Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Bot Development >> bot_Ananas
(Message started by: Max2 on Aug 16th, 2020, 1:30pm)

Title: bot_Ananas
Post by Max2 on Aug 16th, 2020, 1:30pm
bot_Ananas (german for "pineapple") is the result of a letter recombination from:
Arimaa palying bot, using a neural network

This bot be trained from human games and bot games.

One goal of bot_Ananas will be, to give the Arimaa community a handicap playing bot.

Title: Re: bot_Ananas
Post by Max2 on Aug 16th, 2020, 1:30pm
Handicap games work this way:
bot_Ananas always plays as Gold an will have less pieces than normal.
The player plays always as Silver and will have all pieces.

Befor the game starts, the player chooses which handicap he wants to play.  
e.g. a Rabbit handicap means, the bot will only have 7 Rabbits (1 Rabbit less than normal)

In bot_Ananas's first move (after the setup phase), it will sacrifice the 1, 2 or 3 handicap pieces.
After that, the player starts the game with his regular first move.

bot_Ananas's sacrifice move will always have the same move order, so the player in his setup phase already can respond to the Gold setup perfectly. The next paragraph shows this order.

Title: Re: bot_Ananas
Post by Max2 on Aug 16th, 2020, 1:48pm
This picture shows the steps, bot_Ananas will always play.
On the left you see an example setup and on the right, how this setup looks after the sacrifice move.
https://abload.de/img/handicapmovesouk4b.jpg

Also without the picture, the moves are easy to remember:
From left to right (reading order), the pieces directly behind the traps are sacrified and if there are steps left to use, the pieces from the last row replace the sacrified pieces.

Title: Re: bot_Ananas
Post by Max2 on Aug 16th, 2020, 2:09pm
I want bot_Ananas at least to offer this handicaps:
- (no handicap)
R
RR
RRR
C
CC
D
H
M
E

Which other 2 or 3 pieces handicaps do you want to see?

What do you think, at a 2 min/move tournament:
With which handicap the best bot has no winning chance against the best human?
With which handicap the best bot is about even against the best human?
With which handicap the best human has still no winning chance against the best bot?

Title: Re: bot_Ananas
Post by Max2 on Aug 24th, 2020, 11:36am
bot_Ananas also uses many handcrafted features, e.g.
- guaranteed execution of Win-in-1 (it could be annoying without this feature)
- special reactions to Loss-in-1
- immediate move in winning repetition fights
- prevention of complete board clearing (opponent cannot get rid of all pieces on game ending move)

Title: Re: bot_Ananas
Post by Max2 on Aug 28th, 2020, 7:06pm
Version log from bot_Ananas:

V0.1
25.08.2020 able to play in the gameroom
29.08.2020 all handicap types can be started from random setups

For next version, machine learning will be added.

Title: Re: bot_Ananas
Post by ajzaff on Sep 9th, 2020, 4:55pm
That's a great idea! Did you turn off strict setup in cameroom.cfg to achieve this? I wonder if you ran into any problems? How can I play?

Title: Re: bot_Ananas
Post by Max2 on Sep 12th, 2020, 5:29pm

on 09/09/20 at 16:55:47, ajzaff wrote:
Did you turn off strict setup in cameroom.cfg to achieve this? I wonder if you ran into any problems?


I did not know of the "strict setup" feature and also will not use it in the future.

Ananas plays a normal game as Gold but sacrifies the pieces with its first move. Here is an example of a 1-Rabbit-handicap game it played today:
http://arimaa.com/arimaa/gameroom/opengamewin.cgi?client=1&gameid=636804&role=v&side=w  


on 09/09/20 at 16:55:47, ajzaff wrote:
How can I play?


The game I gave as an example is one of the best games of Ananas at the moment. So playing it is not fun.
When Ananas got stronger, there will be open games in the lobby for humans/bots to join.



Title: Re: bot_Ananas
Post by Max2 on Sep 12th, 2020, 5:40pm
V0.2
12.09.2020
Machine Learning (ML) is added: a position can get an automatic value.
Therefore a neural net was trained with half a million positions, played in the gameromm by humans or bots.

The ML search uses Breadth First Search and checks all positions after ply 1 (P1; 4 steps).
The "good" play at the end of the games (see link one post above) comes from the handcrafted features which add a bit P2/P3.

Current stand of problems:
There might be many bugs. Of course, the Breadth First Search is very slow in open positions with many pieces.

-> Ananas will not be available for playing in the next time, until some of the problems will be solved.


Title: Re: bot_Ananas
Post by Max2 on Oct 22nd, 2020, 2:13pm
V0.2
22.10.2020  Many bugfixes, but they did not improve playing strength of Ananas; so I added Monte Carlo Tree Search and pondering

This game has all new features in action:
http://arimaa.com/arimaa/games/jsShowGame.cgi?gid=638786&s=b

So it was not the search which was bad, but the net. It has no understanding of the game.

So I only have to train a new net. Because I use gameroom games for it, it should be done in a few days.

Soon everybody can play bot_Ananas. First it will be 1-rabbit-handicap games.



Title: Re: bot_Ananas
Post by Max2 on Nov 1st, 2021, 8:09am

on 10/22/20 at 14:13:12, Max2 wrote:
So I only have to train a new net. Because I use gameroom games for it, it should be done in a few days.

Soon everybody can play bot_Ananas. First it will be 1-rabbit-handicap games.


It wasn't that easy as expected. Even after months, there is no improvement. There might be still many bugs or other problems.

I am stopping  the developement of bot_Ananas now. So there will be never a playable version of it.



Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.