Skirmish AI: E323AI 3.22.4 - Page 21

Skirmish AI: E323AI 3.22.4

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

Moderators: hoijui, Moderators

User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by hoijui »

it can, for two reasons. it can do multiple things at a time, and it LoS cheats.

also, even if it could not, it would still leave you free to protect your base and build stuff while the fleas are at work.
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by JohannesH »

Yes I know it maphacks and doesnt need to idle at all. It has potential to be very good but atm it suicides its units way too much, it doesnt avoid enemy units or use buildings as cover, gang on enemy scouts etc etc, good players harass much better.

And even when it gets very good its not just a good thing to have your spotting fleas run around as they please.
zingbats
Posts: 2
Joined: 17 Dec 2009, 16:24

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by zingbats »

Heya. I'm getting a crash when loading the bot. I've pastebinned the infolog. Am I using the best Spring Version?

Forgive me for not reading the entire thread.

http://pastebin.com/m4f1121c0

Thanks.
User avatar
bartvbl
Posts: 346
Joined: 21 Mar 2009, 15:55

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by bartvbl »

in the infolog:
[ 0] <SkirmishAI: E323AI 3.14.3 (team 0)>: Speedmetal infects my skills... I won't play
And spring fails because of it
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by 1v0ry_k1ng »

lool

it needs to put a big bmp on the screen to alert you it is crashing due to speedmetal

Image

perhaps
zingbats
Posts: 2
Joined: 17 Dec 2009, 16:24

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by zingbats »

I take it that speedmetal is due to the map?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by hoijui »

yes, speedmetal is a type of map, they usually have metal textures all over, and the whole map has metal (eg, its all green whn you press F4).
this makes the algorithm the AI uses to find spots for metal extractors fail.
pingved
Posts: 21
Joined: 17 Sep 2008, 12:22

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by pingved »

errors :((((
Attachments
infolog.txt
(26.33 KiB) Downloaded 120 times
pingved
Posts: 21
Joined: 17 Sep 2008, 12:22

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by pingved »

2autor.
Plz fix those bugs!
Thx.
slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by slogic »

Here you can try my first attempt to fix crash errors. I repeat, i focused only on errors which make AI unstable. Looks like AI gameplay degraded a bit due to pathfinding issues. No version change.

Based on 3.14.2 sourcecode (prior to group merge removing by Error323).

Changelog:
- fixed 4 errors i mentioned above
- fixed AI attempts to build land metal makers underwater

PS. SSE CPU required.
Attachments
E323AI_source.zip
(73.99 KiB) Downloaded 30 times
SkirmishAI.zip
Windows DLL
(230.05 KiB) Downloaded 42 times
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by Error323 »

Hey Slogic,

Nice! I've finally got some spare time again and will take a look at it this evening.
slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by slogic »

Nice to see you came back. I could suspect you wait until smb fix your errors :) But i won't.

Your ARegistrar concept blowed my brains. You wrote

Code: Select all

		/* The other objects where this registrar is registered */
		std::list<ARegistrar*> records;
So this means (for me) a linkage to owners/parents. For example, in ATask::addGroup() you're adding ATask to CGroup.records() list, so CGroup is owned by ATask. I can't imagine this because usually vice-verse & ATask should be assigned to CGroup.

Due to code above CGroup->records may contain non CUnit descendant objects, e.g. of ATask class (i put there TODO mark) but CGroup::remove(ARegistrar &unit) assumes ARegistrar is of a CUnit class.

Also can you explain the meaning of "waypoint" variable in CPathfinder::updateFollowers()? It can have values: -2, -1, 0, 1.

The last version produces too much LOG_EE messages with pathfinding because algorithm tries to calculate path to group position, owned by already destroyed task
(as you remember group is owned(!) by task, ai->tasks->getPos()). I avoided this situation in my patch so i got zero crashes currently.

PS. The most noticeable bug of the latest version is units sometimes don't know where to got: if you select them in replay you will see they try to move right then left then right then left again etc.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by Error323 »

Nice to see you came back. I could suspect you wait until smb fix your errors :) But i won't.
Hahaha, well ofc not =), but I must say it did make me curious :P.
Your ARegistrar concept blowed my brains. You wrote

Code: Select all

		/* The other objects where this registrar is registered */
		std::list<ARegistrar*> records;
So this means (for me) a linkage to owners/parents. For example, in ATask::addGroup() you're adding ATask to CGroup.records() list, so CGroup is owned by ATask. I can't imagine this because usually vice-verse & ATask should be assigned to CGroup.

Due to code above CGroup->records may contain non CUnit descendant objects, e.g. of ATask class (i put there TODO mark) but CGroup::remove(ARegistrar &unit) assumes ARegistrar is of a CUnit class.
Yeah it might seem a bit unintuitive, and I would do it a bit different if I were to recode it again. The idea is that a unit->remove() can propagate through the system, so a path could be:
  • Remove unit from UnitTable
  • Remove unit from Group
  • Group becomes empty, remove group from Military
  • Remove group from task
  • Remove group from pathfinder
Also can you explain the meaning of "waypoint" variable in CPathfinder::updateFollowers()? It can have values: -2, -1, 0, 1.
Its the amount of "lookahead" for pathfinding. That is, the next waypoint on the path the units will move too.
The last version produces too much LOG_EE messages with pathfinding because algorithm tries to calculate path to group position, owned by already destroyed task
(as you remember group is owned(!) by task, ai->tasks->getPos()). I avoided this situation in my patch so i got zero crashes currently.
Since I fixed the pathfinding for watermaps aswell as land, the following problem occured: On target selection for military units, the target might be in a spot that the groups cannot reach. This results in a LOG_EE msg in the system. Due to some datastructuremanagement flaw this results in crashes (this is presumably what you fixed).
PS. The most noticeable bug of the latest version is units sometimes don't know where to got: if you select them in replay you will see they try to move right then left then right then left again etc.
The result of the above is this, as units are now undefined by the system, they need to be set to idle of some sort such that the military module can pick them up again.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by imbaczek »

Error323 wrote:Yeah it might seem a bit unintuitive, and I would do it a bit different if I were to recode it again. The idea is that a unit->remove() can propagate through the system, so a path could be:
  • Remove unit from UnitTable
  • Remove unit from Group
  • Group becomes empty, remove group from Military
  • Remove group from task
  • Remove group from pathfinder
use boost.signals or libsigc++ or whatever signal library next time, that's precisely what such libs are made for.
slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by slogic »

Error323 wrote:Since I fixed the pathfinding for watermaps aswell as land, the following problem occured: On target selection for military units, the target might be in a spot that the groups cannot reach.
Hm, i saw this for Construction Vehicle. It is not a military unit.
pingved
Posts: 21
Joined: 17 Sep 2008, 12:22

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by pingved »

try to transfer any unit to bot :)
slogic
AI Developer
Posts: 626
Joined: 17 Mar 2008, 19:03

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by slogic »

pingved wrote:try to transfer any unit to bot :)
And? If game crashes then tell exactly how to repeat. Tested with /give command. Works ok.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by imbaczek »

i think he meant sharing a unit via the diplomacy dialog.
Achilla
Posts: 79
Joined: 24 Aug 2009, 15:17

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by Achilla »

Any cool stuff planned for next version?

Error, I hope you didn't give up on your project.
User avatar
Error323
AI Developer
Posts: 237
Joined: 28 Nov 2006, 16:46

Re: Skirmish AI: E323AI v3.14.3 - High Templar

Post by Error323 »

No haven't!!! Just extremely busy, was even during holidays. I don't wanna make any promises as to when I'll have a new version but I'm working on it.
Post Reply

Return to “AI”