This challenge is generally based upon, related to, or simulates a game or some portion of one.

learn more… | top users | synonyms

1
vote
0answers
31 views

Evening Commute Solver

I recently moved to an apartment overlooking the inner ring-road of town, and every day, a beautiful scene unfolds. The traffic lights are apparently so confusing (mostly because the Dutch are used to ...
-5
votes
1answer
173 views

Code golf: Dice Simulator

Task A game uses dice with 4, 6 and 12 sides to determine various outcomes. The user should be able to input which dice is being thrown, eg 4, 6 or 12. The program should output the dice chosen and ...
15
votes
2answers
371 views

Food shortage in the Snakepit

Food shortage in the Snakepit For the first time in 35 years, the snakepit is running out of food. The inhabitant snakes now have to fight each other in order to survive this food shortage. Only one ...
26
votes
21answers
3k views

Morra, the Noble Game of Kings

Background The game of Morra is a simple game. In the "original" version, several players simultaneously throw out a number 0-5 with their hands while guessing the total sum of everyone's hands. ...
49
votes
9answers
4k views

Codémon, I choose you!

Your kindly neighbour, Doctor Tree, just gave you three magical creatures called Codémon. There's a battle tournament in the nearby town of Colorville. Are you the very best, like no one ever was? ...
8
votes
1answer
238 views

Rock-paper-scissors competition simulator

You decided to organize a rock-paper-scissors championship to find out who is the best. You don't want to let luck to decide the winner so everyone has to give you his or her tactic in writing before ...
0
votes
1answer
76 views

Automated Bulls and Cows Player [duplicate]

This is a code golf challenge to see the shortest implementation of an automated guesser in the pen and paper game bulls and cows. The game works as follows: A (usually 4 digit) secret code with ...
14
votes
2answers
473 views

Winning Strategies for a String Construction Game

Background Alice and Bob play a game called construct a binary word. To play the game, you fix a length n >= 0, a set G of length-n binary words called the goal set, and a length-n string t ...
11
votes
1answer
369 views

Score a game of Kingdom Builder

I want to try a new form of code golf here. Similar to bonuses, not all parts of the challenge have to be completed, but each answer has to implement a subset of certain size (and there is a core that ...
13
votes
0answers
322 views

Build a fewest-moves freecell solver

In the game of Freecell, you are tasked with building four foundation piles in suit from ace to king, on a layout where you build downward in alternating colours. However, you can only build one card ...
12
votes
4answers
578 views

Write a Magic Spellchecker

The game Waving Hands is somewhere between a pen-and-paper Magic: the Gathering and a very elaborate Rock Paper Scissors. Each turn you write down one of eight gestures for each hand: wiggled ...
29
votes
10answers
2k views

Verify a Minesweeper board

Your goal is to check whether a completed Minesweeper board is valid. This means that each number is a correct count of mines in cells adjacent to it, including diagonals. The board does not wrap ...
13
votes
5answers
965 views

Play Wythoff's Nim perfectly

Your goal is to write a perfect player for the game of Wythoff's Nim. Rules of Wythoff's Nim Wythoff's Nim is a deterministic two-player game played with two piles of identical counters. Players ...
1
vote
0answers
44 views

Solving Des Chiffres Et Des Lettres - The total is right [duplicate]

One of the games of the French TV show Des chiffres et des lettres, called Le compte est bon ('The total is right'), consists of the following : You get a number A between 101 and 999 as well as six ...
1
vote
0answers
53 views

Automate xmpp requests to ESL website to challenge opponents [closed]

ESL gaming, where you can challenge players to play games. I've provided some steps you can take manually to challenge a player. Note that you have to signup for an account and have to be logged in to ...
10
votes
2answers
825 views

Are You the One? (Mastermind Derivative)

I've got a tough one for you! My girlfriend recently came across a new show on MTV (USA). It's a terrible show, and everyone on it is trashy, but the "game" is pretty interesting. From Wikipedia: ...
14
votes
4answers
654 views

Scriptbot Warz!

Scriptbot Warz! The results are in and Assassin is our champion, winning 2 of 3 matches! Thanks to everyone who submitted their Scriptbots! Special thanks to horns for BestOpportunityBot which ...
5
votes
1answer
366 views

Make your country proud!

You are from the tiny country of Que-Wopistan. The Que-Wopistonion's are a proud people, and every Que-Wopistonian dreams of making their country proud by representing their country in the Olympics. ...
11
votes
2answers
369 views

What are you waiting for? (A mahjong solver)

Idea thanks to @MartinBüttner from a discussion in chat Mahjong is a tile game that is immensely popular in Asia. It is typically played with four players, and the goal of the game is to be the first ...
8
votes
11answers
638 views

Bulgarian Solitaire

Bulgarian Solitaire is a single-player game made popular by Martin Gardner in his mathematical column in Scientific American. You have N identical cards, split into piles. You take a card from each ...
12
votes
4answers
498 views

Resolve doubling and tripling actions in Dominion

Inspiration This question is inspired by the cards Throne Room and King's Court from the popular deck-building card game Dominion. As part of one's turn, one plays a sequence of actions. These ...
15
votes
4answers
889 views

Program a 2048 AI using an existing Framework

EDIT : Recently, my question has been proposed as a duplicate of 2048 Bot Challenge. I would like to stress that this question is different from that question, and will require answers to be ...
5
votes
5answers
457 views

The color spelling game

In the color spelling game, you are shown a list of color names, but rather than reading the words that are written, you have to say the name of the color of the letters. The game is over as soon as ...
8
votes
1answer
469 views

Frogger Champion

The Game Most of us know about Frogger, the 80's era arcade game where the objective is to hop a frog safely across a busy highway and a hazard-filled pond to arrive safely at home. A challenge was ...
7
votes
11answers
661 views

Hotter or Colder: Find the Treasure

A certain children's game, often called "Huckle Buckle Beanstalk", is played with two players. Here is a brief description of how the game is played: One player is designated the "hider", and the ...
4
votes
1answer
1k views

Optimal Minesweeper on the Largest Board

Overview: Your challenge is to write a program that will play minesweeper optimally, giving the best move in any position. Moreover, you must do this on the largest board possible. Game details: ...
0
votes
2answers
576 views

Babylon.js - loop through a scene and apply a simple fragment shader to all of the objects

You have a library - a fully loaded 2014 Babylon.js. You have a fragment shader - let's call it sample.fragment.fx. You have a scene - loaded ahead of time, possibly from a .babylon JSON file. Your ...
2
votes
1answer
1k views

A Most Excellent Code Golf Adventure

You dudes, the Most Excellent Adventure is a home brew roleplaying game system based on the Bill & Ted Films, plays gnarly air guitar riff. In this game system, when you draw from your dice pool ...
14
votes
26answers
3k views

Determine win in Tictactoe

Let's play some code golf! Given a tic-tac-toe board state (Example:) |x|x|o| |x|o|x| |o|o|x| Determine whether a game is a win a lose or cat. Your code should output any of these options given a ...
18
votes
2answers
1k views

Mastermind strategy

I could only find code-golf challenges for Mastermind, so here's a code-challenge version that I would have liked to take on myself. An optimal strategy for the normal Mastermind game, MM(4,6), was ...
13
votes
3answers
1k views

Guess the word (aka Lingo)

The goal of this challenge is to write a program able to guess a word in the smallest possible number of attempts. It is based on the concept of the Lingo TV show ...
11
votes
2answers
1k views

Frogger-ish game

How about giving the good ol' arcade game Frogger a revival, Code Golf-style! Your task is to create a version of this classic game, with as few characters of code as possible. Use the language of ...
32
votes
7answers
3k views

Hunt the Wumpus

When I was a lad, kids would wander into computer stores and play Hunt the Wumpus until the staff kicked us out. It was a simple game, programmable on the home computers of the mid-1970s, machines so ...
17
votes
3answers
2k views

aHHHH! The Beasts are HHHHere!

As we learned from the IBM PC AT, YouTube (see video), Wikipedia (see article), and Sesame Street: The letter H is the most merciless letter of the alphabet! (Even when actually composed from two ...
23
votes
6answers
2k views

Write a Hangman Solver

You are required to write a Hangman solver. Testing against this English word list[1], the solver that solves the most number of words wins, with the number of total incorrect guesses being the ...
15
votes
4answers
3k views

2048 Bot Challenge

We have been cloning 2048, analyzing 2048, but why haven't we played it yet? Write a 555 byte javascript snippet to play 2048 automatically, the best score after an hour will count (see scoring ...
12
votes
4answers
747 views

Compare two poker hands

Challenge: Given two five-card hands, determine which one wins by the standard ranking of poker hands. Input: Ten cards separated by spaces from stdin or as command line arguments, whichever you ...
15
votes
6answers
1k views

Create a Simon Clone!

Scenario: while programming you have a sudden nostalgic urge for the '80s and cheesy games. Requirements: Make a GUI program (text probably won't work) for Simon, the game. Input can be clicking, or ...
20
votes
4answers
2k views

Solve Aristotle's Number Problem

Aristotle's number puzzle is the challenge of populating each of 19 cells in a hexagonal grid with a unique integer between 1 and 19 such that the total along every axis is 38. You can picture the ...
5
votes
4answers
745 views

A golfed golfing game

You have to make a golf game with the following specification :- The field is 10 X 10 characters without spaces. Free ground is represented by . A hole generated at random(not at 0,0) is shown by O ...
37
votes
8answers
23k views

Create a simple 2048 game clone

2048 is an incredibly fun and addictive game in which the goal is to create a tile with 2048 on it. Here's a short description of the game: Pressing an arrow key will slide all the blocks in the ...
29
votes
1answer
1k views

Minesweeper Solver

We already generated Minesweeper fields, but someone really has to sweep those generated mines before PCG blows up! Your task is to write a Minesweeper Solver that is compatible with a slightly ...
10
votes
5answers
640 views

Name the poker hand - 7 cards edition

The Challenge: In this question: Name the poker hand you had to take a five card poker hand and identify it. This question is similar, with two twists: First, the output will be in all lower case. ...
2
votes
1answer
319 views

Hidden easter egg [closed]

Here's a fun idea: Write a simple game (tic-tac-toe, guess the number, etc) that has an easter egg in it, that can be triggered by a specific, special input from the user and does something cool, but ...
19
votes
5answers
2k views

Flappy Bird Clones :)

Everyone's been freaking out about that stupid "Flappy Bird" game being removed. So, your task is to crate a Flappy Bird Clone game. Its really simple. Here are the guide lines: It can use either ...
6
votes
1answer
425 views

Graphical, networked, two-(human)-player Tic-Tac-Toe

Create a Tic-Tac-Toe game that allows two human players to play against each other using two networked devices. Requirements: Network play. Program must let both players know whose turn it is. ...
3
votes
0answers
348 views

Find the best path in a “match-3” game

Suppose you want to cheat in a "match-3" game. In this "match-3" game: In each turn you can move a gem along a path. For example, you can move a gem right-right-down, as in A. (The gems are ...
18
votes
4answers
1k views

Tennis scores meets Code Golf

In light of the 2014 Australian Open in Melbourne, and the win by Stanislas Wawrinka against Novak Djokovic, I propose the following code golf challenge! Wawrinka and Djokovic are at it again for the ...
11
votes
1answer
286 views

Find the best immediate move in a “match-3” game

Your challenge today is to take input like this: fbcfbee ffcabbe debceec bccabbe edcfbcd daeaafc eebcbeb And output the best possible move in a Bejeweled-like game that will match three or more ...
7
votes
4answers
665 views

Build a deterministic Go AI

Here's an interesting problem I thought of the other day, which involves bits of code competing against other bits of code not just in a property that the code has, but by playing a game against those ...