Ludii Forum
Export Forest Structure of Concepts - Printable Version

+- Ludii Forum (
+-- Forum: Questions (
+--- Forum: About the Ludii Grammar (
+--- Thread: Export Forest Structure of Concepts (/showthread.php?tid=865)

Export Forest Structure of Concepts - fkresse - 03-11-2022


is there a way to export the concepts contained in .lud file in a graph structure? I think I figured out how to export the concepts (with help of the utils.concepts in the 'mining' folder). However, is there also a way to export them together with their graph structure? My current goal is generating games with a simple markov chain instead of the currently implemented random generation approach.

Hence, I would like to export the underlying graphs of all games, estimate probabilities of following nodes from those and apply the model at generation time.

If you have any other tips/pointers I would be grateful! (I already had a look at the Generation folder)

Thanks a lot!

RE: Export Forest Structure of Concepts - Eric Piette - 03-14-2022


I am not 100% sure of your request. What do you mean by the concepts in a graph structure?
Ludii can provide to you the topology (so including the graph and the relations of each element of the graph) for any game board and as you probably figured you can get the concepts of each game, but what would be the relations between the graph and the concepts here that you want to obtain?


RE: Export Forest Structure of Concepts - abbeymeeson - 06-14-2023

Hi, you can export the graph structure of the concepts contained in the .lud file using the LUIS CLI tool. The LUIS CLI tool provides a command called "luis export graph" which exports the graph structure of the LUIS app to a .json file. You can then use this file to create a markov chain for generating games. Here's an example command to export the graph structure for a LUIS app:

luis export graph --appId <appId> --versionId <versionId> --out <outputFilePath>

Replace <appId> with the ID of your LUIS app, <versionId> with the version of the app you want to export, and <outputFilePath> with the path where you want to save the exported graph file.

Once you have the graph structure in a JSON format, you can use any programming language of your choice to create a Markov chain using the graph and generate games.