Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.59 KB

README.md

File metadata and controls

36 lines (25 loc) · 1.59 KB

What is this, in short?

This telegram bot

What is it for?

It solves sudoku puzzles like crazy

How is it different from other bots?

Most of other bots use some kind of brute force algorithm. They fail on some especially hard sudokus, like this one

This bot, however, translates sudoku to SAT problem, and then uses efficient SAT solving algorithm to solve it.

What technology does it use?

It runs on Amazon Cloud.

More specifically, it is two serverless AWS Lambda functions. One (sudoku) is an api for solving sudokus, another (tgbot) is just an adapter for telegram bot to use this api.

How do i deploy it to my Amazon Cloud?

  1. Install sam cli interface
  2. Don't forget to set up iam credentials
  3. Go to repo folder, run sam build --use-container, then sam deploy --guided
  4. For telegram bot microservice, set up environmental variables in aws web interface: BOT_TOKEN is a token of your bot, SUDOKU_API_URL is the url of sudoku web app (probably something like https://{id}.execute-api.{location}.amazonaws.com/Prod/solve)
  5. Set your telegram bot webhook to you tgbot url (probably something like https://{id}.execute-api.{location}.amazonaws.com/Prod/bot)