Jump to content

New Split Bot release


Recommended Posts

  • Replies 84
  • Created
  • Last Reply

Top Posters In This Topic

Hi Gamers !

Now I have the svn version of the game and I have some strange behaviour wacko.gif

But first let me tell you that I like very much what I saw, I will comment on other thread !!! banana.gif

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 ?

Link to comment
Share on other sites

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 7

edit2: btw i have some gameplay on my youtube channel. More coming. http://www.youtube.com/user/LinuxEki

Edited by Linux_Eki
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 track

I 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"

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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 by gudo
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 !

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by gudo
Link to comment
Share on other sites

Hello

Thank you for these clues

But 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 6

Still 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"

Link to comment
Share on other sites

- 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 6

Currently 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.

Link to comment
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.

 Share


×
×
  • Create New...