Jump to content

Teiresias

Community Members
  • Posts

    32
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Teiresias

  1. sanderd17: The problem is with agentx. I think he proposes a tournament where only AI players take part. The double-computation check will probably not get that cheat since the same AI code is executed on any machine. Hephaestion: I got curious about my statement myself and created a simple demo bot to show the "code injection attack" (attached to the post - if forum mods remove it for being offensive, i have no problem with it). Actually it was very easy to build once you know all players reside in the same JS runtime. RetroBot does not command its own units in any way - but it injects a trojan into the enemy aegis player. Currently the AEGIS name is hardcoded, but i'm sure this can be 'fixed'. A demonstration of the bot can be obtained by installing the .zip and running pyrogenesis.exe -quickstart -autostart="Oasis 10" -autostart-ai=1:retrobot -autostart-ai=2:aegis(i succeeded with SVN rev. 14760). After player 1 has sent its chat "Injected patch into AEGIS ai", nothing happens at his site anymore, but player 2 (aegis) starts to randomly kill its own units, while the aegis start-up sequence is running 'normally'. It would look better on the Sicilia map i presume, but unfortunately that map is NLA. agentx: I'm afraid a 'real' AI tournament (possibly with prizes to win?) would require manual review of each participant to find such dirty tricks. Edit: Attachment got lost during preview. retrobot.zip
  2. wraitii: No offense taken, in fact i believe it is better to work independantly (and i do not look at the aegis code - on purpose), as this way creativity is not hurt by an attempt to go the other guy's route. However, i'm not sure it is simple to build a "really good city planner". When i started my economy project, i found it particular hard to define what "really good" is, in particular on edge cases. The same goes for military defense: When i look at a map, i can tell immediately how i'll set up my defense, but i cannot tell how i made my mind. Hephaestion: Currently, i try to get a better economy handling on "nasty maps" in particular (e.g. the Acropolis style), but progress is very slow as i can commit about 1h/day max. to 0AD. A bit more on weekends, but still... Regarding the "showstopper", what i mean is the AIs live in one common JavaScript object while 0AD is running and one could patch the code of another one in memory using regular JS techniques. I might try and write a proof-of-concept on such attack depending on the result of this thread and the actual SpiderMonkey layout. Write-protecting files won't help preventing that. Currently, AFAIK AI scripts cannot access the hard disk anyway. Regarding genetic algorithms or neural nets, i'm afraid they'll take a non-acceptable training and computing time. At the current state of the AI API interface (which basically exposes just the units and the territory map), it's likely to die from combinatory explosion.
  3. @agentx: AIs succeeding in an AI tournament are not necessarily the ones most funny to play (against as a human). IIRC, on the heavengames AI tournaments of AoK, the finalist "Missionary monkey" could win by monk spamming. (The monk is a unit which could convert an enemy entity to your side.) Very effective but 'lame' from a human point of view. Others used a lawnmower tactique, with the winner being the one with better startup/resource supply. Second, during my AI experiments (AoK, AoM, 0aD) i got the impression many problems of a good AI are computationally hard: The planning part for example, should consider whether some mine site is "hardly accessible" due to natural obstructions and should care to not place a house right in front of it - i had this happen to my test AI on the Acropolis_05 map. Similar problems arise e.g. for towers - in the end, you'd need a kind of "automatic building department" which pre-calculates and updates a city layout plan as the map changes, taking into account future entity walking routes. The ideas about machine learning seem helpful to me in another way: Afaik, for a lot of game-AI problems no 'intelligent' algorithms are known at all, e.g. to decide where to attack enemy territory, when to retreat etc. Additionally, such algorithms had to be realtime-compatible (big problem!). Laconia comes to mind. Currently, i see four practical problems with agentx proposal: According to trac #2322, all AIs now live in a global compartment. So i presume an AI could cheat by patching another AI script away? For machine learning, i presume AIs should have a kind of persistant storage space e.g. to save 'experience' about entities matching up each other in battles, or weights of neural networks. Such 'cookies' might lead to security problems (privacy attack) As far as i got from IRC logs, the AI interface is considered non-stable and might be redesigned completely should performance problems demand so. Some people even suggested rewriting everything in C++, or to a production-system as in AoK. If this is done, it might render all efforts put into Js AIs void. Consider wraitii in an elder discussion : "1 working bot and one sub-par experimental bot are not interesting compared to having one really good bot, I believe.". (Having problems adjusting the link properly, it is in one of the last posts of the thread).@wraitii: Also I'd like to say that since I arrived here, I have seen no-one start serious work on AIs. I'm crafting an AI privately, but at the moment it's more of a collection of tools than a fit, so i didn't want to bother anyone. In case of interest, drop me a PM (i am offline most of the time). @all: I had similar thoughts when asking about the purpose of the AIs. Any comments still welcome. Offtopic: Personally, i like the idea of AI tournaments. Maybe it could be driven even further by providing a 'viral function' where an AI in good condition could split into two independant players - don't know whether this is possible in the pyrogenesis engine. Something similar to bacteria splitting.
  4. A more general question about synchronization: Assuming an AI player (or multiple) were running in a background thread, who deals with the world advancing while the AI is still calculating? I recall in the days of AoM AI scripts you could happen to add an entity to a "plan" (native implementation similar to what is used by aegis) and while the plan was just initializing, that entity got killed ~> problem. So, assuming someone wrote an AI which started "number crunching" (a HandleMessage()/OnUpdate() call takes several seconds to complete), would this just be considered bad practice?
  5. Thanks for the info&link, i will stand by a few days before doing so - eventually some of them will pass by this thread beforehand, it's probably rude to "hijack" them... (and i could image this question has no simple answer...) Edit: somehow text was garbled up a bit
  6. Yes, I have seen the technical specification, my point was more about the purpose of the AIs (the "gameplay"). For example, in some elder threads there was a desire for a "real hard AI that does not cheat", which is probably category #1,#2. Let's imagine there was a perfect-playing(*) AI - what would one do with it? Another issue is the "partial AI rewrite in C++" mentioned before. If the primary audience is multiplayer, a 100% hardcoded/scripted AI might be sufficient with respect to the performance troubles. (* For tic-tac-toe, checkers and similar games a database of *all possible gameplays* has been built - one can formally prove an AI using that DB can enforce a stalemate at least => it is invincible)
  7. Hello everybody, watching the progression of 0AD for some time now left a question open with me: How do the AI bots "fit into the big picture"? For clarification, i see at least the following uses of a "computer player": 1. "Substitute" a human player e.g. when network is not available/too slow for multiplayer (=> aegis?) 2. "Assistants" - see discussion on "Player-Scriptable Micro Managers" (2011/12/17) 3. "Trainer": Allow newcomers to practice before joining multiplayer games against experienced players (=> jubot?) 4. "Specials": Special behavior designed to fit a custom scenario, e.g. single-player campains or replay of historical events (battle of Marathon comes to mind). 5. "Demos" Show features of gameplay alive, including a "getting started walk-through" and auto-testing (=> tutorialbot, testbot) 6. "Bots in their own right". Could include 'abuse' of 0AD as a "core war runtime with excellent GUI" (i recall during the high-days of AOK there was an AI tournament set up by heavengames.com ~approx. 10 years ago). I haven't found a concept paper on this in the wiki, but i'm curious what the 0AD officials think of where the focus is - what are your "must haves/nice to haves/don't cares/don't want to see thats"? AI development seems relatively quiet at the moment, so i thought it a good time to raise the question. As people were thinking of changing the implementation design (discussions on C++/genetic algorithms etc.), such clarification might help (=> discussion "Finalizing planning for part 1.0" 2013/02/11 - consensus of the associated log seems to implement on an on-need base). Please pardon me if there is info on the web and i didn't find it...
×
×
  • Create New...