Tuesday, 2 January 2024

Show HN: Chomp Game built in React.js https://bit.ly/3vewgrq

Show HN: Chomp Game built in React.js I built a game called Chomp, which sparked my interest back in college when I learned about it in a game theory context. It's a 2-player game, where you take turns biting chunks of chocolate off of a chocolate bar, avoiding a special 'poison' square. Whoever chomps the poison square, loses. I’m learning React / web development and was inspired to create a playable online version as my first React app. And my first Show HN post! Currently you control both Player 1 and Player 2. I imagine a future version where you are Player 1, playing against an AI that controls Player 2. Some more about Chomp: -It is proven that a winning strategy exists for Player 1, regardless of the starting dimensions of the chocolate bar (other than the trivial 1x1 case). -HOWEVER, there is no known winning strategy that works for all starting dimensions. Only for some special cases, like a square NxN chocolate bar. -Computers can of course simulate all possible games and see which ones result in Player 1 winning, but there's no clear step-by-step procedure one could follow in practice (unlike tic-tac-toe, for example). -So if you play around and happen upon a general winning strategy for Player 1, you may have made a mathematical discovery! -Here's the wiki for more info/background on the Chomp game: https://bit.ly/3S6aNdr https://bit.ly/3S3EUCd January 3, 2024 at 01:56AM

No comments:

Post a Comment