-
Notifications
You must be signed in to change notification settings - Fork 151
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
Base work for AI #319
Comments
Couple of points:
To be clear, I think what you're proposing makes a lot of sense, but we should compartmentalize projects as a general engineering practice, even if it's slightly more work up front. I'm working on #318 to make fireplace more easily installable as a library, so this should be even more simple soon. |
As an aside, there are features that need to be added to fireplace to make a real AI work:
I'm slowly working on all these features, so if you'd like to help, let me know and I'll set up separate issues for them. |
I feel pretty dumb for missing the uct.py file. I think I decided it was a util file. I'll give it a closer look before suggesting more features. The IRC told me someone had worked on it, but I assumed they meant offline. I'd be happy to work on the features you talked about. Would certainly want that all to be in place before I took a run at a standalone AI project |
Some things we can set up to make real work on AI faster and easier. This is really not a proposal for a small amount of work, but an attempt to point out and hopefully discuss the hard things about building an AI around fireplace.
Get player's visible board state: Utility function to get all of the information available to the current player, intended to be passed to a score function. Would include minions/weapons on the board currently, cards in hand, number of cards in opponent's hand, cards in the player's deck, and number of cards in the opponent's deck. (There's definitely more information available, but this should be plenty to work with for a while)
Hypothetical Move: To work on sequencing within a turn, we'll need to be able to construct trees. So, for each command a user can input, add the option to in stead hypothetically play that move and return a copy of the game object where that move took place... without revealing any information the user can't have. Which of course means that this is actually a very complicated step and includes things like hypothetical random minions. So, fake it for now, and promise to only run the AI on cards that don't randomly pull cards from places you're not allowed to see.
Dummy AI and score functions: Define an AI base class as a thing that is constructed on a score function, takes in a game, and plays moves on it until the end of its turn, possibly writing down state internally as well. Define a score function that takes in a game and returns rand(0,1). Test this with an analog of full_game that takes way longer because the AI is calling hypothetical move a ton of times.
The text was updated successfully, but these errors were encountered: