Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Brained constructs attempt to path over oremites
New Topic New Poll Post Reply
Poster Message
Dragon Fogel
Level: Smitemaster
Rank Points: 1634
Registered: 06-21-2014
IP: Logged
icon Brained constructs attempt to path over oremites (0)  
Constructs cannot move over oremites under their own power, but brains ignore this.

While it's true that brains don't take everything into account, in all other cases they at least pay attention to whether the monster can move over the floor tile type they're detecting.

I had a quick look and there are only seven rooms with constructs, brains, and oremites. None of them rely on this behavior, though individual demos might break.

It's uncommon enough that I didn't realize it was the case until I tried to make a room about using oremites to create separate pathmaps for a construct and another monster.
11-18-2020 at 06:42 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3500
Registered: 12-28-2004
IP: Logged
icon Re: Brained constructs attempt to path over oremites (+1)  
Quoting TFMurphy from the private DROD 5 Development forum:
As of v5151, Constructs will refuse to cross oremites, even to kill something standing there. Since they have Flexible Flanking movement, they will tend to circle a player standing on one to the NW (maybe we'd want to remove the Flank and just leave them with Flexible Beelining?) Brains don't understand oremites to be an obstacle to Constructs and so they will still pick out paths that lead through them, but just like a normal monster being ordered to step on something they don't like, Constructs will refuse and ask for another square, just as normal.

It was certainly known behavior.

One explanation for this behavior could be that brains just can't conceptualize the idea of not being able to move over oremites, just like they can't understand serpent's inability to move diagonally, or gentryii being able to walk over active firetraps. Which for me isn't any more outrageous than the explanations offered here and brained monsters interactions with Stalwarts.

Please discuss whether this should stay or not. Fixing it is not a huge pain, though I hate the idea of doing it this close to 5.1.1 release, but I'd rather get it done now than later. I also may have a different perpective on this because I am familiar with the code and this (and other brained monster inconsistences) is direct consequences of how pathmaps are coded.

____________________________
My website | Facebook | Twitter
11-18-2020 at 07:37 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
Dragon Fogel
Level: Smitemaster
Rank Points: 1634
Registered: 06-21-2014
IP: Logged
icon Re: Brained constructs attempt to path over oremites (+1)  
Gentryii avoiding firetraps is a "false negative" - a monster concluding that it can't move into a tile when it actually can.

The oremite behavior is a "false positive" - a monster trying to move into a tile when it can't.

We have a lot of examples of both, because brain pathmaps are fairly simplistic by design, but while there is at least one similar example of a false negative, there's nothing comparable in terms of false positives.

A similar false negative is just a tile with a toggleable force arrow on it. If the force arrow is off, brained monsters will move on the tile freely. If it's on, brained monsters won't move onto the tile even if the direction of the arrow would allow them to.

But there are no other false positives based on tile type. Most are based on things that are much more changeable - whether a tile has a sword or a monster in it, for instance. One of the few exceptions is orthosquares - but even there, the false positive is coming from the state of the tiles around it, not the orthosquare itself. You can construct a room where a pathmap goes through an orthosquare and it doesn't cause any problems because the monster enters and leaves the orthosquare through orthogonal directions. Same situation with a snake going through a diagonal-only path - the issue isn't with the diagonally-linked tiles, technically, but with the fact that the brain isn't accounting for the tiles around them.

Here, the false positive is that the brain is telling a monster to cross a tile that it cannot cross, ever, even if the tiles around it are somehow changed, unless a citizen or build command alters the tile itself. There's no other situation where this happens.
11-18-2020 at 08:23 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 3066
Registered: 02-20-2007
IP: Logged
icon Re: Brained constructs attempt to path over oremites (+1)  
The brain pathmap has well-known weaknesses, such as the fact that it sends serpents on a path that assumes they can move diagonally. But one thing it does understand and handle correctly, in all other cases, is which monsters can move on which floor types -- it directs spiders across shallow water but not roaches, and it has separate pathmap for seep and waterskippers that pathfind through walls and water respectively.

The natural expectation is that constructs should be able to pathfind around oremites, and anything else is a bug that should be fixed. I am honestly astonished that it's taken so long for this to come to light, but at least that means that fixing it won't affect very many published rooms.

____________________________
50th Skywatcher
11-18-2020 at 09:25 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3065
Registered: 06-11-2007
IP: Logged
icon Re: Brained constructs attempt to path over oremites (+2)  
I've been thinking about this topic for almost a week now, but kept putting off the ~30 min it would take to write up my feelings on the matter. But I did really want to add something here, so let's see if I can put my thoughts in order. (It's so much easier to write these things in my head when I'm at work all day, but it all gets so hard once you have the window open and want to start....)



It's certainly a compelling argument that brains should always consider the base floor types of each entity they direct. Of course, it's not the only way to internalise understanding of the brain's rules. Like skell, I'm more familiar with the way the pathmaps are generated, so it seemed perfectly fine to me for the brain to continue a sort of "one size fits all", where it shoves monsters into broad categories and gives them advice based on that, not caring when it fails. Snakes are the poster child of that, and Constructs fitting broadly into the Ground+Shallow Water map with a single exception did not feel far from that at all.

I'd also note that other than the big exceptions of Wall and Water, the current pathmaps all use Ground as a 'base subset', so much that Air/Shallow Water just seemed like natural extensions of them. What's being discussed here isn't "Ground+<something>" though, it's "Ground-<something>"... and that feels like it could be an exception too.



Still, like I said, it's a compelling argument. The base 'meta' rules for determining how brains work are clearly debatable, and I don't see a big reason why Constructs couldn't have their own unique map. But, what concerns me is the immediate consequences of that.

Currently, Constructs are given a standard Ground+Shallow Water pathmap. This means that they will pathfind through oremites, even though they can't walk over them. This has some obvious disadvantages: Constructs can't properly navigate gaps between oremites when brained as a result.

But excluding Oremites outright impacts other things. Currently, if you stand in the middle of a large area of oremites, then Constructs will usually be able to get to the edge and remain close enough to possibly be trouble when you finally move off them. Alternatively, if you move past a barrier of oremites into another section of the room closed off from the rest, the Constructs can usually pathfind their way towards their side of the Oremites and be there when you want to cross over again. If Oremites were removed from a Construct pathmap, they would instead become unbrained in both cases. This is a fairly large difference in current behaviour, and it doesn't quite feel right to me -- I feel like the Ground pathmap is so basic to what a brain already directs, that they should at least be able to get a Construct close enough to the player.



So... I have a addition to propose to this, should Constructs get their own pathmap at all, and that is the following: The new Construct pathmap should be able to path through Oremites, but at a vastly increased cost such that any non-Oremite path is prioritised.

In short, I'm proposing that a partial ruleset similar to what the Wall/Water pathmaps apply to all obstacles, is used by the Construct pathmap to apply to Oremites only. This would result in Constructs being able to navigate Oremite mazes easily, but still be able to track the player even if they've put path-blocking Oremites between them (as they currently do).

In this way, we get to apply the 'meta' understanding that brains always understand the base floor types of all enemies, as well as a possible 'meta' addition that pathmaps that are restricted in some way from crossing certain Ground tiles gain some method of pathfinding through obstacles. (In a similar manner, if we ever had a monster who could walk over all Ground tiles except Bridges, I would expect the brain to help it guard the only bridge leading to you.)



This wouldn't be a trivial change to make to the codebase in comparison to just adding a new pathmap, but it also wouldn't be that difficult either (I've had some thoughts on how it would be implemented, but I'm not going to have a DROD compiler running any time soon, so best I could contribute on that front is pseudocode or code snippets that someone else would have to debug/test). But if it needs to be delayed to 5.2, then I think that's fine -- I'd rather this be discussed and dealt with properly, rather than some change made quickly and then we regret not having done something else later.
11-25-2020 at 12:01 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
bbb
Level: Master Delver
Rank Points: 173
Registered: 10-07-2013
IP: Logged
icon Re: Brained constructs attempt to path over oremites (0)  
I agree agree with TFMurphy's sentiments, but not with his suggestion. The way I see it, the difference between the ground based pathmaps and wall/water maps is that Beethro shares the domain with the monsters, so the monster is trying to reach Beethro, while the wall/water monsters live somewhere else, so the monster is trying to come close to Beethro to be ready when Beethro reaches the border.

I would suggest either having the pathmap consider only oremite tiles within 5 tiles of the construct, or ignore only oremite tiles 5 tiles of Beethro.
12-02-2020 at 05:29 PM
View Profile Send Private Message to User Show all user's posts High Scores Quote Reply
Dragon Fogel
Level: Smitemaster
Rank Points: 1634
Registered: 06-21-2014
IP: Logged
icon Re: Brained constructs attempt to path over oremites (0)  
bbb's suggestion sounds like it would be more complicated on the player end.

1000 tiles is a ridiculous amount considering that a room is roughly 1100 tiles total. There's just not enough space to make an obstacle-free path that's longer than an obstacle path.
Because of this, an observant player can notice that a seep will move towards a wall if they're next to a wall, but will still make brained moves if they're not, which is generally all you need to know to solve a room where you need to use the behavior. Under this proposal, oremites would work the same way for constructs.

Mind you, I'm fine with either TFMurphy's approach or the "brain doesn't pathfind over oremites at all" approach. I just think brained constructs should treat oremites as a problem.
12-02-2020 at 05:53 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Brained constructs attempt to path over oremites
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.