for challenges involving board games.

learn more… | top users | synonyms

1
vote
0answers
111 views

Simple single-player board game, expected score distribution

This is the first problem I've posted here; please post criticisms in comments. Summary A game board consists of a starting space, an ending space, and between them are N spaces, each with an ...
5
votes
0answers
289 views

Printing the Cracker Barrel Game

Revised formatting and instructions Given a list of moves for a Cracker Barrel peg board game, or as @Steveverrill stated, Peg Triangle Solitaire: Game 1 Game 2 Game 3 1: 0 ,-1, -1 ...
7
votes
1answer
214 views

Snakes and Ladders probability of winning

(This is my first Q here, and I don't know much about code golfing.) Your aim is to predict the winner of an ongoing Snakes and Ladders game. INPUT A single number (2-1000) indicating the number ...
9
votes
2answers
222 views

Play a Perfect Game of 4x4 Hex

Background Hex is a two-player abstract strategy game played on a K×K rhombus of hexagonal tiles. Two opposite sides of the rhombus are colored white, and the other two black, and the two ...
16
votes
2answers
1k views

Rotate a Chinese checkerboard

A Chinese checkerboard looks like this (based on this question, but this time it has a fixed size): G . G G G G G G . G B B B B . . Y G . Y . Y Y B B B . . ...
6
votes
2answers
356 views

Coding hex board game

Introduction Hex is a strategy board game played on a hexagonal grid, theoretically of any size and several possible shapes, but traditionally as an 11×11 rhombus. Other popular dimensions are 13×13 ...
18
votes
4answers
482 views

Chinese checkerboard

The game of Chinese checkers is played on a board with spaces in the shape of a six-pointed star: Image from Wikipedia We can create an ASCII-art representation of this board, using . for empty ...
6
votes
0answers
279 views

Settlers of Catan - Longest Road!

This is an endgame board of Settlers of Catan: Background: The roads (the long stick pieces) and the settlements (and cities) are rendered by the little huts. We encode the placement of these ...
10
votes
4answers
262 views

Order and Chaos and Codegolf

Order and Chaos is a variant of Tic-Tac-Toe played on a 6x6 board. What makes the game unique, however, is that both players can place either an X or an O! Each turn (starting with Order), a player ...
25
votes
3answers
1k views

Leonhard loves labyrinths

The background My son Leonhard (4 years old) loves labyrinths. I don't know where he knows labyrinths from, but he paints them and knows quite well how they work: Recently, he started making a ...
9
votes
5answers
620 views

Write the shortest game of alak

Alak was invented by the mathematician A. K. Dewdney, and described in his 1984 book Planiverse. The rules of Alak are simple: Alak is a two-player game played on a one-dimensional board with ...
3
votes
0answers
147 views

Simulate a Game of Quagmire

Background Many moons ago, in a galaxy much like our own, a young BrainSteel attempted to invent a board game. He believed that he, too, could find an amazingly simple set of rules that would ...
24
votes
20answers
1k views

Calculate the points in a “sjoelen”-game

Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I ...
13
votes
5answers
1k 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 ...
17
votes
14answers
2k views

Determine a string's Scrabble score and validity

Your task is to determine if a given string is of proper length and can be represented with Scrabble tiles and, if so, output the sum of each letter's score. If you don't know how to play Scrabble:, ...
6
votes
3answers
692 views

Solving a “Ubongo”-puzzle

Some time ago I came across a game called Ubongo. The player got four shapes and has to put them together in a way, that the shapes form the shape of the board. One example is this: Note that the ...
9
votes
2answers
603 views

Chinese Checkers longest move

In Chinese Checkers, a piece can move by hopping over any other piece, or by making a sequence of such hops. Your task is to find the longest possible sequence of hops. Input A sequence of 121 ...
22
votes
5answers
1k views

King of the Hill: Speed Clue AI

Speed Clue Cluedo/Clue is a classic board game with a compelling deduction gameplay component. Speed Clue is a 3-6 player variant that emphasizes this component by using only the cards. The result ...
11
votes
2answers
456 views

Implement a reversi engine

Your job, for this golf, is to write a program that will take moves of a game of reversi (othello) and display the result to the user. Input A string of numbers taken from the range [0-7]. Each pair ...
7
votes
4answers
719 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 ...
11
votes
2answers
579 views

Make a move on a Go board

You are given a board position for a Go game and a move to play. You need to output whether the move is legal or not, and the new board position if it is legal. A brief explanation of Go moves: the ...
8
votes
0answers
603 views

Shortest 2-Player Game of Halma

In Chess, it's possible for the game to end after 4 moves (2 each) with a Fool's Mate. Your goal is to find the Fool's Mate of Halma: the 2-player game of Halma that minimises the number of turns ...
20
votes
5answers
2k views

Score a game of Go

Scoring a Go game is a task that is not all too easy. In the past there have been several debates about how to design rules to cover all the strange corner cases that may occur. Luckily, in this task ...
13
votes
2answers
891 views

Play Connect 4!

Write a program to play the game of Connect 4. You are given the state of the board as input and you must decide which column to place your piece in to either get 4 in a row (horizontally, ...
6
votes
1answer
2k views

Sudoku board generator

A program that randomly generates a Sudoku game board with varying degrees of difficulty (however you decide to measure difficulty). Sudoku requires that there is only one solution, so your program ...
5
votes
1answer
418 views

Optimal Othello/Reversi Move

This is a code-golf challenge: Given a specific board in the game of Othello (Reversi), find a move for Black that will capture the maximum number of White pieces. (Obviously, this may not be the ...