Repository navigation
Bot Strategies for Game Y #37
AdriGarciaS
started this conversation in
General
Replies: 2 comments
|
This would be very interesting for the implementation of different difficulties of the Game of Y and even a custom game mode. |
0 replies
|
Maybe we could start by implementing the heuristic bot and after we confirm everything works we can then work on making higher difficulty levels using the other bot implementations. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey ! I have been looking into different aproaches for improving our bot, and I wanted to share the options i found.
The Main Strategies
The simplest step up from our random bot would be a rule-based or heuristic approach.
This bot evaluates each possible move using a scoring function that considers things like connecting to your existing pieces, blocking the opponent, or controlling the center. It then picks the highest scoring move. This is straightforward to implement and would give us a decent opponent, though it would be quite predictable.
For something more complicated, we could implement a minimax algorithm with alpha-beta pruning.
This simulates future moves, looking ahead several turns to find winning lines while assuming the opponent plays optimally. It would be a more inteligent bot but also more difficult to implement.
The most advanced option is Monte Carlo Tree Search (MCTS) .
Instead of using a scoring function, it plays out many random games from each position and keeps track of which moves lead to wins. It's very powerful but also the most complex to implement.
Creating Difficulty Levels
We have a few options for difficulty levels. We could use the same algorithm with different parameters like search depth for minimax or evaluation complexity for heuristics. Or we could use different algorithms for each difficulty random for easy, heuristic for medium, and minimax or MCTS for hard. We could also do a hybrid approach combining strategies, like a bot that mostly follows rules but sometimes picks randomly.
Questions to Discuss
Which strategy should we tackle first?
How many difficulty levels do we want?
Should they use the same algorithm or different ones?
What response time is acceptable for bot moves in the web interface?
And how should we test and validate our bots?
I have also thinks that this task could be divided among various of us, for example each one could made a diffrente bot for the differente difficulties.
Let me know what you thinks about all of that to organize the work as fast as possible. If you know any other algorith that could be used i would be happy to know it.
All reactions