r22665 - ai vs ai games can be run from command line
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
7 posts
• Page 1 of 1
r22665 - ai vs ai games can be run from command line
by Max mtg » 22 Jul 2013, 21:07
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:
Feedback? Opinions?
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?
Last edited by Max mtg on 24 Jul 2013, 08:24, edited 2 times in total.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: r22665 - ai vs ai games can be run from command line
by Max mtg » 24 Jul 2013, 08:22
Added number of games parameter.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: r22665 - ai vs ai games can be run from command line
by Max mtg » 25 Jul 2013, 08:13
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:
If this doesn't work, we'll have to delay announcement of this feature till next beta.
Will have to test if the output should be explicitly redirected to an outfile (like:
- Code: Select all
forge.exe [paramters] > outfile.txt
If this doesn't work, we'll have to delay announcement of this feature till next beta.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: r22665 - ai vs ai games can be run from command line
by Max mtg » 25 Jul 2013, 21:31
does not work outside of eclipse =((
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: r22665 - ai vs ai games can be run from command line
by Max mtg » 26 Jul 2013, 06:05
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.
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.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: r22665 - ai vs ai games can be run from command line
by timmermac » 26 Jul 2013, 12:26
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.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
Re: r22665 - ai vs ai games can be run from command line
by friarsol » 26 Jul 2013, 12:29
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.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.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 86 guests