AI Ladder, 0.5
Moderators: hoijui, Moderators
Re: AI Ladder, v0.1
after adding my calcengine on the website as well, it works now.
though.. pls add some more map names, latest BA 7.01, and KAIK, RAI and AAI.
most ppl dont have HughAI or E323AI installed. i neither have on my main install under linux (eg, the one whichs spring executable is in PATH, which is hte current release version, installed from the package repository through synaptic)
though.. pls add some more map names, latest BA 7.01, and KAIK, RAI and AAI.
most ppl dont have HughAI or E323AI installed. i neither have on my main install under linux (eg, the one whichs spring executable is in PATH, which is hte current release version, installed from the package repository through synaptic)
Re: AI Ladder, v0.1
umm.. ok i foudn out that i can add all this stuff myself :D doh!
added it (including some some stuff that can be removed..
and after a few tries, i got a game running sucessfully, as you can see on the page
http://manageddreams.com/ailadderstagin ... results.py
it was not all that straight forward, but all possible.. nice work!
(of course one can not await it to be perfect with the speed you did it :D)
added it (including some some stuff that can be removed..
and after a few tries, i got a game running sucessfully, as you can see on the page

http://manageddreams.com/ailadderstagin ... results.py
it was not all that straight forward, but all possible.. nice work!
(of course one can not await it to be perfect with the speed you did it :D)
Re: AI Ladder, v0.1
maybe add some contributors to the project, or make it possible for everyone to commit? :D
i woudl like to see that for once.. i somehow believe it would not even cause much trouble.
sorry for today, i was not.. fit/concentrated at all.
i woudl like to see that for once.. i somehow believe it would not even cause much trouble.
sorry for today, i was not.. fit/concentrated at all.
Re: AI Ladder, v0.1
my github username is lunixbochs, feel free to add me.
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
Re: AI Ladder, v0.1
Super! Thanks guys. You're both added to the repository now by the way.
As far as staging vs non-staging by the way:
- staging is almost always the latest version, but gets database wiped regularly
- the prod version (http://manageddreams.com/ailadder) doesn't get database wiped often, if at all, ie I would try to preserve data during an upgrade, at least accounts and matchrequest/results, but on the other hand, upgrades are few and far between
You can upgrade staging to the latest version at any time by just doing:
http://manageddreams.com/ailadderstaging/reloaddb.cgi -> does a git pull on git repository, and reloads database schema from this
http://manageddreams.com/ailadderstaging/updatesite.cgi -> does a git pull on git repository, and copies the changed files to the website
reloaddb.cgi and updatesite.cgi are not in git, because then they would end up in the main prod site
which probalby wouldn't be a good thing. reloaddb.cgi essentially does:
- git pull
- cd webserver/db
- ./dropall.sh
- ./addall.sh
updatesite.cgi essentially does:
- git pull
- rsync -av webserver/website $ailadderstagingdir
As far as staging vs non-staging by the way:
- staging is almost always the latest version, but gets database wiped regularly

- the prod version (http://manageddreams.com/ailadder) doesn't get database wiped often, if at all, ie I would try to preserve data during an upgrade, at least accounts and matchrequest/results, but on the other hand, upgrades are few and far between

You can upgrade staging to the latest version at any time by just doing:
http://manageddreams.com/ailadderstaging/reloaddb.cgi -> does a git pull on git repository, and reloads database schema from this
http://manageddreams.com/ailadderstaging/updatesite.cgi -> does a git pull on git repository, and copies the changed files to the website
reloaddb.cgi and updatesite.cgi are not in git, because then they would end up in the main prod site

- git pull
- cd webserver/db
- ./dropall.sh
- ./addall.sh
updatesite.cgi essentially does:
- git pull
- rsync -av webserver/website $ailadderstagingdir
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
Re: AI Ladder, v0.1
Yeah, feel free to change that!hoijui wrote:btw.. calcengine is not a good name :D
Re: AI Ladder, v0.1
Use <ul><li> structures to store your menu. Use classes inserted on current pages and css to control what is currently visible.
Either way the following would have sufficed:
Either way the following would have sufficed:
Code: Select all
<div style="float:left; wdth:200px;">put menu in here</div>
<div style="float:right; margin-left:220px;">page content here</div>
Re: AI Ladder, v0.1
thanks hughperkins 
i do not plan to really work on it though.. maybe fix typos or try to enhance minor stuff... i never used phyton (except in SCons build system).

i do not plan to really work on it though.. maybe fix typos or try to enhance minor stuff... i never used phyton (except in SCons build system).
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
Re: AI Ladder, v0.1
Haha! That's enough to put anyone off python for life!except in SCons build system
Re: AI Ladder, v0.1
LOL true, that. While python is actually one of the best languages ever made! </offtopic>
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
Re: AI Ladder, v0.1
Well, bear in mind that prior to the change, the menu was static .html, and the things in the right-hand side were python pages that were totally independent of the menu.AF wrote:Either way the following would have sufficed:
To remove the frames, each page now has to somehow display the menu itself, which meant modifying every page to add in a couple of method calls before and after the code, and also removing any extraneous "<html>" tags and stuff. Not insurmountable, but rather more work than you are implying

Does look a lot nicer now though.
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
Re: AI Ladder, v0.1
Sure. You do have rather a lot of projects going on all at the same time :-DDDDDhoijui wrote:i do not plan to really work on it though..
Anyway, now you see the other side of, when I'm asking for loads of things in the Java Interface and so on, and you're thinking 'but it's easy to make that change! It'd only take 5 minutes!', and you're suggesting I just submit a patch for it, but you're forgetting, really it's 'it's easy for you to make that change, since you already know the Java Interface inside-out, back-to-front!
I have to say I'm very impressed by quite how much you manage to get done on Spring. Your name is all over the place!
As far as the AILadder... if you happen to have a machine bumping around somewhere that could be used as a calcengine/AI battle executor, that would be incredibly useful. It's kind of hard to run Spring, Eclipse, gedit, firefox, apache2, and mysql all at the same time on one poor Eeepc

Re: AI Ladder, v0.1
i feel with you! poor boy!
the only machine i have that could be doing this, has no graphic card -> no spring :/
the only machine i have that could be doing this, has no graphic card -> no spring :/
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
Re: AI Ladder, v0.1
.. i neither run an X session.
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
Re: AI Ladder, v0.1
Looks like there is an example here:
http://www.nabble.com/osmesa-offline-re ... 88881.html
I think their example doesn't actually render, because they didn't call resize(), but we don't care whether it renders or not in fact!
Basically, it looks like we simply make two calls prior to calling InitGL:
http://www.nabble.com/osmesa-offline-re ... 88881.html
I think their example doesn't actually render, because they didn't call resize(), but we don't care whether it renders or not in fact!
Basically, it looks like we simply make two calls prior to calling InitGL:
Code: Select all
ctx = OSMesaCreateContextExt( OSMESA_RGBA, 16, 0, 0, NULL );
/* Allocate the image buffer */
buffer = malloc( WIDTH * HEIGHT * 4 * sizeof(GLubyte) );
/* Bind the buffer to the context and make it current */
OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_BYTE, WIDTH, HEIGHT );
InitGL();
// Draw stuff...
Re: AI Ladder, v0.1
How would I set this up right now? I'm not too bothered about headless sprign as I cna run it minimized and go to lectures and look when I get home
Re: AI Ladder, v0.1
offtopic, just a statement.
hughperkins GETS STUFF DONE. he's a facilitator. bow before him.
that been said, continue! lol
hughperkins GETS STUFF DONE. he's a facilitator. bow before him.
that been said, continue! lol
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
Re: AI Ladder, v0.1
Thanks!
Btw, my gf is on holiday this week, hence the zero progress on Spring
Bear with me...
):
Pre-requisites:
- python (tested with Python 2.6, but probably also kind of tested on 2.3)
Procedure:
- use the website at http://manageddreams.com/ailadderstaging
- reset the db to git by doing:
http://manageddreams.com/ailadderstaging/reloaddb.cgi (clears all data...)
- update the website from git by doing:
http://manageddreams.com/ailadderstaging/updatesite.cgi
Login as admin/admin, then you can register the map, mod and ai you want to use with your engine. You can register them under 'configuration' then 'view maps', 'view mods', and 'view ais'.
For now, the map, mod and admin should already be installed on your calcengine. (Note: calcengine means the machien that will actually run the AI battles.) In the future, maybe the calcengine will download them, but not in this version.
Having done the registration...
- get the latest git on your calcengine (AI battle machine). Go to:
http://github.com/hughperkins/ailadder/
.. click on 'download'
select 'tar' or 'zip'
- cd into the calcengine directory
- copy config.py.template to config.py
- customize config.py:
-- set websiteurl to 'http://manageddreams.com/ailadderstaging'
- run:
./calcengine.py
or:
python calcengine.py
... it should poll for matches to run, and say there are none.
... back to the website, under 'Runner' click on 'add request to queue'
... the calcengine should start runnign this match, on it's next poll, which by default is every minute, but you can change in the config.py.
Btw, my gf is on holiday this week, hence the zero progress on Spring

quick way (Edit: in retrospect, not that quickHow would I set this up right now? I'm not too bothered about headless sprign as I cna run it minimized and go to lectures and look when I get home

Pre-requisites:
- python (tested with Python 2.6, but probably also kind of tested on 2.3)
Procedure:
- use the website at http://manageddreams.com/ailadderstaging
- reset the db to git by doing:
http://manageddreams.com/ailadderstaging/reloaddb.cgi (clears all data...)
- update the website from git by doing:
http://manageddreams.com/ailadderstaging/updatesite.cgi
Login as admin/admin, then you can register the map, mod and ai you want to use with your engine. You can register them under 'configuration' then 'view maps', 'view mods', and 'view ais'.
For now, the map, mod and admin should already be installed on your calcengine. (Note: calcengine means the machien that will actually run the AI battles.) In the future, maybe the calcengine will download them, but not in this version.
Having done the registration...
- get the latest git on your calcengine (AI battle machine). Go to:
http://github.com/hughperkins/ailadder/
.. click on 'download'
select 'tar' or 'zip'
- cd into the calcengine directory
- copy config.py.template to config.py
- customize config.py:
-- set websiteurl to 'http://manageddreams.com/ailadderstaging'
- run:
./calcengine.py
or:
python calcengine.py
... it should poll for matches to run, and say there are none.
... back to the website, under 'Runner' click on 'add request to queue'
... the calcengine should start runnign this match, on it's next poll, which by default is every minute, but you can change in the config.py.