
Ludii Language Reference Cameron Browne, Dennis J. N. J. Soemers, Eric´ Piette, Matthew Stephenson and Walter Crist Department of Data Science and Knowledge Engineering (DKE) Maastricht University Maastricht, the Netherlands Ludii Version 1.2.11 October 6, 2021 Ludii Language Reference This document provides full documentation for the game description language used by the Ludii general game system. Note that the majority of this document is automatically generated. The source code of Ludii is available at https://github.com/Ludeme/Ludii. More info on Ludii may be found on its website: https://ludii.games/. For questions or suggestions, please contact us on the Ludii forums (https://ludii.games/forums/), or send an email to [email protected]. Contents 1 Introduction 18 1.1 Strings......................................... 18 1.2 Booleans........................................ 19 1.3 Integers........................................ 19 1.4 Floats......................................... 19 I Ludemes 20 2 Game 21 2.1 Game......................................... 22 2.1.1 game...................................... 22 2.2 Match......................................... 23 2.2.1 games..................................... 23 2.2.2 match..................................... 23 2.2.3 subgame.................................... 24 2.3 Mode......................................... 26 2.3.1 mode..................................... 26 2.4 Players......................................... 27 2.4.1 player..................................... 27 2.4.2 players..................................... 27 3 Equipment 29 3.1 Equipment...................................... 30 3.1.1 equipment................................... 30 3.2 Component...................................... 31 3.2.1 card...................................... 31 3.2.2 component.................................. 32 3.2.3 die....................................... 32 3.2.4 piece...................................... 32 3.3 Component - Tile................................... 34 3.3.1 domino.................................... 34 3.3.2 path...................................... 34 3.3.3 tile....................................... 35 3.4 Container - Board.................................. 37 3.4.1 board..................................... 37 3 3.4.2 boardless................................... 38 3.4.3 track...................................... 38 3.5 Container - Board - Custom............................. 40 3.5.1 mancalaBoard................................ 40 3.5.2 surakartaBoard................................ 40 3.6 Container - Other.................................. 42 3.6.1 deck...................................... 42 3.6.2 dice...................................... 42 3.6.3 hand...................................... 43 3.7 Other......................................... 45 3.7.1 dominoes................................... 45 3.7.2 hints...................................... 45 3.7.3 map...................................... 46 3.7.4 regions..................................... 47 4 Graph Functions 49 4.1 Generators - Basis - Brick.............................. 50 4.1.1 brick...................................... 50 4.1.2 brickShapeType............................... 50 4.2 Generators - Basis - Celtic.............................. 51 4.2.1 celtic...................................... 51 4.3 Generators - Basis - Hex............................... 52 4.3.1 hex....................................... 52 4.3.2 hexShapeType................................ 52 4.4 Generators - Basis - Quadhex............................ 54 4.4.1 quadhex.................................... 54 4.5 Generators - Basis - Square............................. 54 4.5.1 diagonalsType................................ 54 4.5.2 square..................................... 55 4.5.3 squareShapeType............................... 55 4.6 Generators - Basis - Tiling.............................. 57 4.6.1 tiling...................................... 57 4.6.2 tilingType................................... 57 4.7 Generators - Basis - Tiling - Tiling3464...................... 58 4.7.1 tiling3464ShapeType............................. 58 4.8 Generators - Basis - Tri............................... 59 4.8.1 tri....................................... 59 4.8.2 triShapeType................................. 59 4.9 Generators - Shape.................................. 61 4.9.1 rectangle................................... 61 4.9.2 regular..................................... 61 4.9.3 repeat..................................... 62 4.9.4 spiral..................................... 62 4.9.5 wedge..................................... 63 4.10 Generators - Shape - Concentric.......................... 64 4.10.1 concentric................................... 64 4.10.2 concentricShapeType............................. 65 4.11 Operators....................................... 66 4.11.1 add...................................... 66 4.11.2 clip...................................... 67 4.11.3 complete................................... 67 4.11.4 dual...................................... 68 4.11.5 hole...................................... 68 4.11.6 intersect.................................... 69 4.11.7 keep...................................... 70 4.11.8 layers..................................... 70 4.11.9 makeFaces................................... 71 4.11.10 merge..................................... 71 4.11.11 recoordinate.................................. 72 4.11.12 remove..................................... 72 4.11.13 renumber................................... 74 4.11.14 rotate..................................... 74 4.11.15 scale...................................... 75 4.11.16 shift...................................... 75 4.11.17 skew...................................... 76 4.11.18 splitCrossings................................. 76 4.11.19 subdivide................................... 77 4.11.20 trim...................................... 77 4.11.21 union..................................... 78 5 Dimension Functions 80 5.1 Math.......................................... 81 5.1.1 abs....................................... 81 5.1.2 + (add).................................... 81 5.1.3 = (div)..................................... 82 5.1.4 max...................................... 82 5.1.5 min...................................... 83 5.1.6 ∗ (mul).................................... 83 5.1.7 ^ (pow).................................... 84 5.1.8 − (sub).................................... 84 6 Float Functions 85 6.1 ToFloat........................................ 86 6.1.1 toFloat.................................... 86 6.2 Math.......................................... 87 6.2.1 abs....................................... 87 6.2.2 + (add).................................... 87 6.2.3 cos....................................... 88 6.2.4 = (div)..................................... 88 6.2.5 exp....................................... 89 6.2.6 log....................................... 89 6.2.7 log10...................................... 89 6.2.8 max...................................... 90 6.2.9 min...................................... 90 6.2.10 ∗ (mul).................................... 91 6.2.11 ^ (pow).................................... 92 6.2.12 sin....................................... 92 6.2.13 sqrt...................................... 93 6.2.14 − (sub).................................... 93 6.2.15 tan....................................... 93 7 Rules 95 7.1 Rules.......................................... 96 7.1.1 rules...................................... 96 7.2 End.......................................... 98 7.2.1 byScore.................................... 98 7.2.2 end...................................... 98 7.2.3 forEach.................................... 98 7.2.4 if........................................ 99 7.2.5 payoffs..................................... 99 7.2.6 result..................................... 100 7.3 Meta.......................................... 101 7.3.1 automove................................... 101 7.3.2 gravity..................................... 101 7.3.3 meta...................................... 101 7.3.4 noRepeat................................... 102 7.3.5 passEnd.................................... 102 7.3.6 pin....................................... 103 7.3.7 swap...................................... 103 7.4 Phase......................................... 104 7.4.1 nextPhase................................... 104 7.4.2 phase..................................... 104 7.5 Play.......................................... 106 7.5.1 play...................................... 106 7.6 Start.......................................... 107 7.6.1 deal...................................... 107 7.6.2 start...................................... 107 7.7 Start - DeductionPuzzle............................... 109 7.7.1 set....................................... 109 7.8 Start - ForEach.................................... 110 7.8.1 forEach.................................... 110 7.9 Start - Place..................................... 112 7.9.1 place...................................... 112 7.10 Start - Set....................................... 116 7.10.1 set....................................... 116 7.10.2 setStartPlayerType.............................. 118 7.10.3 setStartSitesType............................... 118 7.11 Start - Split...................................... 120 7.11.1 split.....................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages444 Page
-
File Size-