Coder Social home page Coder Social logo

connect3-qlearn's Introduction

Creating Q Table

  • 先手と後手両方のQテーブルを作る

先手:

L C R
1
2
3
4
5

後手:

L C R
1
2
3
4
5

-> 縦の長さはどうなるか? 左右対称を同一局面として考えると、Qテーブルの長さを減らせる。

$$ Q(x_t, a), + \max _ a Q(x_{t+1}, a) $$

Simulate board options

可能な盤面の組み合わせを生成する

$ pip install -r requirements.txt
$ python3 util/simulateBoard.py

pseudo code

先手盤のQテーブル

ランダムに盤面を選択する そこから期待利益が最大のものを選ぶ(イコールであればランダム) 盤面変化ー>

後手盤のQテーブルに移動 後手盤の期待利益が最大のものを選ぶ(イコールであればランダム) 盤面変化ー>

先手盤のQテーブルに移動

->ゲーム終了 リワードを割り引いて,遡ってQテーブルの選択肢にフィードバック

注意 penalize or rule out impossible moves (when a column is full)

save Qtable as csv

References

https://colab.research.google.com/drive/1N9CuTjHRZt27sbaMHEL3x4aTgn6AVY8F?usp=sharing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.