the random number generator function rand() doesn't return a 32 bits random number !!! Only a 16 bits one!! So the rand_from_table() function which is the random generator of TA3D (a cached version of rand() to speed up things) that uses rand() doesn't return numbers larger than 16bits integers !!!
It doesn't happen on other systems, but it has consequences on the win32 version of TA3D, mainly the one that made me aware of this : AI cannot decide to build more than one or two unit types !!! Because it uses the rand() function to decide ... and other units aren't covered by this short 16 bits range.
I am going to fix it, it should be easy to fix.
critical bug found on win32 version...
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
critical bug found on win32 version...
=>;-D Penguin Powered
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
AI is implemented in ... well currently I don't think we can say AI is implemented . TA3D currently has an API that is an interface between the game and the AI, the small behavior you'll see when playing is the result of basic commands given through this API, the whole code is in ia.cpp & ia.h.
Currently the API provides:
Currently the API provides:
- * neural networks objects (unused at the moment)
* AI threads
* giving orders to units
* managing resources
* scanning available units
=>;-D Penguin Powered
Who is online
Users browsing this forum: No registered users and 26 guests