# Challenge: Can you solve the game of Munch/Chomp?

**URL:** <https://www.ruby-forum.com/t/challenge-can-you-solve-the-game-of-munch-chomp/129089>\
**Category:** Ruby\
**Created:** [February 14, 2008, 5:10am UTC](https://www.ruby-forum.com/t/challenge-can-you-solve-the-game-of-munch-chomp/129089 "2008-02-14T05:10:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stedwick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90ced4/32.png) [@stedwick](https://www.ruby-forum.com/u/stedwick)\
**Post date:** [February 14, 2008, 5:10am UTC](https://www.ruby-forum.com/t/challenge-can-you-solve-the-game-of-munch-chomp/129089/1 "2008-02-14T05:10:52Z")

</div>

[http://www.philipbrocoum.com/munch/](http://www.philipbrocoum.com/munch/)

I think the game is really fun, especially since the comp will whoop  
your butt.

Anyway, I solved it in my own, ridiculously newb-ish way using Ruby  
(I’m a math guy, not a programming guy). But, that’s one of the  
reasons I love Ruby, it’s making programming fun again.

Anyway, I found this to be a good math challenge, and slightly less so  
a good programming challenge.

So, give it a shot! And let me know what you come up with.

Philip

PS I’m really into solving games with Ruby these days. I was reading  
the incredible blog posts about solving Boggle with Ruby here (and  
translating it to C++):  
[http://www.danvk.org/wp/2007-01-30/boggle-2-the-shortest-solver/](http://www.danvk.org/wp/2007-01-30/boggle-2-the-shortest-solver/)

In only 12 lines, no less.

Fascinating stuff!

---

<div class="post-metadata">

**Author:** ![stedwick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90ced4/32.png) [@stedwick](https://www.ruby-forum.com/u/stedwick)\
**Post date:** [February 14, 2008, 5:16am UTC](https://www.ruby-forum.com/t/challenge-can-you-solve-the-game-of-munch-chomp/129089/2 "2008-02-14T05:16:08Z")

</div>

Btw, here’s a list of all winning positions on boards up to 8x9, if  
you want to check yourself:  
[http://www.philipbrocoum.com/munch/winners8x9.txt](http://www.philipbrocoum.com/munch/winners8x9.txt)

Philip

---

<div class="post-metadata">

**Author:** ![stedwick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90ced4/32.png) [@stedwick](https://www.ruby-forum.com/u/stedwick)\
**Post date:** [February 14, 2008, 3:21pm UTC](https://www.ruby-forum.com/t/challenge-can-you-solve-the-game-of-munch-chomp/129089/3 "2008-02-14T15:21:30Z")

</div>

On Feb 13, 2008, at 10:10 PM, Stedwick wrote:

> [http://www.philipbrocoum.com/munch/](http://www.philipbrocoum.com/munch/)

This is very similar to Tactics:

[Ruby Quiz - Solving Tactics (#18)](http://www.rubyquiz.com/quiz18.html)

Thanks for the fun diversion.

James Edward G. II

---

<div class="post-metadata">

**Author:** ![stedwick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90ced4/32.png) [@stedwick](https://www.ruby-forum.com/u/stedwick)\
**Post date:** [February 14, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/challenge-can-you-solve-the-game-of-munch-chomp/129089/4 "2008-02-14T17:51:13Z")

</div>

Haha, I’ll add Tactics to my list of airport games: games that you  
play with a sheet of paper with your friends while delayed at the  
airport =)
