{"id":27063833,"url":"https://github.com/rvalla/rpp-simulation","last_synced_at":"2025-07-25T20:10:39.780Z","repository":{"id":79186092,"uuid":"317898996","full_name":"rvalla/RPP-simulation","owner":"rvalla","description":"A software to simulate Rock, Paper \u0026 Probabilities game.","archived":false,"fork":false,"pushed_at":"2020-12-10T19:14:04.000Z","size":4350,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-29T20:24:49.858Z","etag":null,"topics":["probability","python3","simulation"],"latest_commit_sha":null,"homepage":"https://rodrigovalla.gitlab.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rvalla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-12-02T15:05:48.000Z","updated_at":"2020-12-10T19:14:08.000Z","dependencies_parsed_at":"2023-03-01T12:30:45.892Z","dependency_job_id":null,"html_url":"https://github.com/rvalla/RPP-simulation","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"86b3f10be2de536d1030536d70a08a906c330368"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvalla%2FRPP-simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvalla%2FRPP-simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvalla%2FRPP-simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvalla%2FRPP-simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvalla","download_url":"https://codeload.github.com/rvalla/RPP-simulation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247368707,"owners_count":20927910,"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":["probability","python3","simulation"],"created_at":"2025-04-05T16:35:15.926Z","updated_at":"2025-04-05T16:35:16.435Z","avatar_url":"https://github.com/rvalla.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![icon](https://gitlab.com/matedulab/rpp-simulation/-/raw/master/assets/img/icon_64.png)\n\n# Rock, Paper \u0026 Probabilities\n\nHere is a software written in *python* to simulate the game **Rock, Paper \u0026 Probabilites**, a game we use to\nintroduce probability related concepts in mid-school classes. This tool may be useful to think about randomness\nand how it affects the matches result.\n\n### the game\nTwo special dices are designed. They have rocks, papers and scissors in their faces. You roll the dices then.\nThe output face of a dice is selected randomly, but the odds can be on your side.\n\n### the simulations\nYou need **python3** and **pandas** and **matplotlib** libraries to run this software. Then, from the folder where\nyou copied the files simply run:\n\n```python\nfrom ppp import PPP\ng = PPP(\"pathtojson/config.json\")\n```\n\nYou can configure the simulations trough a *.json* file which fields are:\n\n- **dPath**: the folder to save data *.csv* files in.\n- **cPath**: the folder to save chart *.png* files in.\n- **name**: the base name for the output files.\n- **language**: the language to use in the charts (English or Spanish).\n- **iterations**: number of iteration for this simulation.\n- **rollcount**: number of dice rolls in each iteration.\n- **matchsize**: the number of rolls in a match.\n- **discardtieds**: to decide if you want to discard tied rolls in match results.\n- **computerdice**: the faces for the computer's dice.\n- **playerdice**: the faces for the player's dice.\n\n\n```json\n{\n\t\"dPath\": \"data/\",\n\t\"cPath\": \"charts/\",\n\t\"name\": \"testing\",\n\t\"language\": \"spanish\",\n\t\"iterations\": 3,\n\t\"rollcount\": 50,\n\t\"matchsize\": 7,\n\t\"discardtieds\": true,\n\t\"computerdice\": \"rock,rock,paper,paper,paper,scissors\",\n\t\"playerdice\": \"paper,paper,paper,paper,scissors,rock\"\n}\n```\n\n### the charts\nThe results of a simulation are automatically plotted to make reading the data an easy task. The charts are:\n\n- **history**: the history or won, lost and tied rolls in each iteration.\n- **difference**: won - lost rolls evolution in each iteration.\n- **proportion**: the actual ratio of won, lost and tied rolls.\n- **rolls and matches**: bar charts of rolls and matches total results.\n\n![charts](https://gitlab.com/matedulab/rpp-simulation/-/raw/master/assets/img/charts.png)\n\nYou can play on your own [here](https://matedulab.gitlab.io/scripts/ppp.html?lan=eng).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvalla%2Frpp-simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvalla%2Frpp-simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvalla%2Frpp-simulation/lists"}