Author Topic: Hydra Slayer (now at 16.1), NotEye (now at 8.1)  (Read 147753 times)

CCC

  • Newcomer
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Hydra Slayer version 13.0
« Reply #150 on: February 15, 2013, 04:55:52 PM »
Quote
The vorpal dagger will become a machette after each attack (and Echidnas cannot simply move away to reverse this). Does not this cause problems with your strategy?

Surprisingly few. The main reason for this is that the vorpal dagger doesn't usually become a machete after being used in an ambidextrous attack (I think it did a few times, I'm not quite sure why). And I only ever used it non-ambidextrously if that would kill the hydra in one hit (i.e. the hydra had one head) which was a pretty rare circumstance after picking up the vorpal dagger. (Or against mushrooms).

Another reason is that I was often dividing by odd numbers (a lot of the time, 3 and 5 at once) so I didn't need to use the dagger on every hit.

On occasion, I did have to deal with a machete; and the fact that I had a size-15 instead of a size-16 sword enabled me to properly deal with an odd number of heads at least once (and, of course, the machete shrank during that attack).

Quote
Yeah, probably the best artifact for the Echidna :) I have checked this, and it seems that you can reforge it and get another one... (which is intentional, although maybe overpowered).

Hmmm. When I looked it up with the Scroll of Reforging, it looked like it would only give ordinary weapons. Maybe I misread something.

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Hydra Slayer version 14.6
« Reply #151 on: February 19, 2013, 03:06:56 PM »
Indeed, there was a bug with using the vorpal blade in an ambidextrous attack (it worked against mushrooms and co-aligned hydras, while it should work against mushrooms and not co-aligned hydras; I have been testing on mushrooms).

Fixed in the new version (14.6). Thanks!

CCC

  • Newcomer
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Hydra Slayer version 13.0
« Reply #152 on: February 24, 2013, 12:26:11 PM »
Quote
Yeah, probably the best artifact for the Echidna :) I have checked this, and it seems that you can reforge it and get another one... (which is intentional, although maybe overpowered).

Hmmm. When I looked it up with the Scroll of Reforging, it looked like it would only give ordinary weapons. Maybe I misread something.

I had, indeed, misread something.

Incidentally, I became a bit suspicious when a potion of knowledge (consumed to deal with a shadow hydra) in my current game took a very long time to tell me to use a single weapon (A31) to defeat a 31-headed hydra. The result was correct, of course, but the delay made me suspicious... so I started poking around in the code for a bit.  It looks like you are drawing up the complete graph for all hydras up to a given maximum number of heads before even starting to calculate the optimal path for the given hydra. Is this correct?

If so, then it should be possible to drastically speed that computation up, without sacrificing accuracy; using something like the minimax algorithm, for example, and only finding those edges of the graph that you actually need to use. (I might have a go at that rewrite myself at some point).

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Hydra Slayer version 14.6
« Reply #153 on: February 24, 2013, 10:59:02 PM »
Yes, you are probably right that another algorithm could be faster. IME the current one is very fast in most cases, but it fails miserably with Ambidexterity (I think it takes around 1 minute with 10 weapons on my machine). Anyway, the motivation behind the current one is as follows.

The algorithm is used in very many places in the game (Potions of Knowledge, Powder of Growth, the Mersenne Twister; and to generate strategies for ivy-hydras, arch-hydras, and the Twin; ivy-hydras and arch-hydras know that they can use their special powers in the meantime, although I was too lazy to take Twins' joint attacks into account). It calculates the path backwards, from the "dead hydra" state to every state; although starting from the current state and trying to reach the "dead hydra" state would be more natural, and probably faster for PoK, some of these uses would be hard to implement in this way (most notably the Powder of Growth, which existed since the first version).

And yes, the whole graph is built first - it is easier to generate all the edges from the given vertex, than the edges to the given vertex :)

CCC

  • Newcomer
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Hydra Slayer version 14.6
« Reply #154 on: February 25, 2013, 05:05:42 PM »
The algorithm is used in very many places in the game (Potions of Knowledge, Powder of Growth, the Mersenne Twister; and to generate strategies for ivy-hydras, arch-hydras, and the Twin; ivy-hydras and arch-hydras know that they can use their special powers in the meantime, although I was too lazy to take Twins' joint attacks into account).

Huh. I can find a way to deal with the ivy-hydra, probably the arch-hydra depending on how many heads it can lose at once, the potion of knowledge and probably the Twin as well, using only a partial graph; but the Powder of Growth is a tough one. I think that actually does need the complete graph, especially as I'm not sure that it's possible to work backwards uniquely with some weapons (e.g. the Sector). For maintainability, you'll definitely want to keep all of those options using the same function; if there are two path-finders, they may begin to diverge with future changes.

Okay, then here's another option that should work in all cases; it should be possible to use the ordinary (non-ambidextrous) graph to handle ambidextrous attacks. Since it's the graph generation that's causing the slow-down, this should resolve the problem. The idea is that, instead of seeing the ambidextrous attacks as attacking with several weapons simultaneously, we look at the ambidextrous attack as attacking, or choosing not to attack, with several weapons sequentially. These attacks are always considered to happen in the same order (parenthesabre, then trisector, then dagger...), and only after the ambidextrous user has attacked (or chosen not to attack) with all his weapons does the hydra get a chance to respond (e.g. vulture/ivy hydras grow heads at that point, arch hydras lose heads). Choosing to ignore all weapons would be the "let it attack you" action, which I've noticed turns up on occasion for vulture-headed hydras.

...wait, are you saying that the Mersenne Twister isn't just random?

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Hydra Slayer version 14.6
« Reply #155 on: February 25, 2013, 06:24:48 PM »
A nice idea, but also quite difficult to implement...

You can enchant the Mersenne Twister. The result will be biased for easy numbers then. Yopu will probably need quite a lot of Big Sticks to make it practical, though (I have not tried this strategy in practice, so hard to tell whether it is balanced well).

CCC

  • Newcomer
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Hydra Slayer version 14.6
« Reply #156 on: March 02, 2013, 01:35:07 PM »
I believe I may have found another bug. I noticed that there was an achievement for making a hydra collapse under the weight of its own heads, and so I decided to go for it - I was facing an alien hydra, had a Meteor Divisor of Power (/30), and lots of health. As an Echnida, I was using ambidextrous attacks the whole time.

The hydra got to 245015495 heads before I gave up and fungified it. My first thought was that the collapse threshold was simply higher than that, so I decided to look at the code to see how close I'd been; much to my surprise, I found that I'd rather overshot the goal. It seems that ambidextrous attacks don't trigger the Collapsing Hydra test.

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Hydra Slayer version 14.6
« Reply #157 on: March 02, 2013, 04:46:02 PM »
I will look into that. Thanks!

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Hydra Slayer version 14.6
« Reply #158 on: March 03, 2013, 02:05:59 PM »
Fixed. Also some improvements to the hex mode are included.

Hydra Slayer 14.7

chooseusername

  • Rogueliker
  • ***
  • Posts: 329
  • Karma: +0/-0
    • View Profile
    • Email
Re: Hydra Slayer version 14.6
« Reply #159 on: March 03, 2013, 08:47:06 PM »
I'm clearly missing something.  I enter the game, press F4.  No hex mode visible.  What am I doing wrong?

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Hydra Slayer version 14.6
« Reply #160 on: March 03, 2013, 10:29:33 PM »
Hex mode is a game mode, not a graphical mode. You need to start a new game to play in Hex. The NotEye menu (F4) only allows you to change how the game looks (and other system options), not the gameplay.

You get the option "geometry" while starting a game (on the same screen when you select the race). Note that the Tutorial is 4-directional Human only, you need to start the real game.

Aluminik

  • Newcomer
  • Posts: 1
  • Karma: +0/-0
    • View Profile
(No subject)
« Reply #161 on: March 04, 2013, 02:26:52 AM »
Downloaded Hydra Slayer quite a time ago, but started playing just recently. Now I see that it's rare fusion of dungeon crawl and maths, and oddly enough it works. Reminds me about one game which is not roguelike but still is turnbased and has twisted puzzles, and that game (or rather series) is DROD - Deadly Rooms of Death. Roaches are not hydras, of course, but are nonetheless challenging to defeat. And then, there are goblins and snakes and bats and growing goo...
But enough of introductions, 'cause I went here to speak about maths!

So, line of Divisors only goes one side (leaving Null Sector alone) - increase of denominators: 1/1 -> 1/2 -> 1/3 -> ... But what about other fractions? The least thing to implement should be Sesquisector and Quasquisector, these should change quantity of heads by 2/3 and 4/5 correspondingly. They can be displayed as /1.5 and /1.25 [or 2/3 and 4/5, or /(3/2) and /(5/4), or //3 and ////5...], and they will progress with Big Stick as following: 4/5 -> 4/6 = 2/3 -> 2/4 = 1/2, which stands for normal Bisector.
More fun will be going into full forest of fractions, with unholy spawn of (7/3)-Sector turning into good old Trisector after bigsticking it twice. But this will take too much to implement, I think. And names will be too ridiculous.

Also, reminder that hydras weren't holding the monopoly on multiple heads in Greek mythology. Maybe, that will inspire some idea too.

Once again, thanks for such an interesting expirience of roguelike!

Z

  • Rogueliker
  • ***
  • Posts: 905
  • Karma: +0/-0
    • View Profile
    • Z's Roguelike Stuff
Re: Hydra Slayer version 14.6
« Reply #162 on: March 04, 2013, 10:53:46 AM »
Yes, I know DROD, and it is a great game. Have you seen my other game, HyperRogue? It is more inspired by DROD...

As for dividing by 3/2 and 5/4, I like your name suggestions very much. However, I think that making the Sesquisector work only with numbers divisible by 3 would be quite useless (why not use Trisector instead?).

There is the "first rule of hydra slaying", which holds for most weapons, and is a good rule for balancing them (if N heads remain after an attack, then hydras of only N smaller different sizes could be attacked by the same weapon). We could make Sesquisector agree with this rule by making it work like this: f(3n) = 2n, f(3n+2) = 2n+1. This would make it somewhat useful in a combination with Trisector, and even more useful in a combination with the Sub Trisector, which uses the formula f(3n+1)=n+1 (and yet more useful when you have all three of them). As for the big-stick rule, I think that power N would correspond to (N-1)/N, you would usually find the Quasquisector (5) and have to use Reforging to obtain the more useful Sesquisector (3).

Thanks for reminding about the Hecatonchires! I think it could be a good idea to replace the 2-headed giants with 50-headed Hecatonchires in some levels. Other well known multi-headed beasts are Cerberus and Chimera, but I have no idea how to make them interesting...

Thanks for your comments!

CCC

  • Newcomer
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Hydra Slayer version 14.6
« Reply #163 on: March 05, 2013, 07:41:18 AM »
Hmmm. Well, I don't know how well it would fit, but here's one possibility for Cerberi (I think that's the right plural form):

Have it move twice as fast as a hydra (like a hydra who's been given a potion of speed). Like the two-headed giants, killing a Cerberus is not necessary; however, they have a greater benefit to health (if killed in melee) than a hydra does. Have them dodge ranged weapons, as a giant does.

The general strategy of a cerberus is to hover around one square away from the player; when you step towards them, they hit once, then step back out of reach, usually before the player can react. Against slower Echnida, they will zip in, attack, and retreat all before the player has a chance to react. Short of taking a Potion of Extreme Speed (or perhaps multiple potions if playing an Echnida), the only way to kill a cerberus is to force it into a corner, so that there's nowhere to run; but if you do kill it, there is a big health benefit to be obtained.

How's that?

CCC

  • Newcomer
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Hydra Slayer version 14.6
« Reply #164 on: March 11, 2013, 08:16:30 PM »
Something very strange has happened. I got to a level, killed all the hydras, and it wouldn't let me down the stairs.

I began to suspect that I had missed a shadow hydra in amongst the mushrooms, so I killed every mushroom on the level - to no avail. I wandered all over the level, making sure to step into all the little alcoves along the edge of the level, so as to be sure that a shadow hydra would at least be able to see me (if not vice versa) - it did not help.

I considered the possibility that the level might have been generated with a little one-square spot that I can never reach, in which hides a hydra. Unfortunately, I have no pickaxe, and no wand of phase wall, and so I cannot check for this. (I have a number of scrolls of the big stick, and at least one of reforging - is there ever any other weapon that reforged into a pickaxe?)

I was going for the level 100 trophy, and doing quite well, so this is a somewhat unpleasant occurance.