MegaMek / megamek

MegaMek is a networked Java clone of BattleTech, a turn-based sci-fi boardgame for 2+ players. Fight using giant robots, tanks, and/or infantry on a hex-based map.
http://www.megamek.org
GNU General Public License v2.0
295 stars 282 forks source link

Default Move as climb results in unusual bot behavior #905

Open VampireSeraphin opened 6 years ago

VampireSeraphin commented 6 years ago

mechs climb

These archers are climbing all buildings instead of going through them. While this is theoretically allowed, its very strange bot behavior. I believe this is an artifact of the pathing change that allows the bot to more easily use bridges.

NickAragua commented 6 years ago

Why would you go through a building when you can climb over it? Going through a building is usually a PSR and risks damage.

Edit: It'd probably be a reasonable adjustment to discourage the bot from stopping her units on top of buildings with a CF close to the unit's weight.

HammerGS commented 6 years ago

Or maybe walk around them.....

VampireSeraphin commented 6 years ago

That was largely my thoughts nick, a climbing ground bound mech is easy to exploit by a human player either by destroying a building with a CF to close, or stranding it be destroying nearby buildings. Its also very MP expensive. So, while definitely legal, I'd discourage the bot from doing it.

dericpage commented 6 years ago

Princess already inspects buildings for the possibility of collapse. If a building's CF is less than (mech mass + 10) then she will consider the building unsafe. She makes this check for all buildings she crosses/walks through. This all happens in the PathRanker.willBuildingCollapse method. If this method returns true, then Princess will reject that path.

Now, is (mech mass + 10) a good enough buffer? It's kind of an arbitrary call. It might be better to base the amount of buffer mass on her Piloting Caution setting.

scJazz2 commented 6 years ago

Thanks for clearing things up @dericpage. The adjust buffer by Pilot Caution definitely seems like something worth looking over.

Two things I might add. If the buildings will collapse by going through them Princess can easily get stuck behind a bunch of light/medium buildings which wouldn't cause her much damage. Thinking about those dead ends/totally blocked areas in a City Map. This is not a good thing. Your explanation cleared up why I've seen that so often. If a building has a basement going through or over it might be very very bad.

dericpage commented 6 years ago

Part of the problem with the city maps is that you don't know if a building has a basement until you've fallen into it. I suppose we could make Princess aware of the 'random basements' option at least.

scJazz2 commented 6 years ago

@dericpage that was my point... I should have been more clear.