nowfound

AI · January 3, 2024

CG

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…

What it does

In the maker’s words, at launch

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://en.wikipedia.org/wiki/Chomp

Does the same job

all alternatives →
  • React for Designers2018 · ▲301

    Course for building a React site using components

  • React Jam2023 · ▲108

    Build a game in 10 days using React, learn and win prizes

  • BD
  • BuildKitty PlaySep 2025 · ▲22

    Online React Tailwind Playground

  • 5-Minute RPG2020 · ▲115

    A quick, pure React game in the browser

  • AS
    A small browser game (PC only) built with Phaser 32025 · cubic-zombies.pages.dev · ▲9

    Hi HN! This is my first game — something I’ve always wanted to do. It’s a small browser game built with Phaser 3, React, and the phaser template (https://github.com/phaserjs/template-react-ts/). I made it in 2 days (like 8 hours in total real time) using gemini-cli. About 90% of the code was generated with AI, but I learned a lot by making fine tweaks. It only works on PC since it’s a typical WASD + R (reload) shooter. I’d love feedback on: - Gameplay (is it fun, too hard?) - Ideas for new features Thanks in advance! ps: I used cubes as a prototype, but now I kind of…

More ai this month

the category →
  • I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.

    AI · 16d ago · simedw.com

  • Astute585

    Automate your B2B brand going viral, with new media creators

    AI · 18d ago · company-app.joinastute.com

  • Grok Bot547

    AI teammates that you can give real work to

    AI · 25d ago · x.ai

  • Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…

    AI · 26d ago · cactuscompute.com

  • Make your software self-driving

    AI · 30d ago · coldtea.ai

  • Soloop472

    Approval-first Agent OS for solo founders

    AI · 30d ago · soloop.io

Launched alongside, January 2024

the whole month →