Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [board-game]

for challenges involving board games.

Filter by
Sorted by
Tagged with
12 votes
8 answers
758 views

Count the Liberties - Advanced

Here's an advanced version of the Count the Liberties challenge. The definitions of the terms liberty and group are the same as the previous challenge, so have a look at the previous one for details, ...
user avatar
  • 2,121
10 votes
2 answers
497 views

The maximum liberty of a group on a Go board

Bounty One of the convincing conjectures, by Loopy Walt is, ...
user avatar
  • 2,121
15 votes
9 answers
883 views

Count the Liberties

Background This challenge is about the game of Go. Go is a game played on a board with a square grid N x N. You don't have to know how to play the game to do this ...
user avatar
  • 2,121
6 votes
2 answers
355 views

Reveal all clues of Black Box

Black Box is a board game, Your task is to reveal all clues. What is black box Black box is a board game with hidden atoms, Your task is given input, All atoms, reveal all clues. I/O Input The atoms ...
user avatar
  • 2,493
9 votes
1 answer
342 views

Universal Command Sequence

Universal Command Sequence Definition An \$n\$-maze is a \$n\times n\$ chessboard which has "walls" on some edges, and a "king" on the board that can move to the 4 adjacent cells, ...
user avatar
14 votes
0 answers
416 views

Play Thud! (Troll Edition)

Key Links Dwarf question Chat room Game Controller Interface Troll league table ...
user avatar
  • 11.1k
17 votes
0 answers
455 views

Play Thud! (Dwarf Edition)

Key links: Troll question Chat room Game Controller Interface Dwarf league table ...
user avatar
  • 11.1k
15 votes
1 answer
412 views

Score a 1 player game of Carcassonne

Carcassonne is a tile-based game, where the objective is to construct Roads, Cities and Monasteries, in order to score points. The game works by players taking turns to draw and place tiles to ...
user avatar
3 votes
0 answers
136 views

Chinese checkers adjacent squares [closed]

Challenge You have a Chinese Checkers board looking like this: ...
user avatar
10 votes
1 answer
258 views

Count the Shantens

Introduction to Mahjong tiles Mahjong (麻雀) is a board game that originates from China. Mahjong tiles used in this challenge are in Unicode points U+1F000 – U+1F021: ...
user avatar
  • 4,163
7 votes
2 answers
864 views

Farkle Fest 2k19: An AI dice game tournament

Farkle Fest 2k19 In this challenge, we will be playing the semi-popular dice game Farkle. Farkle is a dice game that has players selecting to save dice or risk rerolling the die for more points to ...
user avatar
-1 votes
1 answer
519 views

Pandemic Outbreak Calculator [closed]

In the board game Pandemic, an outbreak occurs when a city contains more than 3 disease cubes. When the outbreak occurs, any disease cubes in the city in excess of 3 are removed, and each city ...
user avatar
  • 253
3 votes
1 answer
546 views

Shortest Gomoku (5 in a row) implementation [closed]

I suspect Gomoku may be one of the simplest games to implement in code. https://en.wikipedia.org/wiki/Gomoku The game is this: players BLACK and WHITE take turns putting down black and white stones. ...
user avatar
11 votes
1 answer
480 views

Implement MENACE

Background MENACE (Machine Educable Noughts And Crosses Engine) is a rudimentary shallow machine learning algorithm for the game Noughts and Crosses, created by British computer scientist Donald ...
user avatar
48 votes
8 answers
3k views

N-movers: How much of the infinite board can I reach?

Single moves The board is an infinite 2 dimensional square grid, like a limitless chess board. A piece with value N (an N-mover) can move to any square that is a distance of exactly the square root ...
user avatar
  • 10.7k
36 votes
3 answers
2k views

Connect 4: Spot the Fake!

The bank has been broken into, and all the local mafia thugs have an unusual alibi: they were at home playing Connect 4! In order to assist with the investigation, you are asked to write a program to ...
user avatar
8 votes
3 answers
692 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 ...
user avatar
  • 3,007
10 votes
1 answer
773 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) ...
user avatar
  • 16.4k
11 votes
2 answers
869 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 game, ...
user avatar
43 votes
53 answers
5k 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 ...
user avatar
9 votes
2 answers
625 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 ...
user avatar
  • 217
14 votes
4 answers
1k 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-...
user avatar
  • 12.7k
21 votes
11 answers
4k 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 ...
user avatar
  • 27.1k
10 votes
3 answers
656 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 ...
user avatar
15 votes
17 answers
3k 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 ...
user avatar
  • 41.4k
20 votes
22 answers
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, ...
user avatar
  • 443
23 votes
14 answers
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 ...
user avatar
27 votes
22 answers
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 ...
user avatar
  • 393
11 votes
6 answers
1k 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 (...
user avatar
  • 41.4k
2 votes
0 answers
1k 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 ...
user avatar
  • 21
2 votes
0 answers
71 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: ...
user avatar
24 votes
3 answers
6k 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-art ...
user avatar
  • 25.5k
4 votes
3 answers
413 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/...
user avatar
  • 8,386
39 votes
29 answers
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 ...
user avatar
  • 2,614
12 votes
1 answer
426 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 ...
user avatar
  • 2,348
9 votes
1 answer
328 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 ...
user avatar
  • 3,802
18 votes
2 answers
595 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 ...
user avatar
31 votes
23 answers
14k 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 (...
user avatar
11 votes
5 answers
525 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 get ...
user avatar
  • 25.5k
10 votes
4 answers
704 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 ...
user avatar
21 votes
4 answers
1k 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, colored ...
user avatar
  • 6,781
11 votes
2 answers
432 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 ...
user avatar
  • 2,765
19 votes
5 answers
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 ...
user avatar
  • 5,030
19 votes
12 answers
2k 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, ...
user avatar
  • 5,030
16 votes
25 answers
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 ...
user avatar
  • 43.3k
16 votes
4 answers
1k 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 ...
user avatar
20 votes
1 answer
914 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 ...
user avatar
7 votes
2 answers
314 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 ...
user avatar
  • 171
11 votes
1 answer
789 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: ...
user avatar
7 votes
1 answer
3k 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 ...
user avatar