Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1]

Author Topic: Simulator API  (Read 4163 times)

0 Members and 1 Guest are viewing this topic.

Schneau

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1174
  • Shuffle iT Username: Schneau
  • Respect: +1461
    • View Profile
    • Rainwave
Simulator API
« on: April 23, 2012, 01:31:24 pm »
+2

I do research in evolutionary computation, and am interested in evolving Dominion bots. I was wondering if either of the simulators have an API that I could use. In particular, I would want to be able to send the simulator two bots and the number of games to play, and get back basic statistics such as winning percentages, average number of turns, etc.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Simulator API
« Reply #1 on: April 23, 2012, 01:42:56 pm »
0

Don't think so, but it shouldn't be too difficult to hook into Dominiate at https://github.com/rspeer/dominiate/blob/master/play.coffee to let it take some parameters.  I think about doing it from time to time, but didn't need it until now...
Logged

ftl

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2056
  • Shuffle iT Username: ftl
  • Respect: +1345
    • View Profile
Re: Simulator API
« Reply #2 on: April 23, 2012, 03:40:09 pm »
0

Geronimoo's simulator is open-sourced at the moment; if you know Java, you could just use the code, I think?
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: Simulator API
« Reply #3 on: April 23, 2012, 06:19:40 pm »
0

Both simulators are open source, so that is a good place to start.

Geronimoo's simulator github page: https://github.com/Geronimoo/Geronimoo-s-Dominion-Simulator
Dominate's github page: https://github.com/rspeer/dominiate
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: Simulator API
« Reply #4 on: April 23, 2012, 07:05:47 pm »
+2

Logged

Schneau

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1174
  • Shuffle iT Username: Schneau
  • Respect: +1461
    • View Profile
    • Rainwave
Re: Simulator API
« Reply #5 on: April 23, 2012, 08:28:15 pm »
0

Sweet, thanks for the help all around. I'll have to contact the guy who wrote the AI in DG's link, it sounds like he does research similar to mine.
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: Simulator API
« Reply #6 on: April 26, 2012, 04:35:28 pm »
0

I've looked in this direction as well. Some thoughts:

Geronimoo's simulator is ridiculously fast.  Currently the code is fairly tightly coupled to the UI and card play rules, but I don't think it'd be too difficult to extract a jar that you could send XML files to and have it play the games with bots specified in those files.

Dominiate is much slower.  Since bots are CoffeeScript programs, I think it'd be much easier to implement EC algorithms using the simulator, but it will spend a longer time crunching numbers.

Neither is all that great when it comes to tricky cards like Menagerie and Possession.  For that reason, and for EC in general, it will be much easier to pick a well-defined problem.  Something along the lines of optimizing Big Money + X, what sequence to buy victory cards vs money, etc.

For two similar bots, the margin of victory for one over the other can be pretty low.  You may need thousands of games to be sure you're looking at signal and not noise in the win/loss percentages.

I've personally looked into implementing a pure Dominion API for this type of thing (also for bot competitions), but I'd want it to be something that both Dominiate and Geronimoo's simulator could use, and Geronimoo's is just too damn fast to replace.
Logged

Schneau

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1174
  • Shuffle iT Username: Schneau
  • Respect: +1461
    • View Profile
    • Rainwave
Re: Simulator API
« Reply #7 on: April 26, 2012, 04:45:01 pm »
0

Neither is all that great when it comes to tricky cards like Menagerie and Possession.  For that reason, and for EC in general, it will be much easier to pick a well-defined problem.  Something along the lines of optimizing Big Money + X, what sequence to buy victory cards vs money, etc.
This is the kind of thing I was planning on starting with.

And thanks for your other comments. I'm thinking of using Geronimoo's simulator both because it's fast and I'm much more familiar with Java than Javascript or Coffeescript.
Logged
Pages: [1]
 

Page created in 0.073 seconds with 20 queries.