JuliusColtranePille Posted September 15, 2011 Report Share Posted September 15, 2011 Game loads data from either public.zip or public directory, you can extract public.zip where it is placed, you should get public directory, then you can modify something inside this directory (add new bot in this case) and this should affect 0ad.yeah... works fine! Quote Link to comment Share on other sites More sharing options...
lexa Posted September 16, 2011 Author Report Share Posted September 16, 2011 Hi Gamers !Now I have the svn version of the game and I have some strange behaviour But first let me tell you that I like very much what I saw, I will comment on other thread !!! So the 1st problem I have is with the civic center trainingQueue, wich starts empty, then I fill it up with 1 entity to build, and it never gets empty anymore. I have traced the element 0 in the queue and it has a progress property which is always 0 during the training of the unit and then it goes straight to a number close to 1.The 2nd problem is with the obstruction map. It seems my bot can build anywhere, even over an existing building. Did you change something ?Tell me if I should report this somewhere, or is it the right place ? Quote Link to comment Share on other sites More sharing options...
Linux_Eki Posted September 17, 2011 Report Share Posted September 17, 2011 (edited) The 2nd problem is with the obstruction map. It seems my bot can build anywhere, even over an existing building. Did you change something ?Tell me if I should report this somewhere, or is it the right place ?Yeah, your bot just spams buildings anywhere and only sometimes manages to build them in empty spots. I also get warnings those warnings that others reported.edit: played in Alpha 7edit2: btw i have some gameplay on my youtube channel. More coming. http://www.youtube.com/user/LinuxEki Edited September 17, 2011 by Linux_Eki Quote Link to comment Share on other sites More sharing options...
lexa Posted September 17, 2011 Author Report Share Posted September 17, 2011 Hello EkiThe warning issue is fixed in the svn version, and will be included in the next release (alpha2) Quote Link to comment Share on other sites More sharing options...
Pureon Posted September 17, 2011 Report Share Posted September 17, 2011 lexa have you managed to work out either of the problems you listed above? Sorry we've been a little busy releasing the new alpha Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted September 18, 2011 Report Share Posted September 18, 2011 So the 1st problem I have is with the civic center trainingQueue, wich starts empty, then I fill it up with 1 entity to build, and it never gets empty anymore. I have traced the element 0 in the queue and it has a progress property which is always 0 during the training of the unit and then it goes straight to a number close to 1.I don't understand, are you saying the CC doesn't train your unit?The 2nd problem is with the obstruction map. It seems my bot can build anywhere, even over an existing building. Did you change something ?The obstruction map shouldn't be any different, but building restrictions are too advanced now for the AIs to understand given the information they have, especially since we added territories. So yes the build restrictions are disabled for AI players, but they wouldn't have any way to know even if they weren't. This is one of the reasons why I hope we completely overhaul the AI system. Quote Link to comment Share on other sites More sharing options...
lexa Posted September 18, 2011 Author Report Share Posted September 18, 2011 lexa have you managed to work out either of the problems you listed above? Sorry we've been a little busy releasing the new alpha No I did not. I opened a bug for the 1st one in trackI don't understand, are you saying the CC doesn't train your unit?No, I am saying ir does train units normally, but the trainingQueue array behaves differently and has a strange behavior.The obstruction map shouldn't be any different, but building restrictions are too advanced now for the AIs to understand given the information they have, especially since we added territories. So yes the build restrictions are disabled for AI players, but they wouldn't have any way to know even if they weren't. This is one of the reasons why I hope we completely overhaul the AI system.wow, this is weird, you disabled the build restrictions ?!I do not understand this - "are too advanced now for the AIs to understand"- "but they wouldn't have any way to know even if they weren't" Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted September 18, 2011 Report Share Posted September 18, 2011 No, I am saying ir does train units normally, but the trainingQueue array behaves differently and has a strange behavior.Interesting. I don't think the current AIs use that array which may explain why we haven't noticed this.wow, this is weird, you disabled the build restrictions ?!It's a short-term hack to make AI usable until they and the interface can be rewritten The alternative was no AI or let the game be extremely slow when they repeatedly fail to build without knowing it (as I understand, they would send a "construct" message and hope that it works). Quote Link to comment Share on other sites More sharing options...
quantumstate Posted September 19, 2011 Report Share Posted September 19, 2011 Looking at testbot, it is possible for the AI to work out where is buildable apart from territories and Civic Centre restrictions. I uploaded an example of the "buildable areas mask" . It would be nice to have a similar thing for territory and CC restrictions. The code is in plan-building.js, findGoodPosition(). Quote Link to comment Share on other sites More sharing options...
JuliusColtranePille Posted September 20, 2011 Report Share Posted September 20, 2011 somehow the splitbot doesn't train any units more than 10 or so in alpha 7... is it because of the territories and other significant gameplay-changes?! Quote Link to comment Share on other sites More sharing options...
Thorfinn the Shallow Minded Posted September 20, 2011 Report Share Posted September 20, 2011 (edited) Well, you can match that by training your units in fives. That's the way I like to play as it makes it more logical to actually train the women first for their economic use. Edited September 20, 2011 by Thorfinn the Shallow Minded Quote Link to comment Share on other sites More sharing options...
JuliusColtranePille Posted September 20, 2011 Report Share Posted September 20, 2011 Well, you can match that by training your units in five. That's the way I like to play as it makes it more logical to actually train the women first for their economic use.was this a reply to my post?with my post i wanted to say that the splitbot is somehow deficient in alpha 7 whereas it worked totally fine for me in alpha 6. now he doesn't produce more than 15 units in the whole match and doesn't build up a lot of structures...and i don't know why...regards Quote Link to comment Share on other sites More sharing options...
lexa Posted September 21, 2011 Author Report Share Posted September 21, 2011 HelloI am sorry, but the Split bot can not work with alpha 7 since several elements have been disabled in the simulation API.Regardslexa Quote Link to comment Share on other sites More sharing options...
lexa Posted September 24, 2011 Author Report Share Posted September 24, 2011 Hi,The ticket http://trac.wildfiregames.com/ticket/963 has been fixed, so the bot works again in the svn version.But There is now a problem with collision map, which make the bot build at random and inadequate positions. Quote Link to comment Share on other sites More sharing options...
lexa Posted September 24, 2011 Author Report Share Posted September 24, 2011 Interesting. I don't think the current AIs use that array which may explain why we haven't noticed this.It's a short-term hack to make AI usable until they and the interface can be rewritten The alternative was no AI or let the game be extremely slow when they repeatedly fail to build without knowing it (as I understand, they would send a "construct" message and hope that it works).Do you think I should/could open a ticket for this ? Quote Link to comment Share on other sites More sharing options...
quantumstate Posted September 25, 2011 Report Share Posted September 25, 2011 But There is now a problem with collision map, which make the bot build at random and inadequate positions.What problem have you found? In my testing the collision map hasn't given me any problems. Quote Link to comment Share on other sites More sharing options...
gudo Posted September 25, 2011 Report Share Posted September 25, 2011 (edited) Splitbot, for some reason or another, places foundations in locations where they can't actually be constructed (i.e. trying to build a house that is half inside a stone mine.) I think SplitBot may not actually consult the collision map when deciding where to place structures. Edited September 25, 2011 by gudo Quote Link to comment Share on other sites More sharing options...
Pureon Posted September 25, 2011 Report Share Posted September 25, 2011 Splitbot, for some reason or another, places foundations in locations where they can't actually be constructed (i.e. trying to build a house that is half inside a stone mine.) I think SplitBot may not actually consult the collision map when deciding where to place structures.I've seen Jubot doing that today too, building a house inside a farm, it's not just Splitbot. Quote Link to comment Share on other sites More sharing options...
gudo Posted September 25, 2011 Report Share Posted September 25, 2011 That's odd, I've never seen Jubot do that. But then again, farms are kind of weird that way. Have you tried using Splitbot though? There's clearly something going on with it that's not happening with the other bots. Quote Link to comment Share on other sites More sharing options...
quantumstate Posted September 25, 2011 Report Share Posted September 25, 2011 I've seen Jubot doing that today too, building a house inside a farm, it's not just Splitbot.I suspect that this is because with the new house building logic jubot now tries to build multiple buildings per turn. With qBot I found that when you try and do this, because the build commands are not instantly executed the new foundation doesn't affect the obstruction map (since the foundation doesn't exist yet) so the building placement puts another on top of it. The easiest fix is to just limit your AI to one building placement per turn which works fine since you couldn't build that fast.This would be new because the building logic has changes in jubal's latest patch to make houses demand driven. Quote Link to comment Share on other sites More sharing options...
lexa Posted September 26, 2011 Author Report Share Posted September 26, 2011 Splitbot, for some reason or another, places foundations in locations where they can't actually be constructed (i.e. trying to build a house that is half inside a stone mine.) I think SplitBot may not actually consult the collision map when deciding where to place structures.Yes it does consult the collision map. Look at the MapHelper::isObstructed method, it checks the obstruction for the 4 corners of the building.I suspect that this is because with the new house building logic jubot now tries to build multiple buildings per turn. With qBot I found that when you try and do this, because the build commands are not instantly executed the new foundation doesn't affect the obstruction map (since the foundation doesn't exist yet) so the building placement puts another on top of it. The easiest fix is to just limit your AI to one building placement per turn which works fine since you couldn't build that fast.I am afraid it is not a problem of timing because I even saw it building a field over the CC ! Quote Link to comment Share on other sites More sharing options...
quantumstate Posted September 26, 2011 Report Share Posted September 26, 2011 Yes it does consult the collision map. Look at the MapHelper::isObstructed method, it checks the obstruction for the 4 corners of the building.I am afraid it is not a problem of timing because I even saw it building a field over the CC !Looking through the code there is one possible source of error that I can see. In your getMapDataAtCoord function I notice that you do round( (x + y*width) / tilesize )Refactoring you get (almost, you could get +-1 from rounding, but it is clearer like this):round( x/tilesize ) + round((y/tilesize) * width)From this you can see for example if y = 26 then y/tilesize = 6.5 so after multiplying by the width you get a stray width*0.5 added on sending the x coordinate right across the map. So just make sure you round straight after the division before converting to 1D and hopefully it will work.To minimize other errors I would recommend keeping your buildings at a constant orientation since with your corner checking it would be possible for the edge of a building to cut over the corner of another without the corners or centre being obstructed. Quote Link to comment Share on other sites More sharing options...
gudo Posted September 26, 2011 Report Share Posted September 26, 2011 (edited) To minimize other errors I would recommend keeping your buildings at a constant orientation since with your corner checking it would be possible for the edge of a building to cut over the corner of another without the corners or centre being obstructed.Oh ninja'd. I was getting a screencap of this. But yeah, try a constant orientation. I believe the angle that Mythos recommends and Jubot uses is 3/4*pi (.75pi). Edited September 26, 2011 by gudo Quote Link to comment Share on other sites More sharing options...
lexa Posted September 26, 2011 Author Report Share Posted September 26, 2011 HelloThank you for these cluesBut I guess the error comes from somewhere else - the bot has all buildings with an angle of 0- the error I see is much much bigger than an approximation, since it is allowed to build (but not finish, only the foundations) over the civic center - see the attached screenshot (look closely, there are 2 different foundations under the CC)- it did not do that with alpha 6Still I will look in that direction, adding a 5th point (the center) . Do you think it is a good idea ?PS : I worked on the defense tonight and now SplitBot detects when it is under attack I also got rid of this "field building craziness" Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted September 26, 2011 Report Share Posted September 26, 2011 - the error I see is much much bigger than an approximation, since it is allowed to build (but not finish, only the foundations) over the civic center - see the attached screenshot (look closely, there are 2 different foundations under the CC)- it did not do that with alpha 6Currently it's the AI's responsibility to determine where it can build based on the obstructions map. In Alpha 6, the simulation would also do its own checks for all players, to prevent them building where they shouldn't. This will be reinstated once problems like http://trac.wildfiregames.com/ticket/969 are fixed, it shouldn't be long, but until then the AI can do almost anything (but note that your AI should still do its own checks correctly). It may be the simulation check was simply masking problems in the AI build logic. 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.