-
Notifications
You must be signed in to change notification settings - Fork 8
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
Improve AI #3
Comments
I want to spend some time trying to come up with an ai based on reinforcement learning. Never worked with Vue or AI before, which is a little of a road block but i want to look more into AI. |
Amazing, that's super cool. We're in the same boat here, I've never worked with reinforcement learning before and had to start from scratch, too. This is going to be a long running investigation - it's likely that this will be incredibly fun, though. When implementing the game, I made sure to keep a clear separation between vue.js (that is everything in For reference, the two very naive implementation for computer players are located in Feel free to dive into the subject head first. If you need any help or you want to share some thoughts, ideas or progress just let me know! |
Oh, and when it comes to the issue of getting data: that's where the This should allow to investigate how well a certain AI is playing and how many games they win or lose. Thinking further, this data might be good input for machine learning efforts. Don't know if that would actually work 😄 |
Yes I already looked into your code and started a little bit with the implementation. Kudos for your code. You should be able to see the progress on the ai branch of the project, which I forked. I also implemented a very basic keyboard interaction. Is there a way to automatically start the next round after a trick is played? I saw the button is listening to a press to send the event. I didn't manage to start the next trick and end the round automatically. Right now I am triggering the events with button presses. Looking at your roadmap this could be a little refined and adapted. The plans for the backend sounds great. I looked into it, but didn't quite got the hang of it. But thats something I don't need right now. |
Yeah, you'll need to do some modifications in order to play without UI interaction. A few things come to mind (this won't be all but it's all I can see while on the go): When setting up the game (in this.players = [
new Player(randomNames[0], isComputer, "bottom", this),
new Player(randomNames[1], isComputer, "left", this),
new Player(randomNames[2], isComputer, "top", this),
new Player(randomNames[3], isComputer, "right", this)
]; This should take care that The only thing pausing the flow and waiting for human interaction is within Can look more into this tomorrow :) |
I started working on an improved AI and I'm currently going for a basic rule based approach, which is obviously very opinionated and might reflect my type of playing style. I believe this is the approach we should be going for, since right now the game is 'unplayable' in singleplayer. I was able to implement a rule that triggers when a fehl is played, which behaves quite decent. Obviously it's not perfect, but it adds so much value to the play, knowing your opponent will trump you when he can with high value cards, trumping others too, to win the trick. Have look at Issue #42 for some more details. |
It's time to let you know about some of the progress I've done over the past few months. At the current time I consider the basic game very playable. Obviously there still are flaws and things not working too well but at this time I do consider the rule based AI as quite mature and ahead of other AI's I've met playing similar games. What is the AI able to do
Needless to say, many of these moves are very opinionated and represent my own, bold, gamestyle, but for starters I believe this AI works out really well. Disregarding the way I coded it, I believe it's very readable and therefore easy to adjust and expandable. Whats missing or can be improvedThis is definately an incomplete list
Where are we headingRight now I don't plan on adding much more complexity. As I already said, I believe this AI is very playable, though having it's flaws. I think this is a big success! Long term thoughtsAlthough I was never really good at keeping up with long term projects, I am really looking forward doing small steps at a time on this one. |
Currently the AI plays random valid cards. This is the most trivial, non-predictable implementation but of course doesn't make sense for anyone seeking real fun and a challenging game.
We could implement different computer player personas that the human player can choose from. Each with a different approach of playing and therefore with a different difficulty.
Some ideas to approach implementation:
The text was updated successfully, but these errors were encountered: