maxbennedich / onitama

AI for the board game Onitama, using a negamax search with alpha-beta pruning and automated tuning
8 stars 0 forks source link

Cannot install the program #1

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi Max,

I am very curious to test your program! I am one of the highly rated players in the Onitama app, so I am really eager to try and learn from the AI you built.

However, when I try to run the gradlew batch file, I run into the following error: image

Not sure if it is a bug in your code or a problem on my side, but I thought I should let you know. Any clue how to fix this?

Kind regards, Hugo

PS: Great README section, a lot of very interesting information!

maxbennedich commented 4 years ago

Hi Hugo, glad to hear from you!

That error seems to indicate that you are running with Java version 8? (Version 52.0 corresponds to Java 8.) Unfortunately, there were some issues with JavaFX which forced me to require Java 11. Could you try installing Java 11 and then re-run and see what happens?

Happy to debug this issue further until you can get it started!

ghost commented 4 years ago

Hi Max,

thanks for your prompt reply! Which Java do you mean? I have the runtime v8 and now I installed the dk11, but I still get the same error. Can you guide me further on what I need to install/uninstall?

Thank you in advance! Hugo

ghost commented 4 years ago

Hi Max,

I finally got it right, I realized I had to create this JAVA_home environmental variable and then the install went right! I will test your program now and let you know how it goes, I'm very excited about it!

Cheers, Hugo

maxbennedich commented 4 years ago

Hey Hugo! Glad to hear that you got it started! How did the testing work out? Any other feedback or issues?

ghost commented 4 years ago

Hi Max,

I tested quite a lot over the weekend, played over 100 matches with it. Your AI is incredibly strong, definitely super human. I could only beat it in one class of game (all forward cards except one diagonal card - the player who starts with the diagonal wins). All the other games the AI dominated me easily, after ~10 moves it is always in a better position.

Your AI taught me a lot I didn't know about the game, strategy wise - good players in the app have the tendency to hold on to the best card (normally, the card that attacks from a unique direction), but the AI rarely does it (except when there is a major difference between the best card and the rest). The AI on the other hand pushes very aggressively towards having a defended pawn in the middle square of the board, a lot more than I've ever seen any human player do - and when it gets to this position, it is usually clearly favored - I am trying to learn how to achieve this now. Also the way your AI defends against Tiger games is very interesting, and there is definitely a lot to learn there. Your AI is also extremely good at calculating - this is something that is very hard for humans in Onitama (I find it harder than in Chess for instance), because of the dynamic nature of the moveset: for example, I often miss mate in 3, but the AI can easily see a mate in 12.

In terms of feedback: your AI is an amazing training tool, it shows a completely different way to look at the game and I already feel I learnt a lot from it (and I already noticed the improvement in a couple of games I played against real players). As such, my feedback is mostly geared towards improving this: 1) an undo button would be excellent, it really helps in analyzing different possible moves and their consequences. 2) a more flexible way of manipulating the board (setting a position, forcing a move, etc). I saw you have a prompt to define the initial board state, but I couldn't figure out how to work with it. In my opinion, the ideal would be to have a "switch" to enable or disable the AI, and a "switch" to manipulate the board (place and move the pieces/cards as desired and force moves) in the board window (not in the startup menu).

Does this help you? Please let me know if you have any questions or ideas you want me to test! Thank you so much and congrats for creating this AI, it's a great program! Kind regards, Hugo

maxbennedich commented 4 years ago

Thanks for the feedback, it's really helpful and interesting to hear. You're right, the initial board state prompt is not user friendly at all. I will see what I can do about that. Also, an undo button should be fairly straightforward to add, that's a great idea!

If you're open to it, could I reach out to you for any further feedback or testing? It's really useful to have someone who actually plays and knows the game well to help out. Thanks!

ghost commented 4 years ago

Hi Max,

definitely, don't hesitate to ask for any feedback or testing! My girlfriend is also studying UX design, so if you want some feedback and ideas from her on the UX/UI side I can ask her for help.

An alternative to an undo button would be to use the game notation display you already have on the top right to return to a specific board state (maybe right-clicking a certain move could give the option to return to the state before it?)

Why did you decide to build this program, do you also play?

Cheers, Hugo

ghost commented 4 years ago

Another small piece of feedback: in the game notation window, I would add the initial cards from each player before the moves, without that information it is very hard to fully reconstruct the game - I generated a few AI vs AI games to study them, and I had to add that info by hand.

maxbennedich commented 4 years ago

Thanks, those are great ideas! I don't have a ton of spare time at the moment, but will try to get those incorporated.

As for why I built it: A co-worker brought the game to work, and I thought it was fun, but I couldn't see past a move or two, so I thought it'd be a great job for an AI, and a good opportunity to learn how to create a board game AI. I also wanted to see if the game was "solvable", i.e. if there was a guaranteed winning strategy for all or a subset of starting cards, but I was only able to find a handful of such combinations (for the original deck, these were all with the Tiger card if I remember correctly).

ghost commented 4 years ago

Hi Max,

I understand, but I'm happy you liked my suggestions. Please let me know if you need any further testing or feedback!

Yeah indeed for humans this is a very tough game to predict ahead, and that's what I like the most about it - despite being much smaller or simpler than chess, in a way it feels more difficult! Yeah some variants of the game are solvable, a few Tiger games and games when there are only forward moving cards and one diagonal/special card, that family is also 100% solvable (and it's the only game where I could beat the AI). Apart from that I have never discovered anything close to solvable - but again, there is no body of knowledge on this game as far as I know, so a lot of things remain to be discovered.

Cheers, Hugo