Thorfinn the Shallow Minded Posted August 23, 2013 Report Share Posted August 23, 2013 Realize that wraiti only works on Aegis in his spare time, and since schedules can really fluctuate, it is difficult to say that even he can know. With that fact in mind, it is better to patiently wait for it to be fixed while more pressing in-game problems are dealt with. 1 Quote Link to comment Share on other sites More sharing options...
feneur Posted August 23, 2013 Report Share Posted August 23, 2013 You do not encounter this error, he has tested again, and he confirmed the existence of this error.@wraitii:I want to know what time you will finish it this month? Or Earlier in September? thank you!The next Alpha release is not too far away, but the issue of being able to save games with an AI will take some more time. It's one of the more difficult issues to solve actually, so it's impossible to say how long time it will take. Probably more like December or early 2014 than soon. The AI should work fine in Alpha 14 if you just want to play a game though, it's just saving the game that will take longer to figure out. Quote Link to comment Share on other sites More sharing options...
MoLAoS Posted August 23, 2013 Report Share Posted August 23, 2013 The next Alpha release is not too far away, but the issue of being able to save games with an AI will take some more time. It's one of the more difficult issues to solve actually, so it's impossible to say how long time it will take. Probably more like December or early 2014 than soon. The AI should work fine in Alpha 14 if you just want to play a game though, it's just saving the game that will take longer to figure out.I don't understand what you guys mean by saving games with an AI? You should not have to do anything different from saving a player's game. The AI should just look at the circumstances again when the game loads and make decisions.What kind of stuff are you saving? Quote Link to comment Share on other sites More sharing options...
wraitii Posted August 23, 2013 Author Report Share Posted August 23, 2013 It's actually not that easy to just save the AI state. If you restart from scratch, it's going to make terrible decisions... You need to save what it wanted to do with its villagers, things like that. Sure you could try to guess it backwards on loading, but some stuffs won't work (defense, attack…), and the way the AI is coded currently makes this extremely unpractical too (sadly).Fixing the Ai for saving games is actually not extremely hard, but doing it right is hard. And tied with how javascript fundamentally works, which might change as we are considering upgrading. 1 Quote Link to comment Share on other sites More sharing options...
MoLAoS Posted August 23, 2013 Report Share Posted August 23, 2013 I still don't follow what you are saving? You mean like what villagers were assigned to what resource nodes and which were building stuff? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted August 23, 2013 Report Share Posted August 23, 2013 I still don't follow what you are saving? You mean like what villagers were assigned to what resource nodes and which were building stuff?The general plan needs to be saved (as it's following a schema: enlarging economy, building defense and then attack - or something similar). If it forgets where it was in the schema, and it starts all over.But anyway, wraitii, it should go through those first phases quite fast right. So maybe it's good to let the AI start over as it were a new game, for the time being. 1 Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted August 23, 2013 Report Share Posted August 23, 2013 I still don't follow what you are saving? You mean like what villagers were assigned to what resource nodes and which were building stuff?Keep in mind that in multiplayer games, the simulation state on every client has to be identical (for out of sync testing, we simply hash the binary state and compare them). But AIs don't only react to the current simulation state, they also store data from previous turns. This means if you don't serialize the AI state properly (I would say fully) then deserialize it, like if someone rejoins in multiplayer or you load a saved game in single player, the AI will have different internal state, which very likely means it will send different commands. That will cause the simulation state to differ and an OOS error in multiplayer. In single player games, the problem is more subtle, the AI will simply behave differently after loading a saved game. Or you may get errors when certain code paths are hit requiring data that wasn't de/serialized.I actually don't see it as that difficult of a problem. It would require substantial modification of the AIs and their API to fix correctly (Aegis, like qBot and JuBot before, is based on Testbot, which was only a prototype AI that didn't correctly implement serialization and had flaws in the design that make it more difficult now). But those modifications are fairly straightforward for someone familiar with the AI. 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted August 24, 2013 Report Share Posted August 24, 2013 @historic_bruno and @wraitii : Only quantumstate familiar qBot and JuBot, he can help you solve these problems, maybe he knows how to do it, hoping it would provide a good method and suggestions, thank you! Quote Link to comment Share on other sites More sharing options...
MoLAoS Posted August 24, 2013 Report Share Posted August 24, 2013 Keep in mind that in multiplayer games, the simulation state on every client has to be identical (for out of sync testing, we simply hash the binary state and compare them). But AIs don't only react to the current simulation state, they also store data from previous turns. This means if you don't serialize the AI state properly (I would say fully) then deserialize it, like if someone rejoins in multiplayer or you load a saved game in single player, the AI will have different internal state, which very likely means it will send different commands. That will cause the simulation state to differ and an OOS error in multiplayer. In single player games, the problem is more subtle, the AI will simply behave differently after loading a saved game. Or you may get errors when certain code paths are hit requiring data that wasn't de/serialized.I actually don't see it as that difficult of a problem. It would require substantial modification of the AIs and their API to fix correctly (Aegis, like qBot and JuBot before, is based on Testbot, which was only a prototype AI that didn't correctly implement serialization and had flaws in the design that make it more difficult now). But those modifications are fairly straightforward for someone familiar with the AI.Oh okay. I see how your networking implementation might make things difficult. Quote Link to comment Share on other sites More sharing options...
gameboy Posted August 24, 2013 Report Share Posted August 24, 2013 (edited) @wraitii : Please refer to this post: http://www.wildfiregames.com/forum/index.php?showtopic=15963&hl =% 2Bai +% 2Bscript +% 2Bdeserialize +% 2Bcall +% 2Bfailed & fromsearch = 1 Maybe it can provide you with a little help ,Thank you! Edited August 24, 2013 by gameboy Quote Link to comment Share on other sites More sharing options...
niektb Posted August 24, 2013 Report Share Posted August 24, 2013 Perhaps, (not sure if its an option) we could temporarely disable saving with multiplayergames. (Till the AI is working properly with save games. Quote Link to comment Share on other sites More sharing options...
Almin Posted August 24, 2013 Report Share Posted August 24, 2013 (edited) I'm not deep into this topic, but I wonder whether it would be easier to save correctly without the plan-queue-system kind of thing. Is this a typical system/design/architecture that is used for Game AI? And/or would it even be replaceable? Not that I think this would be recommendable (gigantic amount of work) , of course! It's more like a question of academic interest. Edited August 24, 2013 by Almin Quote Link to comment Share on other sites More sharing options...
wraitii Posted August 24, 2013 Author Report Share Posted August 24, 2013 Almin: I have no idea if it's a classic system. I even have no idea if it's the best, but it works nicely enough. And it wouldn't change a thing for serialization, no.historic_bruno: BTW I've answered you here and haven't heard back from you, and there are fairly important issues at stake there. Quote Link to comment Share on other sites More sharing options...
Yves Posted August 24, 2013 Report Share Posted August 24, 2013 I made some measurements concerning the topic we discussed today.We really need a better solution for applying entities delta.This was a 2vs2 AI game that ran for about 15000 turns. 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted August 25, 2013 Report Share Posted August 25, 2013 About this error we need to resolve as soon as possible, as soon as possible to find an effective way, of course, this is a vexing problem.BTW: please programmers work together to solve this problem, thank you! :wink2: :kid: Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted August 25, 2013 Report Share Posted August 25, 2013 They are trying gameboy if it was easy it would have been fixed long ago if you have been reading along with the rest of us you would have noticed that there seems to be some issues with the programming language implementation(JavaScript Spider Monkey) which means that until that project fixes things we can not,which is why they are working with them as well.I know that it is frustrating but it will be fixed as it is a major issue so all us non-programmers can do is cheer on any improvement Enjoy the Choice 1 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted August 25, 2013 Report Share Posted August 25, 2013 Many of our players do not understand the difference in levels of development, including how to program and work on Wildfire Games (0A.D) commercial developers and large companies. Quote Link to comment Share on other sites More sharing options...
wraitii Posted August 29, 2013 Author Report Share Posted August 29, 2013 New version of the upcoming version, no real changelog this time either, still more rewriting and still more work about naval stuffs (this time it's fairly close to completion but weird issues make me unable to complete). I've fixed a few bugs in the attack plans that should make the AI slightly better at attacking though.Just replace the binaries/data/mods/public/simulation/ai/ folder with the one linked.(for sanderd: not a patch because imo this is easier for a folder)ai.zip 1 Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted August 29, 2013 Report Share Posted August 29, 2013 (for sander: not a patch because imo this is easier for a folder)Sure, one zip is doable. 5 zips is less easy. Quote Link to comment Share on other sites More sharing options...
gameboy Posted August 30, 2013 Report Share Posted August 30, 2013 (edited) Nice work!BTW:About whether to save loading error correction? Serialization problem?@wraitii: Just now, I tested you provide AI, new error appears:<h2>0 A.D. Main log (warnings and errors only)</h2><p class="warning">WARNING: JavaScript warning: simulation/ai/common-api-v3/terrain-analysis-pathfinder.js line 18reference to undefined property gameState.ai.terrainAnalyzer.map</p><p class="error">ERROR: JavaScript error: simulation/ai/common-api-v3/terrain-analysis.js line 120TypeError: this.map is undefined ([object Array],true,500,false)@simulation/ai/common-api-v3/terrain-analysis.js:120 ([object Array],[object Array],2,2)@simulation/ai/common-api-v3/terrain-analysis-pathfinder.js:90 ([object Object],[object Object])@simulation/ai/aegis/aegis.js:262</p><p class="error">ERROR: AI script Deserialize call failed</p><p class="warning">WARNING: JavaScript warning: simulation/ai/common-api-v3/terrain-analysis-pathfinder.js line 18reference to undefined property gameState.ai.terrainAnalyzer.map</p><p class="error">ERROR: JavaScript error: simulation/ai/aegis/aegis.js line 258TypeError: myKeyEntities.toEntityArray()[0] is undefined ([object Object],[object Object])@simulation/ai/aegis/aegis.js:258</p><p class="error">ERROR: AI script Deserialize call failed</p><p class="warning">WARNING: JavaScript warning: simulation/ai/aegis/aegis.js line 100reference to undefined property this.gameState</p><p class="error">ERROR: JavaScript error: simulation/ai/aegis/aegis.js line 100TypeError: this.gameState is undefined ([object Object])@simulation/ai/aegis/aegis.js:100 ([object Object],[object Object])@simulation/ai/common-api-v3/base.js:68 @:0</p><p class="warning">WARNING: JavaScript warning: simulation/ai/aegis/aegis.js line 100reference to undefined property this.gameState</p><p class="error">ERROR: JavaScript error: simulation/ai/aegis/aegis.js line 100TypeError: this.gameState is undefined ([object Object])@simulation/ai/aegis/aegis.js:100 ([object Object],[object Object])@simulation/ai/common-api-v3/base.js:68 @:0</p> Edited August 30, 2013 by gameboy Quote Link to comment Share on other sites More sharing options...
wraitii Posted September 1, 2013 Author Report Share Posted September 1, 2013 New-ish version, fixes a serious bug where the AI would assign all its worker to fields/ too many to wood and weird stuffs like that. Also, the attack plans now attack informations again, because it's less taxing for the pathfinder that way.ai.zip Quote Link to comment Share on other sites More sharing options...
gameboy Posted September 2, 2013 Report Share Posted September 2, 2013 About me reporting problems solved?I tested it, the error still exists! Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted September 2, 2013 Report Share Posted September 2, 2013 When happens that? gameboy I don't get errors with Aegis only some lag XD. Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted September 2, 2013 Report Share Posted September 2, 2013 When happens that? gameboy I don't get errors with Aegis only some lag XD.Gameboy is talking about that new AI (in the zip) which is still in heavy development, so still has some errors in certain cases (I also reported some to wraitii). But that's normal for something in heavy development. Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted September 2, 2013 Report Share Posted September 2, 2013 But is the same problem, because he is only the one on reporting this. 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.