Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Bot Development >> AEI - Can't run any file please help
(Message started by: dussardee on Sep 27th, 2014, 4:16am)

Title: AEI - Can't run any file please help
Post by dussardee on Sep 27th, 2014, 4:16am
hi i'm new here and i wanna try to run bot with AEI but i can't open any file in AEI folder.It away say invalid syntax.I only change username and password in gameroom.cfg and change name gameroom_example to gameroom. Is there something that i miss please help.:'(

I try to find answer it forum before in :
http://arimaa.com/arimaa/forum/cgi/YaBB.cgi?board=devTalk;action=display;num=1367716111

http://arimaa.com/arimaa/forum/cgi/YaBB.cgi?board=devTalk;action=display;num=1363802352

http://arimaa.com/arimaa/forum/cgi/YaBB.cgi?board=devTalk;action=display;num=1332772240
- I can't download hippo file. :'(

Title: Re: AEI - Can't run any file please help
Post by Migi on Sep 27th, 2014, 8:43am
Hello, and welcome to the forum!

If you're getting "invalid syntax" errors, it's probably because you're using Python 3, but the AEI scripts were made for Python 2. So you'll have to install Python 2 and run the scripts using that.

Also, on Windows, you may have to install some additional Python modules, like Queue. At least that's what it complained about for me. On Linux everything worked flawlessly out of the box.

Title: Re: AEI - Can't run any file please help
Post by dussardee on Sep 27th, 2014, 10:03am
Oh i see .I will try it .thank you very much  ;D

Title: Re: AEI - Can't run any file please help
Post by dussardee on Oct 2nd, 2014, 11:37am
After i try to do like Migi said i got this problem. Did i need to set aei.py too? :'(


Code:
Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>

Traceback (most recent call last):
 File "E:\AEI\gameroom.py", line 934, in <module>
   main(sys.argv)
 File "E:\AEI\gameroom.py", line 794, in main
   engine_ctl = aei.EngineController(engine_com)
 File "E:\AEI\pyrimaa\aei.py", line 302, in __init__
   response = engine.waitfor("aeiok", START_TIME)
 File "E:\AEI\pyrimaa\aei.py", line 143, in waitfor
   line = self.readline(timeout = wait)
 File "E:\AEI\pyrimaa\aei.py", line 135, in readline
   raise socket.timeout()
timeout

Title: Re: AEI - Can't run any file please help
Post by Janzert on Oct 2nd, 2014, 10:30pm
Not sure what you mean by "set aei.py", but that error looks like it is caused by the engine you are using not sending "aeiok" back to the AEI script within ~5 seconds after starting and receiving "aei".

Maybe try running your engine manually and typing in "aei" + <enter>. If that works and it shows initial responses concluding with "aeiok" one thing to check is that you're flushing stdout in the engine after sending a line.

Janzert

P.S. As an aside, the Queue package has been included in all versions of python back to 1.5 (released in 1998). I'm not sure how you'd get an installation with that missing and not have a lot of other things broken as well.

Title: Re: AEI - Can't run any file please help
Post by dussardee on Oct 22nd, 2014, 5:23pm
Thank you for your answer janzert
But i try to type "aei" + enter after i run program but not thing happen.
It like i send command in the wrong way. Can you tell me where i should type or send massage with this program. I was spend so much time to find it but still can't do nothing. I'm sorry for trouble  :'(

Title: Re: AEI - Can't run any file please help
Post by lightvector on Oct 23rd, 2014, 6:29pm
Do you have a bot that you yourself have programmed that supports the AEI protocol, or do you have one of the sample bots that supports AEI compiled?

The AEI package is a set of scripts to help an external bot engine do things like talk to the Arimaa gameroom, and does not itself actually include any bots.

When Janzert was talking about typing 'aei' and pressing enter after running your engine, he was referring to the external bot executable that you presumably have separately compiled and which you are trying to make connect to the AEI interface. If you're having trouble getting your bot executable to respond to an 'aei' command, then it's hard to help until we know more.(which bot you downloaded, or if you wrote it yourself, etc.)



Title: Re: AEI - Can't run any file please help
Post by dussardee on Oct 29th, 2014, 3:55am
Thank you lightvector
I try to run bot hippo that i download from http://arimaa.com/arimaa/download/bot_Hippo/bot_Hippo.zip

I didn't change anything in bot hippo.
I change username and password in gameroom.cfg to my username and password.
I run file ArimaaEngineInterface.java then i run gameroom.py then it should be at least send "aieok" to gameroom.py is that i think.
But it seem can't send massage to each other maybe i was do something  wrong.
:-/

Title: Re: AEI - Can't run any file please help
Post by harvestsnow on Oct 29th, 2014, 11:24am

on 10/29/14 at 03:55:34, dussardee wrote:
I run file ArimaaEngineInterface.java

That's a source file, it cannot be run.

If you have a java compiler installed ( javac (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html), for instance), you should go to the folder where you extracted the zip, then type

Code:
javac arimaa3/*.java
to compile everything (you'll get lots of .class files under arimaa3/ and ai_util/).
If you don't have a java compiler, you can get a precompiled version here: http://hrosi.synology.me/arimaa/bot_Hippo120330.zip .

To test the bot, type

Code:
java arimaa3.ArimaaEngineInterface
from the same directory.
Wait a bit, the hippo wakes up. Then you can dialog with it according to the AEI protocol:

Code:
aei
protocol version 1
id name Hippo
id author Vladan Majerech
id version 2011
aeiok

(This assumes you already have some version of java installed. If not, get it here: https://www.java.com/download/manual.jsp )

The command you should put in the config file is the same, except java needs to know where to find the classes.
It would be something like

Code:
cmdline = java -classpath /hippoes/live/here/ arimaa3.ArimaaEngineInterface
Alternatively, you can add the directory path to the CLASSPATH system variable, so it can be run from anywhere.


On a side note, when you report something or ask for help, please try to give as much information as you can about the issue, like what programs you are using (and which versions), on what operating system, what commands you type, what you expect of it and what error prints you get... It would speed the process a lot, especially if you aren't online very often. Otherwise your interlocutors have to guess at what you are doing.

I hope this helps. If you still have problems, you could also try to make it work with one of the OpFor binaries provided at http://arimaa.janzert.com/opfor/ .

Title: Re: AEI - Can't run any file please help
Post by dussardee on Oct 29th, 2014, 1:44pm
Thank you for your answer harvestsnow and sorry for less information. :)
I use Eclipse SDK ver.3.7.2 to run hippobot on window 7 64bit.
And use Python 2.7.8 to run AEI.
Or i need to use linux instated of window?
I will try to test botHippo120330 that you give me.
Maybe it will work. :)



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