Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : General : Stalwarts (The reasons behind their negative life expectancy...)
New Topic New Poll Post Reply
Poster Message
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged
icon Stalwarts (+6)  
I didn't really like the Stalwart puzzles in TCB. How well they survive is something that's very difficult for you to directly control. In keeping with that, though, I thought it'd be interesting to actually see what they were doing, in the hopes that knowing how they moved might help people use them a bit better.

They're still quite dense, but let's see what we can find.

Again, these are true for 3.0.0. Later patches may change things.

Basic Stalwart Movement
* First off, Stalwarts can be frozen by Aumtlich beams. If a Stalwart is frozen, then he forgets everything else and merely rotates clockwise on the spot, forever. This is in hopes that he'll break the beam, clearly. Unfortunately, he doesn't really care about Beethro when he's doing this.

* Otherwise, Stalwarts want to know if they can get at any accessible enemies. They look for all monsters in the room, and check to see which has the shortest path to them. If they don't find a path or don't find any monsters, then they'll just stay put and not do anything. If they do find a path, then they'll start following the shortest one.

Path-Finding
The Stalwart looks for the shortest path to available to any accessible monster. This is done in the same way Slayer Wisps find Beethro and Halph finds Orbs.

One quirk about this is that the path is only valid if the Stalwart can currently walk along it without turning. Since it tests for various obstacles and stuff like bombs, oremites, swords, guards and the like, this means that the Stalwart may suddenly decide it's impossible to get to the monster even if a single rotation would make it possible again. And since it pathfinds at the start of every turn, the Stalwart may have thought it possible last turn, then swung his sword to follow the path, and then suddenly found his current orientation can't negotiate the path.

Path-Following
Once the Stalwart has decided on his path, he will try to follow it.

* First, the Stalwart checks if he's already stabbing the monster. If so, he doesn't do anything.

* Then he checks to see if his sword is next to the monster. If it is, he decides whether he needs to rotate or move to kill the monster on this turn: if possible, he does so. He prefers to rotate to kill rather than move. In 3.0.0, a monster directly adjacent to him that would require a backswipe to kill will always be rotated towards: this usually results in the Stalwarts death since he won't kill the monster in time. I believe this has been fixed in the patch.

* If he can't move to destroy the target on this turn, but he's two steps away from his enemy along his chosen path, then he'll turn until his sword is pointing directly at the target. (Remember that he'll move to kill before this if he can hit the target in a single turn though.) If he's already facing his target, he'll move onto the final square along the path. Of course, if he gets to this point where his sword is pointing at his enemy and he can't do a one-step kill, then he's going to end up next to his target with the target still alive at the end of his turn. This is usually fatal to the Stalwart.

* Finally, if he's farther away than that, then he will want to follow his chosen path. If his sword is not more than one rotation from his current path, then he'll keep moving along the path: for example, if he's moving N and his sword is facing either NW, N or NE, then he'll move rather than turn.

If his sword is not facing one of those directions, then he'll try to turn his sword towards his target, favoring a clockwise rotation if he starts facing directly away from his target. In general, he wants to be facing in a horizontal or vertical direction if there is more than double the distance in one of the orthogonal directions than there is in the other (example: 15 S and 6 E has the S-distance over twice that of the E-distance, so the Stalwart would want to face south). The Stalwart will stay in place rotating his sword until its either pointing towards its target, or his sword is within one rotation of the direction he needs to take to follow his path.

Obviously, if the Stalwart cannot turn his sword, then he'll move instead, even if he wanted to turn rather than move.

Path Obstacles
A Stalwart considers the basic set of obstacles to be impossible to walk on. It also considers all swords and characters/monsters to be impassible.

A Stalwart also considers obstacles to its sword before moving. As mentioned previously, this can result in the Stalwart failing or losing paths even if it would easily fit if it turned. Stalwarts will try not to stab the player, any friendly characters (includes Mimics, Decoys and other Stalwarts, among other things) or bombs.

The exception to the above is if either Beethro, friendly character or the bomb is on Oremites. This can be particularly dangerous if the Stalwart himself is not on Oremites. It's quite possible for a Stalwart to blow himself up by walking past a Bomb that just happens to be on an Oremite patch while the Stalwart isn't.

EDIT: Oh, right, forgot one other thing. Stalwarts (and Guards... but not Slayers) are affected the same as Beethro on Oremites: when they move, they end up facing the direction they move. This confuses the hell out of all of them (especially if they really expected to kill something on their move), and is again exceedingly dangerous if Bombs and other things they usually don't want to stab are littered around. As an example, you could create a single tile of Oremite and then place Bombs two tiles away from it in various directions. Any Stalwart that steps on that tile is in for a nasty surprise.

==========

They're still really quite dense, especially with regards to what they consider to be "accessible paths". Quite likely some puzzle potential there, I guess, in that they often need to be babysat through areas of Mimics or Bombs, and that'll you'll quite likely either need to clear the way first, or try to get them to turn to face the right way to start with (not easy). It is, however, all too easy for them to be baited into a position where they'll get killed in the next few turns.

Still, used correctly, they're pretty versatile. And if a Brain isn't around, they're more powerful than Decoys at pulling monsters away from Beethro. And if Brains *are* around, well, the Stalwart can still backstab many of them. (And then get killed as it wades into the hordes).

Anyways, hope that helps, and apologies if I missed anything or didn't explain anything well enough - they're a little more complicated than briars, after all. If you have questions, feel free to ask. If you have stuff to add, by all means, go ahead.

[Last edited by TFMurphy at 06-12-2007 05:14 PM : Slight correction to Oremite addition]
06-12-2007 at 04:52 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
larrymurk
Level: Smitemaster
Avatar
Rank Points: 1911
Registered: 12-09-2004
IP: Logged
icon Re: Stalwarts (0)  
Nice stalwart primer.
06-12-2007 at 05:06 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Stalwarts (+2)  
I'd say this is an excellent list of things for Mike to fix.
I'm joking... or am I?

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
06-12-2007 at 06:18 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
starwed
Level: Delver
Rank Points: 49
Registered: 12-16-2006
IP: Logged
icon Re: Stalwarts (0)  
They're still really quite dense, especially with regards to what they consider to be "accessible paths".
Guards (and slayers, I suppose, although I haven't tested that explicitly) are the same way; the pathmap algorithm just doesn't consider such things.
06-13-2007 at 04:37 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged
icon Re: Stalwarts (+1)  
starwed wrote:
Guards (and slayers, I suppose, although I haven't tested that explicitly) are the same way; the pathmap algorithm just doesn't consider such things.

Actually, they're not as bad. This is because both Guards and Slayers will still follow the path up to the "blockage", and then may (with luck) negotiate the path then.

A Stalwart, on the other hand, will just look at the path from 20 squares away and say "I can't get through that, so I'm staying here/going after another monster". This can *really* confuse the Stalwart if it has multiple monsters it can 'access', but the way it's turning blocks off the closest; you can watch him stand in place continually turning clockwise then anticlockwise if things are set up in a particular way.
06-13-2007 at 10:45 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Jothki
Level: Goblin
Rank Points: 15
Registered: 02-18-2007
IP: Logged
icon Re: Stalwarts (0)  
From playing around with them, it seems like Stalwarts stink at fighting Guards. I would expect their AIs to be pretty similar, is there any particular reason for this?
06-13-2007 at 04:11 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Chaco
Level: Smitemaster
Rank Points: 3624
Registered: 10-06-2005
IP: Logged
icon Re: Stalwarts (+2)  
Stalwarts move before guards. This is actually quite detrimental to their health:
.......
.......
..S=G..
.......
.......


(Note that the swords are clashing)

The stalwart will attempt to go around the guard's sword in an attempt to kill it, and the guard will rotate to kill it. Similar instances abound in which a stalwart moves next to a monster without killing it, and then the monster just rotates or kills the Stalwart on its move.

____________________________
Quick links to my stuff (in case you forgot where it was):
Click here to view the secret text

06-13-2007 at 04:36 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Dex Stewart
Level: Smiter
Rank Points: 355
Registered: 01-19-2007
IP: Logged
icon Re: Stalwarts (0)  
Can anybody confirm that Stalwarts are exactly the same as guards in 3.0.2 ?
06-15-2007 at 05:04 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Dex Stewart
Level: Smiter
Rank Points: 355
Registered: 01-19-2007
IP: Logged
icon Re: Stalwarts (+1)  
Chaco wrote:
Stalwarts move before guards. This is actually quite detrimental to their health:
.......
.......
..S=G..
.......
.......


(Note that the swords are clashing)

The stalwart will attempt to go around the guard's sword in an attempt to kill it, and the guard will rotate to kill it. Similar instances abound in which a stalwart moves next to a monster without killing it, and then the monster just rotates or kills the Stalwart on its move.

That is not necessarily true. Think of a world without Beethro, where Guards and Stalwarts simply move alternatively. There, the chances are equal in every case, depending upon who moves first(of course, if their behaviour algorithms are identical).
06-15-2007 at 05:06 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged
icon Re: Stalwarts (+2)  
They're nowhere near exactly the same as Guards - it would require a number of changes to their current system to do that, not just the addition of backswiping. The key differences between the two currently are:

1) Stalwarts move before Guards.
2) Stalwarts use Wisp-pathfinding (and take their sword into account), Guards use Brain-pathfinding (and don't take their sword into account) against Beethro and beelining against everything else.
3) Guards always want to face their target, Stalwarts are fine so long as they're facing the path they need to take to get to their target.
4) Stalwarts prefer to kill by rotating, Guards prefer to kill by moving.

And probably a few more (obvious ones like Stalwarts being friendly ignored). Once a stable 3.0.2 (or later) release is available, I'll try and update this post with any additional changes, if there are any.


[Last edited by TFMurphy at 06-15-2007 05:19 PM : A little extra about Guard-pathfinding]
06-15-2007 at 05:11 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Red-XIII
Level: Smitemaster
Avatar
Rank Points: 623
Registered: 08-05-2012
IP: Logged
icon Re: Stalwarts (0)  
Sorry for bumping like this but I'd like to know something about the "Path-obstacles".

Since the fegundo moves before the stalwart he'll check his path after a fegungo explosion. Now, ashes are clearly obstacles, but does the stalwart consider the tiles "on flame", the ones affected by explosion, like an obstacle?

I tried to discover this by myself and maybe the anwer is yes but I'd like to know it from you.
Thanks.

____________________________
There's not some other world out there where everything's gonna be okay.
There's just this one, just this rock.
-33th Skywatcher
09-16-2013 at 10:03 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : General : Stalwarts (The reasons behind their negative life expectancy...)
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.