Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[囲碁] 地の判定、報酬計算 #25

Closed
OkanoShinri opened this issue Sep 8, 2022 · 5 comments
Closed

[囲碁] 地の判定、報酬計算 #25

OkanoShinri opened this issue Sep 8, 2022 · 5 comments

Comments

@OkanoShinri
Copy link
Collaborator

OkanoShinri commented Sep 8, 2022

環境を作る以上正しく報酬を返さなければならない。

現実の囲碁は

  • 終了条件が「両者のパス」であり、将棋やチェスのようにこうしたら勝ちというものではない
  • 駄目の存在により、盤の空点全てが地になっていなくても終局する(終局の判定が人間任せ)
  • すなわち互いに合意するまで対局が続く

今回のシミュレータでは、ひとまず

  • 両者がパスしたら終局(シミュレータ側で終局の判定はしない)
  • 終局したら盤面の地を数える
  • 「地-アゲハマ」が大きい方が勝ち

として進めたいと思います。
報酬はとりあえず勝った方を+100, 負けた方を-100勝った方を+1, 負けた方を-1としておきます。

@sotetsuk
Copy link
Owner

sotetsuk commented Sep 8, 2022

1/-1で!

@OkanoShinri
Copy link
Collaborator Author

#21 (comment)
_is_surrounded_v2()は地のカウントにも使える利点があるので、_is_surrounded()を削除し、_is_surrounded_v2()_is_surrounded()にリネームします

@OkanoShinri
Copy link
Collaborator Author

@sotetsuk
step()を実行したときに返される報酬は

  • その行動をしたプレイヤーの報酬(整数値)
  • [先手の報酬, 後手の報酬]のリスト

のどちらが良いでしょうか?
囲碁は2回パスで終局になるので、前者だと2回目のパスをしたプレイヤーの報酬しか分からない気がしたのです

@sotetsuk
Copy link
Owner

んーたしかに悩ましいですね。一旦リストで返しておきますか!@OkanoShinri

@sotetsuk
Copy link
Owner

Ndarrayにしておきましょう

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants