Author |
Topic: Sample Java Bot (Read 1579 times) |
|
omar
Forum Guru
Arimaa player #2
Gender:
Posts: 1003
|
|
Sample Java Bot
« on: Mar 10th, 2006, 7:32pm » |
Quote 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:
Posts: 405
|
|
Re: Sample Java Bot
« Reply #1 on: Mar 10th, 2006, 8:43pm » |
Quote 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:
Posts: 30
|
|
Re: Sample Java Bot
« Reply #2 on: Jan 27th, 2010, 12:00am » |
Quote 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:
Posts: 682
|
|
Re: Sample Java Bot
« Reply #3 on: Jan 27th, 2010, 7:02am » |
Quote 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:
Posts: 30
|
|
Re: Sample Java Bot
« Reply #4 on: Jan 27th, 2010, 9:11pm » |
Quote 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:
Posts: 30
|
|
Re: Sample Java Bot
« Reply #5 on: Jan 30th, 2010, 8:39pm » |
Quote Modify
|
The exception I am always getting Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at arimaa3.ArimaaMove.<init>(ArimaaMove.java: 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:
Posts: 1003
|
|
Re: Sample Java Bot
« Reply #6 on: Feb 1st, 2010, 7:45am » |
Quote 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:
Posts: 30
|
|
Re: Sample Java Bot
« Reply #7 on: Feb 2nd, 2010, 11:51pm » |
Quote 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:
Posts: 682
|
|
Re: Sample Java Bot
« Reply #8 on: Feb 3rd, 2010, 6:47am » |
Quote 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 |
|
|
|
|