Jump to content

About the AIs we have


Recommended Posts

Hi,

I open this thread because 2 interesting questions came out of discussions about Split Bot, which are more about AIs in general

Out of interest, how does it compare to qBot and Jubot?

and

Just did some testing, and SplitBot is the "best" of the bots. Despite a whole bunch of building placement crazyness that causes it to waste considerable time, it still grows in population faster than the other bots, builds siege sooner and attacks in larger waves.

Though an interesting idea occurred to me, perhaps it grows so fast because it builds slowly. Sure, it wastes resources when it puts the foundation down, but that blocks the builder agent from building and placing more buildings, freeing up more resources for spawning units. Plus, it gets those resources right back when it cancels the stuck structure. Essentially, the delay in building means an acceleration in spawning.

So, AI developers and others, what do you think ? Edited by lexa
Link to comment
Share on other sites

I haven't looked into splitbot and I haven't tested with it much because I have found it a bit buggy (building placement before the fix, it also locked up occasionally/spat lots of error messages (which I should have bug reported but didn't, sorry)).

Since I started with a testbot base and primarily test with JuBot opponents I can provide detail on the differences.

Queue System

The primary difference currently is my replacement of the plan system.

JuBot doesn't plan ahead, by this I mean that practically nothing calculated in a turn is used after that turn. So Jubot looks at the current state and a bit of the past and works from there.

Qbot's queue system tries to plan ahead, so with qBot the system queues ~70 female citizens from the very start of the game. It also queues up 30 soldiers at once. Stuff like houses it doesn't do so much since I want the population supply to keep up with the number of houses, otherwise wood is wasted. The benefit of this approach is that for resource gathering my AI can look ahead in the queues and see what will be needed and gather that ratio. In contrast JuBot looks to see what resource it is running out of for the plans at the current turn and gives them more workers, so JuBot should be less able to cope with sudden changes in resource requirements. The other benefit is speed, my system remembers stuff so things like workers training can be done less often since it has a big queue to work through.

Note: I have been bug fixing the predictive resource code this morning after I found it wasn't working properly so testers may have noticed unbalanced gathering (probably too much food, stone and metal), this was a bug in implementation which will be fixed soon.

I plan to look at the training rates and recognise when a lack of training structures will be a bottleneck, currently my AI doesn't build much so too much building isn't slowing its speed, in my brief testing I think qBot builds up fastest at the start of the game but then gets hindered by not being able to use citizen soldiers to gather. I also restricted economy a bit to help not lag the game with too many workers walking around.

Economy

This is fairly complete except for building resource drops which is unimplemented, I am thinking of using JuBots implementation, maybe with some tweaks.

Military System

My main current work is revamping the military section. This is still all sitting in my development branch because it is a heavy work in progress. It has taken me a while for two reasons: firstly I was away for a few days and have moved back to Uni so have had less time; secondly I have been messing with different approaches in general so have been thinking about the general architecture of the military section.

What I have settled on is a system which tracks the id's of the military units. This will be faster than storing a role in metadata and continually rescanning the entities to look for units with the metadata. Also it forces keeping track of units more carefully, so it will watch the events for when units are destroyed and react based on this information.

There will be a general military manager which will train units, keep track of the id's and manage everything generally. Then there will be attack managers which can request units and will then keep control of them until they die or it releases them for general use. So there will (hopefully) be a raiding module, a decoy module (which would be initiated by a main attack module), a "scorched earth" module (wipe everything in its path), a siege module etc. These will be strategic level control and will be chosen in some way so hopefully with enough different ones the AI won't be too predictable and can strike at weaknesses.

Jubal mentioned that he was thinking of working on a battle level AI which would hopefully be able to be shared between AI's, so my strategic level modules would pass control to a battle controller when they encountered some enemy units.

Terrain Analysis

This is a completely theoretical plan which I haven't done any code for at all. It is below a few other priorities so will be a while before I could do any work on it.

The idea would be for the AI to look at the map and pick out important features. My thoughts so far have mainly been about choke point identification. So it will be presented with the map and will produce a list of distinct routes to the enemy base. This would be helpful for attack planning and defence i.e. build fortresses blocking every approach. I think I know how to do this (basically find the shortest path, look for a narrow point sufficiently close to my base, store this, put a fortress arrow range sized unpathable region at that point, repeat until there are no more routes).

Navy

I have not thought about this. I aim to do the other stuff I mentioned first. I personally don't really like sea maps so would prefer a challenging AI on land rather than mediocre on land an sea.

Conclusion

That is a rough outline of what my AI does and what I plan to do to develop it further. Hopefully this will help people testing to see what is a bug and what is unimplemented and let the other AI people know what I am doing.

Link to comment
Share on other sites

Simple to decide which AI is the best . Have an AI tournament . qbot vs JuBot , Jubot vs SplitBot . The winner of the two battles takes on each other in the final round to determine the winner .

Run this on all the maps about a dozen time and calculate statistically who wins most of the time .

But on a more serious note I think all AI developers should work together to incorporate best elements of there designs to create a good working AI for the game rather than competing with one another . Although friendly competition is always beneficial still the game at this point of time lack a good AI and the sooner it gets implemented the better it is for the game . After that happens I see no harm in having multiple AI implementations or experimenting with the AI as

long as there is a basic stable working computer opponent to play against . ( Frankly I don't know much about AI development so I hope haven't offended any of the AI developers in this post but just in case I apologies in advance )

Edited by ac892006
Link to comment
Share on other sites

Simple to decide which AI is the best . Have an AI tournament . qbot vs JuBot , Jubot vs SplitBot . The winner of the two battles takes on each other in the final round to determine the winner .

Run this on all the maps about a dozen time and calculate statistically who wins most of the time .

But on a more serious note I think all AI developers should work together to incorporate best elements of there designs to create a good working AI for the game rather than competing with one another . Although friendly competition is always beneficial still the game at this point of time lack a good AI and the sooner it gets implemented the better it is for the game . After that happens I see no harm in having multiple AI implementations or experimenting with the AI as

long as there is a basic stable working computer opponent to play against . ( Frankly I don't know much about AI development so I hope haven't offended any of the AI developers in this post but just in case I apologies in advance )

All of the AI's are under the same license so can in theory share things. Hindrances are the difference between the AI's (SplitBot is written in Haxe, and qBot has made fairly large architectural changes). I gave my reasoning for starting a separate project in my qBot thread. I certainly hope we can share some things between the AI's, I am pretty sure I will end up integrating some of JuBot into qBot. Currently I have been working on the core parts which make it difficult to be collaborative. I'm sure you didn't offend anyone.

Link to comment
Share on other sites

  • 2 weeks later...

Simple to decide which AI is the best . Have an AI tournament . qbot vs JuBot , Jubot vs SplitBot . The winner of the two battles takes on each other in the final round to determine the winner .

Run this on all the maps about a dozen time and calculate statistically who wins most of the time .

Good idea, this is very

If we do this, we should advertise it a little bit, set a date and make it a small event?

But on a more serious note I think all AI developers should work together to incorporate best elements of there designs to create a good working AI for the game rather than competing with one another . Although friendly competition is always beneficial still the game at this point of time lack a good AI and the sooner it gets implemented the better it is for the game .

I think that this kind of post is a collaboration and we try to understand what is good in each approach

All of the AI's are under the same license so can in theory share things.

Right!

Link to comment
Share on other sites

  • 3 months later...

It's been a while since I did not touch SplitBot...

Did someone try to make bots fight together?

I need to make some comparisons because I am not a good player, so I guess I should get some inspiration from other bots techniques...

Not sure to have the latest versions of all bots. Is there a place where they are listed with download links?

Link to comment
Share on other sites

in fact in the svn ( http://svn.wildfiregames.com/public/ps/trunk/binaries/data/mods/public/simulation/ai/ )

I have found also

  • scaredybot
  • testbot

Those are Philip's first proof of concepts, scaredybot more or less just starts up and then sends a message to the player and surrender =) , and testbot is (at least in part) the base for jubot and qbot. In other words, only JuBot and qBot are really relevant if you want to compare AIs.

Link to comment
Share on other sites

  • 2 weeks later...

I'm not using the SVN version of 0 A.D., but marilyn ought to be compatible... It pretty much started as my take on qBot while I was on Holidays, and I've basically spent two months tweaking stuffs to make it about as good as qbot with a few underlying architectural changes.

I'm doing this both for fun and to try to improve qbot while Quantumstate is not working on it... I've basically developed this my way, but it appears all the ideas I'm trying to implement are going in the way of what Quantumstate wrote above, namely the "attack managers", which I implemented on my own as attack plans (whilst not having read that he wanted to do so, too, funnily enough). Chokepoints I intend to do too.

My biggest design change has been a few stuff in the Queues managers, the defense system (which I implemented separately for readability), attacks and the building of dropsites.

I plan on making further changes, and perhaps someday change the economic aspect a bit.

I'm also making Marilyn more suitable for the day technologies arrive.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...