It is alive!!!

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:

It is alive!!!

Post by zuzuf » Mon Oct 22, 2007 11:05 pm

I manage to run a very basic AI on TA3D. But it works !!! It builds a base, well it builds things, now it doesn't build exactly what it should but that's a start. For now it builds too much factories because the factory weight isn't limited so it becames very high very quickly.

I still need to fix a couple of things but it works, the first AI ever made for TA3D :shock:
=>;-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 Oct 23, 2007 2:40 pm

Wonderfull!!! What can be better to teach AI some usefull tricks :)

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

Post by zuzuf » Tue Oct 23, 2007 7:16 pm

for now it's only a basic AI that execute the orders it can give (and are programmed in the code) to units, but it still needs a "mind" to analyze the game more precisely and decide the priority of these orders and their parameters (where to attack, where to settle, build what kind of structure, spy, ...). This will be done by AI type dependent code, and the bloody AI should use neural networks to take those decisions.
=>;-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 Oct 24, 2007 9:48 am

That`s really nice news :) Waiting for test releases :)

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

Post by zuzuf » Wed Oct 24, 2007 12:06 pm

yes, but there are some bugs to fix first like the one with factories:
when a factory close if you order it to build something too early it won't activate again and won't build anything... and that's a real problem with AI since it doesn't wait even a bit when it gives orders to factories, so you get lots of locked factories :(
=>;-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 Oct 24, 2007 12:30 pm

From this point of view AI help us do testing :) Factoryes are still have several bugs with open/close state and units releasing.

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

Post by zuzuf » Wed Oct 24, 2007 12:42 pm

bug just fixed :D

I've just seen some strange call in the code something like:

Code: Select all

	launch_script(get_script_index(SCRIPT_stop));
	deactivate();
but when the deactivate() function is called, it runs the deactivate script function in the COB machine which calls the stop function ... but with some state management, so calling stop before deactivate bypass the state management in the script causing bad behaviour -> so removed the call to stop.

Hope it won't create bugs with other units, but it seems good for now 8)
=>;-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 Oct 24, 2007 1:07 pm

Testing testing and testing :)

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

Post by zuzuf » Thu Oct 25, 2007 9:53 pm

Ok, I fixed many bugs that we couldn't see before having AI ready, so now AI just works, even if it still doesn't attack the AI builds a base, with everything it needs, and if you let it do it will build a huge base, and it uses all the units it can build. So in a game I played, it built lots of mines, solar panels, ...
=>;-D Penguin Powered

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

Post by Balthazar » Fri Oct 26, 2007 3:40 pm

Now it just should sometimes send all units it have to attack (or patrol) the player :)

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

Post by zuzuf » Fri Oct 26, 2007 8:15 pm

Yes, but it also has to take fog of war into account, so there will be two codes, one for FOW and one without FOW, so AI won't cheat. When the AI knows where it can attack then it will attack. Still working on it, but the good news is that I can run the game during a long time without any crash!!!
=>;-D Penguin Powered

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

Post by Balthazar » Sat Oct 27, 2007 6:56 am

Cool :) Well, non-cheating AI is too weak. I don`t belive that AI can be good without cheating. Human just too powerfull to play against AI fair.

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

Post by zuzuf » Sat Oct 27, 2007 9:57 am

Yes but this is the core of the AI API, so if it cheats there then every AI that will be used will cheat. And I am not sure the AI has to cheat in order to be hard to defeat, I would like to see first how good it will be with neural networks to analyze the game it is playing. And if one AI is too weak then use more AI :D
=>;-D Penguin Powered

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

Post by Balthazar » Sat Oct 27, 2007 5:42 pm

Well, several AI is worser than one cheating AI IMHO.

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

Post by zuzuf » Sat Oct 27, 2007 6:42 pm

yes, but it's only a start.

PS: I am having stability problems with my dsl connection, so I might not respond before leaving tomorrow. I am working on the AI and on some bugs with bombers (should be fixed now). If my dsl connection allows me to upload something I might upload a test build with AI.
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests