Page 1 of 1

r22665 - ai vs ai games can be run from command line

PostPosted: 22 Jul 2013, 21:07
by Max mtg
usage: forge.exe sim <deck1> <deck2> [N]

sim - game mode
deck1/2 - either names of constructed decks created in game or paths to deck files.
N - number of games, defaults to one.

Note:
  • filenames must end with dot and three-symbol extension (works fine for most .dck, .txt files)
  • deck names are case-sensitive, have to be quoted if contain multiple words. (ex: "Tempered Steel")


Feedback? Opinions?

Re: r22665 - ai vs ai games can be run from command line

PostPosted: 24 Jul 2013, 08:22
by Max mtg
Added number of games parameter.

Re: r22665 - ai vs ai games can be run from command line

PostPosted: 25 Jul 2013, 08:13
by Max mtg
Works fine with eclipse console, but the compiled forge.exe does not produce any output to the console, where I launched it.
Will have to test if the output should be explicitly redirected to an outfile (like:
Code: Select all
forge.exe [paramters] > outfile.txt
) so that user would have to open that file to read the results.

If this doesn't work, we'll have to delay announcement of this feature till next beta.

Re: r22665 - ai vs ai games can be run from command line

PostPosted: 25 Jul 2013, 21:31
by Max mtg
does not work outside of eclipse =((

Re: r22665 - ai vs ai games can be run from command line

PostPosted: 26 Jul 2013, 06:05
by Max mtg
Ok, latest news.
Since Forge in a GUI application (and console command prompt does not wait for it to finish) I cannot get the output in the same window.

However, since all output is dumped to forge.log, It's that file where one can find the simulation results.

So, it's not a very convinient way to use the feature, but may be fair for a few enthusiasts.
This has to be improved, of course. Still don't know which way would be the best one.

It looks like a best one to split actual forge project into a gui shell and a different jar with libraries to create a console application using the same libs.

Re: r22665 - ai vs ai games can be run from command line

PostPosted: 26 Jul 2013, 12:26
by timmermac
Why not set it up so that you can actually see the match being played out on the screen? That would be more fun, IMO.

Re: r22665 - ai vs ai games can be run from command line

PostPosted: 26 Jul 2013, 12:29
by friarsol
timmermac wrote:Why not set it up so that you can actually see the match being played out on the screen? That would be more fun, IMO.
You can do that already and have been able to for a few releases. Someone requested a feature to be able to simulate lots of matches in a row (via a script) without needing to sit there and watch the UI update, which is slow.