Trap
1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...

Friday, August 29th, 2008 | Programs

trap





For more including Author's Notes download the eBook pages with this program's code listing.

Trap is another variant of the “Guess my number” game that has been played on school yards since time began. In this game the player chooses 2 numbers and the one with the secret number responds with whether it is larger, smaller, or between the numbers guessed.

The optimal solution, like with high/low games, is a divide and conquer strategy. However with 2 numbers you should discover quickly that halves are not always the best solution. Played optimally it shouldn’t take more than 5 guesses. The game as it’s written gives you eight.

Trap is written by Joseph Larson.

Share and Enjoy:
  • StumbleUpon
  • Google
  • del.icio.us
  • Facebook
  • Digg
  • Slashdot
  • Fark
  • Live
  • Spurl
  • TwitThis
  • E-mail this story to a friend!
  • Reddit



No comments yet.

Leave a comment

Support Cymon's Games

Recent Comments

Search

Sponsored Links

Cymon's Amazon Store