Recommend
5 
 Thumb up
 Hide
31 Posts
1 , 2  Next »   | 

Rising Sun» Forums » General

Subject: AI demo (latest downloadable version: March 18) rss

Your Tags: Add tags
Popular Tags: [View All]
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Some of you may remember the digital app and AI demo that I posted a few months ago. With all the new information available, I took some time to implement the Kami Unbound expansion today. First impression: the Kamis change the dynamics of the game a lot, especially at low player counts! I also implemented the Fox clan with its updated ability, which seems to be a bit overpowered. But anyway, you can see how simulated AI games play out by yourselves by downloading the demo here:

https://transfer.sh/11v9vv/sunrise_jan21_3p_demo.jar outdated

Note that all simulations and AI decisions are computed on-the-fly, so this demo requires quite a bit of memory and processing power.

Edit: All expansions, KS extras, and FAQ answers are now implemented. An updated demo is available here:

https://transfer.sh/vW9h6/sunrise_mar18_demo.jar
8 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
birchbeer
United States
Colorado
flag msg tools
badge
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
So is this a precursor to what will~eventually~be an app for Apple and Android?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Oden Dee
Australia
flag msg tools
mb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
Cool will be fascinating to see the Kami in action.

Looking forward to seeing the 2 new season sets when someone finally gives pics.

Edit: Just ran it 40 times and didn't once get the Fox clan.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
Warlock00 wrote:

Edit: Just ran it 40 times and didn't once get the Fox clan.


Sorry, my bad. I forgot to set an option in the app. I fixed and reuploaded the demo (see updated link in original post).

bamonson wrote:
So is this a precursor to what will~eventually~be an app for Apple and Android?


Maybe, I haven't done any iOS/Android programming, but that would certainly be cool.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Oden Dee
Australia
flag msg tools
mb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
Nice.

Wow the Fox clan ends with big points often.

His ability thrives in a 3 player game.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Thilo M.
Germany
Wiesbaden
flag msg tools
badge
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
I am really impressed. CMON should hire you to help balance their games. Maybe this will be done in the future!
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Casey Smith
Switzerland
Portland
Oregon
flag msg tools
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
It wont start on my computer, what program do I use? I have windows 7.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
PK Levine
United States
Rossville
GA
flag msg tools
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
I'm not sure what I'm looking at here... it loads, but now what?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
GrandKhan44 wrote:
I am really impressed. CMON should hire you to help balance their games. Maybe this will be done in the future!


Haha, thanks! blush

SwissQueso wrote:
It wont start on my computer, what program do I use? I have windows 7.


The only dependency you need is a recent Java Runtime Environment (1.8 or higher).

pkitty wrote:
I'm not sure what I'm looking at here... it loads, but now what?


Do you see the game board, components, etc.? If you can see that, good. Things might proceed very slowly, depending on your CPU/memory.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Charlie Ringer
United Kingdom
flag msg tools
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
What AI techniques are you using?
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
Charlesworth wrote:
What AI techniques are you using?


The demo uses Monte Carlo tree search with a couple of game-specific heuristics. I also trained some statistical models based on reinforcement learning, but they are not used in the current implementation.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Charlie Ringer
United Kingdom
flag msg tools
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
I guessed it was MCTS by how much my PC struggled when I ran it. I am a big fan of MCTS for board game AI although there is certainly performance issues with it, hence the hueristics right?

What sort of heuristics are you using? Also, how did you handle the alliance making? It seems tough to model with MCTS as it is not turn based, it is 'real time'.

All in all cool app, keep it up
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
Charlesworth wrote:
I guessed it was MCTS by how much my PC struggled when I ran it. I am a big fan of MCTS for board game AI although there is certainly performance issues with it, hence the hueristics right?


Yes, the demo as linked above uses ~800 playouts for each decision. That's still a fairly low number considering the number of possibilities at each time step, but the built-up search tree gets deep enough to make fairly good decisions.


Charlesworth wrote:
What sort of heuristics are you using?


I constrained the action space to exclude some non-sensical decisions (e.g. bidding coins on ronin when no player has any ronin) and I removed some unlikely decisions from the MCTS rollouts (e.g. "passing" twice when playing Betrayal).


Charlesworth wrote:
Also, how did you handle the alliance making? It seems tough to model with MCTS as it is not turn based, it is 'real time'.


The alliance making (in contrast to bidding) actually is turn-based: in clock-wise order, each player can make a proposal and the recipient of the proposal can accept, reject, or make a modified proposal (and so on and so forth).

Charlesworth wrote:
All in all cool app, keep it up


Thanks a lot!
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
In case someone was wondering how things were going. I implemented all expansions, KS extras, and FAQ answers, worked on the solitaire mode, and have now invited some people to test the current version. I am hoping to give more updates soon.

Teaser pictures of the solitaire app in action:


4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
M. K.
Germany
flag msg tools
Re: Updated AI demo (including Fox clan and Kami Unbound!)
I am so hyped about your AI
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jonahdel
Canada
Burnaby
British Columbia
flag msg tools
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
Any news Kami-sama? XD
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
Xairen wrote:
Any news Kami-sama? XD


I successfully recovered from the flu. Hopefully, the next news will be about the app again.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Re: Updated AI demo (including Fox clan and Kami Unbound!)
I received comments from testers and spent the weekend fixing some bugs. One bug had a rather strong impact as it caused the AI to underestimate the benefits of Marshal and Recruit. It is great that this bug has been fixed. The AI now selects those mandates more often and also plays much better overall.

The error should have occurred to me months ago: Some BGG users commented at the time that the AI very often plays Betray. I didn't give it much thought. But as it turned out now, this was at least partly a result of the bug.

At the moment I am still waiting for more feedback from testers. However, I am planning to upload a solitaire variant of the app within the next few weeks. For the meantime, here is an updated version of the AI demo, including expansions and KS exclusives:

https://transfer.sh/vW9h6/sunrise_mar18_demo.jar
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Mark Nash
United Kingdom
flag msg tools
I'm getting the following when trying to run:

java.util.concurrent.ExecutionException: java.lang.StackOverflowError

java.lang.StackOverflowError

Amongst other text

The graphic pops up on the screen and then disappears.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Nasher1976 wrote:
I'm getting the following when trying to run:

java.util.concurrent.ExecutionException: java.lang.StackOverflowError

java.lang.StackOverflowError

Amongst other text

The graphic pops up on the screen and then disappears.


Thanks for the report! Can you provide a bit more detail on the error? Does it come up right away when you try to start the app or only a couple of moves in? Did the error come up only once or does it come up every time you try to run the app?

If nothing works, can you give some details on your computer? E.g. CPU, memory, installed Java version? I will have more time to look into the problem tomorrow. In the meantime, you can try to to manually increase your Java stack size (start the app on the commandline via "java -Xss1M -jar sunrise_mar18_demo.jar") or try this lower-memory version instead:

https://transfer.sh/mzjiD/sunrise_mar18_demo.jar

 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Mark Nash
United Kingdom
flag msg tools
The graphic screen pops up for a second and then disappears, it happens every time.

I've tried the low memory version and get the same result.

My CPU is i7 2.8GHz
RAM is 12GB
Hard drive is SSD RAID 0
Java version is 8 update 161 (build 1.8.0_161-b12)

Below is a link to the whole text that is displayed in the cmd prompt:
https://www.dropbox.com/s/5somq50h3pzwm49/RisingSunJava.txt?...
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Nasher1976 wrote:
The graphic screen pops up for a second and then disappears, it happens every time.

I've tried the low memory version and get the same result.

My CPU is i7 2.8GHz
RAM is 12GB
Hard drive is SSD RAID 0
Java version is 8 update 161 (build 1.8.0_161-b12)

Below is a link to the whole text that is displayed in the cmd prompt:
https://www.dropbox.com/s/5somq50h3pzwm49/RisingSunJava.txt?...


I was able to reproduce your error by setting the Java stack size to a small value. So it seems like your default value is just smaller than it should be (maybe because you are running a 32-bit version of Java? I don't know.) As a solution to the problem, I rewrote the code such that threads are created with a manually specified stack size. You can download an updated version of the app here:

https://transfer.sh/MWUrj/sunrise_mar19_demo.jar

Sorry about the trouble. I hope it works now!
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Mark Nash
United Kingdom
flag msg tools
Many thanks, it now loads up, however I can't click on anything to make it work?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael R

Heidelberg
msg tools
badge
Avatar
mbmbmbmbmb
Nasher1976 wrote:
Many thanks, it now loads up, however I can't click on anything to make it work?


Edit: As mentioned above, I am planning on releasing a solitaire variant (i.e., only 3 out of 4 players controlled by the AI) of the app soon.

For the moment, the app is just a demonstration of the AI. Admittedly, it can be quite slow but you should be able to sit back and watch it do stuff. (However, let me know if nothing happens at all!)


 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Mark Nash
United Kingdom
flag msg tools
Nothing happens.

C:\WINDOWS\system32>java -jar C:\Temp\sunrise_mar19_demo.jar
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.addWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)
at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at sunrise.MCTreePlayer.buildSearchTree(MCTreePlayer.java:191)
at sunrise.MCTreePlayer.choose(MCTreePlayer.java:72)
at sunrise.Communicator.next(Communicator.java:2159)
at sunrise.Communicator.teaCeremony(Communicator.java:362)
at sunrise.Communicator.startSeason(Communicator.java:386)
at sunrise.Communicator.startSeason(Communicator.java:336)
at sunrise.SunriseMain.start(SunriseMain.java:424)
at sunrise.SunriseMain.main(SunriseMain.java:94)
... 5 more

C:\WINDOWS\system32>
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
1 , 2  Next »   | 
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.