https://github.com/stypox/beggar-my-neighbour
This program looks for an infinite game of the completely random card game "Beggar My Neighbour". https://en.wikipedia.org/wiki/Beggar-my-neighbour
https://github.com/stypox/beggar-my-neighbour
beggar beggar-my-neighbour card card-game cardgame game infinite my neighbour permutation series
Last synced: 20 days ago
JSON representation
This program looks for an infinite game of the completely random card game "Beggar My Neighbour". https://en.wikipedia.org/wiki/Beggar-my-neighbour
- Host: GitHub
- URL: https://github.com/stypox/beggar-my-neighbour
- Owner: Stypox
- Created: 2018-03-24T13:10:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-31T14:35:55.000Z (about 6 years ago)
- Last Synced: 2025-02-08T20:47:33.735Z (2 months ago)
- Topics: beggar, beggar-my-neighbour, card, card-game, cardgame, game, infinite, my, neighbour, permutation, series
- Language: C++
- Homepage:
- Size: 29.3 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This project contains an algorithm that, given the cards of two players, calculates how many rounds it took a player to win the game. Basically, the algorithm simulates a two-players [Beggar-My-Neighbour](https://en.wikipedia.org/wiki/Beggar-my-neighbour) game.
I want to find an infinite game: this happens when, after some rounds, the deck of both players is equal to the one they had at the start. But since there are [~10^20 possible games](https://math.stackexchange.com/questions/2688331/beggar-my-neighbour-possible-games), I can't test all of them, so I want to use evolution to get longer games and maybe find an infinite one[The file management library I use](https://github.com/Stypox/file-management)