6 ms·
So the source code of the bot is here: https://github.com/Kharacternyk/paper-tactics/blob/master/paper_tactics/entities/game_bot.py https://github.com/Kharacter
by Jorge1o1 3y ago
So the source code of the bot is here:
https://github.com/Kharacternyk/paper-tactics/blob/master/paper_tactics/entities/game_bot.py https://github.com/Kharacternyk/paper-tactics/blob/master/pa...
It seems like there's an evaluation function but there's no state search / recursive minimax tree for the bot.
I think if we added a 10-ply lookahead minimax algo for the bot here it would be pretty good. [1]
I will probably do it myself if I end up having a bit of free time this weekend.
[1] https://en.wikipedia.org/wiki/Minimax#Minimax_algorithm_with_alternate_moves https://en.wikipedia.org/wiki/Minimax#Minimax_algorithm_with...
- radarsat1 3y agoI was wondering about the architecture because I want to be able to make little games like this, so I'm super happy to see the source here, thanks for posting it! And looks like you put a lot of thought into the architecture too, going to study it.
- quickthrower2 3y agoGood old Alpha Beta pruning. I have a real mental block whenever I try to code that algorithm!
- tmountain 3y agoMonte Carlo tree search is another “easy” way to build a decent AI for a game. I love it because you simply define the rules of the game in a purely functional way, and it does the rest. https://en.m.wikipedia.org/wiki/Monte_Carlo_tree_search https://en.m.wikipedia.org/wiki/Monte_Carlo_tree_search