{"id":22288701,"url":"https://github.com/heziode/tron-multiplayer","last_synced_at":"2025-03-25T21:20:08.595Z","repository":{"id":95101104,"uuid":"93935872","full_name":"Heziode/tron-multiplayer","owner":"Heziode","description":"A Tron version for AI experiments (no GUI)","archived":false,"fork":false,"pushed_at":"2017-06-17T14:49:45.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T18:38:42.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Heziode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-10T11:49:48.000Z","updated_at":"2017-06-10T14:06:51.000Z","dependencies_parsed_at":"2023-03-09T11:00:25.675Z","dependency_job_id":null,"html_url":"https://github.com/Heziode/tron-multiplayer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heziode%2Ftron-multiplayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heziode%2Ftron-multiplayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heziode%2Ftron-multiplayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heziode%2Ftron-multiplayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Heziode","download_url":"https://codeload.github.com/Heziode/tron-multiplayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245543426,"owners_count":20632648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T17:06:34.010Z","updated_at":"2025-03-25T21:20:08.585Z","avatar_url":"https://github.com/Heziode.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coalitions of artificial intelligence for the game Tron\n\nThis project was designed for a university project.\n\nThe objective of this project it's to determine if exist in configuration who a player can win against a coalition of other players.\n\n \u003e This project is basically designed for a \"statistical study\". It is built to be run easily from a script. **There is no GUI**\n \u003e\n \u003e **This project is designed to run on Linux and require JavaFX.**\n\nFor this project, I implemented the Paranoid algorithm, a multiplayer variant (more than two players) of MinMax. It assumes that all players form a coalition against a single player:\n\n```\nAlgorithm paranoid (ei,d)\nif d = 0 then\n    return f(ei)\nelse\n    if ei is a player node then\n        m ← −∞\n        for all ej ∈ successors(ei) do\n            m ← max(m, paranoid(ej,d−1))\n        end for\n    else\n        m ← +∞\n        for all ej ∈ successors(ei) do\n            m ← min(m, paranoid(ej,d−1))\n        end for\n    end if\n    return m\nend if\n```\n\n\n\n## Build project\n\n```\ngit clone https://github.com/Heziode/tron-multiplayer.git\ncd tron-multiplayer\nant\n```\n\n\n\n## VM parameters\n\nMandatory :\n\n- tron.coal : integer value (separated by spaces): depth of calculation of each player coalitions\n- tron.nbCoal : integer value (separated by spaces): number of players in each coalition\n\nOptional :\n\n- tron.gridSize : integer value: grid size (square grid), by default, randomly depending on the number of players\n- tron.gui : boolean, true or false: indicates whether the program should be started with or without GUI (True by default)\n- tron.ptrace : boolean (false by default): true to save the paranoid calculation tree in DOT, false otherwise\n- tron.player.order : integer value (separated by spaces): order of the players by coalitions (eg 0 1 0 2 = place one first of a coalition player 0, then a coalition player 1, etc.)\n- tron.player.position : integer value (0 default): position (in the player list) of the first player to play.\n- tron.player.shift : integer value (0 by default): shifts the location of the first player to the grid border\n- tron.player.location : integer pair (separated by spaces): coordinates \"x,y\" of each player\n- tron.result : boolean (false by default): true to save the result of the game to a file (in CSV format), false otherwise\n- tron.result.name : string: name of the result file. The default is a random UUID (Universally Unique IDentifier).\n- tron.random : boolean (false by default): true to enable player placement, grid size and first player to play randomly\n- tron.result.print : boolean (false by default): true to display the result of the part (at the CSV foramt) in the terminal, false otherwise\n\nExemple : **java -jar -Dtron.gui=false -Dtron.coal=\"5 3\" -Dtron.nbCoal=\"1 2\" -Dtron.gridSize=7 Tron_Multiplayer.jar**\n\nThis will launch a game without a graphical use interface (GUI) and a solo player with a depth of calculation of 5 against a coalition of 2 players with a depth of calculation of 3 on a grid of 7 by 7.\n\n## Export results of a game in CSV format\n\nIt is possible to export the result of a game in a CSV format using the parameter:\n\n`-Dtron.result=true`\n\nThe only separator character used is the comma: **,**\n\n\u003e   Results are saved only in non-GUI mode\n\nThe export format obtained is as follows (with an example of result in the second line):\n\n| Size of the grid | Winning coalition | Number of strokes | First player index | Total number of players | Number of coalitions | Location of players at the start | Number of players per coalition | Research depth of coalitions |\n| :--------------: | :---------------: | :---------------: | :----------------: | :---------------------: | :------------------: | :------------------------------: | :-----------------------------: | :--------------------------: |\n|        7         |         1         |        37         |         0          |            3            |          2           |      \\[0;0\\] \\[6;2\\]\\[2;6\\]      |               1 2               |             5 3              |\n\n\n\n## Export Paranoid calculation\n\nIt is possible to export in DOT language the calculations made by paranoid to each stroke using the parameter:\n\n`-Dtron.ptrace=true`\n\n\n\n\u003e   It is possible to generate SVG to visualize the DOT language. This requires, on the other hand, to have the utility **dot**\n\n\n\nYou can use the **toDot.sh** script to generate them. It assumes that the files are located in a subdirectory **paranoid_traceback**.\n\n![](https://rawgit.com/Heziode/tron-multiplayer/master/ressources/cb3400af-99bf-4c05-b14b-ddf5fd160133-0-0_paranoid.svg)\n\nLegend:\n\n-   **V**: Square visited by a player\n-   **J**: Square occupied by a player\n-   **T**: Square belonging to the territory of a player\n-   **B**: Square blocked, which is and will never be accessible during the game\n-   **R**: Value of this state of games according to the player who plays at *node0*\n-   **node**: the node numbers are given according to the paranoid calculation order\n-   **Red arrow**: best solution found by paranoid\n-   **MAX**|**MIN**: indicates whether the node takes the maximum or minimum value of its wires\n\n## Massive execution\n\nYou can make mass executions of the program through the script contained in the script directory. \n\n\u003e    Scripts are written in JavaScript and require Node.js\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheziode%2Ftron-multiplayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheziode%2Ftron-multiplayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheziode%2Ftron-multiplayer/lists"}