Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [board-game]

for challenges involving board games.

9
votes
3answers
507 views

Partially-Observable Connect-4

The Game You will be playing an (almost) standard game of Connect-4. Unfortunately, it is a correspondence game and someone has placed black tape on every second row starting from the bottom, so that ...
10
votes
1answer
427 views

KoTH: Gomoku (Five in a row)

Gomoku or Five in a row is a board game played by two players on a \$15 \times 15\$ grid with black and white stones. Whoever is able to place \$5\$ stones in a row (horizontal, vertical or diagonal) ...
10
votes
2answers
466 views

Camel Up Cup: An AI board game tournament

Camel Up Cup 2k18 In this challenge, we will be playing the semi-popular board game Camel Up. Camel Up! is a board game that has players betting on camels to win rounds, win the game or lose the ...
37
votes
41answers
4k views

Scrabble scorer

Challenge: Take a string of upper or lower case letters as input (optional), and calculate the score that string would get in a game of Scrabble in English. Rules: The score of each letter is as ...
9
votes
2answers
481 views

How many draws are there in Quarto?

Introduction This challenge is similar to Project Euler problems. I came up with it because I was playing a deceivingly simple board game and couldn't come up with an efficient solution to answer a ...
13
votes
2answers
516 views

Play tic-tac-toe and never lose

(There exists some challenges that require to use the best strategy, but here we don't. Even if you are able to win, you are allowed to make a tie) Challenge Write a program which plays the game tic-...
20
votes
11answers
3k views

Where can the knight be in N moves?

This is Hole-3 from The Autumn Tournament of APL CodeGolf. I am the original author of the problem there, and thus allowed to re-post it here. Given: a number of turns (please state if no movements ...
10
votes
3answers
606 views

Exact Cover Puzzle

CHALLENGE Given a set of grouped letters, arrange them onto the board so that they cover the area entirely. Board Representation (a.k.a. the SHIP DECK) The board is a 6x6 grid. There will always be ...
14
votes
15answers
2k views

Tic-Tac-Toe - X or O?

Background Skip to "Task" if you are familiar with Tic-Tac-Toe (I think most are!) Tic-Tac-Toe is a famous two-player game. It consists of a 3x3 board that is filled gradually by two players (...
19
votes
22answers
2k views

Build a checkerboard

For this challenge you will print the coordinates and color of each piece at the start of a game of checkers. Enter the x and y (comma seperated) for every square (indexed 0-7) on a checkerboard, ...
23
votes
14answers
5k views

Can I Settle Down?

In The Settlers of Catan board game, there are five resource types: Brick, Log, Ore, Wheat, and Sheep. Building a settlement costs a Brick, a Log, a Wheat, and a Sheep. However, you can also trade in ...
26
votes
22answers
6k views

Is it a good 2048 board?

This is my first question here, so any suggestions in the comments would be appreciated! Thanks ;) Introduction One very common strategy for the 2048 game is never ever swiping down. This positions ...
10
votes
6answers
706 views

Let's play Rummikub!

Note: This is related to a variation of the game Rummikub Background & Rules Rummikub is a tile-based game. There are four colors: red, orange, blue and black. For each color there are 13 tiles (...
2
votes
0answers
409 views

Create a simple mancala game [closed]

Simple Mancala Game Create a mancala game using as few bytes as possible. The game Mancala is a family of games where a player has a control over a set amount of pots filled with stones/seeds. The ...
2
votes
0answers
62 views

Score a hand of Cribbage! [duplicate]

Goal: Given a hand of 5 cards, determine its value in the game Cribbage. Input a string through any reasonable means. You can assume the string will always be in this format: ...
19
votes
1answer
3k views

Print a Sorry Board

I was just playing the board game Sorry! with some people, and I realized that I could base a few interesting challenges off of it. This one is pretty simple. You task is simply to output an ascii-...
4
votes
2answers
350 views

It's Your Turn ! (Renju)

EDITS: Added link to the plain-text (multiple strings) test data Added BLANK,EDGE and TIE2 test cases (see Test Data section) (11/25) Updated the JSON test cases (some lines were ill-formatted) (11/...
39
votes
29answers
7k views

Take a ride on the Reading, If you pass Go, collect $200

Monopoly Board For this code-golf challenge we will be building the board game Monopoly. Rules: Take no input. Output a 11x11 board where each ASCII character forming the board is the first letter ...
14
votes
1answer
346 views

Checkers: King Me?

Challenge: Given a checkerboard, output the smallest amount of moves it would take (assuming black does not move at all) to king a red piece, if possible. Rules: Red's side will always be on the ...
9
votes
1answer
260 views

Where can the cannon go?

Introduction The game of xiangqi, also known as Chinese chess, is a chess-like game popular in China, Vietnam, Taiwan, and other East Asian countries. The colours of the two sides in xiangqi are red ...
18
votes
2answers
520 views

What's your next move?

This challenge is to write a minimax function in a language of your choice, to output the next best move in an NxN game of tic-tac-toe given the current board state. The board input can be accepted as ...
29
votes
17answers
6k views

Draw an Empty Scrabble Board

A standard Scrabble board is a 15×15 grid of spaces to place letter tiles. Most of the spaces are blank but some are double word scores (pink), triple word scores (red), double letter scores (...
11
votes
5answers
382 views

Evaluate a Stratego Battle

In the game Stratego, the main game mechanic is when you attack an opponent's piece with yours. In this challenge, you job is to simulate one of these battles and say who survives. Specs You will ...
10
votes
4answers
638 views

Winnable Solitaire Mancala Boards

Mancala is the name of a family of board games that usually involve a series of cups filled with beads that the players manipulate. This challenge will use a specific rule set for a solitaire variant ...
21
votes
4answers
741 views

Count Mills in Nine Men's Morris

Introduction Nine Mens's Morris (also called Mills) is a board game for two players which is played on the following board (image taken from the linked Wikipedia-page): Each player has 9 men, ...
11
votes
2answers
379 views

Let's play some boardgame!

Introduction Boardgames are a classic play between kids, but there are some kids that feel bored playing a boardgame step by step. Now they want the result to be shown before they put their hands on ...
19
votes
5answers
1k views

Play Antichess!

https://en.wikipedia.org/wiki/Losing_chess This is basically Chess Tournament, but for antichess ;) Antichess is one of the many chess variants that have been invented. The goal is to lose all your ...
20
votes
12answers
1k views

Connect-n time!

https://en.wikipedia.org/wiki/Connect_Four Does anyone remember the 2 player game connect 4? For those who don't it was a 6x7 board that stands vertical on a surface. The goal of connect 4 is to, ...
14
votes
25answers
2k views

Number of pieces on a checkers board

Introduction A normal checkers board contains 8 x 8 = 64 squares: You can see that in total, there are 12 white pieces. Black and white always have the same amount of pieces. If there are any more ...
16
votes
4answers
904 views

Can you win with two more moves at Three Men's Morris?

Bounties No. 1 (awarded) I'll throw in 50 rep for the first valid answer No. 2 (awarded) I'll throw in another 100 rep for the shortest valid answer. No. 3 (open for submissions) I'll ...
19
votes
1answer
769 views

Determine winner of Connect 4

You are given a partially filled Connect 4 grid (7x6). O X O X X O X O O X O X O X X O X X X O O X O O O X X O X (Input can be given ...
7
votes
2answers
297 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 ...
8
votes
0answers
497 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: ...
7
votes
1answer
2k 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 of ...
10
votes
2answers
600 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 ...
19
votes
2answers
4k views

Rotate a Chinese checkerboard

A Chinese checkerboard looks like this (based on this question, but this time it has a fixed size): ...
6
votes
2answers
2k 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 ...
21
votes
5answers
1k 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 ...
15
votes
1answer
940 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 pieces ...
10
votes
4answers
366 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 game ...
9
votes
5answers
1k 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 ...
9
votes
0answers
378 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 ...
30
votes
22answers
2k 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 ...
16
votes
5answers
2k 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 ...
8
votes
1answer
564 views

Tic-Tac-Toe and Chess, with fewest [distinct] characters

In this form of the game Tic-Tac-Chec, the goal is to move chess pieces to get four-in-a-row. Your goal here is to figure out if a position has a winning move. Rules The rules are similar, but not ...
23
votes
15answers
3k 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
1k 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 ...
12
votes
2answers
889 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 ...
23
votes
5answers
2k 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 ...