QAI! V2.45! New (03/09/2007) - Page 4

QAI! V2.45! New (03/09/2007)

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Engine Of Darkness
Posts: 87
Joined: 23 Dec 2006, 21:36

Post by Engine Of Darkness »

Ok no need to hurry, I already though I've scared you with my behaviour of writing long messages ^^
User avatar
Ling_Lover
Posts: 100
Joined: 26 Sep 2006, 11:50

Post by Ling_Lover »

Any chance of having nano-towers (or hubs) able to build?

Then we'd have a (non-NTAI) Mod that we could use for EE :)
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Actually, I went ahead and implemented my custom build site algorithms last night, so I'll probably release the next version today or tomorrow. The new version has Hub support! :)
Engine Of Darkness
Posts: 87
Joined: 23 Dec 2006, 21:36

Post by Engine Of Darkness »

Sounds interesting
bamb
Posts: 350
Joined: 04 Apr 2006, 14:20

Post by bamb »

Doesn't build land mexxes in Expand & Exterminate 0.173, builds floating ones though.
I thought I'd mention since it's actually one of the AI:s that work with E&E.
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

bamb wrote:Doesn't build land mexxes in Expand & Exterminate 0.173, builds floating ones though.
I thought I'd mention since it's actually one of the AI:s that work with E&E.
I haven't actually put up the new version yet. :)
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Woo! 2.3 has finally arrived!

Lots of fixed bugs!
Enhanced Nano Tower Support!
Hub Support!
Constructors will be built again! ;)

-QMan
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

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
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

interesting, GCC and MSVC must handle something different.

Here's a fix:

Replace this (UnitManager.cpp @ line 660)

Code: Select all

if ( ( engineCall->GetCurrentUnitCommands( *i )->size() == 0 )
&& !( engineCall->UnitBeingBuilt( *i ) ) )
with this:

Code: Select all

if (!( engineCall->UnitBeingBuilt( *i ) ) )
if ( engineCall->GetCurrentUnitCommands( *i )->size() == 0 )
This'll be pushed into the next point release.
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

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
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

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
User avatar
iamacup
Posts: 987
Joined: 26 Jun 2006, 20:43

Post by iamacup »

This should be included in the next version of spring :P
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

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*
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

submarine wrote:- qai may destroy its entire base when com tries to dgun nearby moving enemies (i dont think its easy to solve though)
Yeah, I gave up on this for now and disabled DGUNning enemies, preferring the com to just run away.

-QMan
Reth
AI Developer
Posts: 70
Joined: 15 Aug 2006, 14:05

Post by Reth »

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.

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;
}
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Ooh, capturing! I forgot all about that command. Thanks for the fix!
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

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
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

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!
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

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.
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: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.
Yeah, this has been bugging me too, not sure how I want to address it yet.
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.
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.

-QMan
User avatar
DJ
Posts: 355
Joined: 17 Jan 2007, 13:26

Post by DJ »

Just one other thing i think there might be an issue with
as well as metal spot/geo spot overlap constraints.
(you wrote in the NTai forum) I've seen QAI build lazer towers on a geo spot on small divide. Might be worth having a look at.
Post Reply

Return to “AI”