QAI! V2.45! New (03/09/2007)
Moderators: hoijui, Moderators
-
- Posts: 87
- Joined: 23 Dec 2006, 21:36
- Ling_Lover
- Posts: 100
- Joined: 26 Sep 2006, 11:50
i compiled QAI 2.3 with VS.net 2003 to get a sparring partner for aai
however qai crashes after a few seconds in line 680 in UnitManager.cpp
currCmd = engineCall->GetCurrentUnitCommands( *i )->front().id;
after calling
qai.dll!std::deque<Command,std::allocator<Command> >::const_iterator::operator*() Line 113 + 0x11 C++
qai.dll!std::deque<Command,std::allocator<Command> >::front() Line 542 C++
qai.dll!CUnitManager::CheckForIdleUnits() Line 680 + 0x32 C++
qai.dll!QGlobalAI::Update() Line 432 C++
i guess the crash does not occur in the official release version, but maybe it's worth looking at what's going wrong
however qai crashes after a few seconds in line 680 in UnitManager.cpp
currCmd = engineCall->GetCurrentUnitCommands( *i )->front().id;
after calling
qai.dll!std::deque<Command,std::allocator<Command> >::const_iterator::operator*() Line 113 + 0x11 C++
qai.dll!std::deque<Command,std::allocator<Command> >::front() Line 542 C++
qai.dll!CUnitManager::CheckForIdleUnits() Line 680 + 0x32 C++
qai.dll!QGlobalAI::Update() Line 432 C++
i guess the crash does not occur in the official release version, but maybe it's worth looking at what's going wrong
interesting, GCC and MSVC must handle something different.
Here's a fix:
Replace this (UnitManager.cpp @ line 660)
with this:
This'll be pushed into the next point release.
Here's a fix:
Replace this (UnitManager.cpp @ line 660)
Code: Select all
if ( ( engineCall->GetCurrentUnitCommands( *i )->size() == 0 )
&& !( engineCall->UnitBeingBuilt( *i ) ) )
Code: Select all
if (!( engineCall->UnitBeingBuilt( *i ) ) )
if ( engineCall->GetCurrentUnitCommands( *i )->size() == 0 )
New version up (2.4)!
Major features:
-Completely rewrote unit experience gain system
(recommended, but not required, to delete the *.learn files in the EfficiencyLearning directory)
-New unit selection algorithm
--Sweepers for anti-unit support
--Skirmishers to take out unprotected economy
--Invaders to destroy bases
-Tons more bug fixes
Major features:
-Completely rewrote unit experience gain system
(recommended, but not required, to delete the *.learn files in the EfficiencyLearning directory)
-New unit selection algorithm
--Sweepers for anti-unit support
--Skirmishers to take out unprotected economy
--Invaders to destroy bases
-Tons more bug fixes
Updated to 2.41
Changelog:
V2.41
-Fixed support for air only mods
-Air units can build stuff again
-Air construction units should no longer be used as scouts
-Fixed detecting units as being underwater units
-Air repair pads should no longer be used as energy plants
-Multiple factories should no longer be built simultaneously
-Commander will now properly run away when heavily damaged
-Fixed method of detecting if a target is in LOS
Changelog:
V2.41
-Fixed support for air only mods
-Air units can build stuff again
-Air construction units should no longer be used as scouts
-Fixed detecting units as being underwater units
-Air repair pads should no longer be used as energy plants
-Multiple factories should no longer be built simultaneously
-Commander will now properly run away when heavily damaged
-Fixed method of detecting if a target is in LOS
some feedback from aai vs qai (so it might not be very meaningful concerning human vs qai) i disabled usage of long range artillery as qai doesnt seemm to build them
- qai may destroy its entire base when com tries to dgun nearby moving enemies (i dont think its easy to solve though)
- nano tower usage can be quite funny: 3 nano towers repaired an llt which stopped 4-5 waves of aai attackers all by itself :)
- qai seems to be rather porcy, leaving to much of the map to the enemy
- its very nice to see qai rotate factories in the proper direction when they are located at the edge of a map *thumbs up*
- qai may destroy its entire base when com tries to dgun nearby moving enemies (i dont think its easy to solve though)
- nano tower usage can be quite funny: 3 nano towers repaired an llt which stopped 4-5 waves of aai attackers all by itself :)
- qai seems to be rather porcy, leaving to much of the map to the enemy
- its very nice to see qai rotate factories in the proper direction when they are located at the edge of a map *thumbs up*
To no real surprise, the dev version of RAI crashed QAI after capturing one of it's metal extractors. Would probably have the same result with AAI, but haven't seen it happen since its still a rare occurrence.
There is no rush in fixing this, since RAI's next version isn't coming out any time soon, but its fairly simple to add. Some variation of this will likely do it.
There is no rush in fixing this, since RAI's next version isn't coming out any time soon, but its fairly simple to add. Some variation of this will likely do it.
Code: Select all
int cGlobalAI::HandleEvent(int msg,const void* data)
{
switch (msg)
{
case AI_EVENT_UNITCAPTURED: // 2
{
const IGlobalAI::ChangeTeamEvent* cte = (const IGlobalAI::ChangeTeamEvent*) data;
UnitDestroyed(cte->unit,-1);
}
break;
}
return 0;
}
Version 2.42 up!
Changelog:
V2.42
-Fixed bug with unit learning and multiple QAIs
-Added build queue to later finish selected buildings
-Fixed bug with sweepers going after targets long gone or still under construction
-AI should no longer build giant guns & nuke launchers that it doesn't use
-AI should no longer build so many scouts
-Fixed possible issue of AI not building any factories at beginning of game
-Fixed crash bug involving capturing units
-Fixed commander not building any factories at beginning of game
-Fixed issue with factories being built too close to metal spots
-Added ability for AI to upgrade metal extractors
-Added preliminary support for allied teams
-Fixed issue with certain areas not being built upon
Changelog:
V2.42
-Fixed bug with unit learning and multiple QAIs
-Added build queue to later finish selected buildings
-Fixed bug with sweepers going after targets long gone or still under construction
-AI should no longer build giant guns & nuke launchers that it doesn't use
-AI should no longer build so many scouts
-Fixed possible issue of AI not building any factories at beginning of game
-Fixed crash bug involving capturing units
-Fixed commander not building any factories at beginning of game
-Fixed issue with factories being built too close to metal spots
-Added ability for AI to upgrade metal extractors
-Added preliminary support for allied teams
-Fixed issue with certain areas not being built upon
This AI looks really well put together, really like the rotating factories and factory placement feature. Noticed a few things about it that seem to hold it back a little bit
1) It groups all its defensive structures together in one place, doesn't seem to consider building them anywhere else. The overall strategy of the AI seems to be quite defensive but it doesn't build any defences to protect key areas. Perhaps it could prioritise where to place its defences by the resource production in an area or cost of the buildings in the area.
2) It has a tendancy to send construction vehicles off into contested areas rather than retreating them to safety, this causes it to have to continually build con vehicles instead of assualt vehicles.
3)The initial build placement doesn't seem to take account of resources that are around, on small divide for example it would only have to shift the position it build all it's initial defence in by a small amount to protect the geo spot.
Overall though looks excellent, looking forward to seeing more new versions!
1) It groups all its defensive structures together in one place, doesn't seem to consider building them anywhere else. The overall strategy of the AI seems to be quite defensive but it doesn't build any defences to protect key areas. Perhaps it could prioritise where to place its defences by the resource production in an area or cost of the buildings in the area.
2) It has a tendancy to send construction vehicles off into contested areas rather than retreating them to safety, this causes it to have to continually build con vehicles instead of assualt vehicles.
3)The initial build placement doesn't seem to take account of resources that are around, on small divide for example it would only have to shift the position it build all it's initial defence in by a small amount to protect the geo spot.
Overall though looks excellent, looking forward to seeing more new versions!
Right now it focuses on spots that have been attacked the most, or spots where it destroys the most enemies. Prioritization could work though. :)DJ wrote:1) It groups all its defensive structures together in one place, doesn't seem to consider building them anywhere else. The overall strategy of the AI seems to be quite defensive but it doesn't build any defences to protect key areas. Perhaps it could prioritise where to place its defences by the resource production in an area or cost of the buildings in the area.
Yeah, this has been bugging me too, not sure how I want to address it yet.DJ wrote:2) It has a tendancy to send construction vehicles off into contested areas rather than retreating them to safety, this causes it to have to continually build con vehicles instead of assualt vehicles.
Again, it doesn't focus on protecting anything in particular (though that wouldn't be a bad idea), it just puts things in the spots where it was attacked the most.DJ wrote:3)The initial build placement doesn't seem to take account of resources that are around, on small divide for example it would only have to shift the position it build all it's initial defence in by a small amount to protect the geo spot.
-QMan