Othello game development made with Python

Introduction

I developed an Othello game using Python. Anyone can play easily

github page https://github.com/chihina/othello-game-python

top_resized.png

Development environment

python3.7.1 For others, check requirement.txt on the following github page. https://github.com/chihina/othello-game-python

Until the game starts

First, do a git clone with the following command.

git clone https://github.com/chihina/othello-game-python.git

Next, install the libraries in bulk with the following command.

pip -r install requirement.txt

This is the end of environment construction. It's easy. The game starts with the following command. Please play it !!

python game.py

Game commentary

Battle mode

We have implemented the following three battle modes. --Human vs Human --Human vs CPU --CPU vs CPU (computer vs computer)

In the top two modes, you can choose first or second.

CPU type

The computer has implemented three strengths. --Weak (weak) --Little strong --Strong

The following describes how to implement the computer.

Weak (weak)

Randomly decide which move to take from the available moves. In short, I'm choosing a hand for texto.

Little strong

In Othello, it is said that taking four corners is strong (generally). In other words, if you do not hit your own frame in the red frame of the image below, you will not be taken against the four corners. Therefore, I implemented it so as not to hit my own frame in the red frame of the image below. top_resized - コピー.png

Strong

Use the static evaluation value of Othello obtained from the following website. https://uguisu.skr.jp/othello/5-1.html

Use this static evaluation value to determine the move. value.png

Battle simulation results

The simulation results of the three CPUs are shown below. result.png

You can see that the winning percentage comes out in the order of strength. You can see how important corners are in Othello.

Afterword

We've only implemented a simple CPU here. Possible future possibilities include determining the hand by reading a few moves and determining the hand using machine learning. If you have any advice, I would appreciate it if you could comment !!

github page https://github.com/chihina/othello-game-python

References How to make Othello (reversi) (algorithm) -Evaluation by stone position- (2020/3/13 access) https://uguisu.skr.jp/othello/5-1.html

Recommended Posts

Othello game development made with Python
Othello made with python (GUI-like)
I made a roguelike game with Python
Othello app (iOS app) made with Python (Kivy)
I made a bin picking game with Python
I made blackjack with python!
I made blackjack with Python.
I made wordcloud with Python.
I made a Christmas tree lighting game with Python
I made a simple typing game with tkinter in Python
SNS Python basics made with Flask
Tank game made with python About the behavior of tanks
Numer0n with items made in Python
I made a fortune with Python.
Life game with Python! (Conway's Game of Life)
I made a puzzle game (like) with Tkinter in Python
Prepare Python development environment with Atom
I made a daemon with Python
Application development with Docker + Python + Flask
Sugoroku game and addition game with python
Life game with Python [I made it] (on the terminal & Tkinter)
I made a poker game server chat-holdem using websocket with python
Let's make a shiritori game with Python
[Development environment] Python with Xcode [With screen transition]
I made Othello to teach Python3 to children (4)
Simple Slack API client made with Python
HTTP split download guy made with Python
I made a character counter with Python
I made Othello to teach Python3 to children (2)
I made Othello to teach Python3 to children (5)
I made a Hex map with Python
I made a life game with Numpy
Serverless face recognition API made with Python
I made Othello to teach Python3 to children (3)
I made Othello to teach Python3 to children (1)
I made a simple blackjack with Python
I made a configuration file with Python
I made a neuron simulator with Python
Statistics with python
Python with Go
Twilio with Python
Integrate with Python
Play with 2016-Python
AES256 with python
Tested with Python
python starts with ()
with syntax (Python)
Bingo with python
Zundokokiyoshi with python
Excel with Python
Microcomputer with Python
Cast with python
[Python] Python and security-② Port scanning tool made with Python
I made a competitive programming glossary with Python
I made a weather forecast bot-like with Python.
I made a GUI application with Python + PyQt5
[Python] Make a game with Pyxel-Use an editor-
Build Python development environment with Visual Studio Code
Python Web Content made with Lolipop cheap server
I made a Twitter fujoshi blocker with Python ①
I want to make a game with Python