AILadder and SpringGrid

AILadder and SpringGrid

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
timdine
Posts: 3
Joined: 20 Apr 2014, 21:43

AILadder and SpringGrid

Post by timdine »

Is there anyone running this (AILadder and SpringGrid) themselves at the moment? I've been picking at the old sources on github and been struggling at trying to make it run with only partial success.

I want to play with various combinations of training ai's and config files, but it seems like these tools would be handy in making that happen.

I've installed the applications, but haven't really gotten the botrunner to access the grid. I've tried a few combinations of different code bases, databases, and web servers. Any suggestions on a combination that is working or are there any working copies of the VMs around already configured.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: AILadder and SpringGrid

Post by gajop »

I'm not using it anymore since I'm not writing AIs ATM, but I did develop a part of it.
What version of springgrid and botrunner did you get, and where from?
Post your steps and your problems exactly and I'll lend you a hand.
timdine
Posts: 3
Joined: 20 Apr 2014, 21:43

Re: AILadder and SpringGrid

Post by timdine »

That sounds great! Your username looks familiar, as in related to where I got some of the source for these things.

These are the versions I'm trying to make work now. They look like they're the versions you continued on from the originals. I almost had the original running, but I'm struggling a bit with the relationship of ailadder/springgrid. Is it right to assume ailadder is the front end for springgrid now?
https://github.com/gajop/springgrid
https://github.com/gajop/ailadder
https://github.com/gajop/botrunner

Downloaded ailadder, unzipped and run setupwebsite.py I choose a directory to install the website to, files copy. I choose a database to use. I choose mysql (v5.6 default install). I get positive feedback that the database is populated and "This configuration completed."

Installed Apache 2.2, configured Apache to execute py.

Code: Select all

Alias /ailadder "C:/Utils/ailadder"
<Directory "C:/Utils/ailadder">
    AllowOverride All
    Options Indexes FollowSymLinks ExecCGI
    AddHandler cgi-script .cgi .py
    Order allow,deny
    Allow from all
</Directory>

Downloaded botrunner, unzipped the botrunner folder. Run botrunner.py using python 3.3. Running it with 2.7 it gives and error with urllib.request and a few others packages. I did some fiddling to get the config to go. End result is a config.py with the appropriate values filled into the fields. Run bot runner, it can't find botrunner_webservice which doesn't exist in your repository on github (I'm assuming this is somehow dealt with in springgrid).

ailadder opens in a browser. I can login, view leagues, see accounts, etc. There are no registered botrunners though which makes sense given where I am.

Suggestions where to go next? I'm not entirely clear where springgrid fits into the mix.

I did have the original ailadder and botrunner registering, but not returning a good response to the ping function in particular. For this run through I've grabbed your latest cut of the apps since I'm assuming it's the most recent version. Thanks in advance for any suggestions you may have.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: AILadder and SpringGrid

Post by AF »

hughperkins is the author, and built it primarily to help acquire a new job. He does still visit the forums, but he rarely posts, perhaps he will see this thread.

I'd be curious to see what Gajop intended in his modifications
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: AILadder and SpringGrid

Post by gajop »

timdine wrote:That sounds great! Your username looks familiar, as in related to where I got some of the source for these things.

These are the versions I'm trying to make work now. They look like they're the versions you continued on from the originals. I almost had the original running, but I'm struggling a bit with the relationship of ailadder/springgrid. Is it right to assume ailadder is the front end for springgrid now?
https://github.com/gajop/springgrid
https://github.com/gajop/ailadder
https://github.com/gajop/botrunner
That's great, since you're using my modifications I can probably help you out, just it's been a while since I've last touched it, so things might be fuzzy.
Those repos are correct, but you don't need ailadder (as you'll see below).

timdine wrote: Downloaded ailadder, unzipped and run setupwebsite.py I choose a directory to install the website to, files copy. I choose a database to use. I choose mysql (v5.6 default install). I get positive feedback that the database is populated and "This configuration completed."

Installed Apache 2.2, configured Apache to execute py.

Code: Select all

Alias /ailadder "C:/Utils/ailadder"
<Directory "C:/Utils/ailadder">
    AllowOverride All
    Options Indexes FollowSymLinks ExecCGI
    AddHandler cgi-script .cgi .py
    Order allow,deny
    Allow from all
</Directory>
You can completely drop this step, you no longer need apache or ailadder.
timdine wrote: Downloaded botrunner, unzipped the botrunner folder. Run botrunner.py using python 3.3. Running it with 2.7 it gives and error with urllib.request and a few others packages. I did some fiddling to get the config to go. End result is a config.py with the appropriate values filled into the fields. Run bot runner, it can't find botrunner_webservice which doesn't exist in your repository on github (I'm assuming this is somehow dealt with in springgrid).
Correct, the botrunner_webservice is a service offered by springgrid.
timdine wrote: ailadder opens in a browser. I can login, view leagues, see accounts, etc. There are no registered botrunners though which makes sense given where I am.

Suggestions where to go next? I'm not entirely clear where springgrid fits into the mix.

I did have the original ailadder and botrunner registering, but not returning a good response to the ping function in particular. For this run through I've grabbed your latest cut of the apps since I'm assuming it's the most recent version. Thanks in advance for any suggestions you may have.
OK, so here's the thing, in the hugh's original architecture you had three components: 1) springgrid - which was used to schedule matches, 2) botrunners - which executed those matches and 3) ailadder - a separate webserver which was the frontend to springgrid, and allowed you to make leagues and similar.
The only problem is, it was never really done completely. You never had a concept of leagues - which would allow you to queue a large number of games between AIs. Such an architecture turned out to struggle when having to queue that many matches (the springgrid <-> ailadder communication was slow, and I wasn't smart enough to do that in separate threads).
In any case, it turned out needlessly complex to have both a springgrid and an ailadder webserver, so I merged that into a single one (springgrid), and that's all what you need now.
Also, since I didn't really like using cgibin in today's day and age, I rewrote springgrid to use pylons instead (got slightly annoyed later that they deprecated that for pyramid, but that's another story).

So all you need to do is setup springgrid now, and have botrunners connect to it :)
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: AILadder and SpringGrid

Post by gajop »

AF wrote: I'd be curious to see what Gajop intended in his modifications
This was some of the old intentions: http://springrts.com/phpbb/viewtopic.php?f=15&t=24218 , but it's outdated. I kinda lost the inspiration for it as it seems no one is writing AIs anymore, and I got rather annoyed that Pylons 1.x was dropped in favor of Pyramid (still usable, but support will eventually be dropped).

I started working on springgrid when you had E323AI, RAI, KAIK, Shard, AAI, and an active AI development community :) I was happy to see progress on MyAI as it started beating AAI, RAI, KAIK and then eventually E323AI.
timdine
Posts: 3
Joined: 20 Apr 2014, 21:43

Re: AILadder and SpringGrid

Post by timdine »

I feel like I'm getting closer, but still no success. Is it fair to say that springgrid is a complete app that can be made to run in it's current state if you've been at various stages of development with it?

If there is no longer a need for apache then I'm assuming that there is code in springgrid that is it's own webserver rather than using apache's and just being code. That would lead me to believe I can run one of the scripts in the webserver folder and launch that webserver hosting up all the template html code and access the database. I haven't found that yet. There are a number of setup scripts that have me chasing my tail slightly.

I've installed pylons, and I believe I've done all the prereqs in howtouse.txt.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: AILadder and SpringGrid

Post by gajop »

What you should probably do is install pylons and the required packages inside a virtual env, and here's how:

Code: Select all

#create virtualenv
virtualenv ~/env_springgrid
#get into the virtualenv (you need to repeat this every time you want to run your application)
source ~/env_springgrid/bin/activate

#install required packages
pip Pylons
pip SQLAlchemy
pip Jinja2
pip py-bcrypt
pip python-openid

#setup our application
paster setup-app development.ini

#run it
paster serve development.ini
Instructions from: https://github.com/gajop/springgrid/blo ... README.txt

PS: Sorry, I know there are too many (old) instructions laying all around, I just haven't gotten to cleaning it all up.
Post Reply

Return to “AI”