Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Weekly Programming - Week 2

Programming a Game Player

Programming projects help programmers get better. I’m publicly announcing a project every week on Monday with the goal of helping you get better at programming along with me.

This week’s programming challenge is to make a bot that plays this game.

The Game Of Trust:

  1. Two points are up for grabs.
  2. Each Player can either choose to share or to steal.
  3. If Both players steal, nobody gets points.
  4. If one player steals, that player gets all of the points.
  5. If both players share, each player gets one point.

The bot doesn’t have to play the game well, it just has to be capable of playing against a person and/or another bot.

The rules are as follows:

  1. Complete the challenge to any degree using any language.
  2. A new challenge will come out every Monday.
  3. Post the result somewhere by Sunday as proof of completion.

There will be scoring as follows:

  • Participants who tried, get a score of 1 for each project.
  • Participants who learned something new get an additional 2 points.
  • Participants who didn’t try get a score of 0.
  • Participants who copy large chunks of code get their project score cut in half rounded down.

Scoring will be entirely done on the honor system. Feel free to include your current score along with your post. For example: my personal score is 4 at the time of writing.

Take your time, I’m excited to see what we can do!

If you liked this also check out: Last Week’s Challenge and My Result From Last Week