This telegram bot
It solves sudoku puzzles like crazy
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.
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.
- Install sam cli interface
- Don't forget to set up iam credentials
- Go to repo folder, run
sam build --use-container
, thensam deploy --guided
- 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 likehttps://{id}.execute-api.{location}.amazonaws.com/Prod/solve
) - Set your telegram bot webhook to you tgbot url (probably something like
https://{id}.execute-api.{location}.amazonaws.com/Prod/bot
)