[PYTHON] Deep Learning on Mac and Google Colab Words Learned with Shogi AI

TOP PAGE

shogi.BB_SQUARES [0b000 ・ ・ ・ 0001, 0b000 ・ ・ ・ 0010, 0b000 ・ ・ ・ 0100, ・ ・ ・, 0b100 ・ ・ ・ 0000]. 81 elements.

shogi.COLORS Range (0, 2). 0,1.

shogi.CSA.Parser.parse_file(filepath) It is converted from a CSA file to a dictionary with four keys: names, sfen, moves, and win. This dictionary is included in the list as an element. If you add [0] after (filepath), you can retrieve only the dictionary.

shogi.PIECE_TYPES_WITH_NONE Range (0, 16). 0,1, ..., 15.0 is blank, and 1 and later indicate the type of piece.

shogi.MAX_PIECES_IN_HAND [0, 18, 4, 4, 4, 4, 2, 2, 0, 0, 0, 0, 0, 0, 0]. The meaning of the number of pieces you have. Indexes 1-7 probably look like this: shogi.MAX_PIECES_IN_HAND [1] = 18: Ayumu shogi.MAX_PIECES_IN_HAND [2] = 4: Lance shogi.MAX_PIECES_IN_HAND [3] = 4: Keima shogi.MAX_PIECES_IN_HAND [4] = 4: Silver shogi.MAX_PIECES_IN_HAND [5] = 4: Fri shogi.MAX_PIECES_IN_HAND [6] = 2: Corner shogi.MAX_PIECES_IN_HAND [7] = 2: Rook

shogi.SQUARES Range (0, 81).

Move class

from_square A variable that represents the movement source when the board surface is represented by a numerical value from 0 to 80. The quotient when divided by 9 is the y coordinate, and the remainder is the x coordinate. The xy coordinate is 0 origin.

x coordinate
0   1   2   3   4   5   6   7   8

0 1 2 3 4 5 6 7 8 0 y coordinates
9   10  11  12  13  14  15  16  17      1
18  19  20  21  22  23  24  25  26      2
27  28  29  30  31  32  33  34  35      3
36  37  38  39  40  41  42  43  44      4
45  46  47  48  49  50  51  52  53      5
54  55  56  57  58  59  60  61  62      6
63  64  65  66  67  68  69  70  71      7
72  73  74  75  76  77  78  79  80      8

to_square Same as above (destination).

Board class

A class that represents an aspect. By the way, you can display the board in two dimensions with print (board).

piece_bb An array of 15 elements. Each element indicates the arrangement of each piece. 0: blank, 1: step, 2: incense, ... bit board. The bit board is as follows. Each element is a decimal number display of 81 digits (= 81 squares) in binary (that is, bit board). If you want to display 81 decimal digits, you can print ('{: 0 = 81b}'. format (decimal value)).

occupied An array of two elements. Each element is the position of the piece occupied by the first move and the second move. bit board.

pieces_in_hand An array of two elements. Each element is a dictionary type that shows which piece (= key) and how many pieces (= value) the first move and the second move have.

Recommended Posts

Deep Learning on Mac and Google Colab Words Learned with Shogi AI
Deep Learning with Shogi AI on Mac and Google Colab
Deep Learning with Shogi AI on Mac and Google Colab Chapter 11
Deep Learning with Shogi AI on Mac and Google Colab Chapters 1-6
Deep Learning with Shogi AI on Mac and Google Colab Chapter 7
Deep Learning with Shogi AI on Mac and Google Colab Chapter 10 6-9
Deep Learning with Shogi AI on Mac and Google Colab Chapter 10
Deep Learning with Shogi AI on Mac and Google Colab Chapter 7 5-7
Deep Learning with Shogi AI on Mac and Google Colab Chapter 9
Deep Learning with Shogi AI on Mac and Google Colab Chapter 12 1-2
Deep Learning with Shogi AI on Mac and Google Colab Chapter 12 3
Deep Learning with Shogi AI on Mac and Google Colab Chapter 12 3 ~ 5
Deep Learning with Shogi AI on Mac and Google Colab Chapter 7 9
Deep Learning with Shogi AI on Mac and Google Colab Chapter 8 5-9
Deep Learning with Shogi AI on Mac and Google Colab Chapter 8 1-4
Deep Learning with Shogi AI on Mac and Google Colab Chapter 12 3
Deep Learning with Shogi AI on Mac and Google Colab Chapter 7 8
Deep Learning with Shogi AI on Mac and Google Colab Chapter 7 1-4
Learn with Shogi AI Deep Learning on Mac and Google Colab Use Google Colab
About learning with google colab
Steps to quickly create a deep learning environment on Mac with TensorFlow and OpenCV
Play with Turtle on Google Colab
Use MeCab and neologd with Google Colab
Deep Learning from scratch-Chapter 4 tips on deep learning theory and implementation learned in Python
Deep Learning from scratch The theory and implementation of deep learning learned with Python Chapter 3
"Learning word2vec" and "Visualization with Tensorboard" on Colaboratory
Install selenium on Mac and try it with python
Deep learning image analysis starting with Kaggle and Keras
Extract music features with Deep Learning and predict tags
[AI] Deep Metric Learning
What I learned about AI and machine learning using Python (4)
Recognize your boss and hide the screen with Deep Learning
An error that stumbled upon learning YOLO on Google Colab
Machine learning environment settings based on Python 3 on Mac (coexistence with Python 2)
HIKAKIN and Max Murai with live game video and deep learning
Easy deep learning web app with NNC and Python + Flask
Machine learning learned with Pokemon
Try deep learning with TensorFlow
Deep Kernel Learning with Pyro
Try Deep Learning with FPGA
Catalina on Mac and pyenv
Generate Pokemon with Deep Learning
Create AtCoder Contest appointments on Google Calendar with Python and GAS
Build a Python environment on your Mac with Anaconda and PyCharm
How to run Jupyter and Spark on Mac with minimal settings
The strongest way to use MeCab and CaboCha with Google Colab
Install lp_solve on Mac OS X and call it with python.