Skip to main content
8 events
when toggle format what by license comment
Jan 24, 2024 at 21:21 comment added graveyard A* is just dijkstra's with added heuristics, it doesn't actually do anything differently, no? the only thing that changes is the order of tiles chosen, and an early escape (which you add to dijkstra's anyway, although it will still take longer to finish than A*)
Jan 24, 2024 at 21:09 comment added Jesse Williams I would suggest some debugging that includes what the location of the next tile it's evaluating is, use the 4 move scenario that you said isn't working, and actually follow each evaluation. Ensure that it's evaluating paths the way you expect. I suspect this is a fault of Djikstra (one of the reason I usually use A* instead). I'm not sure that it will retroreflect multiple equal paths the way your code is written.
Jan 24, 2024 at 21:07 comment added Jesse Williams One thing you note is that it works with a different max movement (or that was my understanding: 3 vs 4). What that tells me is that you're skipping when cost is exceeded, but not retroflecting when two paths contain the same cost. Sounds like it's following one of, but not all of, next paths that have the same cost associated.
Jan 24, 2024 at 20:57 comment added graveyard I know it can't be an unmodified dijkstra's, I was hoping for suggestions on specifically how to modify it to get what I need with this question. the scoring is the easy part
Jan 24, 2024 at 20:48 comment added Jesse Williams Of note - both answers WILL work. If they fail to work, it's a code logic issue. A basic Dijkstra shouldn't have branching paths because it can't (as noted elsewhere) "remember" multiple acceptable paths. But again, you won't be able to do what you want with a raw Dijkstra anyway, so... you'll have to work around that.
Jan 24, 2024 at 20:46 comment added Jesse Williams Ah I see - this wouldn't work with an unmodified Dijkstra. This could potentially work with some form of A*. But it sounds like to get what you want, you aren't going to be able to use an unmodified Dijkstra anyhow. There are some differences between what I'm suggesting and what quarague suggested, though. I do not recommend increasing the number of steps/moves it takes. And I definitely don't recommend multiple passes as the other answer suggested - or at least not in serial. Exponential weighting takes amount of damage into consideration without arbitrary costs.
Jan 24, 2024 at 17:58 comment added graveyard the problem is that im trying to score tiles by fall damage taken, as well as keeping the path under a specific movement amount, there is already an answer suggesting pretty much the same thing as here, with comments discussing why it doesn't work, which seem to be accurate since it doesn't work when i try this method.
Jan 24, 2024 at 17:19 history answered Jesse Williams CC BY-SA 4.0