Problem is now that I have to run for about 10 mins before it crashes, so debugging doesn't go exactly fast.
First release of JCAI - global AI
Moderator: Moderators
Is it only me, or dont the scripts work if you change the default map to a new one that is packed in the new formats?
edit: did try out the standart aivsai.bat two times, and it crashed both times after about 3-4 minutes.
log:
The first crash also ended in excatly the same line (...added CAORFAV...)
The first crash was before any unit had been killed,the second one after one kill.
Maybe there was a pointer error or something, because batchsize didnt increase after the unit-add?
Edit2:
I did a few runs with debug=1
It seems the crash happens _everytime_ the first batch of CVs and Jeffys has been build.
edit: did try out the standart aivsai.bat two times, and it crashed both times after about 3-4 minutes.
log:
Code: Select all
UnitGroup: Added CORFAV - batch has 3 units.
UnitGroup: Added CORFAV - batch has 4 units.
New cell klab
RequestSafeBuildingZone(): heightdif=7.137262
New cell vplant
RequestSafeBuildingZone(): heightdif=10.461583
UnitGroup: Added CORFAV - batch has 4 units.
The first crash was before any unit had been killed,the second one after one kill.
Maybe there was a pointer error or something, because batchsize didnt increase after the unit-add?
Edit2:
I did a few runs with debug=1
Code: Select all
1st one:
.
.
New cell mine
RequestMiningZone(): (0,4)
mine: Trying to build a mex...
AddBuildOrder: CORMEX @ (224,2480)
New cell mine
RequestMiningZone(): (3,3)
mine: Trying to build a mex...
AddBuildOrder: CORMEX @ (1776,1792)
New cell mine
RequestMiningZone(): (4,2)
mine: Trying to build a mex...
AddBuildOrder: CORMEX @ (2272,1248)
New cell mine
RequestMiningZone(): (1,5)
mine: Trying to build a mex...
AddBuildOrder: CORMEX @ (768,3056)
New cell mine
RequestMiningZone(): (3,4)
mine: Trying to build a mex...
AddBuildOrder: CORMEX @ (1872,2416)
SetBatchBuildingTask: BasicForce1
SetBatchBuildingTask: BasicForce1
airbuilder: Trying to build a support CORSOLAR...
AddBuildOrder: CORSOLAR @ (6400,7040)
SetBatchBuildingTask: BasicForce1
UnitGroup: Added CORFAV - batch has 4 units.
ForceHandler: Batch build completed: (BasicForce1)
--------------------------------------------------
2nd one:
.
.
Add factory order: CORFAV
New cell klab
RequestSafeBuildingZone(): heightdif=7.137262
AddBuildOrder: CORLAB @ (1792,768)
New cell vplant
RequestSafeBuildingZone(): heightdif=10.461583
Add factory order: CORCV
SetBatchBuildingTask: BasicForce1
Add factory order: CORVENG
UnitGroup: Added CORFAV - batch has 4 units.
SetBatchBuildingTask: BasicForce1
SetBatchBuildingTask: BasicForce1
SetBatchBuildingTask: BasicForce1
SetBatchBuildingTask: BasicForce1
SetBatchBuildingTask: BasicForce1
SetBatchBuildingTask: BasicForce1
SetBatchBuildingTask: BasicForce1
airbuilder: Trying to build a support CORSOLAR...
AddBuildOrder: CORSOLAR @ (6400,7040)
UnitGroup: Added CORFAV - batch has 4 units.
ForceHandler: Batch build completed: (BasicForce1)
--------------------------------------------------
3rd one:
.
.
New cell mine
RequestMiningZone(): (4,2)
mine: Trying to build a mex...
AddBuildOrder: CORMEX @ (2272,1248)
New cell mine
RequestMiningZone(): (1,5)
mine: Trying to build a mex...
AddBuildOrder: CORMEX @ (768,3056)
New cell mine
RequestMiningZone(): (3,4)
mine: Trying to build a mex...
AddBuildOrder: CORMEX @ (1872,2416)
SetBatchBuildingTask: BasicForce1
airbuilder: Trying to build a support CORSOLAR...
AddBuildOrder: CORSOLAR @ (1280,896)
UnitGroup: Added CORFAV - batch has 4 units.
ForceHandler: Batch build completed: (BasicForce1)Strangly, when selecting playervs2cpu, it didnt crash that quickly.
And your ai is already better than the cavedog one (if it doesnt crash).
After building a rader tower i found a group of enemy units. I send some flashes , and the jeffies retreated, only to come back a minute later when a second group had arrived and attacked my base, while at the same time they send in planes from the other direction. (maybe the "other direction" part was coincidence, but that behaviour did _feel_ like a real opponent.
And your ai is already better than the cavedog one (if it doesnt crash).
After building a rader tower i found a group of enemy units. I send some flashes , and the jeffies retreated, only to come back a minute later when a second group had arrived and attacked my base, while at the same time they send in planes from the other direction. (maybe the "other direction" part was coincidence, but that behaviour did _feel_ like a real opponent.
It's probably a lot of coincidence too, mainly it's just attacking in groups.That's what makes it better than cavedog AI already I think. Probably the other direction is just caused by the fact that there were 2 AIs in the game.
Anyway, back to debugging
- this part of coding sucks...
thx for testing...
It doesn't use any map specific information. (at least none that isn't given by the spring interface) However, because there is no balancing in place could make it very weak or even non-working at some maps.Is it only me, or dont the scripts work if you change the default map to a new one that is packed in the new formats?
Anyway, back to debugging
thx for testing...
I will be adding a more automated form of dependency handling now, just like spring itself has. This should get rid of errors like this, because it all involves access violations, but it could take a while before it's running properly again....
I also discovered that the debug version is a lot more stable than the release, that's why it was very hard to reproduce all the reported bugs...
I also discovered that the debug version is a lot more stable than the release, that's why it was very hard to reproduce all the reported bugs...
Metal extractor finding and mex radius
Zaphod, can you modify your MEX spot finding routine so it will get the spots correctly on map like Core Prime industrial(metal uniformely distributed) and some others by using new callback->getExtractorRadius function to calculate metal spots so the mex's radiuses cover all metal. In CPIndustrial map mex radius is just the size of mex, so mex spots should be all over, while now your AI finds them like this(tested) : (0;0) (0;512); (0;1024)... (512;0) (512;512) and so on I don't know why.
If you'll fix this could I get a link to the new code? :)
I've read enough C++ and started writing my AI and just lazy to wright my own metal spot finder routine;)
Thanks,
Oleg.
If you'll fix this could I get a link to the new code? :)
I've read enough C++ and started writing my AI and just lazy to wright my own metal spot finder routine;)
Thanks,
Oleg.
- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
I notices it crashes after the commander can't move to a desired position.
Doesn't explain the random crashes, but the AI fights very well though.
in TA:WD it more often crashes, probably due to the commander finding spots to build...
BTW, when the new TA:WD beta is ready, i'll release it as a mod file along with a script for it...i'll probably release the .ccx version seperately.
Doesn't explain the random crashes, but the AI fights very well though.
in TA:WD it more often crashes, probably due to the commander finding spots to build...
BTW, when the new TA:WD beta is ready, i'll release it as a mod file along with a script for it...i'll probably release the .ccx version seperately.
Sorry, eventually I will be focusing on that too, but currently other things are way higher on my todo list...Zaphod, can you modify your MEX spot finding routine so it will get the spots correctly on map like Core Prime industrial(metal uniformely distributed) and some others by using new callback->getExtractorRadius function to calculate metal spots so the mex's radiuses cover all metal. In CPIndustrial map mex radius is just the size of mex, so mex spots should be all over, while now your AI finds them like this(tested) : (0;0) (0;512); (0;1024)... (512;0) (512;512) and so on I don't know why.
If you'll fix this could I get a link to the new code? :)
I've read enough C++ and started writing my AI and just lazy to wright my own metal spot finder routine;)
Thanks,
Oleg.
It's basically because the cell system only allows one mex per cell, plus it's easier to find the spots with such a system.
I'm doing some restructuring now, though the scripts (your TA:WD script as well) should be fine. It'll take at least 4 days, as I'm kinda demotivated because of the debugging and I also have exams coming up.
- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
Hey, I feel ya man, I am not quite motivated my self to work on TA:WD, even though I know I need to make new textures, new models etc.
Focus on your exams for now, you might get more motivation soon as you see more posts with praise to your AI :) because you did a hell of a job so far! it works great even though it's only version 0.11!
Focus on your exams for now, you might get more motivation soon as you see more posts with praise to your AI :) because you did a hell of a job so far! it works great even though it's only version 0.11!
I decided to register here so that I could thank you Zaphod publicly for two reasons.
1) The AI, yes it's not finished and it crashes. All great works start somewhere. You have so far provided the leading AI in the spring community take a bow :)
2) Burning Alantai Firestar. I have been following the threads on AI construction here pretty close for some time now. I had started to grow a dislike to the windbag. I got a good laugh at you making him take a quiet exit.
Once more, many thanks on doing both of those!
Keep up the great work!
1) The AI, yes it's not finished and it crashes. All great works start somewhere. You have so far provided the leading AI in the spring community take a bow :)
2) Burning Alantai Firestar. I have been following the threads on AI construction here pretty close for some time now. I had started to grow a dislike to the windbag. I got a good laugh at you making him take a quiet exit.
Once more, many thanks on doing both of those!
Keep up the great work!
Okay, i reinstalled the lastest version with only maps and downloaded your updated version of JCAI. Now, when i start it says ''Incoret version of globall AI test.dll'' and the path to it. Then there is either 1 commander (if i started spring.exe and global AI) or nothing (if i played a me vs bot game in spring lobby).
Help?
Oh, and i can only select the test.dll in spring lobby...
Help?
Oh, and i can only select the test.dll in spring lobby...
ditto.Kixxe wrote:Okay, i reinstalled the lastest version with only maps and downloaded your updated version of JCAI. Now, when i start it says ''Incoret version of globall AI test.dll'' and the path to it. Then there is either 1 commander (if i started spring.exe and global AI) or nothing (if i played a me vs bot game in spring lobby).
Help?
Oh, and i can only select the test.dll in spring lobby...
Since it basically crashes somewhere in the game anyway, I didn't bother to recompile.
I'm kinda redesigning and rewriting it, while continously testing it on release mode so I bump on (hopefully) every bug in it. This will make parts of the AI script outdated, and will take some time since I also have exams coming up next week.
I'm not really willing to invest my time on debugging the not-quite-optimal solution that JCAI 0.11 had, I going for long-term improvements :), so you guys have to wait for at least a week longer...
I'm kinda redesigning and rewriting it, while continously testing it on release mode so I bump on (hopefully) every bug in it. This will make parts of the AI script outdated, and will take some time since I also have exams coming up next week.
I'm not really willing to invest my time on debugging the not-quite-optimal solution that JCAI 0.11 had, I going for long-term improvements :), so you guys have to wait for at least a week longer...
