Jump to content
Sign in to follow this  
wraitii

Further AI development

Recommended Posts

Glad to hear about the defense manager, definitely needed. With Alpha 15, I tried creating 5 missile units and rushing them - the AI had made no units, just built a Storehouse. They were wiped out. In Alpha 14 they built farms, same result. It's ridiculous.

The AI needs to produce some citizen soldiers with their starting resources, before they build production facilities.

Share this post


Link to post
Share on other sites

I tried the introductory tutorial and seemed to work fine, until I was asked to build more units from the barracks. At that point I got a "Segmentation error (core dump created)" and game closed (no core dump that I can see). Probably unrelated to the AI changes however.

Since v1 and v2 are no longer present you may rename common-api-v3 just to common-api.

EDIT: attached commands.txt for the play that crashed, however the replay doesn't trigger the crash.

commands.txt

Share this post


Link to post
Share on other sites

Also a different problem, when starting the default map I get this:

WARNING: JavaScript warning: simulation/ai/aegis/defence-helper.js line 302anonymous function does not always return a valueWARNING: JavaScript warning: simulation/ai/aegis/defence-helper.js line 315anonymous function does not always return a valueWARNING: JavaScript warning: simulation/ai/aegis/defence-helper.js line 343anonymous function does not always return a valueWARNING: JavaScript warning: simulation/ai/aegis/defence-helper.js line 352anonymous function does not always return a valueWARNING: JavaScript warning: simulation/ai/aegis/defence-helper.js line 360anonymous function does not always return a value

I will report as a ticket if needed.

Share this post


Link to post
Share on other sites

$ ./pyrogenesis -replay=/home/fabio/.config/0ad/logs/sim_log/8584/commads.txtReplay.cpp(119): Assertion failed: "m_Stream->good()"

That's because there's a typo in "commads.txt".

Share this post


Link to post
Share on other sites

That's because there's a typo in "commads.txt".

Oops, you are right. Fixing the typo the simulation completes without any error, issue I experienced cannot be reproduced this way.

Share this post


Link to post
Share on other sites

fabio: those warnings are stuff I should have fixed and forgot to before committing, I'll do it now.

greenknight32: yes that's a known issue, rushing the AI early enough basically means killing it right now.

Share this post


Link to post
Share on other sites

You may also want to see this problem (happened before recent changes): http://www.wildfiregames.com/forum/index.php?showtopic=18036

Also simulation2 dir could be renamed to simulation (may break some not merged patches however).

Please be careful with the simulation2 rename. I don't want to lose the entire SVN history of simulation2 (like happened once with Aegis).

Share this post


Link to post
Share on other sites

greenknight32: yes that's a known issue, rushing the AI early enough basically means killing it right now.

Yes, I know - just saying that the behavior had changed, but it was no improvement. I spoke too soon, though, seems to be a problem with the skirmish map I was playing on. I tried restarting from the same setup - I saved before I did anything - and not rushing, left the AI faction completely unmolested. They never did produce any troops or build any more buildings.

This was Athenians v Persians, on the neareastern badlands skirmish map. I tried the same matchup and terrain via the Random map dialog, and the game went normally - they even managed to survive (barely) an early rush.

Is Skirmish mode broken generally, or just certain maps? I'll try out some others...

Edited by greenknight32

Share this post


Link to post
Share on other sites

Ok, tried the Belgian Bog Skirmish, it worked fine.

The problem occurred with the Alpine Valleys and Neareastern Badlands (2) Skirmishes, which happened to be the first 2 I tried. It would be an unlikely coincidence if those were the only ones. Need to test them all, I guess. Fun project for me.

Share this post


Link to post
Share on other sites

greenknight: did you say you saved and reloaded before trying? Because that would break the AI in many ways and is expected not to work too well.

On the other hand, I haven't noticed the AI getting stuck on Alpine Valleys. It started really slowly on Deccan plains but that has been fixed, so now it should work mostly properly.

Still, it's far from perfect anyhow.

Share this post


Link to post
Share on other sites

I got a lot of these errors when running:

./pyrogenesis -quickstart -autostart="The Massacre of Delphi" -autostart-ai=1:aegis -autostart-ai=2:aegis

ERROR: JavaScript error: simulation/ai/aegis/attack_plan.js line 1053 TypeError: enemyStructures is undefined m.CityAttack.prototype.update@simulation/ai/aegis/attack_plan.js:1053 m.HQ.prototype.update@simulation/ai/aegis/headquarters.js:1163 m.AegisBot.prototype.OnUpdate@simulation/ai/aegis/aegis.js:172 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:79

Share this post


Link to post
Share on other sites

greenknight: did you say you saved and reloaded before trying? Because that would break the AI in many ways and is expected not to work too well.

On the other hand, I haven't noticed the AI getting stuck on Alpine Valleys. It started really slowly on Deccan plains but that has been fixed, so now it should work mostly properly.

Still, it's far from perfect anyhow.

I thought that savegame bug was fixed - ok, that explains why it did that on the replays. The first time was not reloaded from the save, though.

Tried Alpine Valleys again from a fresh setup, did an early rush. This time they'd created 4 units, a house, and a storehouse. Better, but not good enough - they still got massacred.

With Neareastern Badlands, very different this time. Randomly came up Ptolemies v Ptolemies. Early rush met with strong resistance, only slowed them down a bit - just the way it should work. Hard-fought game.

Sadly, ran into another glitch at the end - it didn't end. My troops went everywhere, couldn't find another enemy unit. Finally quit, checked the stats - it showed they'd constructed 2 more buildings than they'd lost (invisible buildings? Arrgh!). Hope that's just a one-time glitch. Anyway, that's another issue, not AI.

Share this post


Link to post
Share on other sites

Sadly, ran into another glitch at the end - it didn't end. My troops went everywhere, couldn't find another enemy unit. Finally quit, checked the stats - it showed they'd constructed 2 more buildings than they'd lost (invisible buildings? Arrgh!). Hope that's just a one-time glitch. Anyway, that's another issue, not AI.

I've run into something similar to this a few times. They're even built in my own territory ( I covered the entire map). From what I observed the AI tried to build something continuously. Archers would even fire and attack at the invisible foundation. However, they game still ended when I find (finally) the last unit. I have no idea how to reproduce it unfortunately.

Share this post


Link to post
Share on other sites

I've run into something similar to this a few times. They're even built in my own territory ( I covered the entire map). From what I observed the AI tried to build something continuously. Archers would even fire and attack at the invisible foundation. However, they game still ended when I find (finally) the last unit. I have no idea how to reproduce it unfortunately.

There was one place where some archers were making the motions of shooting, but no arrows could be seen - like they were firing invisible arrows at an invisible target.

I had detachments scouring the whole map, don't know how I could have missed any units - but you can't prove a negative, always possible I missed something. None of this would matter if the AI would just surrender when it's beaten, which I believe is already a planned feature.

Share this post


Link to post
Share on other sites

Now its not affect in performance when my units are destroying constantly a building and the Ai try to build, I mean example if I bring a Siege tower and constantly destroy the foundation and the Ai place in same place again and again , it's like a loop.

Share this post


Link to post
Share on other sites

I just committed a somewhat important change to the way workers choose dropsites. Please report if you notice the AI acting weirdly, or seemingly getting stuck (if possible, post your commands.txt for those games).

Share this post


Link to post
Share on other sites

WARNING: food1
WARNING: 1
WARNING: 1
WARNING: 1
WARNING: for dropsite best is 170 at 0
WARNING: Initialized with the difficulty 2
WARNING: No food found for hunting! (2)
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
WARNING: No proper dropsite found for wood, waiting.
ERROR: CRenderer::EndFrame: GL errors occurred
WARNING: Planning Town Phase
WARNING: Trying to build barracks
WARNING: for dropsite best is 134 at 221600
WARNING: planning new dropsite for wood
WARNING: Trying to reach TownPhase
WARNING: Trying to reach TownPhase
WARNING: Trying to reach TownPhase
WARNING: Found a proper dropsite for food but apparently no resources are available.
WARNING: Please report this to wraitii on the wildfire games Forum
WARNING: Found a proper dropsite for food but apparently no resources are available.
WARNING: Please report this to wraitii on the wildfire games Forum
WARNING: Found a proper dropsite for food but apparently no resources are available.
WARNING: Please report this to wraitii on the wildfire games Forum
WARNING: Found a proper dropsite for food but apparently no resources are available.
WARNING: Please report this to wraitii on the wildfire games Forum

THe Warning brings me to send to you this. XD realy funny, good changes now the Ai are like bees when you try to do a early rush :):yes3:

Batcria Skirmish Map. romans Vs Seleucids.

Edited by Lion.Kanzen

Share this post


Link to post
Share on other sites

@wraitii: Oh, my friends, today I tested the latest SVN version, get some errors when I'm at war with the enemy, an error occurs (my first attack enemy troops.) :unknw:

Batcria Skirmish Map. romans Vs Seleucids. (The same to you, Lion.Kanzen)

Another problem: the enemy of workers and the military a strange action: When the game save again loaded, the workers will not go to collect resources, they will stand next to the resource (for example: farmland beside), enemy forces will not attack me .

<h2>0 A.D. Main log (warnings and errors only)</h2>
<p class="error">ERROR: JavaScript error: simulation/ai/aegis/attack_plan.js line 986
TypeError: collec.attack is not a function
([object Object],[object Object],[object Object])@simulation/ai/aegis/attack_plan.js:986
([object Object],[object Object],[object Object])@simulation/ai/aegis/headquarters.js:1228
([object Object])@simulation/ai/aegis/aegis.js:182
([object Object],2,[object Object])@simulation/ai/common-api/baseAI.js:81</p>
<p class="error">ERROR: JavaScript error: simulation/ai/aegis/attack_plan.js line 986
TypeError: collec.attack is not a function
([object Object],[object Object],[object Object])@simulation/ai/aegis/attack_plan.js:986
([object Object],[object Object],[object Object])@simulation/ai/aegis/headquarters.js:1228
([object Object])@simulation/ai/aegis/aegis.js:182
([object Object],2,[object Object])@simulation/ai/common-api/baseAI.js:81</p>
<p class="error">ERROR: JavaScript error: simulation/ai/aegis/attack_plan.js line 986
TypeError: collec.attack is not a function
([object Object],[object Object],[object Object])@simulation/ai/aegis/attack_plan.js:986
([object Object],[object Object],[object Object])@simulation/ai/aegis/headquarters.js:1228
([object Object])@simulation/ai/aegis/aegis.js:182
([object Object],2,[object Object])@simulation/ai/common-api/baseAI.js:81</p>
<p class="error">ERROR: JavaScript error: simulation/ai/aegis/attack_plan.js line 986

commands.txt

Edited by gameboy

Share this post


Link to post
Share on other sites

Oh, my friends, today I tested the latest SVN version, get some errors when I'm at war with the enemy, an error occurs (my first attack enemy troops.) :unknw:

Batcria Skirmish Map. romans Vs Seleucids. (The same to you, Lion.Kanzen)

Another problem: the enemy of workers and the military a strange action: When the game save again loaded, the workers will not go to collect resources, they will stand next to the resource (for example: farmland beside), enemy forces will not attack me .

<h2>0 A.D. Main log (warnings and errors only)</h2>

<p class="error">ERROR: JavaScript error: simulation/ai/aegis/attack_plan.js line 986

TypeError: collec.attack is not a function

([object Object],[object Object],[object Object])@simulation/ai/aegis/attack_plan.js:986

([object Object],[object Object],[object Object])@simulation/ai/aegis/headquarters.js:1228

([object Object])@simulation/ai/aegis/aegis.js:182

([object Object],2,[object Object])@simulation/ai/common-api/baseAI.js:81</p>

<p class="error">ERROR: JavaScript error: simulation/ai/aegis/attack_plan.js line 986

TypeError: collec.attack is not a function

([object Object],[object Object],[object Object])@simulation/ai/aegis/attack_plan.js:986

([object Object],[object Object],[object Object])@simulation/ai/aegis/headquarters.js:1228

([object Object])@simulation/ai/aegis/aegis.js:182

([object Object],2,[object Object])@simulation/ai/common-api/baseAI.js:81</p>

<p class="error">ERROR: JavaScript error: simulation/ai/aegis/attack_plan.js line 986

TypeError: collec.attack is not a function

([object Object],[object Object],[object Object])@simulation/ai/aegis/attack_plan.js:986

([object Object],[object Object],[object Object])@simulation/ai/aegis/headquarters.js:1228

([object Object])@simulation/ai/aegis/aegis.js:182

([object Object],2,[object Object])@simulation/ai/common-api/baseAI.js:81</p>

<p class="error">ERROR: JavaScript error: simulation/ai/aegis/attack_plan.js line 986

Hmm weird, in my gameplay they are very Agressive, I like that. Was like attack a honeycomb, they persuit to my CC and perform some vandalism XD in my buildings.

Share this post


Link to post
Share on other sites

@Lion.Kanzen:If you try to save a loaded again, you will find the enemy's army will not attack like a flood, like you, they will guard their buildings and resources, and workers will no longer collect resources, and they stood beside the building next to the resource does not move .

@wraitii: Tested again and found a new error: :unknw::unknw::unknw::sweatdrop::sweatdrop::sweatdrop:

<h2>0 A.D. Main log (warnings and errors only)</h2>
<p class="error">ERROR: JavaScript error: simulation/components/UnitAI.js line 1755
TypeError: cmpFormation is null
()@simulation/components/UnitAI.js:1755
([object Object],"INDIVIDUAL.COMBAT.ATTACKING")@simulation/helpers/FSM.js:376
([object Object],[object Object])@simulation/helpers/FSM.js:284
([object Object])@simulation/components/UnitAI.js:3737</p>
<p class="error">ERROR: Script message handler OnMotionChanged failed</p>
<p class="error">ERROR: JavaScript error: simulation/components/UnitAI.js line 1755
TypeError: cmpFormation is null
()@simulation/components/UnitAI.js:1755
([object Object],"INDIVIDUAL.COMBAT.ATTACKING")@simulation/helpers/FSM.js:376
([object Object],[object Object])@simulation/helpers/FSM.js:284
([object Object])@simulation/components/UnitAI.js:3737</p>
<p class="error">ERROR: Script message handler OnMotionChanged failed</p>
<p class="error">ERROR: JavaScript error: simulation/components/UnitAI.js line 1755
TypeError: cmpFormation is null

commands2.txt

Edited by gameboy
  • Like 1

Share this post


Link to post
Share on other sites

<h2>0 A.D. Main log (warnings and errors only)</h2>

<p class="error">ERROR: JavaScript error: simulation/components/UnitAI.js line 1755

TypeError: cmpFormation is null

()@simulation/components/UnitAI.js:1755

([object Object],"INDIVIDUAL.COMBAT.ATTACKING")@simulation/helpers/FSM.js:376

([object Object],[object Object])@simulation/helpers/FSM.js:284

([object Object])@simulation/components/UnitAI.js:3737</p>

<p class="error">ERROR: Script message handler OnMotionChanged failed</p>

<p class="error">ERROR: JavaScript error: simulation/components/UnitAI.js line 1755

TypeError: cmpFormation is null

Wraitii, do you edit formations directly? Or could there be another reason some entity is a formation member, but without valid formation controller?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...