Bot to play LumberJack
LumberJack is an online game played via telegram bot(for more details see https://telegram.games/telegram-games/lumberjack/)
This bot plays the game by analysing the screenshots.
- Open the Lumberjack Game and take a screenshot.
- Find the Region of Interest and get the coordinates of upper left point and bottom right point.
- Update the values in the game variable "gameDimension"
- Using "img.show()" see the image captured and get the coordinates of head position on the left and right side of the tree
- Update the values in the game variables "leftPoint" and "rightPoint"
- Run the python script(make sure that all the imported libraries are available)
- Open the lumberjack game and click play
- Keep pressing the ↑ key to play
- Press ↓ to terminate the bot
After cutting the tree, how long should the bot wait
Experimentally found to be around 0.15 second with a max score of 246 Note: This value may differ based on factors like framerate, CPU load, etc.
Figuring out the amount of decay is challenging Difficult to find manually
Assumption: when the tree is cut, the height of the lowest branch is reduced
Problem: there is a whole animation of tree height reducing