TA3D 0.4.1 TEST 6

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

TA3D 0.4.1 TEST 6

Post by zuzuf » Sat Oct 27, 2007 11:06 pm

This is the first release with A.I. !!! Of course it's a test release since AI code needs testing -> Ok it's not perfect, not hard, I know that, what I want to know is how it interacts with the rest of the engine, does it freeze the game (It happened to me once, but didn't crash), does it crash in some strange configuration, ...

Also bombers weren't dropping their bombs at all, now it should be fixed.

have fun:
TA3D 0.4.1 TEST 6
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Oct 28, 2007 8:54 am

FUCCKKIIINNNGGG COOOLLLL!!!!!!

Thanx, Zuzuf!!!

Also question - how AI interacts with mods?

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Oct 28, 2007 9:22 am

:( I`ve played several games with ccdata nd rev31.gp3 and thithout them, but AI only builds solar panels or wind generators :(

Are there any special settings that should be made to help AI to behave more correctly?

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Oct 28, 2007 9:50 am

And my units can`t fire, except commander. Don`t know why :(

AI comm behave funny, but if mu units approach AI base he run to kick some asses :) then return to build energy buildings again.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Oct 28, 2007 3:02 pm

AI is a state machine so its behaviour depends on everything the game has loaded, so try to figure out what is making it behaving the wrong way. For now it should build a base starting with resources generators. Then he will build what he needs to make an army if he thinks he need to (if you're making units).

Also I didn't test AI with mods, so I don't know how it works with mods, it should read the set of units it can build and deal with that like it would do with normal units, but I "balanced" AI behaviour for CORE, so it might not play as good as expected with mods.

keep testing, I have to leave now :wink:
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Oct 28, 2007 5:21 pm

I`ve tested it with different resource variations.

The only unit that can attack - commander.

The only unit that can be attacked - commander.

So no building, no land can be attacked - just enemy commander. AI still builds solar panels and sometimes wind generators. Well, something need to be redone here...

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Nov 04, 2007 1:06 pm

ok, I'll check that.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Nov 04, 2007 1:35 pm

Hurray! Zuzuf is back :)

And there are sometime selection problems. You select commander and there then you can`t select anything. So the only thing you can do is select something else on minimap, then all return to normal.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Nov 04, 2007 3:55 pm

yeah I've already seen this selection but only with the windows version, and it seems to do this only some times. This must be linked to the GUI system since the cursor behaves as if it was on GUI, if you click the order button and go to the order menu, you'll get the normal behavior again.

You'll be happy to know I've fixed the attack bug, it was due to some error in the code I changed to make bombers work again. Also compilation problems with Allegro 4.2.0 are fixed.

But on my PC the AI is behaving the expected way ...

I'll add some logging system for the AI code, so you can send me data telling how it's doing.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Nov 04, 2007 5:51 pm

Yes, this could give us a hand how to fix AI :)

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Nov 04, 2007 6:06 pm

Yes,

currently I am some code thread safe ( I noticed the game could freeze during battles, so I am adding the locking mechanism to the UNIT class so locking will be done by UNIT elements (one unit) instead of INGAME_UNITS (all the units at the same times). So it should also be possible to increase engine speed on multi CPU systems that way.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Nov 04, 2007 6:15 pm

Also please specify what resources do you use to test AI. So I will use the same set of resources to recieve the same results as you.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Nov 04, 2007 7:02 pm

I am using totala1.hpi, totala2.hpi, rev31.gp3, ccdata.ccx, bmaps2f.hpi (only contains maps), and a large set of maps but I am testing on tawp_double_crossing.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Nov 04, 2007 7:26 pm

I see :) Will wait till next release, before testing, since can`t even attack :)

Also, maybe you shuld think about some function that will calculate effectivness of unit to specify it`s weight for AI to use, depending map size and type.

So using different mods AI will not be confused with new different units and could use the more effective ones. Also external unit weight files should be supported for AI tweaking.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Nov 04, 2007 9:27 pm

hm, units should be able to attack auto-targeted enemies (it's a bug in the code that handles the commandfire variable from *.fbi files).

unit effectiveness will be implemented but not as part of the AI base API, since this will vary from one AI to another.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Mon Nov 05, 2007 2:48 pm

I see. But now I can`t auto-attack buildings (since +shootall command not implemented in TA3D) and AI don`t build factories and units :)

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Nov 05, 2007 4:07 pm

what happens when you play with more than one AI ? Which AI difficulty levels did you tried ?
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Mon Nov 05, 2007 4:22 pm

:) I don`t know, never tryed more than one at a time. Difficult level - default one. Does difficulty level affects AI behaviour?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Nov 05, 2007 4:36 pm

AI level affects the speed of the AI, easy -> slow, takes a decision every 10 sec, up to the fastest level 1 decision/sec.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Tue Nov 06, 2007 6:23 am

Hell, three AI just do the same way - building solar panels and wind generators. Resources - are the same, except rev31.gp3 and external mappack. Tryed different maps.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Wed Nov 07, 2007 7:51 am

what if you build a base too ? did you try with 2 AI players ?
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Wed Nov 07, 2007 6:54 pm

Well, it all useless. I`ve played several games against 3 AI, with buildiong up my base and attacking AI.

But it was all useless. They don`t build metal extractors, only solar panels and wind generators. I was unable to figure what the cause of this. Sorry :(

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Wed Nov 07, 2007 10:06 pm

hm, strange, I'll test on other machines when I'll be back home. On my dev computer it just works, I can play games against AI player(s), it only reveals that unit moving code isn't perfect since some units can still get blocked :evil: (I think this might be because of path simplification code that doesn't check enough things)
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Thu Nov 08, 2007 6:22 am

Yes, please check on other PC. I`m in desperate need of working AI :)
I`ve checked on two different PC`s and the result was just the same.
Also - AI that is close to the border of the screen offten gets confused.

Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests