look like title,i want write a AI better than me
infact i want write all my want to AI,how to do that?
how can i write a AI for TA3D
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
Currently, AI is a weight system, very TA-ish thing, and AI API is very poor. The only way to implement an AI at the moment is to add it into the AI module directly in C++, linked against the TA3D binary.
It's planned to add a Lua interface for AI in order to allow easy implementation of various AI and to achieve high portability (scripts are much more portable than plugins). Also since scripts are monitored by the engine, they can be given a CPU quota in order to prevent scripts to slow down things too much. So I believe scripts is the way to go, but for now the Lua interface is TODO work.
So we're listening to you, what would you like to have in the Lua interface ?
It's planned to add a Lua interface for AI in order to allow easy implementation of various AI and to achieve high portability (scripts are much more portable than plugins). Also since scripts are monitored by the engine, they can be given a CPU quota in order to prevent scripts to slow down things too much. So I believe scripts is the way to go, but for now the Lua interface is TODO work.
So we're listening to you, what would you like to have in the Lua interface ?
=>;-D Penguin Powered
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
the weight system is slightly different, TA3D uses dynamic weights whose evolution is based on several rules (written directly in the code). So this may not be easy to interface with TA static weights (I don't even know exactly how TA system works which makes the thing even harder).
The easiest way to do that would be to use the future Lua interface (we can imagine using the weight system evolving based on rules coded in Lua).
Also, I planned to add several algorithms in the Lua interface that could be useful for AI such as g/kmeans which could be used to identify the different bases/armies of a player and act accordingly
The easiest way to do that would be to use the future Lua interface (we can imagine using the weight system evolving based on rules coded in Lua).
Also, I planned to add several algorithms in the Lua interface that could be useful for AI such as g/kmeans which could be used to identify the different bases/armies of a player and act accordingly
=>;-D Penguin Powered
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
Lua API is C, so you can perfectly hack this part of the code (AI API is nearly C code), also there are several examples of programs using Lua (Lua itself comes with examples).
Also I've made a small project using Lua (in order to understand better the way it works), it contains some useful functions (like functions to use Vector3D objects like native Lua variables). We could use the Lua code loader from this project since it's much better than the one in TA3D script code (and design is thread friendly)
Also I've made a small project using Lua (in order to understand better the way it works), it contains some useful functions (like functions to use Vector3D objects like native Lua variables). We could use the Lua code loader from this project since it's much better than the one in TA3D script code (and design is thread friendly)
=>;-D Penguin Powered
Who is online
Users browsing this forum: No registered users and 3 guests