Author |
Topic: Quick Bot interface kit question (Read 1106 times) |
|
heroicjanitor
Forum Full Member
Arimaa player #6109
Gender:
Posts: 14
|
|
Quick Bot interface kit question
« on: May 3rd, 2011, 5:55am » |
Quote Modify
|
How exactly do I get this to work with a java class? I have a class which works when I run it and give it the position file as an argument, it selects a move and prints to standard output. I have edited the bot.cfg file to point at it but it doesn't seem to find it and I don't know why. I've seen the sample java bot which uses it but can't seem to get that to work either, and it doesn't use the kit in the same way I want to either so I can't figure out much about it. Basically from other topics here and fro mthe kit itself it seems like it should be easy to get it to work with my class, so I must be missing something.
|
|
IP Logged |
|
|
|
jdb
Forum Guru
Arimaa player #214
Gender:
Posts: 682
|
|
Re: Quick Bot interface kit question
« Reply #1 on: May 3rd, 2011, 11:09am » |
Quote Modify
|
Are you using the Arimaa Engine Interface kit (AEI) ? I could be mistaken, but based on your description, it sounds like you are using the old interface.
|
|
IP Logged |
|
|
|
heroicjanitor
Forum Full Member
Arimaa player #6109
Gender:
Posts: 14
|
|
Re: Quick Bot interface kit question
« Reply #2 on: May 3rd, 2011, 12:29pm » |
Quote Modify
|
You're right I am, I thought it was supposed to be easier to set up. It works with its own getMove, written in perl, but it won't work with my Java class.
|
|
IP Logged |
|
|
|
jdb
Forum Guru
Arimaa player #214
Gender:
Posts: 682
|
|
Re: Quick Bot interface kit question
« Reply #3 on: May 3rd, 2011, 1:00pm » |
Quote Modify
|
I looked through some old code. In order to get clueless to work with the old interface kit, in the bot.cfg file, $C{getMove} = "perl ./getMove"; was changed to $C{getMove} = "java -Xmx2G -classpath test.jar arimaa3.ArimaaMain"; The mainline for using the old interface code from ArimaaMain: Quote: public static void main(String args[]) { // Used for testing purposes // String file_name = "c:/arimaa/bot/running/gamestate2860"; // execute(file_name); // This is for arimaa online server if (args.length == 3) { execute(args[2]); } // This is for offline match player if (args.length == 5) { int search_time = Integer.parseInt(args[1]); fixed_match(args[2], search_time); } } |
| The gamestate file is in args[2]. Hope this helps.
|
|
IP Logged |
|
|
|
heroicjanitor
Forum Full Member
Arimaa player #6109
Gender:
Posts: 14
|
|
Re: Quick Bot interface kit question
« Reply #4 on: May 3rd, 2011, 6:20pm » |
Quote Modify
|
It works now! Thanks a lot for your help
|
|
IP Logged |
|
|
|
|