{"id":15360467,"url":"https://github.com/zgana/othello","last_synced_at":"2025-06-27T08:37:42.256Z","repository":{"id":151455869,"uuid":"226610724","full_name":"zgana/othello","owner":"zgana","description":"Basic text-only implementation of Othello/Reversi.","archived":false,"fork":false,"pushed_at":"2021-09-06T14:14:06.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-27T21:33:11.420Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/zgana.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":"2019-12-08T03:49:20.000Z","updated_at":"2021-09-06T14:14:09.000Z","dependencies_parsed_at":"2023-05-23T09:15:23.556Z","dependency_job_id":null,"html_url":"https://github.com/zgana/othello","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"85a81d1d2190e29d58782d59345455497a2902e6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgana%2Fothello","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgana%2Fothello/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgana%2Fothello/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgana%2Fothello/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zgana","download_url":"https://codeload.github.com/zgana/othello/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239530162,"owners_count":19654242,"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-10-01T12:50:10.109Z","updated_at":"2025-02-18T18:43:12.073Z","avatar_url":"https://github.com/zgana.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# othello.py\n\nBasic text-only implementation of Othello/Reversi.\n\n## Two-player mode\n\nNo arguments are required.  'O' goes first.  Moves are input in the format\n`[row][column]` or `[column][row]`, i.e. row letter and column number.  Spaces\nare allowed but have no effect.\n\n    $ ./othello.py\n\n    --------------------------\n    O: 2                  X: 2\n    --------------------------\n    a ( )( )( )( )( )( )( )( )\n    b ( )( )( )( )( )( )( )( )\n    c ( )( )( )( )( )( )( )( )\n    d ( )( )( )(x)(o)( )( )( )\n    e ( )( )( )(o)(x)( )( )( )\n    f ( )( )( )( )( )( )( )( )\n    g ( )( )( )( )( )( )( )( )\n    h ( )( )( )( )( )( )( )( )\n       1  2  3  4  5  6  7  8\n    O =\u003e e6\n\n    --------------------------\n    O: 4                  X: 1\n    --------------------------\n    a ( )( )( )( )( )( )( )( )\n    b ( )( )( )( )( )( )( )( )\n    c ( )( )( )( )( )( )( )( )\n    d ( )( )( )(x)(o)( )( )( )\n    e ( )( )( )(o)(o)(o)( )( )\n    f ( )( )( )( )( )( )( )( )\n    g ( )( )( )( )( )( )( )( )\n    h ( )( )( )( )( )( )( )( )\n       1  2  3  4  5  6  7  8\n    X =\u003e 6 f\n\n    --------------------------\n    O: 3                  X: 3\n    --------------------------\n    a ( )( )( )( )( )( )( )( )\n    b ( )( )( )( )( )( )( )( )\n    c ( )( )( )( )( )( )( )( )\n    d ( )( )( )(x)(o)( )( )( )\n    e ( )( )( )(o)(x)(o)( )( )\n    f ( )( )( )( )( )(x)( )( )\n    g ( )( )( )( )( )( )( )( )\n    h ( )( )( )( )( )( )( )( )\n       1  2  3  4  5  6  7  8\n\n    [...]\n\n\n## Computer player\n\nNaive (minimal look-ahead) computer players are implemented.  The computer can\nstand in for player 'O', player 'X', or both.  There are several options that\nhave been only just barely tested:\n\n    $ ./othello.py --rand-X         # choose randomly from legal moves\n    $ ./othello.py --best-X         # flip as many pieces as possible\n    $ ./othello.py --skill-X=1.0    # tune preference for large flip counts\n\nThe latter option produces random move selection based on `n_flips**skill`,\nwhere `skill` is a non-zero float.  I haven't yet performed any statistical\nanalyses to determine the relative performance of these various settings.\n\nHere's one example of a computer-vs-computer match and the resulting final\nstate:\n\n    $ ./othello.py --best-O --rand-X\n\n    [...]\n\n    --------------------------\n    O: 42                X: 22\n    --------------------------\n    a (x)(x)(x)(o)(o)(o)(o)(o)\n    b (x)(x)(x)(x)(o)(o)(o)(x)\n    c (x)(x)(o)(o)(o)(o)(x)(o)\n    d (o)(x)(o)(o)(o)(x)(o)(o)\n    e (o)(x)(o)(o)(x)(x)(o)(o)\n    f (o)(x)(o)(x)(x)(o)(o)(o)\n    g (o)(x)(x)(o)(o)(o)(o)(o)\n    h (o)(x)(o)(o)(o)(o)(o)(o)\n       1  2  3  4  5  6  7  8\n    No legal moves remain!\n    Player \"O\" wins by 42 - 22.\n\n\n## TODO\n\nKnown TODO items include:\n\n* Decouple game state engine from presentation — alternative UIs could include\n  curses, PyQt/PyGTK, some kinda website, etc.\n\n* Store game history and provide interface for saving the logs to disk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzgana%2Fothello","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzgana%2Fothello","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzgana%2Fothello/lists"}