Page 16 of 17

Re: AI Ladder, 0.5

Posted: 22 Oct 2009, 18:50
by aegis
and here's a widget to disable the interface and set the speed to 120x when running headless.
you might need to enable it while running normal spring if you have the LuaAutoEnableUserWidgets config variable disabled.
the widget only activates while running headless.

hugh: might not hurt to give me write access to springheadless repo

Re: AI Ladder, 0.5

Posted: 23 Oct 2009, 02:18
by hughperkins
aegis wrote: hugh: might not hurt to give me write access to springheadless repo
Sure. Done.

Re: AI Ladder, 0.5

Posted: 23 Oct 2009, 15:13
by hughperkins
Wow, you managed to add two 'aegiscluster's to ailadderstaging! That doesn't sound terribly healthy...

Edit: anyway, I'm only maintaining currently:

Stable:

ailadder '0.5' branch
- http://manageddreams.com/ailadder

bugfixes only

Dev/unstable:

- http://manageddreams.com/springgridstaging (=springgrid 'master' branch), but *only* the underlying business logic, the database, the botrunner_webservice, and the api_webservice. The front-end webpages are currently out of scope for me
- http://manageddreams.com/ailaddergrid (=ailadder 'gridclient' branch)

Waiting on some botrunners!

Re: AI Ladder, 0.5

Posted: 23 Oct 2009, 16:37
by AF
We need a provision for configs or at least difficulty, Id like in the future to be able to add a list of configs to AI options, which would have a big impact on how this ladder works in terms of NTai performance.

Re: AI Ladder, 0.5

Posted: 23 Oct 2009, 16:58
by hughperkins
AF wrote:We need a provision for configs or at least difficulty, Id like in the future to be able to add a list of configs to AI options, which would have a big impact on how this ladder works in terms of NTai performance.
Agreed. It's on the list http://github.com/hughperkins/ailadder/ ... t/todo.txt but what I need most right now is: botrunners.

Edit, by the way, current instructions for setting up a botrunner:

- grab the latest springgrid git from http://github.com/hughperkins/springgri ... ves/master
- cd into botrunner directory
- run 'python botrunner.py' and use 'http://manageddreams.com/springgridstaging' as the website url, when it asks for this.

You can see the botrunner's registration at http://manageddreams.com/springgridstaging

The botrunner's websiteurls config value is now a list, so you can add in multiple websites if you want, in config.py, and the botrunner will register, ping and poll all configured websites.

Re: AI Ladder, 0.5

Posted: 23 Oct 2009, 17:02
by aegis
curse your silly needs!

ah just a sec.

Re: AI Ladder, 0.5

Posted: 23 Oct 2009, 17:14
by aegis
six should be online. dunno what's wrong with my other server, it was giving oom errors etc yesterday... it didn't respond to the wake-on-lan message.

Re: AI Ladder, 0.5

Posted: 23 Oct 2009, 17:17
by AF
Would you like a project at redmine.darkstars.co.uk to track all your to do stuff and set milestones/bug reports?

Re: AI Ladder, 0.5

Posted: 23 Oct 2009, 18:16
by hughperkins
aegis wrote:six should be online. dunno what's wrong with my other server, it was giving oom errors etc yesterday... it didn't respond to the wake-on-lan message.
Hmmm, only seeing two, but at least one is sufficient, though clearly the more the merrier.

They're appearing in red, and their ping time is about 8:36am and 8:51am October 23rd. Did you reset them, or did they crash?

Re: AI Ladder, 0.5

Posted: 23 Oct 2009, 18:49
by aegis
oh sorry forgot to turn them back on after changing config.

Re: AI Ladder, 0.5

Posted: 24 Oct 2009, 01:50
by hughperkins
Cool!

Hmmm, there don't seem to be any mods installed? http://manageddreams.com/springgridstag ... giscluster

Re: AI Ladder, 0.5

Posted: 24 Oct 2009, 02:20
by aegis
installed, just not registered <_< should be better now.

Re: AI Ladder, 0.5

Posted: 24 Oct 2009, 02:23
by hughperkins
aegis wrote:installed, just not registered <_< should be better now.
Excellent!

Re: AI Ladder, 0.5

Posted: 24 Oct 2009, 02:52
by hughperkins

Re: AI Ladder, 0.5

Posted: 24 Oct 2009, 03:59
by hughperkins
Update to springgrid git, and springgridstaging site:
- expired botrunner sessions are purged now, and the corresponding matchrequests are marked as no longer assigned to those sessions

Edit: update2:
- sessions that are older than the inter-ping time show up as orange now (but don't expire until sessionexpiretime)
- added getconfig and setconfig scripts to webserver directory, since config is stored in db now

Edit: update3:
- added viewconfig.py page http://manageddreams.com/springgridstag ... wconfig.py

Still not too many active botrunners ;-)

Re: AI Ladder, 0.5

Posted: 24 Oct 2009, 05:03
by AF
How shall we account for statistical learning?

Brand new NTais and AAIs with blank learnign data, can be mincemeat when presented to experienced NTais and AAIs

Re: AI Ladder, 0.5

Posted: 24 Oct 2009, 11:18
by hughperkins
Perhaps, statistical learning algorithms can upload their data to a central repository, that they manage, at the end of a match, and download it at the start of a match?

It doesn't directly allow for matches to be repeatable, but that would be true for a human ladder too.

I feel it could be the AI dev's responsibility to handle creating such a repository for their learning data, and for getting their ai to communicate with the repository.

In the case that an AI dev wishes to choose a specific static set of training data, they could pass in a parameter to their AI in the AIOptions, such as 'learning-data-set' = 'a03bcf0131fac0'.

Edit: what are your thoughts on how to manage this?

Edit2: I suppose another possibility could be to have a blob of 'state' associated with each AI, that gets passed in to an AI at the start of a match, then retrieved at the end. One disadvantage of this is that it would effectively preclude any possibility of running multiple matches for the same AI in parallel, or at least imply that some state changes would be lost.

Edit3: I suppose another way could be to provide a repository for AI-specific data on the spring-grid website, or on the AILadder website, or on a third website dedicated to this, that an AI can read and write to.

Edit4: sort of like Edit2, except that the AI just reads/writes to files on the disk as normal, and the botrunner writes these files at the start of a match, and retrieves the modified files at the end of a match.

Edit5: in edit2, I asserted that some changes in state would be lost, but actually, if the new states can be effectively merged then that would not be an issue.
- for example, the new state could be the old state, with history lines recording some events that occurred
- some merge function can be provided by the AI to merge multiple output states, eg amalgamate the kill statistics for every unit.
- I'm reminded vaguely of Google's MapReduce as I write this... http://labs.google.com/papers/mapreduce.html

Re: AI Ladder, 0.5

Posted: 24 Oct 2009, 11:47
by hoijui
I had hte smae idea like your initially one (without the part with AIOptions, which is a good idea too), and it still seems the best way to me. -> its the AIs responsibility to handle it.
A pro of this approach is, that the performance of the AI on the AI-Ladder can be assumed to be the same as for the user. cause if hte AI ladder does supply a special system for config files, which the user would not have, results will (needlessly) differe a lot from what the user will/would experience.
The only problem i see, is that not all AI devs may have access to an always online data storage place, which is not the case for AF, i guess ;-)

Re: AI Ladder, 0.5

Posted: 24 Oct 2009, 12:07
by hughperkins
hoijui wrote: The only problem i see, is that not all AI devs may have access to an always online data storage place, which is not the case for AF, i guess ;-)
Well I don't mind providing one, or maybe AF can provide one, or I could build a minimalist xmlrpc interface, and AF can host that.

Or use Amazon S2.

Anyway, a minimalist xmlrpc interface could off the top of my head be something like... oh .... hmmm..... authentication.... how are we going to authenticate an AI that is running on untrusted clients? :shock:

Ok, so basically what we need perhaps is a drop-box system.

Dropping off data, and retrieving dropped off data:

Code: Select all

dropoffdata( ainame, aiversion, data ) # data is any xml-compliant string.  use base64 to encode binary.
references[] = retrievedatareferences( ainame, aiversion)  # returns a list of integers, which are references to previously dropped off data
[datetime, data] = retrievedata( reference ) # returns the datetime of dropped off data, and the data
Creating merge files (authenticated), and retrieving mergefile:

Code: Select all

uploadmergefile( ainame, aiversion, sharedsecret, mergefile ) # upload an xml-compliant string containing all the configurations for ainame/aiversion
mergefile = downloadmergefile( ainame, aiversion ) # download an xml-compliant string containing all configurations for ainame/aiversion
So, the idea is that:
- at the start of a game, an AI calls 'downloadmergefile(ainame,aiversion)', and ploof! that's its configuration
- during the game, or at the end of the game, or both, the ai can call
'dropoffdata(ainame,aiversion,data)' to upload new learning data to the drop box

Then, the AI dev can occasionally, or a cronjob run by the developer, or something similar, can download all dropped data:

Code: Select all

references = retrievedatareferences( ainame, aiversion)
[datetime, data] = retrievedata( reference )
.... then merge that into a new config file, which he can upload:

Code: Select all

uploadmergefile( ainame, aiversion, sharedsecret, mergefile )

Re: AI Ladder, 0.5

Posted: 24 Oct 2009, 14:23
by AF
The problem with that is different users play against different installs of NTai, and thus it learns different things, the same with AAI.

I'd also prefer not to implement code into NTai that auto downloads the learning files from a central repository and re-uploads them, this would remove an entire feature from NTai, and worst of all, reduce variety into a homogenous smear.

I want variety. That and different learning configs are better at killing different AIs. As such I can imagine 2 entries for NTai, each with different places in the ladder, each capable of defeating different AIs and being beaten by different tactics.