Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Towers of Hanoi solver #214

Open
hobovsky opened this issue Feb 23, 2024 · 2 comments
Open

Towers of Hanoi solver #214

hobovsky opened this issue Feb 23, 2024 · 2 comments
Labels
discussion/deduplicate Discussion and vote what to do with duplicate kata

Comments

@hobovsky
Copy link
Contributor

hobovsky commented Feb 23, 2024

  1. Tower of Hanoi
  • Beta, estimated ~5kyu
  • Solution is a stateful object returning steps toward a solution. Non-optimal solutions are allowed.
  • Satisfaction 100% with 19 completions
  • 1 pending issue
  • JS only
  • Published Mar 2015, author active
  1. Tower of Hanoi
  • 5 kyu
  • Return value is a sequence of from/to rods. Optimal solution is not required.
  • Satisfaction 75% with 67 completions
  • No pending issues, but discourse comments are not overly positive
  • JS only
  • Published Nov 2013, author inactive
  1. Towers of Hanoi
  • 5 kyu
  • Result should be a list of [from, to] tuples. Requires an optimal solution.
  • Satisfaction 86% with 74 completions
  • Ruby only
  • Published Feb 2014, author inactive
  1. Hanoi Tower Array
  • 6 kyu
  • Result is a sequence of states of the board. Optimal solution is required.
  • Satisfaction 86% with 84 completions.
  • 1 pending issue
  • Python only
  • Published Nov 2017, author last active Jan 2024.

I have completed only the kata 4., so I do not know if kata 1.-3. have any pending translations.

Bonus discussion: The Scrambled Towers of Hanoi. I havent solved this one either, so I do not know if it's close enough to be a duplicate. I think it is not, but if you think it is, please tell.

@hobovsky hobovsky converted this from a draft issue Feb 23, 2024
@hobovsky hobovsky moved this to Discussing in Deduplication process Feb 23, 2024
@hobovsky hobovsky added the discussion/deduplicate Discussion and vote what to do with duplicate kata label Feb 23, 2024
@hobovsky
Copy link
Contributor Author

I have not solved any kata here, but comments under the 1. suggest that this one is the best. Low satisfaction votes on approved kata suggest that they are not too good.

I am not sure if a requirement of an optimal solution is that important. It might make the kata more challenging, but on the other hand, all commonly known algorithms to solve this puzzle generate optimal solutions anyway, so maybe it's not much of a difference (it's easier to find an optimal solver than a non-optimal one).

I do not know what was monadius' idea for improvements in the beta, so maybe one of the approved kata could be kept, and the beta could be hardened or made different in some way?

I am also not sure if the stateful aspect of the beta kata (and its requirement to throw a specific error) would translate well into other languages. Maybe it should be somehow stated that the generator/stream of moves is not a strictly required part for languages which cannot support it easily?

@scoraig52
Copy link

I would keep the Beta kata. It has best overall quality of these kata's. The Ruby kata is also a nice one, and we can easily refactor that code and add it as a translation on the Beta kata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion/deduplicate Discussion and vote what to do with duplicate kata
Projects
Status: Discussing
Development

No branches or pull requests

2 participants