Recommend
13 
 Thumb up
 Hide
7 Posts

Santorini» Forums » General

Subject: AlphaGo -- but for Santorini rss

Your Tags: Add tags
Popular Tags: [View All]
Jake Carlson
United Kingdom
flag msg tools
Thought other coders and Santorini fans might enjoy this!

I built a version of DeepMind's AlphaGo Zero, but that plays Santorini. My code is open-sourced here: https://github.com/lagerros/Alpha-Santorini
It does train, but fairly slowly.

Would appreciate any feedback as this project was mostly an attempt to learn more about deep reinforcement learning, and I'm still an amateur (my background is in neuroscience).

Also, if anyone else has done similar projects, I'd love to hear!
17 
 Thumb up
5.00
 tip
 Hide
  • [+] Dice rolls
Russ Williams
Poland
Wrocław
Dolny Śląsk
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Cool.

FWIW Stephen Tavener's generic abstract-game-playing program AiAi (based on Monte Carlo Tree Search) includes a Santorini player (which I've not tried). Might be fun or useful to compare:

http://mrraow.com/index.php/aiai-home/
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jake Carlson
United Kingdom
flag msg tools
That's cool! I'll check it out!
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael Van Biesbrouck
Canada
St Catharines
Ontario
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
As the person who does the rules implementation for Ai Ai Santorini (and develops new stuff for Santorini), I've thought about AlphaGo and Santorini. In principal you could make the challenger selecting powers and so forth the opening moves of the game (they are!), but since the rules diverge at that point I think that the learning of the game would be degraded unless the selection of powers was limited. Evolving game play for pairs of powers would probably have superior results. Splicing together the results for many pairs of powers should result it something that plays all pairs well. (There are efficient techniques for learning which AIs to use.)

Since you plan to play many games of Santorini (without powers), you will get much better results using a more efficient programming language (10x speedup shouldn't be a problem), although a Python compiler might provide some of that benefit. You should also think about the efficiency of the ways that you are generating moves. For example, changing coordinate representations is inefficient; always refer to spaces by number and precompute the neighbours of each space. Using objects for spaces is also a performance problem. It is quite cool that you've done this, but improved performance will help you get good results.
4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jake Carlson
United Kingdom
flag msg tools
Thanks, that feedback is really useful.

Yeah powers would be tricky -- in some sense it makes the state space 50x as large (in case you wanted to feed the conv net an encoding of the current gods in use). But in other sense it only increases the breadth of the search space by 1. I don't know which of those rivalling intuitions to trust. It seems plausible you might have ~10 gods and train well without additional modification, but that your suggestions (e.g. pairing powers) would be needed to train on all ~50 gods.

I'm not sure whether performance gains from changing the language would be that important. Currently ~80% of processing time during self-play is dedicated to evaluation using the networks, and DeepMind also uses tensorflow and Python, suggesting optimizing cloud GPU usage would be comparatively more important. Nonetheless, I'll implement your suggestions for move generation when I get the time, thanks!
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Spencer C
Canada
GTA
Ontario
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
I wonder how crucial the particular combination of powers is. If the important thing is only to learn to play toward a god's goals/abilities or to defend against a particular god's goals/abilities, maybe you could train offense & defense models for each god, but not bother learning every single god pair. It would still be a lot of training, but only 2N instead of N(N-1). The models could then be combined as an ensemble.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael Van Biesbrouck
Canada
St Catharines
Ontario
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Spencer, that was what I was trying to suggest. Most powers are inherently separable. I think that Clio openings are an exception, and there might be some general classes of specialization, such as playing Chronus or Dionysus against low-doming powers or powers with multiple builds.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.