Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'll add mine to the pile: I needed a visualization of the classic Towers of Hanoi puzzle for a course I'm teaching and Claude banged it out (in pure JavaScript, no less) in like 3 minutes of me typing: https://lgessler.com/files/towers.html

The first stab was basically correct, but then I needed to prompt him several times to correct an issue where the disk that's currently picked up was being rendered as a vertical strip instead of as a disk, and then I just told him to convert the React into pure JS and IIRC it worked first try.



This is interesting, I also tried this with my daughter after we had been talking about Towers of Hanoi, and like you it worked really well. Then we tried to get it to implement a little version of the game where you have a farmer, some corn, a chicken and a wolf and you have to get them across the river in only one boat (actually Wiki says goat and cabbage, but whatever https://en.wikipedia.org/wiki/Wolf,_goat_and_cabbage_problem). I wasn't trying to get it to solve the puzzle, just give us a UI to play the game. We gave up after an hour or more of going in circles. I wonder if there's a lot of Towers of Hanoi implementations out there it can use as references.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: