noteye icon indicating copy to clipboard operation
noteye copied to clipboard

Growth scroll seems to not consider shurikens

Open BlackCapCoder opened this issue 6 years ago • 3 comments

I was being chased by a rogue 3-headed ice hydra. I had a -1 frozen dagger, a -2 bone machete and a M4 chaos shuriken. I used a growth scroll on the hydra, expecting it to grow an extra head so that I could kill it with the shuriken, but instead the game told me that growing extra heads would not help me, wasting my scroll.

BlackCapCoder avatar Jul 16 '18 14:07 BlackCapCoder

The rune of growth uses the same algorithm as the potion of knowledge, and also several late-game hydras and weapons.

There are too many special cases regarding the shurikens (should we allow multiple throws? should the wounds be counted as usual or not? should we consider throwing through a mushroom? should we consider it if the best option is to throw it an another hydra, thus making it unavailable for this fight? etc.) so I have decided that it is easier to just not consider shurikens in the algorithm.

zenorogue avatar Jul 17 '18 22:07 zenorogue

I agree that it shouldn't consider all those arcane cases- it's not useful to the player- but it might make sense to consider the trivial case of throwing the shuriken no more than once directly at the hydra, at least in cases where there are no other options.

Off topic question: Are there game states equivalent to collatz functions? Collatz functions are turing-complete, so the decision problem of whether or not you can kill a hydra would be undecidable in general

BlackCapCoder avatar Jul 19 '18 11:07 BlackCapCoder

Well, there is a rule that a hydra over 1000000 heads dies immediately, so everything is decidable unless we ignore this rule.

There is one special weapon which basically does one iteration of the standard Collatz function, but I guess we should ignore that.

If you have fire bisector and ice subbisector against an ice hydra, the fire bisector does 2n => n while the ice subbisector does 2n+1 => 3n+1, and you could also have a dagger which grows +1 head so it basically tests if there is currently just 1 head, so it is very similar to the standard Collatz function (I do not know if the answer is known for this one). In general we only have kn => n, kn => (2k-1)n, kn+1 => n+1, kn+1 => (2k-1)n+1, which is probably not general enough to obtain an undecidable Collatz function. But maybe some undecidability could arise from other features.

zenorogue avatar Jul 26 '18 14:07 zenorogue