Welcome, Guest. Please Login or Register.
Nov 24th, 2024, 4:29am

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « How to begin (the basics of working bots, etc.)? »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   How to begin (the basics of working bots, etc.)?
« Previous topic | Next topic »
Pages: 1 2  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: How to begin (the basics of working bots, etc.)?  (Read 2800 times)
chess123mate
Forum Senior Member
****



Arimaa player #3547

   


Gender: male
Posts: 29
How to begin (the basics of working bots, etc.)?
« on: Oct 6th, 2008, 2:32pm »
Quote Quote Modify Modify

I'm very new here, and I'm having difficulty trying to figure out how to operate Arimaa bots, etc.
 
My first problem is how to use the 'matchOffline' system. I think that's reasonably basic, so I'm hoping to try that first. I have no idea how to do anything Smiley
I think I have to use the Command Prompt to do some of these things, or something else?
 
That'd be great, except I have no idea how to use the Command Prompt  Huh
 
Also, I wish to know how to make my own bots. I've tried downloading the sample bots, but I still don't understand what I'm supposed to do.
 
Any help would be greatly appreciated Smiley
Thanks,
chess123mate
IP Logged
Fritzlein
Forum Guru
*****



Arimaa player #706

   
Email

Gender: male
Posts: 5928
Re: How to begin (the basics of working bots, etc.
« Reply #1 on: Oct 6th, 2008, 7:25pm »
Quote Quote Modify Modify

Are you using Windows?  The command prompt can be accessed via Start -> Run.  In the bar where you type the program name to run, type "cmd".  That will open a window where you type white commands on a black background.
 
Some basic commands you can type at the command prompt are "dir" to see what is in the directory; "cd xxxx" to move down to folder xxxx from the folder you are in; "cd .." (that's two periods) to move up one level from whatever folder you are in.
 
I hope this helps get you started.
IP Logged

The_Jeh
Forum Guru
*****



Arimaa player #634

   


Gender: male
Posts: 460
Re: How to begin (the basics of working bots, etc.
« Reply #2 on: Oct 6th, 2008, 7:35pm »
Quote Quote Modify Modify

I think chess123mate might also be referring to the need for his program to write to the command prompt. That is the problem I ran into when trying to figure out how I could make a bot using REALbasic. I never did figure that out.
« Last Edit: Oct 6th, 2008, 7:36pm by The_Jeh » IP Logged
chess123mate
Forum Senior Member
****



Arimaa player #3547

   


Gender: male
Posts: 29
Re: How to begin (the basics of working bots, etc.
« Reply #3 on: Oct 7th, 2008, 3:07am »
Quote Quote Modify Modify

Awesome! Now I can use the command prompt Smiley [Yes, I have Windows Vista and access to an XP as well]
Actually, The_Jeh, I'm still trying to figure out how to run a bot.
 
I'm currently confused as to how all this networking is set up. I've been searching over all of Arimaa wiki, etc., but I couldn't find anything that helped.
 
Specifically, I wish to try and start by running a 'matchOffline' with the sample bots. If anyone's managed to do this, a few quick step-by-step instructions would be greatly appreciated.
 
Also, what file in the sample bots actually includes the uncompiled code (ex. in java)? I tried opening a few, but they were all gibberish or human comments that didn't help...
 
Thanks again,
chess123mate
IP Logged
99of9
Forum Guru
*****




Gnobby's creator (player #314)

  toby_hudson  


Gender: male
Posts: 1413
Re: How to begin (the basics of working bots, etc.
« Reply #4 on: Oct 7th, 2008, 3:14am »
Quote Quote Modify Modify

In Don Dailey's sample bot written in C all the files which end in .c or .h are source code files that you can open with a text editor.  Source code often does look like gibberish if you don't know any programming language.
IP Logged
chess123mate
Forum Senior Member
****



Arimaa player #3547

   


Gender: male
Posts: 29
Re: How to begin (the basics of working bots, etc.
« Reply #5 on: Oct 7th, 2008, 11:16am »
Quote Quote Modify Modify

Thanks! Now I can find the C source files... Smiley
I am familiar with the programming languages, fortunately. Otherwise I'd be really lost Wink
When I said gibberish, I was looking at files such as 'position.pl', which, to me, appears to be in a semi-compiled state... either way, it's got characters that Windows doesn't recognize Smiley
 
Now I've re-read the 'readme's and I still can't get matchOffline to run. The error said that the file wasn't a recognized batch file? I even tried this on an XP, but the same error occurred:
 
C:\Arimaa\matchOffline>match r0 r0
'match' is not recognized as an internal or external command, operable program or batch file.

 
What am I doing wrong? I looked at the README, it said to go recompile in bot_r0, which I did. Same error.
IP Logged
aaaa
Forum Guru
*****



Arimaa player #958

   


Posts: 768
Re: How to begin (the basics of working bots, etc.
« Reply #6 on: Oct 7th, 2008, 11:32am »
Quote Quote Modify Modify

You'll have to install Perl, as .pl files here are Perl scripts (they could also be Prolog files, but that's not the case here).
IP Logged
chess123mate
Forum Senior Member
****



Arimaa player #3547

   


Gender: male
Posts: 29
Re: How to begin (the basics of working bots, etc.
« Reply #7 on: Oct 7th, 2008, 12:39pm »
Quote Quote Modify Modify

Uhh... anyone have a link?
I tried installing it (or doing anything with it, actually). I found a .tar.tar file. I found out Windows has no idea what that is or how to open it, so I'm stuck.
http://search.cpan.org/dist/perl/
That's where I got it from.
IP Logged
aaaa
Forum Guru
*****



Arimaa player #958

   


Posts: 768
Re: How to begin (the basics of working bots, etc.
« Reply #8 on: Oct 7th, 2008, 12:56pm »
Quote Quote Modify Modify

http://www.activestate.com/Products/activeperl/index.mhtml
IP Logged
chess123mate
Forum Senior Member
****



Arimaa player #3547

   


Gender: male
Posts: 29
Re: How to begin (the basics of working bots, etc.
« Reply #9 on: Oct 7th, 2008, 12:57pm »
Quote Quote Modify Modify

Thanks!   Cheesy
 
EDIT: I just got it installed. I am still unaware on how to run matchOffline... Sad sorry if I'm asking questions with obvious answer ("stupid questions")... I'm sure it's obvious when you're used to it, but I've never done this sort of thing before
« Last Edit: Oct 7th, 2008, 1:22pm by chess123mate » IP Logged
Fritzlein
Forum Guru
*****



Arimaa player #706

   
Email

Gender: male
Posts: 5928
Re: How to begin (the basics of working bots, etc.
« Reply #10 on: Oct 7th, 2008, 4:15pm »
Quote Quote Modify Modify

One problem I had after installing Perl was that the executable was not in my path.  That is to say, if I typed the command "perl xxxx.pl", instead of Perl executing the script xxxx.pl, Windows didn't know where to find "perl".  People here will laugh at me for being so dumb that I didn't know how to change my path, but what I actually did was specify the exact location of Perl, i.e. "C:\Perl\bin\perl.exe xxxx.pl".  Then it worked.
 
I don't know if the path is your problem, but if so, this is one way around it.  (Actually, you can type "path" at the command prompt and see whether C:\Perl\bin\perl is in it (or the equivalent) and if not, there's your trouble.)
 
« Last Edit: Oct 7th, 2008, 4:17pm by Fritzlein » IP Logged

chess123mate
Forum Senior Member
****



Arimaa player #3547

   


Gender: male
Posts: 29
Re: How to begin (the basics of working bots, etc.
« Reply #11 on: Oct 8th, 2008, 3:12am »
Quote Quote Modify Modify

Yep, that's probably my problem... and I am feeling like an idiot right now...  Undecided
 
Anyway, I'm now 1 step closer. Now I'm getting this error due to command:
 
C:\Arimaa\matchOffline>c:\perl\bin\perl.exe match r0 r0
random seed is 682342
'.' is not recognized as an internal or external command, operable program or batch file.
1w
no steps taken m=[]
 
Also, I just tried "recompiling" the "makefile" in bot_r0, but it had a full screen of information about errors. In conclusion, it says
"...Execution of makefile aborted due to compilation errors."
So that doesn't work either Sad
IP Logged
Polyfractal
Forum Senior Member
****



Arimaa player #3241

   


Gender: male
Posts: 27
Re: How to begin (the basics of working bots, etc.
« Reply #12 on: Oct 8th, 2008, 9:05pm »
Quote Quote Modify Modify

Have you edited the match or position scripts at all?
 
Is your bots config file in order?  Do all the paths point to the correct locations?
 
The error looks like the errors I get when my bot outputs an illegal move.  I'm guessing the r0 bot isn't functioning correctly.  I've been using a copy of Fairy for testing and it works fine.  You can get a copy from Unic's server (see this post).  It is included in his "playtest.exe" package, which may also be useful for you.
 
Try fairy.exe instead of r0 (make sure you add fairy to your bots config file) and see if that works.
IP Logged
chess123mate
Forum Senior Member
****



Arimaa player #3547

   


Gender: male
Posts: 29
Re: How to begin (the basics of working bots, etc.
« Reply #13 on: Oct 9th, 2008, 3:11am »
Quote Quote Modify Modify

Haven't edited a thing. As for a config file, I didn't know there was one! As I said, I still have no idea what syntax the bots are using, what they are inputting from or outputting to (other than a server of some sort...), and I have no idea if all the paths are in the right locations or not.
I currently haven't made any bots. I have ideas for them, but I wanted to try and get existing bots running first, then figure out how they work, and finally make my own after that.
 
Alright, thanks Polyfractal for the link. I downloaded it as directed, and now I need to know how to run it. It said to put the paths of the bots into the "bots" file? I looked at it and it was full of comments and maybe a few commands... I have no idea. What syntax am I supposed to use?
 
I just tried that new program and used playtext.exe with the parameters 'r0 r0' and also 'fairy060518 fairy060518'. Both of them resulted in an error because a file could not be read. I found a file named moves.txt, but it had only an opening.
 
So how do I add 'fairy.exe' to any bot's config file? And in what syntax?
IP Logged
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
Re: How to begin (the basics of working bots, etc.
« Reply #14 on: Oct 9th, 2008, 6:12am »
Quote Quote Modify Modify

I just downloaded the offline match player.
 
The command "match r0 r0" works under Linux.
 
The command "perl match r0 r0" does NOT work under windows. In order to get this to work under windows, the program in the bot_r0 directory needs to be recompiled for windows. Also because windows has a different path syntax than Linux, line 200 of the "match" file needs to be commented out.
 
My recommendation would be to use the match player under Linux. I have got the match player running under windows in the past, but it was such a huge headache to get working.
IP Logged
Pages: 1 2  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.