Author |
Topic: Arimaa Engine Interface (AEI) (Read 22129 times) |
|
Janzert
Forum Guru
Arimaa player #247
Gender:
Posts: 1016
|
|
Re: Arimaa Engine Interface (AEI)
« Reply #90 on: May 6th, 2012, 11:24pm » |
Quote Modify
|
on May 3rd, 2012, 8:23am, Nombril wrote:Thanks for the quick reply Janzert. |
| Sorry, this one's a bit slower. Quote:Starting fresh today I was able to find the problem. I had been running via starting the class, I tried running with the jar file (netbean's "suggestion" to run the program) and it worked. |
| I have very limited experience with java so I'm probably wrong, but doesn't that first way of running it need to also modify the classpath in order to work? Quote:I had a poor description of the error last night - running roundrobin from python was giving me the timeout error. This morning I ran it from compiled python/windows explorer... and it gave me different output - that it couldn't find the bot. |
| I'm not quite clear on how you're running roundrobin, either the first or second way. Normally I just type in "roundrobin.py" from a command line opened to the aei directory and windows with its extension association mechanism will run it with python. Double clicking on roundrobin.py from windows explorer works as well though, but is easier to lose the roundrobin console output. It sounds like for some reason the second method you are using to run it isn't finding your s.bat file. Maybe the current working directory isn't set to the aei directory? Except I think that would cause an error where it can't read the config file. In any case maybe try supplying an absolute path for your bot command. Janzert
|
|
IP Logged |
|
|
|
Hippo
Forum Guru
Arimaa player #4450
Gender:
Posts: 883
|
|
Re: Arimaa Engine Interface (AEI)
« Reply #91 on: May 7th, 2012, 6:58pm » |
Quote Modify
|
I have added 3 fold repetition test to roundrobin.py. My current version of it is here. [edit]I was editting it as it was not prepared for the "resign" move. So it was added as well. (Chatting was added earlier.) [/edit] [edit] I forgot to mention ... I have corrected bug in reserve calculation for percent != 100. (When player uses reserve). [/edit] P.S.: I have not added the forced 3 times repetition test to immobilization condition, but I expect it could be done. P.P.S.: Janzert ... should I try to modify https://github.com/Janzert/AEI? ... I have not experimented with it ... I expect your version will be maintained and another version will be added? Have I rights to do that? I should modify aei protocol specification ... as I have added some signalling ... I am sending sid ... but it is not that much important. I am sending chats. I would like to send "postal" flag as postal playing differs from on-line (the sid varies during the game in postal game). I have used sid+oppname as a logfile name, but it is not practical in postals ... . Sending permanent game id at the end could be usefull as well ... to rename the logfile finally to match it easily with the arimaa.com database. In future allowing the postgame chat could be usefull. (But I have more important TODOs now ) Standard aei bot should be ready to ignore signals it does not understand ... to let the AEI open for further changes.
|
« Last Edit: May 7th, 2012, 8:17pm by Hippo » |
IP Logged |
|
|
|
Hippo
Forum Guru
Arimaa player #4450
Gender:
Posts: 883
|
|
Re: Arimaa Engine Interface (AEI)
« Reply #92 on: May 7th, 2012, 7:12pm » |
Quote Modify
|
on May 2nd, 2012, 10:05pm, Nombril wrote: And play some games locally (against human and simple bot). |
| Do you have problems with human (rabbits interface) I was mentioning? ... Freezing whenever you touch a key on keyboard (with the window active). It is not that anoying whan you don't want chatting ... but I would prefere chatting interface .
|
|
IP Logged |
|
|
|
Nombril
Forum Guru
Arimaa player #4509
Gender:
Posts: 292
|
|
Re: Arimaa Engine Interface (AEI)
« Reply #93 on: May 9th, 2012, 10:28pm » |
Quote Modify
|
on May 6th, 2012, 11:24pm, Janzert wrote: I have very limited experience with java so I'm probably wrong, but doesn't that first way of running it need to also modify the classpath in order to work? |
| You are correct. I modified the classpath to get bot_hippo to run, and I thought bot_jae had been running, I wonder now if I somehow changed the directory? Anyway, the jar seems better, so the professor can run it without changing classpaths Quote:I'm not quite clear on how you're running roundrobin, either the first or second way. Normally I just type in "roundrobin.py" from a command line opened to the aei directory and windows with its extension association mechanism will run it with python. Double clicking on roundrobin.py from windows explorer works as well though, but is easier to lose the roundrobin console output. |
| The first way was when I was trying to debug, I had roundrobin.py already open in IDLE, and ran in debug mode there. I guess the IDLE debug only showed what was happening as a result of the python commands. So it didn't show the error from the command line part. I agree, both ways you mentioned would have given me the error saw in the morning. (But running from the command line is probably better - double clicking from windows explorer --> the error sometimes doesn't stay on the screen for long enough to read before the window automatically closes. PS, Hippo, I'll check tomorrow (hopefully!) about the chat, I thought it worked.
|
|
IP Logged |
|
|
|
Janzert
Forum Guru
Arimaa player #247
Gender:
Posts: 1016
|
|
Re: Arimaa Engine Interface (AEI)
« Reply #94 on: May 10th, 2012, 1:40pm » |
Quote Modify
|
on May 7th, 2012, 6:58pm, Hippo wrote:I have added 3 fold repetition test to roundrobin.py. My current version of it is here. |
| Unfortunately the latest unreleased version has rearranged quite a bit of the code in roundrobin.py so I'm having some difficulty comparing what has changed in your version and what has already been fixed. Even if you don't setup git (see below) you can get the latest version from github by clicking the "download as zip" at https://github.com/Janzert/AEI/downloads. Quote:[edit]I was editting it as it was not prepared for the "resign" move. So it was added as well. (Chatting was added earlier.) [/edit] |
| Oh, is this actually allowed by the arimaa server (as in it results in a resignation not an illegal move ending)? I just thought with Omar's preference against resigning that bots were not given a way to resign. Quote:[edit] I forgot to mention ... I have corrected bug in reserve calculation for percent != 100. (When player uses reserve). [/edit] |
| Thanks, that is definitely wrong currently. Quote:P.S.: I have not added the forced 3 times repetition test to immobilization condition, but I expect it could be done. |
| Yep, certainly should be added. Quote:P.P.S.: Janzert ... should I try to modify https://github.com/Janzert/AEI? ... I have not experimented with it ... I expect your version will be maintained and another version will be added? Have I rights to do that? |
| Basing changes off the github repo is certainly the way to go. The normal way to do it is by forking it on github, which anyone can do. I'm not sure exactly what you mean by "your version will be maintained and another version will be added", but yes another copy is created when you fork it that you can then apply your changes to. The github tutorial series seems a fairly good introduction, although it looks to be a bit dense if you aren't already familiar with other version control systems. Quote:I should modify aei protocol specification ... as I have added some signalling ... I am sending sid ... but it is not that much important. I am sending chats. I would like to send "postal" flag as postal playing differs from on-line (the sid varies during the game in postal game). I have used sid+oppname as a logfile name, but it is not practical in postals ... . Sending permanent game id at the end could be usefull as well ... to rename the logfile finally to match it easily with the arimaa.com database. In future allowing the postgame chat could be usefull. (But I have more important TODOs now ) |
| Sound like useful things to add to the gameroom interface. I don't think any of the above should be done in a way that modifies the protocol itself though. Specifically "setoption" should be used for sending the extra information to the engine and "log" for the chat messages back from the engine. Quote:Standard aei bot should be ready to ignore signals it does not understand ... to let the AEI open for further changes. |
| One of the primary goals for AEI is ease of correct implementation by engine authors. To help this the number of message types has been kept to a minimum. Any added message is meant to require a protocol version change, with the protocol version in use for a session set by the engine. So the engine should never get a message it can't handle. Also AEI is a stateful protocol and an unexpected or unrecognized message means the engine and controller can no longer be sure of the appropriate state after an unrecognized message. Having an immediate error helps prevents more subtle bugs from persisting. Initially AEI allowed unknown setoption messages to pass silently. After I was bitten by misspelling an option name in OpFor without noticing it since it was just silently ignored, this was changed to logging a warning message. The one major addition AEI still needs is the ability for the engine to tell the controller about the options it understands during the opening phase. Janzert
|
|
IP Logged |
|
|
|
|