OTAI for 0.66b1

OTAI for 0.66b1

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

Moderators: hoijui, Moderators

Post Reply
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

OTAI for 0.66b1

Post by Veylon »

New Version of OTAI: download here.

New Features:
- Remembers where it saw enemies and attacks there.
- More likely to scout where enemies have been seen.
- Manages mexxes better.
- Mostly fixed idle builder bug.
- Builders now help on nearby projects, rather than starting new ones.
- New Building site system, no more buildings on metal/geo that shouldn't be there.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Current version be 0.67 not .66 btu it should be compatible anyways.

But no source?!?!?!?!?!?! Me shall playtest AAI vs NTAI vs OTAI
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

Don't forget to throw JCAI in there too...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Nah, in every single game on brazzlian battlefields of JCAI vs AAI vs NTAI, JCAI always did the same thing

build a few soalrs and mexes
build a vehicle plant with a tree blocking the exit point
build a jeffy while com buidls mex
jeffy gets stuck, commander does nothing
NTAI sends a con bot to build a mex next to JCAI's veh plant
Bot gets blwon up by JCAI
NTAI sends in an attack force and crushes JCAI.

In other cses just take the above and replace it with

AAI scouted JCAI
AAI sent untis to destroy JCAI
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I've added NTAI and OTAI to the community news
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

Yeah! Thanks.
Liam
Posts: 93
Joined: 02 Nov 2004, 22:43

Post by Liam »

just tried otai vs. ntai ARM and otai won, but it was a really good game, all these AIs are really impressive, keep up the good work :)
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Nah, in every single game on brazzlian battlefields of JCAI vs AAI vs NTAI, JCAI always did the same thing
And JCAI always started on the right side of the map right?
Because if you put NTAI on the right side it will get stuck in the trees or has a serious disadvantage anyway. My point is that BB is not a fair map to test on, because the right side has much more trees than the left.

But anyway, JCAI is not being developed anymore for a while now, so logically it's behind the other AIs. So it's also not participating again in the "AI battles" until I start supporting it again ;)

Ok back to OTAI, which I still have to test so I can't give an opinion ;)
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

I tried it on 4skulls, but it made only LLTs. Probably because I started with 5000 metal by accident, but it's still something you should check out.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

What OTAI builds si questionable.

On one game ti built resources adn defences but didnt build a factory till the 30 min mark.

On another it built the factory rather quickly and spammed mexes (see post I'll make in a few minutes).

Overrall OTAI is very capable AI, given a bti fo finetuning and problem resolving it could crush AAI and NTAI. The agme I've bene spectating in the last 90 minutes has ahd OTAI and NTAI dueling. The onyl thign was OTAI seemed reluctant to send its forces out too far so never atatcked the main NTAI abse. But NTAI is having trouble destroying OTAI..
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

cool, u shoulda nudged me so i could spec too :D
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Twas an offline game
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

Thirty minutes!
I've never seen it put it off factories that long. I hope it's just a fluke.

Anyway, I've more or less fixed the Mex spamming problem by forbidding all non-mex units on metal and geos.

The problem, especially on XanthTerra, was that the base would get built over the metal spots, the AI would see all that metal there, build a mex as close as it could, which was too far to get anything, and then repeat.

The problem (I think) on 4 Skulls was that the starting area was too rough and the AI too dumb to migrate. I'll have to check it out some more.

I also got reclamation and some resurrection going as well and reduced the probability of defense building to a more reasonable level.

Download the new version here.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

source source source source SOURCE!!!!!!!!
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

Whoops!

I'll get it next time. Anything in particular you want to know about while I'm here?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

err, spout as much info as you can, more about how your attack system works compared to NTAI & AAI, better yet how are you placing buildings?
User avatar
Veylon
AI Developer
Posts: 174
Joined: 21 Sep 2005, 19:45

Post by Veylon »

Building Placement:

I basically copied the building placement algorithm from the TASpring engine, and then modified it to use a buildmap. This buildmap is generated at the beginning and marks all squares as OK to build except Metal and near Geos.

Then, the algorithm goes through the nearby positions and if the building could be built there according to the buildmap, it is checked with the callback CanBuildHere function.

Finally, when the unit is created, it marks off the area it covers and a buffer around it as being unavailable in the build map.

Attack System:

Every frame the Update Function increments the TimeLastAttack variable. When it is about 500, the Attack system begins looking for a new target (high lastattacktime = longer since any fighting, therefore time to move on)

It first looks to see if there are any visible enemies. If so, it sets the attack position there. If not, it looks for radar targets, and ditto with one of them. Lastly, it sorts through the LastKnownLoc list and finds the nearest place in which it last saw an enemy and does not have LOS. Then it goes there. Otherwise, the units around the attackmarker patrol farther and farther out and eventually become scouts.

The LastKnownLoc list is generated for each new unit of the enemy's that is seen. It is updated when they are exiting the los and radar and deleted when they are destroyed.

Also the attack team is supposed to attack only when there are about twenty units in it, otherwise regroup, but I've got a few bugs there that I have to fix.

Anything else you wanted to know?

edit:

Here's the source:
http://www.geocities.com/veylon_ii/TASp ... 03_src.zip
Post Reply

Return to “AI”