GithubHelp home page GithubHelp logo

ludeme / ludii Goto Github PK

View Code? Open in Web Editor NEW
87.0 10.0 30.0 587.62 MB

The Ludii general game system, developed as part of the ERC-funded Digital Ludeme Project.

Home Page: https://ludii.games/

License: Other

GLSL 0.05% PostScript 0.19% Java 99.51% TeX 0.24%
games general-game-playing artificial-intelligence ludii

ludii's Introduction

Ludii

twitter โ™Ÿ๏ธ๐ŸŽฒ๐Ÿ’ป

Ludii is a general game system designed to play, evaluate and design a wide range of games, including board games, card games, dice games, mathematical games, and so on. Download the Ludii player to explore our ever-growing database of games, test your AI search algorithms, and design your own games.

Games are described as structured sets of ludemes (units of game-related information). This allows the full range of traditional strategy games from around the world to be modelled in a single playable database for the first time. Ludii is being developed as part of the ERC-funded Digital Ludeme Project.

This GitHub profile contains various repositories related to Ludii and the project.


Acknowledgements

Ludii is part of the European Research Council-funded Digital Ludeme Project (ERC Consolidator Grant #771292), being run by Cameron Browne at Maastricht University's Department of Data Science and Knowledge Engineering.

European Research Council Logo

ludii's People

Contributors

cambolbro avatar dennissoemers avatar filippdokienko avatar frehburg avatar greendate avatar ludeme avatar nibbla avatar nprianikov avatar padlex avatar rainrat avatar stepmat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ludii's Issues

Ludii - Analysis metric outputing conflicting numbers with swap rules

Hello, I'm currently conducting some experiments on the game Hex using the "Evaluation Dialog" and I noticed that when I allow swap rules, the Player 1 win rate and AdvantageP1 numbers do not match and Balance also doesn't reflect the reported win rates at times. Here is the console output for an experiment on 100 trials, with no timeouts and no draws, using MC-GRAVE AI agent:

Analysing Hex [Board Size/11x11, Swap Rules/On, End Rules/Standard]

Please don't touch anything until complete!
Generating trials:
....................................................................................................
Calculating metrics:
AdvantageP1
Balance
Completion
Drawishness
Timeouts
Board Coverage Default
Decisiveness Moves
Ideal Duration

Agent type: MC-GRAVE
Draw likelihood: 0%
Timeout likelihood: 0%
Average number of moves per game: 30.76
Player 1 win rate: 58%
Player 2 win rate: 42%

AdvantageP1: 0.56 (weight: 1.0)
Balance: 0.88 (weight: 1.0)
Completion: 1 (weight: 1.0)
Drawishness: 0 (weight: 1.0)
Timeouts: 0 (weight: 1.0)
Board Coverage Default: 0.25405 (weight: 1.0)
Decisiveness Moves: 0.42 (weight: 1.0)
Ideal Duration: 0.43987 (weight: 1.0)
Final Score: 3.55391

When I look into EvaluateGame function, the win rate is calculated using "RankUtils.agentUtilities(context);" where it is explicitly checked if players swapped positions, but metrics for Advantage and Balance are calculated using "trial.status().winner()" with no further checks. If the winner is wrongly attributed to a player index before the swap, this would explain this discrepancy.

I'm not that well versed in Java and maybe I overlooked something, but can you please check my findings? The problem is reproducible on Ludii-1.2.8 and a version close to the current master.

Thank you,

David

Choice of Licensing

It's been a long time since I have seen code licensed as Creative Commons, much less Non-Commercial, much less No Derivatives. What was the reasoning behind the licensing? This basically means one cannot even fork Ludii, yes? The closest forum post I could find is #150, but that still doesn't answer my question.

Argument labels in nested symbols

This extract is from Mweiso.lud

and {
    if:(if ("SameTurn")
        (< 0 (count at:(from)))
        (< 1 (count at:(from)))
    )
    (is In (from) (sites {(mapEntry "LeftMostOuter" Mover) (mapEntry "SecondLeftInner" Mover)}))
    (is In ("NextHole" (from) "TrackCW" (count at:(from))) (sites Mover "Inner"))
    (is Occupied ("OppositePit" ("NextHole" (from) "TrackCW" (count at:(from)))))
    (is Occupied ("OppositeOuterPit" ("NextHole" (from) "TrackCW" (count at:(from)))))
}

Is the if: label intentional in if:(if ("SameTurn")? I'm struggling to grasp why a label might be in an array. The game compiles just fine without it and, as far as I can tell, plays identically.

If it was a mistake I can make a pull request to remove every occurance

Taikyoku shogi: Dog's move is incorrect

The Dog piece as shown on the English Wikipedia moves to either one of the three forward squares.
But it appears the Dog pieces in front of the pawns are either Left Dog or Right Dog, so they will need to be changed to a regular Dog.

Unexpected Symbol::returnType behaviour

Grammar.grammar().symbols() does not contain the Step symbol's returnType.

For example

Symbol moveStepType = Grammar.grammar().symbolsByName("MoveStepType").get(0);
Symbol step = Grammar.grammar().symbolsByName("Step").get(2);
List<Symbol> symbols = Grammar.grammar().symbols();
System.out.println("is " + moveStepType + " in the grammar? " + symbols.contains(moveStepType));
System.out.println("is " + step.returnType() + " in the grammar? " + symbols.contains(step.returnType()));

System.out.println("disambiguation " + step.returnType().disambiguation(moveStepType));

System.out.println(moveStepType.info());
System.out.println(step.returnType().info());

Returns

is <moveStepType> in the grammar? true
is <moveStepType> in the grammar? false
disambiguation null
~~~~ <moveStepType> name=MoveStepType type=Structural (game.rules.play.moves.decision.MoveStepType) => <moveStepType>, pack=game.rules.play.moves.decision, label=moveStepType, cls=game.rules.play.moves.decision.MoveStepType, keyword=moveStepType, atomic=MoveStepType, atomic path=game.rules.play.moves.decision.MoveStepType
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "main.grammar.Symbol.name()" because "this.atomicLudeme" is null
	at main.grammar.Symbol.info(Symbol.java:1085)
	at approaches.random.GeneratorNode.main(GeneratorNode.java:64)

I had expected step.returnType() to equal moveStepType. However, it instead returns a new symbol which has the same name but is not present in Grammar.grammar().symbols(). Is this intended behaviour? And is it okay that step.returnType().info() crashes?

Assuming it's all correct. What would be the best way to find the "real" symbol from the return type?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.