prompt
stringlengths
71
4.65k
completion
stringlengths
34
5.1k
Modify the Ludii game according to the following option changes: The game involves 2 players. -> The game involves 4 players. (define "SiteToMoveOnTrack" ("NextSiteOnTrack" #1)) (define "ThrowValue" (mapEntry "Throw" (count Pips))) (game "Paradis" (players 2) (equipment { (board (concentric {2 2 2 2 2 2 2 2 2 2}) { (tr...
(define "SiteToMoveOnTrack" ("NextSiteOnTrack" #1)) (define "ThrowValue" (mapEntry "Throw" (count Pips))) (game "Paradis" (players 4) (equipment { (board (concentric {4 4 4 4 4 4 4 4 4 4}) { (track "Track1" {36 32 28 24 20 16 12 8 4 0 4 8 12 16 20 24 28 32 36 32 28 24 20 16 12 8 4 0 4 8 12 16 20 24 28 32 36 32 28 24 20...
Construct a Ludii game based on the following description Colour edges of the graph, by selecting them, until they form a path that passes through every vertex exactly once and returns to its starting point. ###
(game "Hamiltonian Maze" (players 1) (equipment { (board (graph vertices:{ {0 0} {2 0} {4 0} {6 0} {8 0} {10 0} {2 2} {4 2} {6 2} {8 2} {10 2} {0 4} {2 4} {6 4} {8 4} {10 4} {0 6} {2 6} {4 6} {6 6} {8 6} {10 6} {0 8} {2 8} {4 8} {6 8} {8 8} {10 8} {0 10} {2 10} {6 10} {8 10} {10 10}} edges:{{0 1} {0 11} {1 6} {6 7} {7 ...
Construct a Ludii game based on the following description Played on an 8x8 board. 16 pieces per player, lined up in the second and third rows. A piece can move forwards, straight ahead or diagonally, or sideways to an orthogonally adjacent field if that field is empty, and capture opponents' pieces by jumping left, rig...
(define "IsUnpromoted" ("IsPieceAt" "Counter" Mover (last To))) (define "HopMan" ("HopCapture" (from #1) (directions {Forward Rightward Leftward}) #2)) (define "PromotedHopOrthogonalSequenceCapture" ("HopCapture" #1 #2 (then ("ReplayIfCanMove" ("HopCapture" (from (last To)) #2))))) (game "Tama" (players 2) ("DraughtsEq...
Construct a Ludii game based on the following description Goal: Connect all three edge colors with a single group of connected stones of your own color. (As in 'Y') Turns alternate. The player seeking to connect with the darker color starts. On each turn the current player places one s...
(define "EdgesOfSide" (intersection (sites Outer Edge) (forEach of:(difference #1 (sites Corners Vertex)) (sites Incident Edge of:Vertex at:(site))))) (define "BoardColour" (colour 215 203 170)) (define "P2Colour" (colour White)) (define "P1Colour" (colour DarkGreen)) (define "AddPieceOf" (move Add (piece #1) (to (site...
Describe the mechanics of the following Ludii game (define "Move" (if ("IsEndTrack" ("SiteToMoveOnTrack" from:(from) ("ThrowValue"))) (move (from (from)) (to (mapEntry "Start" Mover)) (then (fromTo (from (handSite ("HandOpponent"))) (to (handSite ("HandTeam")))))) (move (from (from)) (to ("SiteToMoveOnTrack" from:(from...
The board is roughly rectangular. There are six points on either side, with each side divided in half by two short parallel lines, the rivers. There are four arcs in the corners of the \ Each team has 10 scoring sticks. END
Construct a Ludii game based on the following description 2x3 board. Three counters in each hole. Players sow from any one of their holes. Sowing can occur in the following directions: From the leftmost hole, clockwise; from the rightmost hole, anti-clockwise; from the center hole, the player may choose either directio...
(define "PiecesOwnedBy" (+ (count Cell at:(handSite #1)) (count in:(sites #1)))) (define "Sow" (move Select (from #1 if:(> (count at:(from)) 1)) (then (sow #2 if:(and (= (count at:(to)) 2) (is In (to) (sites Next))) apply:(fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) backtracking:True)))) (game "Um e...
What does the following global Ludii definition do? (define "PhaseMovePiece" (phase #1 (play (forEach Piece)) #2)) ###
Defines a phase to move each piece according to the move ludeme associated with each piece. END
Construct a Ludii game based on the following description 5x5 grid, with six spaces extending from the central row; the final three of this extension rendered as rectangles rather than squares (Cairo, Medina, and Mecca, in that order). The central square of the grid is marked with a circle (the Minaret). Any number of ...
(define "Move" (if (!= 0 #1) (or { (if (is In (from) (sites Track "FirstTrack")) (move (from (from) level:(level)) (to ("SiteToMoveOnTrack" "FirstTrack" #1))) ("CaptureMove" "FirstTrack")) (if (is In (from) (sites Track "SecondTrack")) (move (from (from) level:(level)) (to ("SiteToMoveOnTrack" "SecondTrack" #1)) ("Capt...
Construct a Ludii game based on the following description DEFINITION: A group is a maximal set of orthogonally adjacent like-colored pieces. GAMEPLAY: On your turn, flip an enemy group. OBJECTIVE: Eliminate the enemy pieces. An 8x8 board is currently selected. No heuristic is used. ###
(define "FlipGroupAndCalculateDifference" (do (add (to (sites Group at:(last From) Orthogonal) (apply (remove (to))))) next:(and (set Score P1 (- (count Groups Orthogonal if:(= (id P1) (who at:(to)))) (count Groups Orthogonal if:(= (id P2) (who at:(to)))))) (set Score P2 (- (count Groups Orthogonal if:(= (id P2) (who a...
Construct a Ludii game based on the following description 2x4 board, rendered as holes in the sand. Six counters per hole. A player picks up all of the counters in one of the holes in their row and sows them in an anti-clockwise direction. When the final counter lands in an empty hole, the contents of the following hol...
(define "NoCounters" (all Sites (sites #1) if:(= 0 (count at:(site))))) (define "NextHole" ("NextSiteOnTrack" 1 from:#1 "Track")) (define "PlayFromLastHole" (last To afterConsequence:True)) (define "Columns" 4) (game "Boukerourou" (players 2) (equipment { (mancalaBoard 2 "Columns" store:None (track "Track" "0,E,N,W" lo...
Construct a Ludii game based on the following description 5x5 board. Markings in the central square, each corner square, and the central square of each side. Black plays with thirteen pieces, white plays with ten. Black places the first piece on the central square, then players alternate turns placing a piece on their ...
(game "Gala" (players 2) (equipment { (board (square 5)) (hand Each) (regions P1 (expand (sites Bottom) steps:2)) (regions P2 (expand (sites Top) steps:2)) (regions "MarkedCells" (union { (sites Centre) (sites Corners) (intersection (sites Outer) (sites Row (row of:(centrePoint)))) (intersection (sites Outer) (sites Co...
Modify the Ludii game according to the following option changes: A board with side lengths 5 and 6 is currently selected -> A board with side lengths 7 and 8 is currently selected (define "Remove" (forEach Group (if (all Sites (sites) if:(= 0 (count Sites in:(difference (intersection (sites Occupied by:Mover) (sites Di...
(define "Remove" (forEach Group (if (all Sites (sites) if:(= 0 (count Sites in:(difference (intersection (sites Occupied by:Mover) (sites Direction from:(site) stop:(is Occupied (to)) stopIncluded:True)) (sites))))) (remove (sites))))) (define "Move" (move Add (to (forEach (sites Empty) if:(> (count Pieces Mover in:(si...
Modify the Ludii game according to the following option changes: The pieces follow a track describing by Murray. -> The pieces follow a longer track than the description of Finkel. (define "RemoveAPiece" (move Remove (from))) (define "SiteToMoveOnTrack" ("NextSiteOnTrack" (count Pips))) (game "Royal Game of Ur" (player...
(define "RemoveAPiece" (move Remove (from))) (define "SiteToMoveOnTrack" ("NextSiteOnTrack" (count Pips))) (game "Royal Game of Ur" (players 2) (equipment { (board (hole (hole (rectangle 3 8) (poly { {4 0} {4 1} {6 1} {6 0}})) (poly { {4 2} {4 3} {6 3} {6 2}})) {(track "Track1" "20,3,W,N1,E6,N,E,S,W,End" P1 directed:Tr...
Construct a Ludii game based on the following description 6x6 board. Each player has twelve sticks. One player's sticks are without bark to distinguish them. Players placing their sticks in empty spaces, filling the central four first. Once all of the sticks have been placed, the players may move their sticks orthogona...
(define "CheckLine3LastFrom" (if (and (!= (last From) (ahead (last From) #1)) (= (mover) (who at:(ahead (last From) #1)))) (if (is Line 3 Orthogonal through:(ahead (last From) #1) exact:True) (and (moveAgain) (addScore Mover 1))))) (define "RemoveEnemyPiece" (move Remove (sites Occupied by:Next container:"Board") (then...
Construct a Ludii game based on the following description Each stone must move to any adjacent(orthogonal or diagonal) cell, which is occupied by an enemy stone. This stone is captured by replacement. After that, all adjacent enemy stones (orthogonal or diagonal) are converted to friendly ones. There are fewer and fewe...
(game "Crusade" (players 2) (equipment { (board (square 8)) (piece "Ball" Each ("StepToEnemy" ~ (then (forEach Site (sites Around (last To)) (if ("IsEnemyAt" (site)) (and (remove (site)) (add (piece (id "Ball" Mover)) (to (site)))))))))}) (rules (start { (place "Ball1" (sites Phase 1)) (place "Ball2" (sites Phase 0))})...
Construct a Ludii game based on the following description This game is played on a hexagonal board made up of hexagonal squares, usually 6 squares per side, although other sizes are possible. Initially the board is empty and black pieces are placed in turns until one player passes. The player who passed becomes Black. ...
(define "IsPlayingPhase" (= 1 (var))) (define "BlackVC" (or ("IsSidesConnected" S NW (sites Side NE)) ("IsSidesConnected" N SW (sites Side SE)))) (define "WhiteVC" (or { ("IsSidesConnected" S N) ("IsSidesConnected" SW NE) ("IsSidesConnected" SE NW)})) (define "IsSidesConnected" (is Connected {(sites Side #1) (sites Sid...
Construct a Ludii game based on the following description Four 3x8 rectangles, arranged in a cross. In the outer rows of each arm, the third square from the outer corners is marked with an X. In two opposite arms, the bottom left corner is marked with \ ###
(define "Move" (or { (if (and { (>= 0 (var "EnteredPiece")) (is Occupied (handSite Mover)) ("Bange")}) (move (from (handSite Mover)) (to (mapEntry "DefaultEntry" Mover)) (then (set Var "EnteredPiece" 1)))) (if (and { (>= 0 (var "EnteredPiece")) (is Occupied (handSite Mover)) ("Dust")}) (move (from (handSite Mover)) (to...
Construct a Ludii game based on the following description Play occurs on a 3x3 grid. One player places an X, the other places an O and players take turns placing their marks in the grid, losing is they make three in a row of their colour. ###
(game "Tic-Tac-Toe Misere" (players 2) (equipment { (board (square 3)) (piece "Disc" P1) (piece "Cross" P2)}) (rules (play (move Add (to (sites Empty)))) (end (if (is Line 3) (result Next Win))))) END
Modify the Ludii game according to the following option changes: Chess rooks are added to the game. -> Chess knights are added to the game. (define "InitialPawnMove" (if (is In (from) (sites Start (piece (what at:(from))))) ("DoubleStepForwardToEmpty" "SetEnPassantLocation"))) (define "EnPassant" (move Step (directions...
(define "InitialPawnMove" (if (is In (from) (sites Start (piece (what at:(from))))) ("DoubleStepForwardToEmpty" "SetEnPassantLocation"))) (define "EnPassant" (move Step (directions {FR FL}) (to if:"InLocationEnPassant") (then (remove (ahead (last To) Backward))))) (define "InLocationEnPassant" (and (is Pending) (= (to)...
What does the following global Ludii definition do? (define "IsEndTrack" (= #1 End)) ###
Checks if a site returned by a track is the ending site of the track. END
Construct a Ludii game based on the following description 4x6-28 board; 16-20 is most common, only even numbers of holes. Two counters in each hole except the leftmost on the inner row, which is left empty, and the one to its right which contains one counter. Players sow by picking up the counters in any of their holes...
(define "PiecesOwnedBy" (+ (count Cell at:(handSite #1)) (count in:(sites #1 "Home")))) (define "Sow" (then (sow "Track" owner:(mover) apply:(if (> (count at:(to)) 1) (moveAgain) (if (is In (to) (sites Mover "Inner")) (and { (fromTo (from (to)) (to (handSite Mover)) count:(count at:(to))) (if (> (count at:("OppositePit...
Construct a Ludii game based on the following description The rules are the same as for Chess, except instead of moving a piece, a player's turn may be taken by replacing a captured piece on the board on any empty space. This piece is controlled by the player who replaced it. Captured pawns cannot be placed in the firs...
(define "CaptureForwardDiagonal" (move Step (directions {FR FL}) (to if:("IsEnemyAt" (to)) (apply (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to))))))))) (define "EnPassant" (move Step (directions {FR FL}) (to if:"InLocationEnPassant") (then (add (piece (mapEntry "captured" (what a...
Construct a Ludii game based on the following description Three concentric squares, with the midpoints of their sides connected with lines. Twelve pieces per player. Players take turns placing one of their pieces on an empty point on the board. The first player to make three in a row obtains the privilege of starting t...
(define "ResetGame" (and { (remove (sites Occupied by:All)) (add (piece (id "Marker" P1)) (to (handSite P1)) count:12) (add (piece (id "Marker" P2)) (to (handSite P2)) count:12)})) (define "RemoveEnemyPiece" (move Remove (sites Occupied by:Next container:"Board") #1)) (define "IfLine3MoveAgain" (then (if (and ("NewTurn...
Construct a Ludii game based on the following description 5x5 intersecting lines, with diagonals in each square formed by the lines. Twenty pieces per player, which each player places on the points on their side of the board, as well as the two points to the left of the central space. The central spot remains empty. Pl...
(game "Bis Gutiya" (players 2) (equipment { (board (square 5 diagonals:Solid) use:Vertex) (piece "Marker" Each (or ("StepToEmpty") ("HopCapture")))}) (rules ("BeforeAfterCentreSetup" "Marker1" "Marker2") (play (forEach Piece)) (end ("CaptureAll" Next)))) END
Construct a Ludii game based on the following description 4x6-21 board; 8 is most common, 12, 15, and 18 are also popular. Two counters in each hole in the players' outer rows. Before the game starts, players choose to make additional captures from one, two, or three holes. Sowing occurs in an anti-clockwise direction,...
(define "HaveToMakeExtraCapture" (set Var 3)) (define "NumCapture" (var)) (define "NextHoleFrom" ("NextSiteOnTrack" 1 from:#1 #2)) (define "AHoleHasMoreThanOneCounter" (not (all Sites (forEach (sites Mover) if:(< 1 (count at:(site)))) if:(= 0 (count at:(site)))))) (define "NoPiece" (all Sites (sites Player "Home") if:(...
Construct a Ludii game based on the following description Starting of the game, the player can select the goal of the puzzle, which can be spanning tree or caterpillar tree. This game has two versions: addition and deletion version. At the addition version, the board graph is initially uncoloured. Players take turns to...
(game "SpanRups" (players 1) (equipment { (board (graph vertices:{ {0 0} {0 1} {0 2} {0 3} {0 4} {1 0} {1 1} {1 2} {1 3} {1 4} {2 0} {2 1} {2 2} {2 3} {2 4} {3 0} {3 1} {3 2} {3 3} {3 4} {4 0} {4 1} {4 2} {4 3} {4 4}} edges:{ {0 1} {0 5} {0 6} {1 6} {1 2} {1 5} {2 7} {2 3} {3 8} {3 4} {3 9} {4 8} {4 9} {5 6} {5 10} {6 ...
Modify the Ludii game according to the following option changes: The game is played on a board with 7 hexes per side. -> The game is played on a board with 8 hexes per side. (define "IsPlayingPhase" (= 1 (var))) (define "BlackVC" (or ("IsSidesConnected" S NW (sites Side NE)) ("IsSidesConnected" N SW (sites Side SE)))) ...
(define "IsPlayingPhase" (= 1 (var))) (define "BlackVC" (or ("IsSidesConnected" S NW (sites Side NE)) ("IsSidesConnected" N SW (sites Side SE)))) (define "WhiteVC" (or { ("IsSidesConnected" S N) ("IsSidesConnected" SW NE) ("IsSidesConnected" SE NW)})) (define "IsSidesConnected" (is Connected {(sites Side #1) (sites Sid...
Construct a global Ludii definition which fulfills the following requirements. Checks if a site returned by a track is not the ending site of the track. ###
(define "IsNotEndTrack" (!= #1 End)) END
Construct a Ludii game based on the following description Use Options to select a board size. Goal: Be the last to play. Then the first player (Maroon) places a stone, after which the players alternate, taking up to two moves per turn. To move, either: ...
(define "Perf7" (board (dual (remove (hex "Jungle") cells:{12 25 34 41 50 57 66 75 82 91 98 107 116 123 131 144 150 161})) use:Vertex)) (define "Perf6" (board (dual (remove (hex 8) cells:{0 4 5 6 7 8 13 17 20 27 28 35 44 49 54 61 62 65 72 76 77 84 91 92 96 103 106 107 114 119 124 133 140 141 148 151 155 160 161 162 163...
Describe the mechanics of the following Ludii game (define "CanEscape" ("IsOffBoard" #1)) (define "AllPieceEscaped" (no Pieces Mover)) (define "Bar" (mapEntry (mover))) (define "RemoveAPiece" (move Remove (site))) (define "NextSiteFromDist6" ("NextSiteOnTrack" 6 from:#1)) (define "NextSiteFrom" ("NextSiteOnTrack" (pips...
2x12 board, divided in half, where the spaces are rendered as points. Fifteen pieces per player. Three six-sided dice. The points form a continuous track in a horseshoe shape; each player progresses in opposite directions, one from their bottom right to the top right, the other from their bottom left to their top left....
Construct a Ludii game based on the following description The game is played on a sheet of graph paper, with any set of designs traced out. It is most commonly played on rectangular board like a 6×6 square. Two players have a collection of dominoes which they place on the grid in turn. A player...
(game "Cram" (players 2) (equipment { (board (rectangle 6 6)) (tile "Tile" P1 {F} numSides:4) (tile "Tile" P2 {F} numSides:4)}) (rules (play (or (move Add (piece (mover) state:0) (to (sites Empty))) (move Add (piece (mover) state:1) (to (sites Empty))))) (end ("NoMoves" Loss)))) END
Construct a Ludii game based on the following description MOVE - Stones may move to an adjacent (orthogonal or diagonal) empty cell. CAPTURE - Stones capture by jumping over an enemy stone and landing in the immediate opposite empty cell. - Captures are mandatory. - Capt...
(game "Jumping Beans" (players 2) (equipment { (board (square 7)) (piece "Bean" Each ("StepToEmpty"))}) (rules ("BeforeAfterCentreSetup" "Bean1" "Bean2") (play (if ("SameTurn") (max Moves ("HopCapture" (from (last To)) ~ (then ("ReplayIfCanMove" ("HopCapture" (from (last To))))))) (priority { (max Moves (forEach Piece ...
Construct a Ludii game based on the following description 2x6 board. 72 counters are distributed unevenly into the holes with the only rule that corresponding holes on either side of the board must contain counters. The opponent moves first, but may flip the board around if they prefer that arrangement, sacrificing the...
(define "EmptyBoard" (all Sites (sites Board) if:(= 0 (count at:(site))))) (define "NoCounters" (all Sites (sites #1) if:(= 0 (count at:(site))))) (define "CorrespondingHolesHaveSeeds" (all Sites (sites Bottom) if:(if (is Empty (site)) (is Empty (+ (site) "Columns")) (is Occupied (+ (site) "Columns"))))) (define "Colum...
Construct a Ludii game based on the following description Crossway is played with a Go set. The board starts out empty. Each player takes possession of all of the stones of one color. Players take turns adding their stones to the board, one stone per turn. A player must never create a crosscut formation. Black makes th...
(define "IsNotCut" (not (is Pattern {F R F R F} whats:{(mover) (next)}))) (game "Crossway" (players 2) (equipment { (board (square 19) use:Vertex) (piece "Marker" Each) (regions P1 {(sites Side N) (sites Side S)}) (regions P2 {(sites Side W) (sites Side E)})}) (rules (meta (swap)) (play (do (move Add (to (sites Empty))...
Modify the Ludii game according to the following option changes: Order 8 board -> Order 2 board Square Grid -> Hex Grid (define "BoardUsed" (square 8)) (define "StepIteration" (if (<= #2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (#1))))) (define "S5" (intersection (sites Empty) (sites Around...
(define "BoardUsed" (hex 2)) (define "StepIteration" (if (<= #2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (#1))))) (define "S5" (intersection (sites Empty) (sites Around ("S4")))) (define "S4" (intersection (sites Empty) (sites Around ("S3")))) (define "S3" (intersection (sites Empty) (sites...
Construct a Ludii game based on the following description It is played on a board that is a grid of dots. 3x3 dots is common. Players alternate turns drawing a line between two of the dots. If a player completes a square, they receive one point and play again. The player with the most points when there are no more move...
(define "HalfBoardSize" (/ (count Cells) 2)) (define "CaptureTheCell" (claim (to Cell (site)) (then (and (addScore Mover 1) (moveAgain))))) (define "NoFreeEdge" ("NoSites" (intersection (sites Incident Edge of:Cell at:(site)) (sites Empty Edge)))) (define "CellOfLastEdge" (sites Incident Cell of:Edge at:(last To))) (ga...
Construct a Ludii game based on the following description 2x6 board with two stores. Four counters in each hole. Play may begin from any of the player's holes. Counters are sown anti-clockwise. If the last counter falls into an empty hole or a hole in either row, making that hole contain four counters, play ends, and t...
(define "PiecesOwnedBy" (+ (count at:(mapEntry #1)) (count in:(sites #1)))) (game "Obridje" (players 2) (equipment { (mancalaBoard 2 6 (track "Track" "1,E,N,W" loop:True)) (piece "Seed" Shared) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)})}) (rules (start (set Count...
Modify the Ludii game according to the following option changes: Each row has 41 holes. -> Each row has 42 holes. (define "PiecesOwnedBy" (+ (count Cell at:(handSite #1)) (count in:(sites #1)))) (define "Columns" 41) (game "En Gehe" (players 2) (equipment { (mancalaBoard 2 "Columns" store:None (track "Track" "0,E,N,W" ...
(define "PiecesOwnedBy" (+ (count Cell at:(handSite #1)) (count in:(sites #1)))) (define "Columns" 42) (game "En Gehe" (players 2) (equipment { (mancalaBoard 2 "Columns" store:None (track "Track" "0,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "Seed" Shared) (hand Each)}) (rules (start...
Construct a Ludii game based on the following description On a turn, the active player takes a cube that is blank or bearing his symbol from the outer ring of the grid, then adds it to the grid by pushing it into one of the rows from which it was removed. Thus, a few pieces of the grid change places each turn, and the ...
(define "Push" (move Select #1 (then (and { (push (from (last To)) #2) "CompleteLineWithPieceTaken"})))) (define "From" (from (difference (intersection (sites #1) #2) (sites {(last To)})))) (define "LastColumn" (sites Column (column of:(last To)))) (define "LastRow" (sites Row (row of:(last To)))) (define "TakeAPieceIn...
Construct a global Ludii definition which fulfills the following requirements. Defines a piece moving like a bishop in Chess. ###
(define "ChessBishop" (piece #1 Each (move Slide Diagonal (to if:("IsEnemyAt" (to)) (apply (remove (to) #2))) #3))) END
Modify the Ludii game according to the following option changes: A size 4 board is currently selected -> A size 5 board is currently selected (define "ScoreOf" (+ (results from:(sites Occupied by:#1) to:0 (if ("ConnectsAt" (from)) 1 -1)))) (define "UpdateScoreMover" (and (set Score Mover 0) (forEach Group Orthogonal if...
(define "ScoreOf" (+ (results from:(sites Occupied by:#1) to:0 (if ("ConnectsAt" (from)) 1 -1)))) (define "UpdateScoreMover" (and (set Score Mover 0) (forEach Group Orthogonal if:(is Mover (who at:(to))) (if ("Connects" (sites)) (addScore Mover (count Sites in:(sites))) (addScore Mover (- (count Sites in:(sites))))))))...
Construct a global Ludii definition which fulfills the following requirements. If the mover is reaching a space of a region with his last movement, a player is winning. This ludemeplex can be used only in an ending condition. ###
(define "ReachWin" (if (is In (last To) #1) (result #2 Win))) END
Describe the mechanics of the following Ludii game (define "PromoteTo" (move Promote (last To) #1 Mover)) (define "KingCaptureStep" (move Step #1 (to if:"IsToEmptyOrEnemy" (apply (if ("IsEnemyAt" (to)) (remove (to) (then (set Counter)))))) #2)) (define "P12" (if (is Mover P1) #1 #2)) (define "IsToEmptyOrEnemy" (or "IsT...
Mini Hexchess is played on a hexagonal board with each side having length 5, and each space oriented horizontally. The board has 37 spaces. Piece Movement: * Kings, Rooks, Bishops, and Knights move as in Glinski Chess. - Kings step one space in any of the 12 directions. ...
Construct a Ludii game based on the following description Played on a square grid 11x11 or larger. White goes first and places two pieces every turn, Black places four pieces per turn. White wins if they make an orthogonal line of four pieces; Black wins if they make an orthogonal line of 7 pieces. Played on a size 1...
(game "Unfair" (players 2) (equipment { (board (square 11) use:Vertex) (piece "Ball" Each)}) (rules (play (or (move Add (to (sites Empty) if:(= (id P1) (mover))) (then (if (= 0 (count MovesThisTurn)) (moveAgain)))) (move Add (to (sites Empty) if:(= (id P2) (mover))) (then (if (< (count MovesThisTurn) 3) (moveAgain)))))...
Construct a Ludii game based on the following description 2x12 board. Beginning from the leftmost hole closest to a player and proceeding in an anti-clockwise direction, the opening arrangement of counters is an alternating pattern of one empty hole, followed by two holes with three counters each. The first move for ea...
(define "NextHoleFrom" ("NextSiteOnTrack" #2 from:#1)) (define "NoPiece" (= (count in:(sites Player "Home")) 0)) (define "LastHoleSowed" (sites {("LastHole")})) (define "LastHole" (last To afterConsequence:True)) (define "Columns" 12) (game "Tapata" (players 2) (equipment { (mancalaBoard 2 "Columns" store:None (track "...
Construct a Ludii game based on the following description Players take turns placing one piece of their colour on empty cells; the piece they place may not be adjacent to the last piece placed by their opponent. A player wins by connecting all three board sides with a connected group of their pieces. Played on a size 1...
(game "Tabu Y" (players 2) (equipment { (board (hex Triangle 11)) (piece "Disc")}) (rules (play (move Add (to (sites Empty) if:(not (is In (to) (sites Around (last To))))))) (end (if (is Connected 3 Sides) (result Mover Win))))) END
Construct a Ludii game based on the following description DEFINITIONS Group: like-colored stones adjacent to each other. Singletons are considered groups of size 1. Path: an empty point, or an uninterrupted straight line of empty points that have a pair of like-colored stones on both ends, which...
(define "Remove" (forEach Group (if (all Sites (sites) if:(= 0 (count Sites in:(difference (intersection (sites Occupied by:Mover) (sites Direction from:(site) stop:(is Occupied (to)) stopIncluded:True)) (sites))))) (remove (sites))))) (define "Move" (move Add (to (forEach (sites Empty) if:(> (count Pieces Mover in:(si...
Construct a Ludii game based on the following description Each turn the current player must move, capture and drop. The current player must move one of their pieces in a straight line in any of the six hexagonal directions to land on a vacant foreign cell; any intervening cells must also be emp...
(define "Bunny" (if (= (mover) 1) (if (= ("Candidate") 2) 3 2) (if (= (mover) 2) (if (= ("Candidate") 1) 3 1) (if (= ("Candidate") 1) 2 1)))) (define "Candidate" (var)) (define "GetCandidate" (set Var (mapEntry "PlayerPhase" (phase of:(last To))))) (game "Triad" (players 3) (equipment { (board (hex 5)) (piece "Marker" ...
Construct a Ludii game based on the following description Men can move one step forwards orthogonally or diagonally, or can jump an opponent's adjacent piece to capture it, in any direction. When a man ends its turn on the opposite edge of the board from its starting position, it becomes a king and may move or jump ove...
(define "IsUnpromoted" ("IsPieceAt" "Counter" Mover (last To))) (define "HopCounter" (move Hop (from #1) All (between if:(and (not (is In (between) (sites ToClear))) ("IsEnemyAt" (between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) #2)) (game "Omnidirectional Draughts" (players 2) ("DraughtsEqui...
Construct a global Ludii definition which fulfills the following requirements. Allows to remove one piece of the enemy player which is not in a line 3. ###
(define "RemoveAnyEnemyPieceNotInLine3" (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 #1 through:(site)))))) END
Describe the mechanics of the following Ludii game (define "CanMoveAnotherStone" (can Move (do (set Var #2) next:(forEach Site (difference (sites Occupied by:Mover) #1) (step (from (site)) (directions Cell from:#1 to:(var)) (to if:(and (is Empty (to)) (not (is In (to) (sites "RedDots")))))))))) (game "Tandems" (players...
On each turn, each player must move two friendly stones to adjacent (diagonal or orthogonal) empty cells, both in the same direction. Stones cannot move into the restricted points on the game board. The player that first moves 5 stones to the last row wins the game. END
Modify the Ludii game according to the following option changes: The game is played on a 5x5 board -> The game is played on a 7x7 board (game "Gale" (players 2) (equipment { (board (square 5)) (piece "Square" Each) (regions P1 {(sites Top) (sites Bottom)}) (regions P2 {(sites Left) (sites Right)})}) (rules (start { (pl...
(game "Gale" (players 2) (equipment { (board (square 7)) (piece "Square" Each) (regions P1 {(sites Top) (sites Bottom)}) (regions P2 {(sites Left) (sites Right)})}) (rules (start { (place "Square1" (forEach (sites Board) if:(and (is Even (column of:(site))) (is Odd (row of:(site)))))) (place "Square2" (forEach (sites B...
Construct a Ludii game based on the following description Played on an 8x8 board with each player having twelve pieces. Pieces move diagonally one space forward, and can capture opponent's pieces by jumping them if they are adjacent. Capturing must happen if it is possible, multiple captures are allowed, and can happen...
(define "JumpToPromotionZone" (is In (last To) (sites Next))) (define "IsUnpromoted" ("IsPieceAt" "Counter" Mover (last To))) (define "HopCounter" (move Hop (from #1) Diagonal (between if:(and (not (is In (between) (sites ToClear))) ("IsEnemyAt" (between))) (apply (remove (between)))) (to if:(is Empty (to))) #2)) (game...
Describe the mechanics of the following Ludii game (game "Lam Turki" (players 1) (equipment { ("StarBoard" 5) (hand Each) (piece "Marker" P1 ("HopFriendCapture"))}) (rules (start { (place "Marker" (handSite P1) count:9)}) phases:{ (phase "Placement" (play (if (is Even (count Moves)) (move (from (handSite Mover)) (to (s...
The board is a five-pointed star. The player has nine pieces. In the first phase, the player attempts to place all the pieces on the board. The player choses a point, then moves the piece two spaces in a straight line. The piece may move through a spot occupied by another piece, but must land on an empty space. Once al...
Construct a Ludii game based on the following description Game is played on an Alquerque board with 5x5 intersecting lines and with a triangular appendage on either side. Each player has sixteen pieces, which are placed on the intersections and move along the lines to the next open intersection. Players can hop opponen...
(game "Mogul Putt'han" (players 2) (equipment { ("AlquerqueBoardWithBottomAndTopTriangles") (piece "Marker" Each (or ("HopSequenceCapture") ("StepToEmpty")))}) (rules (start { (place "Marker1" (union {(sites Row 0) (sites Row 1) (sites Row 2) (sites Row 3)})) (place "Marker2" (union {(sites Row 5) (sites Row 6) (sites ...
Construct a Ludii game based on the following description Three concentric pentagons, with lines connecting the corners and the midpoints of each side. Fourteen pieces per player. Players alternate turns placing one of their pieces on an empty spot on the board. When all of the pieces are placed, they alternate turns m...
(game "Tavan Tal" (players 2) (equipment { (board (add (merge { (shift 2 2 (merge { (rectangle 1 3) (shift -1.31 0.95 (rotate 108 (rectangle 1 3))) (shift -0.81 2.49 (rotate 216 (rectangle 1 3))) (shift 1.31 0.95 (rotate -108 (rectangle 1 3))) (shift 0.81 2.49 (rotate -216 (rectangle 1 3)))})) (shift 1 1 (scale 2 (merg...
Construct a global Ludii definition which fulfills the following requirements. If the mover has no legal moves, the mover is winning. This ludemeplex can be used only in an ending condition. ###
(define "MisereBlockWin" (if (no Moves Mover) (result Mover Win))) END
Construct a Ludii game based on the following description Players take turns marking any unmarked cell with no marked neighbour. Player who can’t move loses. ###
(define "NoNeighbour" ("NoSites" (sites Around (to) Orthogonal if:(is In (to) (sites Occupied by:Neutral))))) (game "Spots" (players 2) (equipment { (board (hex 5)) (piece "Marker" Neutral)}) (rules (play (move Add (piece "Marker0") (to (sites Empty) if:"NoNeighbour"))) (end ("NoMoves" Loss)))) END
Construct a Ludii game based on the following description At the beginning of the game, the first player places 4 pieces of any colour in the bottom row. These pieces will be hidden to the second player during all the game. The objective of the second player (called codebreaker) is to try to gu...
(define "AddWhiteHint" ("AddHint" "Disc1")) (define "AddBlackHint" ("AddHint" "Disc2")) (define "AddHint" (add (piece #1) (to (regionSite ("HintPositions") index:(value))))) (define "CombinationFound" (and (= 0 (count Sites in:(intersection (sites Empty) (sites Row ("RowToCheck"))))) (= "NumColumn" (count Sites in:(for...
What does the following global Ludii definition do? (define "ForEachPlayerNoMovesLoss" (forEach Player if:(no Moves Player) (result Player Loss))) ###
Makes a player losing when this player has no moves. This ludemeplex can be used only in an ending condition. END
Construct a Ludii game based on the following description 3x3 intersecting lines, with diagonals in the square. Three pieces per player, which begin on opposite sides of the square. Players alternate turns moving one of their pieces along the lines of the board. When a player surrounds one of the opponent's pieces with...
(game "El-Mthaltha" (players 2) (equipment { ("AlquerqueBoard" 3 3) (piece "Marker" Each ("StepToEmpty" ~ (then ("CustodialCapture" Orthogonal (max 1)))))}) (rules (start { (place "Marker1" (sites Bottom)) (place "Marker2" (sites Top))}) (play (forEach Piece)) (end ("CaptureAll" Next)))) END
Construct a Ludii game based on the following description The board consists of four rows of any number of holes. Two to twelve players, who play on two equal teams. The number of pieces per team is equal to the number of holes in one row. One team plays as pieces of camel dung, the other as sticks. The pieces begin, o...
(define "Move" (if ("NeverGoInEnemyHome" (from)) (or (if (<= (var) 0) (move (from (from) if:(if ("ActivatedPiece" (from)) True ("ActivatedThrow"))) (to ("NextSiteOnTrack" ("ThrowValue") "Track") if:(if (is In (to) ("MiddleSites")) (or (is Empty (to)) (and ("IsEnemyAt" (to)) ("PieceCanBeCapture"))) (is Empty (to))) (app...
Construct a Ludii game based on the following description 2x12 board, divided in half. Spaces on each side take the form of semi-circular sockets, into which the pieces fit. Fifteen pieces per player. Two or three dice. Players move according to the number on each die by moving one piece the value on one die then anoth...
(define "RemoveAPiece" (move Remove (from))) (define "SiteToMoveOnTrack" ("NextSiteOnTrack" (pips))) (game "Pareia de Entrada" (players 2) (equipment { ("TableBoard" "TableTracksSameDirectionWithHands") (dice d:6 num:3) (hand Each) (piece "Disc" Each (forEach Die if:("DieNotUsed") (if ("IsOffBoard" "SiteToMoveOnTrack")...
Construct a global Ludii definition which fulfills the following requirements. Checks if a stack has a size of 1 at a site. ###
(define "IsSingletonStack" (= 1 (size Stack at:#1))) END
Construct a global Ludii definition which fulfills the following requirements. Defines a regular start board (example: Kaooa). ###
(define "StarBoard" (board (splitCrossings (regular Star #1)) use:Vertex)) END
Describe the mechanics of the following Ludii game (define "CountAndMarkOddGroupsMover" (and (set Score Mover 0) (forEach Group Orthogonal if:(is Mover (who at:(to))) (if (is Odd (count Sites in:(sites))) (and (addScore Mover -1) (forEach Site (sites) (set State at:(site) 1))) (forEach Site (sites) (set State at:(site)...
Players take turns placing a stone of their own color on any empty cell of a hexagonal grid of hexagons (a hexhex board). The game is over when the board is full, and the player with the lower score wins. If both players have the same number of groups, your score is your number of odd-sized gr...
Construct a Ludii game based on the following description 6x6 board. Two or four players. Three pieces per player, which begin in opposite corners of the board. Players alternate turns moving one piece to an empty adjacent space, orthogonally or diagonally, but not backwards. The first player to place their pieces in t...
(define "SizeStart" 1) (game "Bajr" (players {(player NE) (player SW)}) (equipment { (board (square 6)) (piece "Counter" Each ("StepToEmpty" (directions {Forwards Leftward Rightward}))) (regions "Home" P1 (expand (intersection (sites Bottom) (sites Left)) steps:"SizeStart" Orthogonal)) (regions "Home" P2 (expand (inter...
Construct a Ludii game based on the following description The pieces start with each color on opposite ends of the board, with two empty holes in between. The goal is to move the pieces so that they end up on opposite sides of the board from their starting position. Pieces can only be moved forward. ###
(define "MoveOfThePiece" (or (move Hop (from) Forward (between if:("IsFriendAt" (between))) (to if:(is Empty (to)))) ("StepForwardToEmpty"))) (game "Insanity" (players 1) (equipment { (board (rectangle 1 10)) (piece "Marker1" P1 E "MoveOfThePiece") (piece "Marker2" P1 W "MoveOfThePiece")}) (rules (start { (place "Marke...
Construct a Ludii game based on the following description 4x6-21 board; 8 is most common, 12, 15, and 18 are also popular. Each player's rightmost hole is the musoro. Two counters in each hole in the players' outer rows, except each musoro which has three. Sowing occurs in an anti-clockwise direction. When the final co...
(define "NextHoleFrom" ("NextSiteOnTrack" 1 from:#1 #2)) (define "AHoleHasMoreThanOneCounter" (not (all Sites (forEach (sites Mover) if:(< 1 (count at:(site)))) if:(= 0 (count at:(site)))))) (define "LastHoleSowed" (sites {(var)})) (define "NoPiece" (all Sites (sites Player "Home") if:(= 0 (count at:(site))))) (define ...
Construct a Ludii game based on the following description In this Shogi Puzzle, you have to checkmate the black Osho, using the regular rules of Shogi, with the smallest number of moves possible. ###
(define "PlaceAPawn" (do (move (from (sites Occupied by:Mover container:"Hand" component:"Fuhyo")) (to (difference (sites Empty) (sites Mover "LastRank")) if:"OnePawnPerColumn")) ifAfterwards:(not ("KingCheck" Next)))) (define "PlaceALance" (move (from (sites Occupied by:Mover container:"Hand" component:"Kyosha")) (to ...
Construct a Ludii game based on the following description 10x10 board, 20 pieces per player. Pieces move diagonally one or can jump an opponent's adjacent player to capture it. Pieces can move forward or backwards. When a piece reaches the opposite edge of the board from its starting position, it becomes a king and can...
(define "IsUnpromoted" ("IsPieceAt" "Counter" Mover (last To))) (game "International Draughts" ("TwoPlayersNorthSouth") ("DraughtsEquipment" (square 10)) (rules ("BlackCellsSetup" 4) (play (if "SameTurn" (if "IsUnpromoted" (max Moves ("HopInternationalDraughtsStyle" (from (last To)) (then ("ReplayIfCanMove" ("HopIntern...
Construct a Ludii game based on the following description 3x3 intersecting lines with diagonals. Play occurs on the intersections of the lines. Players each have three pieces, initially placed on the sides closest to the player. Players move the pieces to an adjacent unoccupied intersection along the lines. The goal is...
(define "NotAllPieceInHome" (not (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover))))) (game "Tant Fant" (players 2) (equipment { ("AlquerqueBoard" 3) (piece "Marker" Each "StepToEmpty") (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start { (place "Marker1" (sites P1)) (place "Marker2...
Construct a Ludii game based on the following description 7x7 board. 24 pieces per player. Players alternate turns placing two pieces on the board. When all of the pieces are placed, players alternate turns moving one piece orthogonally any distance. The first player to place seven of their pieces in an orthogonal or d...
(game "Fart (7x7)" (players 2) (equipment { (board (square 7)) (piece "Marker" Each (move Slide Orthogonal)) (hand Each)}) (rules (start (place "Marker" "Hand" count:24)) phases:{ (phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Board) (centrePoint)) if:(is Empty (to))) (then (if ("NewTurn"...
Construct a Ludii game based on the following description Players take turns placing one stone of either color on the board, until it is full. Player One wins if there is an odd number of groups with at least five pieces on the board, Player Two wins otherwise. Played on a size 5 board. Min group size 5. ###
(define "GroupCount" (+ (count Groups if:(= (who at:(to)) P1) min:5) (count Groups if:(= (who at:(to)) P2) min:5))) (game "Odd" (players 2) (equipment { (board (rotate 90 (hex 5))) (piece "Marker" Each) (hand Shared size:2)}) (rules (start { (place "Marker1" (handSite Shared)) (place "Marker2" (handSite Shared 1))}) (p...
Construct a Ludii game based on the following description 5x6 board, made in the sand. One player plays with twelve sticks and the other with twelve pebbles. The player with the sticks plays first. Players alternate turns placing one of their pieces on an empty space on the board. Players are not permitted to place mor...
(game "Wali" (players 2) (equipment { (board (rectangle 5 6)) (hand Each) (piece "Stick" P1 ("StepToEmpty" Orthogonal (then ("ReplayIfLine3" Orthogonal)))) (piece "Ball" Each ("StepToEmpty" Orthogonal (then ("ReplayIfLine3" Orthogonal))))}) (rules (start { (place "Stick1" (handSite P1) count:12) (place "Ball2" (handSit...
Construct a Ludii game based on the following description 4x7 board. Three counters in each hole in the outer row; before beginning each player rearranges these as they wish, with the following rules: The leftmost hole in the outer row must have the most counters; Each hole must have equal to or less than the number of...
(define "NoPiece" (all Sites (sites Player "Home") if:(= 0 (count at:(site))))) (define "OneCounterInEachHole" (all Sites (sites Mover "Home") if:(> 2 (count at:(site))))) (define "NextHole" ("NextSiteOnTrack" #2 from:#1 "TrackCCW")) (define "MaximumOfTwoHolesInInner" (>= 2 (count Sites in:(forEach (sites Mover "Inner"...
Construct a global Ludii definition which fulfills the following requirements. Returns the number of pieces owned by a player around a given site. ###
(define "OccupiedNbors" (count Sites in:(intersection (sites Around #1) (sites Occupied by:#2)))) END
Construct a global Ludii definition which fulfills the following requirements. Defines a hop move in all the diagonal directions over an enemy to an empty site. The enemy piece is removed. ###
(define "HopDiagonalCapture" (move Hop Diagonal (between if:("IsEnemyAt" (between)) (apply (remove (between)))) (to if:(is Empty (to))))) END
Describe the mechanics of the following Ludii game (define "PiecesOwnedBy" (+ (count at:(mapEntry #1)) (count in:(sites #1)))) (game "Kara" (players 2) (equipment { (mancalaBoard 2 3 (track "Track" "1,E,N,W" loop:True)) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map {(pair P1 FirstSite) (pair P2 LastSite)}) ...
Play begins with seven counters in each hole. Players begin by picking up the counters in one of their holes and sowing them anti-clockwise. If the final counter lands in an opponent's hole or the rightmost hole belonging to the player sowing, having dropped counters in the opponent's holes making them contain two, fou...
Construct a Ludii game based on the following description Reversi is played on a hexhex-6 board with some cells removed. Pieces are double-sided, with each side distinct in some way from the other. Each side designates ownership of that pieces to a certain player when face-up. In Reversi Mode, play begins with the play...
(define "ReverseBoundedPieces" (custodial (from (site)) (between if:(is Enemy (state at:(between))) (apply (allCombinations (add (piece "Disc0" state:(mover)) (to (site))) (flip (between))))) (to if:(is Friend (state at:(to)))))) (game "MacBeth" (players 2) (equipment { (board (remove (hex 6) cells:{7 9 11 22 24 26 28 ...
Construct a Ludii game based on the following description 5x5 intersecting lines. Two triangles on opposite sides of the square, with the apex intersecting with the midpoint of opposite sides. A line is drawn from the apex , bisecting the base, and another line bisecting this one and the opposite two sides of the trian...
(game "Shanzak Kammar" (players 2) (equipment { (board (add ("AlquerqueGraphWithBottomAndTopTriangles") edges:{{5 1} {1 7} {7 3} {3 9} {13 9} {7 13} {11 5} {15 11} {11 17} {7 11} {17 13} {13 19} {23 19} {23 17} {17 21} {15 21}}) use:Vertex) (piece "Marker" Each (or "StepToEmpty" "HopCapture")) (regions "Goal" P1 (expan...
Describe the mechanics of the following Ludii game (define "StackSizeLessThan2" (< (size Stack at:("NextSiteOnTrack" (pips))) 2)) (define "Unstack" (set State at:(last To) 0)) (define "PieceStacked" (= (state at:#1) 1)) (define "RemoveAPiece" (move Remove (from))) (define "SiteToSelect" ("NextSiteOnTrack" (- (pips) 1) ...
2x12 board, divided in half. Spaces on each side take the form of semi-circular sockets, into which the pieces fit. Twelve pieces per player. Pieces begin on one half of a player's side of the board (the half to the left of one player, and to the right of the other player), two per space, stacked on top of one another....
Construct a global Ludii definition which fulfills the following requirements. Defines a piece moving like a king in Chess (castling is not described in this ludemeplex). ###
(define "ChessKing" (piece #1 Each (move Step (to if:(not ("IsFriendAt" (to))) (apply (if ("IsEnemyAt" (to)) (remove (to) #2)))) #3))) END
Construct a Ludii game based on the following description The two players, Red and Blue, alternately place tokens on the intersections of the board until each has placed fifteen. Thereafter they alternate turns sliding a single token along a line to an adjacent vertex. A player who occupies the...
(define "NextPlayerHasLost" (is Triggered "Lose" Next)) (define "NextPlayerLose" (trigger "Lose" Next)) (define "AllCellOfLastVertex" (sites Incident Cell of:Vertex at:(last To))) (define "PlaceAPiece" (move (from (handSite Mover)) (to (sites Empty)))) (define "MoveAnEnemyPiece" (move (from (sites Occupied by:Next cont...
Construct a global Ludii definition which fulfills the following requirements. Defines a pachisi board. ###
(define "PachisiBoard" (board (add (hole ("CrossGraph" 3 19) (poly {{8 8} {8 11} {11 11} {11 8}})) cells:{ { 8 28 48 68 69 70 71 51 31 11 10 9}}) #1)) END
Construct a Ludii game based on the following description Each player has his own board, set up so that the opponent cannot see it. The referee has a board of his own on which he plays the moves of both players. He can see both player's boards. To make a move, a player plays a stone on his own ...
(define "MadeALegalMove" (do (add (to (last To)) (then (and { "CaptureSurroundedPiece" (set Hidden at:(last To) to:Next) (note player:Mover "has moved") (note player:Next "to play")}))) ifAfterwards:("HasFreedom" Orthogonal))) (define "NotEmpty" (not (is In (last To) (sites Empty)))) (define "IllegalMove" (and { (note ...
Construct a Ludii game based on the following description 4x12-24 (only even numbers allowed) board. Play begins with two counters in the outer row of each players' holes and two counter in each of the four holes on the right hand side of both players' inner row of holes. Player picks up contents of any hole containing...
(define "PiecesOwnedBy" (+ (count Cell at:(handSite #1)) (count in:(sites #1)))) (define "MoveAgainAfterCapture" (is Pending)) (define "PlayFromNextHole" (sites {(value Pending)})) (define "NextHole" ("NextSiteOnTrack" 1 from:(to) "Track")) (define "Columns" 12) (game "Hus (Damara)" (players 2) (equipment { (mancalaBoa...
Construct a Ludii game based on the following description 2x6 board. Four counters in each hole. Sowing occurs in a clockwise direction when starting from the three holes on the left of the board, and in an anti-clockwise direction when starting from the three holes on the right. Sowing ends when the final counter is d...
(define "PiecesOwnedBy" (count in:(forEach (sites Board) if:(= (id #1) (state at:(site)))))) (game "Qelat (Beni Amir-Mensa)" (players 2) (equipment { (mancalaBoard 2 6 store:None { (track "TrackCCW" "0,E,N,W" loop:True) (track "TrackCW" "5,W,N,E" loop:True)}) (piece "Seed" Shared) (regions "Left" P1 (intersection (expa...
Describe the mechanics of the following Ludii game (game "Shatranj (Iraq)" ("TwoPlayersNorthSouth") (equipment { (board (square 8)) ("ChessKing" "King_noCross") (piece "Ferz_noCross" (or ("SlideCapture") ("LeapCapture" "KnightWalk"))) (piece "Elephant" (move Slide Diagonal (between if:(or (is In (between) (sites Around...
8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): Any distance orthogonally or diagonally, or like the Asb. 2 x Rukh (rook): Any number of spaces orthogonally. No castling. 2 x Pil (elephant): Any distance diagonally, ju...
Construct a global Ludii definition which fulfills the following requirements. Checks if only one single group with pieces owned by a player exists. This ludemeplex can be used only in an ending condition. ###
(define "SingleGroupWin" (if ("IsSingleGroup" #1 #2) (result #1 Win))) END
Describe the mechanics of the following Ludii game (define "SquareGraphics" (graphics { (board Style Go) (piece Background image:"square.svg" edgeColour:(colour 100 100 100 255)) (piece Foreground image:"cross.svg" edgeColour:(colour 100 100 100 255)) (piece Colour strokeColour:(colour 100 100 100 255)) (piece Scale .2...
With the board empty, Black starts. Players take turns in alternation, placing a stone on to an empty cell. However, a stone must not be placed next to a group that already has the same (or more) stones as there are friendly groups. The game is lost by the first...
Modify the Ludii game according to the following option changes: The game is played on a 4x4 board -> The game is played on a 6x6 board The version of the game played with 3 players. -> The version of the game played with 4 players. (game "Omega" (players 3) (equipment { (board (hex 4)) (piece "Marker" Each)}) (rules (...
(game "Omega" (players 4) (equipment { (board (hex 6)) (piece "Marker" Each)}) (rules (play (move Add (piece (+ 1 (% (count Moves) (count Players)))) (to (sites Empty)) (then (if (!= (count MovesThisTurn) (- (count Players) 1)) (moveAgain))))) (end (if (and { (not (is Mover P1)) (is Next P1) (> (pow (count Players) 2) ...
Construct a global Ludii definition which fulfills the following requirements. Defines two players, P1 moving in direction to the north and P2 moving in direction to the south. ###
(define "TwoPlayersNorthSouth" (players {(player N) (player S)})) END
Describe the mechanics of the following Ludii game (game "Ahtarah Guti" (players 2) (equipment { ("AlquerqueBoardWithBottomAndTopTriangles") (piece "Marker" Each (or ("HopSequenceCapture") ("StepToEmpty")))}) (rules (start { (place "Marker1" (union {(sites Row 0) (sites Row 1) (sites Row 2) (sites Row 3) (sites {13 14}...
5x5 intersecting lines, with diagonals in each quadrant. Two triangles, the apexes of which intersect with the square at the midpoint of opposite sides. One line bisecting the base of the triangle, and another bisecting this line. Eighteen pieces per player, each side arranged on one side of the board, with the central...
Describe the mechanics of the following Ludii game (define "SiteToMoveOnTrack" ("NextSiteOnTrack" (count Pips))) (game "Had" (players 2) (equipment { (board (rectangle 3 14) { (track "Track1" "0,E,N1,W,N1,E" P1 directed:True) (track "Track2" "41,W,S1,E,S1,W" P2 directed:True)}) (dice d:4 num:2) (piece "Marker" Each (if...
3x14 board. Fourteen pieces per player, placed in the outer rows of the board. Two knucklebones used as dice. Players move their pieces according to the throws of the knucklebones. Pieces move in a boustrophedon path along the board. The first player to remove their pieces from the board wins. END
Construct a global Ludii definition which fulfills the following requirements. Checks if an enemy is on a site. ###
(define "IsEnemyAt" (is Enemy (who at:#1 #2))) END
Construct a Ludii game based on the following description 4x8=20 holes, with an even number per row. One counter in each hole, except the right-hand end row of the inner row. Sowing occurs in an anti-clockwise direction, only into an empty hole. When a counter lands in a hole in the inner row and the opponent's opposit...
(define "NextHoleFrom" ("NextSiteOnTrack" 1 from:#1)) (define "NoPiece" (all Sites (sites Player "Home") if:(= 0 (count at:(site))))) (define "Columns" 8) (game "Sute" (players 2) (equipment { (mancalaBoard 4 "Columns" store:None { (track "Track1" "0,E,N1,W" loop:True P1) (track "Track2" "16,E,N1,W" loop:True P2)}) (re...
Modify the Ludii game according to the following option changes: 5x5 Square -> 6x6 Square (define "KnightVector" (sites (from) {{F R F L F} {F L F R F}})) (define "UnconfinedStiesOf" (forEach (sites Board) if:(!= Infinity (count Steps Adjacent (step Adjacent (to if:(or (is Empty (to)) (is #1 (who at:(to)))))) (site) (s...
(define "KnightVector" (sites (from) {{F R F L F} {F L F R F}})) (define "UnconfinedStiesOf" (forEach (sites Board) if:(!= Infinity (count Steps Adjacent (step Adjacent (to if:(or (is Empty (to)) (is #1 (who at:(to)))))) (site) (sites Outer))))) (define "SetScoreOf" (set Score #1 (- 0 (count Sites in:(difference (sites...
Construct a Ludii game based on the following description Numbers from 1 to 9 have to be placed in the squares such that each row, column, cage has each number appearing only once, and the numbers in each cage add up to the assigned number. ###
(game "Killer Sudoku" (players 1) (equipment { (board (square 9) (values Cell (range 1 9))) (hints { (hint {0 9 18 27} 27) (hint {1 10} 8) (hint {2 11} 16) (hint {3 12 13 22} 10) (hint {4 5 6} 13) (hint {7 8} 17) (hint {14 15} 15) (hint {16 17 25 26} 14) (hint {19 20 29} 6) (hint {21 30 39} 20) (hint {31 40 49} 17) (hi...
Construct a global Ludii definition which fulfills the following requirements. Defines a Three Men's Morris board. ###
(define "ThreeMensMorrisBoard" (board ("AlquerqueGraph" 3 3) use:Vertex)) END