zoot Posted March 6, 2013 Report Share Posted March 6, 2013 (edited) ERROR: JavaScript error: simulation/ai/common-api-v3/utils.js line 10TypeError: a is undefined SquareVectorDistance((void 0),[object Array])@simulation/ai/common-api-v3/utils.js:10 ([object Object],[object Object],[object Array])@simulation/ai/qbot-wc/attack_plan.js:676 ([object Object],[object Object],[object Array])@simulation/ai/qbot-wc/military.js:562 ([object Object])@simulation/ai/qbot-wc/qbot.js:218 ([object Object],[object Object])@simulation/ai/common-api-v3/base.js:128 @:0This was on the Atlas Mountains random map, tiny, 1 Aegis Bot opponent, standard settings. Edited March 6, 2013 by zoot Quote Link to comment Share on other sites More sharing options...
Pureon Posted March 6, 2013 Report Share Posted March 6, 2013 Amazing list of updates wraitii. Can't wait to test it out.The addition of difficulty settings, basic naval support, and technology research is a massive step forward! You may experience a little lag when the map generation reaches 100%: that's from the AIs initializing. It should not feel too long.It's much better to wait a few seconds before the map is generated, not at the start of the game where it's more noticeable as lag. Perhaps a message saying 'Initializing AIs' could be added at the 100% mark to explain the wait (although that's not important). Quote Link to comment Share on other sites More sharing options...
fabio Posted March 6, 2013 Report Share Posted March 6, 2013 I get this build error on linux:../../../source/simulation2/components/CCmpAIManager.cpp: In member function ‘bool CAIWorker::TryLoadSharedComponent(bool)’:../../../source/simulation2/components/CCmpAIManager.cpp:401:7: error: ‘callConstructor’ was not declared in this scope../../../source/simulation2/components/CCmpAIManager.cpp: At global scope:../../../source/simulation2/components/CCmpAIManager.cpp:362:7: warning: unused parameter ‘hasTechs’ [-Wunused-parameter]make[1]: *** [obj/simulation2_Release/CCmpAIManager.o] Errore 1make: *** [simulation2] Errore 2 Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 6, 2013 Author Report Share Posted March 6, 2013 -___-That's me being stupid when committing this morning and accidentally reverting a line. Sorry bout that, just change "if (callconstructor)" to "if (hasTechs)" in the meantime. Will fix in 1 or 2 hours.Edit: ah nevermind, I'll actually do it right now...Edit2: and done.Pureon: exactly my opinion, but I don't think it deserves a "Initializing AI" screen unless we actually did this for the whole process. Quote Link to comment Share on other sites More sharing options...
fabio Posted March 6, 2013 Report Share Posted March 6, 2013 OK, build is fixed.There is a[warning] initedwhen starting a match.Also for some reason the AI doesn't use the cavalry which is very effective at gathering food (this speed is an old bug possible needing a fix, the AI could use the cavalry anyway). Quote Link to comment Share on other sites More sharing options...
fabio Posted March 6, 2013 Report Share Posted March 6, 2013 Also I get awarning: Trying to reach city phasebut not a:warning: Trying to reach town phase Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 6, 2013 Author Report Share Posted March 6, 2013 Sure of that?The warnings themselves are normal, "debug" is still on this the default config file (can change that in config.js, in the qbot-wc folder) Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 6, 2013 Author Report Share Posted March 6, 2013 (just for fun, a little comparison between "now" and "then").A screenshot I had posted in early august, back when I had just started work on what would become Aegis, of a victory against qBot on the RM Continent (I was blue, did nothing on purpose. qBot was red, Aegis green. Can't see the timer but it was at 41 minutes). Screenshot of the same thing happening now (aegis blue, qBot red). (You'll also notice Aegis sucked at attacking. It had won by 25:00). 1 Quote Link to comment Share on other sites More sharing options...
Enrique Posted March 6, 2013 Report Share Posted March 6, 2013 Good things I noticed playing against 2 AIs, random map Persian highlands 3 player size:-Less lag -Faster at building economy (both had nice stats even defeated)-Much more units trained -Fast phase upgrading.-Frequent attacks.-Dropsite placement with defense tower to defend resources.Not so good things:-Didn't care much of defending "not-main" CCs (if you try to attack main CC you get a response)-Didn't use cav against my siege units (it would be great if he tries to prioritize siege attacking with cav, don't know if this is possible yet)-After killing all units of the last AI, I didn't win until I destroyed a CC foundation that obviously wasn't being constructed (I think this is not AI problem though )-After taking down first AI CC, I received the following errors and he didn't try to build a new one:No more errors, just some warnings about the plans, phasing, and some resources not found (but I think they're normal)Overall a nice step forward, It was a fun match Good work Wraitii! Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 6, 2013 Author Report Share Posted March 6, 2013 Thanks for the report, Enrique...I'm getting a weird bug on occasion where the AI will crowd the map with useless dropsites which I'll have to fix. And there seems to be a few defense issue. Also, ballistas are pretty useless, though ram get used correctly. Will work on that. Quote Link to comment Share on other sites More sharing options...
Yves Posted March 7, 2013 Report Share Posted March 7, 2013 Wow, this AI is really huge improvement. It's even a lot better than the last patch you posted!Well done! Some issues I've discovered in random order (Some are already known and we discussed most of them on IRC): Dropsite placement problem and related CC placement problemThe AI does not seem to reclaim territory by building a CC after one CC got destroyed (maybe related to the dropsite issue)When the AI successfully destroyed something it attacked, it looks like the remaining units just keep standing around there with no further ordersThe AI does not seem to know about the build limit of towers. The message that the limit is reached keeps getting displayed.In AI vs AI fights it happens often that they build CCs just beside the enemy one. This happens twice on Belgian Bog for example when playing it with 1 Aegis vs 1 Aegis.Sometimes the AI gathers resources from far away and outside of its territory even though the same resource is available much closer (just beside a dropsite).Out of memory errors (we should probably increase the runtime size until the engine's pathfinder can be used for AI pathfinding)Units are standing around and doing nothing (This happend in very late-game and it didn't happen a single time in the early phase of the game)EDIT:The fight on Belgian Bog just ended because one AI destroyed the others main CC.It did not defend it with the army standing quite close (check the attachment). Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 7, 2013 Author Report Share Posted March 7, 2013 Thanks for reporting, Yves. Just committed an update, issues 1 and 8 are definitely fixed, 2/3/4/5 might be to some extent, 6: unsure, but could be related to 1. 1 Quote Link to comment Share on other sites More sharing options...
Yves Posted March 7, 2013 Report Share Posted March 7, 2013 2 and 8 seem to be fixed, but if you check on Belgian Bog, the red player still builds masses of mills on the bottom-left corner.EDIT:Now the blue AI gets "stuck" somehow.It still has some resources but I doesn't train any units. First it did train a few, but they were only sent into the enemy's territory and even though there were only about 5 women gathering, no additional workers were trained. Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 9, 2013 Author Report Share Posted March 9, 2013 Yves: tried to reproduce the error, couldn't on that map because there were other errors that I fixed. It does happen to me in some cases, but it doesn't seem too reproducible or annoying. If you find a scenario where this happens again, do tell (or a RM with a seed).I've been fixing tons of stuffs, and I think you'll find Aegis is much more efficient. Here's a little screeny of a 1v1 Aegis/Aegis (Sparta v Rome) which Aegis won (by destroying everything that Sparta had) at exactly the 40th minute. The big screenshot is at around 33 minutes, showing the maximal development of both players (that attack by Rome actually failed, but weighted too heavily on Sparta which was lagging behind since the beginning.) Quote Link to comment Share on other sites More sharing options...
Yves Posted March 9, 2013 Report Share Posted March 9, 2013 I'll do some more tests if you upload a patch for the newest version or commit it. Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 9, 2013 Author Report Share Posted March 9, 2013 Changes committed to svn. Also added the support for "-autostart-civ" to set the civilization at start. Requires recompiling.So basically the defense manager should react much better. Garrisoning should mostly happen when it makes sense, and the units should not attack you just because you stepped in their territory. Furthermore I did tons of change to the attack manager to make it actually able to attack.Note that the AI absolutely sucks with ballistas. Any civ that has rams will work much better (that's basically all of them but Athen, I think).The AI should be able to actually destroy its opponent if it takes the upper hand (seen it done in 30 minutes. Usually done by 40 minutes against qBot. Even if it has 5 fortresses to tear down). The problem of idle units doing nothing is also gone.Aegis is still no rusher (earliest attack will be around 13/14 minutes) but it will generally attack every 3/4 minutes after, with increasingly sized waves if you don't kill it (after 25/30 minutes, they get seriously dangerous).It seems to get stuck sometimes when attacked, will look into it.(also, did a benchmark with a slightly different config.js: Aegis reaches 300 units in 21 minutes.) 1 Quote Link to comment Share on other sites More sharing options...
Yves Posted March 9, 2013 Report Share Posted March 9, 2013 I've tested on Belgian Bog again.So far a lot of problems seems to be gone, but I've found two additional problems:The red AI stopped attacking. It had an army waiting in the middle of the map in neutral territory but it just kept standing there and waiting for something. It could have been waiting for two rams that were stuck in houses. You should probably adjust the placement of houses a bit (check the screenshot from later in the same game with some additional rams that are stuck in houses).The red player kept repairing a mill and a tower that were cut off from its territory. Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 9, 2013 Author Report Share Posted March 9, 2013 Yeah, I know about 1. I've made the AI place buildings a little less far apart again, so this kind of happen. Normally attack plans should detect they are stuck and disband after a while (can be 3 minutes). But I should probably just place houses closer together.Thanks for reporting 2 though, I had forgotten about that one. Quote Link to comment Share on other sites More sharing options...
Yves Posted March 9, 2013 Report Share Posted March 9, 2013 Normally attack plans should detect they are stuck and disband after a while (can be 3 minutes). But I should probably just place houses closer together.I'm quite sure that this was more than 3 minutes (maybe 10-20). Quote Link to comment Share on other sites More sharing options...
fabio Posted March 9, 2013 Report Share Posted March 9, 2013 I have a question: why the AI plans some actions (advance phases, build fortress, and so on) based on time rather than on available resources? I mean the time approach could not be optimal when starting with a lot of resources (this way it could progress faster), or if natural resources are far away (slower).(Also update readme.txt with the new command line). Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 9, 2013 Author Report Share Posted March 9, 2013 Fabio: basically it's faster to code than some more advanced logic, but I agree. Generally it should be tied with number of workers, not time.Will do about the read-me Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 10, 2013 Author Report Share Posted March 10, 2013 Okay, light update to fix a few issues that popped up. Fabio, readme.txt has been updated (Never knew about that file ).Yves, this should fix the two bugs you reported above. 1 definitely is (it was actually faulty logic when the AI reached max pop), 2 should be mostly. I've slightly changed building placement, might help the pathfinder.(also reverted accidentally committing a profanity into svn. Sorry bout' that.) Quote Link to comment Share on other sites More sharing options...
zoot Posted March 10, 2013 Report Share Posted March 10, 2013 Lol. You may want to consider using more descriptive variable names than 'Lalala' too Quote Link to comment Share on other sites More sharing options...
wraitii Posted March 11, 2013 Author Report Share Posted March 11, 2013 Should Aegis be made the default AI?(asking both team members and other people. Keep in mind that I can plan to add some sort of difficulty system before Alpha 13) Quote Link to comment Share on other sites More sharing options...
fabio Posted March 11, 2013 Report Share Posted March 11, 2013 (edited) Yes for me (I didn't do extensive testing however it's better than qbot). It's already the default on some maps (e.g. Acropolis 1 and Zagros Mountain 3) anyway.The problem of idle units doing nothing is also gone.The starting cavalry is still unused. Edited March 11, 2013 by fabio Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.