Welcome, Guest. Please Login or Register.
Nov 24th, 2024, 9:22am

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Sample Java Bot »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   Sample Java Bot
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Sample Java Bot  (Read 1579 times)
omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Sample Java Bot
« on: Mar 10th, 2006, 7:32pm »
Quote Quote Modify Modify

Jeff Bacher (developer of bot Clueless) has contributed
a sample Arimaa bot written in Java. Developers can
simply enhance the evaluation function to build their
own bot. I've added it to the download page:
 
http://arimaa.com/arimaa/download/
 
Thanks Jeff.
IP Logged
IdahoEv
Forum Guru
*****



Arimaa player #1753

   


Gender: male
Posts: 405
Re: Sample Java Bot
« Reply #1 on: Mar 10th, 2006, 8:43pm »
Quote Quote Modify Modify

Hey, that's pretty cool; I'm developing in Java as well.    
 
I was thinking of releasing my class library that models all the basis elements of Arimaa, but looking at jeff's it may not be necessary; they cover most of the same ground (although in a rather different way; Jeff's code is very "C-like", mine is more like what you'd see in a design patterns textbook.   Which means mine is undoubtedly much slower...).   It might just add confusion to have two incompatible java classlibs floating around.
 
But thanks much for releasing this; I've pretty much only been working on my eval function, figuring I'd code a tree searcher in Java down the road some day (or port to C).  This will help quite a bit.
IP Logged
asfaklive
Forum Senior Member
****



Arimaa player #4922

   


Gender: male
Posts: 30
Re: Sample Java Bot
« Reply #2 on: Jan 27th, 2010, 12:00am »
Quote Quote Modify Modify


I have downloaded his program and found in the main he wrote a comment
 
// Used for testing purposes
//    String file_name = "c:/arimaa/bot/running/gamestate804";
//    execute(file_name);
 
Where can I find such a file so that I can check the program first without any effort?
 
Can anybody provide me with such a file so that I can start a test of the bot?
 
 
Regards.  
 
[Sorry previously I have posted this message in the general discussion with title "About 'Arimaa Sample Java Bot' made by Jeff Bacher"]
IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: Sample Java Bot
« Reply #3 on: Jan 27th, 2010, 7:02am »
Quote Quote Modify Modify

The test you mentioned was for testing the gameroom interface. It is not necessary to know about that to use the engine.
 
To run the engine intself, I suggest starting in ArimaaEngine. It contains a program entry point that allows the engine to run on its own.
IP Logged
asfaklive
Forum Senior Member
****



Arimaa player #4922

   


Gender: male
Posts: 30
Re: Sample Java Bot
« Reply #4 on: Jan 27th, 2010, 9:11pm »
Quote Quote Modify Modify

Hi !  
 
Thanks for the reply. I have tried that. But I am getting java.lang.OutOfMemoryError: Java heap space error. I am using eclipse IDE.  
 
I have tried to run the app with  
 
-Xmx500000000 but it is still showing the same error.
 
Would you please recommend a valid heapsize for this?
or Am I missing anything?
IP Logged
asfaklive
Forum Senior Member
****



Arimaa player #4922

   


Gender: male
Posts: 30
Re: Sample Java Bot
« Reply #5 on: Jan 30th, 2010, 8:39pm »
Quote Quote Modify Modify

The exception I am always getting
 
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
 at arimaa3.ArimaaMove.<init>(ArimaaMove.java:Cool
 at arimaa3.HashTable.<init>(HashTable.java:30)
 at arimaa3.ArimaaEngine.<init>(ArimaaEngine.java:433)
 at arimaa3.ArimaaEngine.main(ArimaaEngine.java:1314)
 
 
May I get any suggestions?
 
Regards.
IP Logged
omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Re: Sample Java Bot
« Reply #6 on: Feb 1st, 2010, 7:45am »
Quote Quote Modify Modify

Jeff can probably give you more details later, but I think you can reduce the heap size until you find something that works.
 
Try something like:
java -Xmx30000000 -classpath test.jar arimaa_bb.ArimaaMain
 
to give 30 MB for the heap.
IP Logged
asfaklive
Forum Senior Member
****



Arimaa player #4922

   


Gender: male
Posts: 30
Re: Sample Java Bot
« Reply #7 on: Feb 2nd, 2010, 11:51pm »
Quote Quote Modify Modify


No, that does not work, too.
 
By the way, now I am trying to understand the sample perl bot.  
 
Regards.
IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: Sample Java Bot
« Reply #8 on: Feb 3rd, 2010, 6:47am »
Quote Quote Modify Modify

on Jan 27th, 2010, 9:11pm, asfaklive wrote:
Hi !  
 
Thanks for the reply. I have tried that. But I am getting java.lang.OutOfMemoryError: Java heap space error. I am using eclipse IDE.  
 
I have tried to run the app with  
 
-Xmx500000000 but it is still showing the same error.
 
Would you please recommend a valid heapsize for this?
or Am I missing anything?

 
500Mb should be plenty for the heap. Maybe eclipse is doing something. Have you tried running it from the command line?
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.