Welcome, Guest. Please Login or Register.
Nov 28th, 2024, 10:38pm

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Quick Bot interface kit question »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   Quick Bot interface kit question
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Quick Bot interface kit question  (Read 1106 times)
heroicjanitor
Forum Full Member
***



Arimaa player #6109

   


Gender: male
Posts: 14
Quick Bot interface kit question
« on: May 3rd, 2011, 5:55am »
Quote Quote Modify 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: male
Posts: 682
Re: Quick Bot interface kit question
« Reply #1 on: May 3rd, 2011, 11:09am »
Quote Quote Modify 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: male
Posts: 14
Re: Quick Bot interface kit question
« Reply #2 on: May 3rd, 2011, 12:29pm »
Quote Quote Modify 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: male
Posts: 682
Re: Quick Bot interface kit question
« Reply #3 on: May 3rd, 2011, 1:00pm »
Quote Quote Modify 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: male
Posts: 14
Re: Quick Bot interface kit question
« Reply #4 on: May 3rd, 2011, 6:20pm »
Quote Quote Modify Modify

It works now! Cheesy Thanks a lot for your help  Smiley
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.