Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

play from given board state #1

Open
OneFluffyBunny opened this issue Mar 12, 2024 · 2 comments
Open

play from given board state #1

OneFluffyBunny opened this issue Mar 12, 2024 · 2 comments

Comments

@OneFluffyBunny
Copy link

Hey, mate! Came across your work on a MCTS implementation for quoridor and thought it was very impressive. I'm trying to become a quoridor expert this year and I think an AI tool could be very helpful in aiding my studies. Is there any easy way to have the AI play from a given game state instead of the beginning of the game? Use case is to find the optimal way to play endgames (where the search space is a lot smaller). My idea was to feed a particular game state to the AI (probably not in browser) and let it compute from there, but I'm not sure how to achieve that. Any advice is appreciated.

@gorisanson
Copy link
Owner

gorisanson commented Mar 17, 2024

@OneFluffyBunny
Hi! I'm sorry for my late response. Thank you for playing my MCTS implementation for Quoridor. I want to answer your question in two aspects.


Is there any easy way to have the AI play from a given game state instead of the beginning of the game?

No. There's no easy way for now. This is a part which I regret about the structure of this project. In this project, the UI(user interface) components and MCTS implementation are not loosely coupled enough. I wish I had implemented MCTS and UI components to use text (string) as the measure to represent and communicate the game board state. If it was the case, you could use texts (strings) "to feed a particular game state to the AI".

You need to modify/revise some code (https://github.com/gorisanson/quoridor-ai/tree/main/src/js) to achieve what you want.


Use case is to find the optimal way to play endgames (where the search space is a lot smaller)

I think MCTS would be not good for the purpose you stated above. MCTS generates probabilistic result which can be not optimal. I think minimax would be better for your purpose since it would always find the optimal way to play endgames if the depth for minimax is sufficient.

The following implementations use minimax:

Daniel Borowski's Quoridor AI

Martijn van Steenbergen's SmartBrain 4

@OneFluffyBunny
Copy link
Author

Thanks, appreciate the reply. Will have a go at seeing how hard is it to change the code to input a board state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants