TableOfContent |
์ฃผ์ ¶
๊ฐ๋จ Othello AI ๋ง๋ค์ด๋ณด๊ธฐ
์์ ¶
- ๊ฐ๋จ Othello ๋ฃฐ์ ๋ํ ์ค๋ช
- 1์ฐจ ๊ตฌํ
- approach : state machine
- approach : minimax
ํ ๊ตฌ์ฑ ¶
2-3๋ช
๋น 1ํ์ผ๋ก. ํ ๋ด์๋
ํน์, ๊ตฌํ ์์ฒด๊ฐ ๊ฐ๋จํ๋ฏ๋ก ๊ฐ๋จํ ๋ฌธ๋ฒ์ ๋์๋ฐ์์ ํ๋ก๊ทธ๋๋ฐ ์งํํด๋ ์ข์
- ํ์ด์ฌ ํ๋ก๊ทธ๋๋ฐ ๊ฐ๋ฅํ ์ฌ๋ 1๋ช
์ด์
- ์ค๋ธ๋ก ๊ฒ์์ ์๋ ์ฌ๋์ด 1๋ช
์ด์
์ด์ฉ ํด๋ค(์ค์นํ ๊ฒ) ¶
์ฃผ์ ํด๋์ค ¶
class Board
getPutableList(self,aStone)
count(self,aStone)
isPutable(self, aCol, aRow, aStone)
tsGameOver(self)
class Player
ํด๋น ๋ ์์ ๋ํ ๋์ ์ ์๋ ์์น๋ค ํฐํ๋ค์ ์ค๋ค
(col,row)๋ค ๋ฆฌ์คํธ
(col,row)๋ค ๋ฆฌ์คํธ
count(self,aStone)
ํด๋น ๋ ์์ ์ผ๋ค
isPutable(self, aCol, aRow, aStone)
ํด๋น ๋ ์์ผ ํด๋น ์์น์ ๋์ ์ ์๋์ง ์ฌ๋ถ ํ
์คํธ(true/false)
tsGameOver(self)
๊ฒ์ ์ข
๋ฃ ์กฐ๊ฑด ์ํ์ ๋๋ฌํ๋์ง์ ๋ํ ์ฌ๋ถ
name(self)
put(self)
isPutable(self,aCol,aRow)
getStoneColor(self)
getPutableList(self)
ํด๋น ํ๋ ์ด์ด์ ์ด๋ฆ์ ๋ํ๋
put(self)
์ค์ ๋์ ๋์
isPutable(self,aCol,aRow)
์๊ธฐ ์์ ์ด ๋์ ์ ์๋ ์์น์ธ์ง์ ๋ํ ์ฌ๋ถ ์ฒดํฌ
getStoneColor(self)
์์ ์ ๋ ์์ ๋ํด ์คํธ๋ง์ ๋ฆฌํด
getPutableList(self)
ํด๋น ํ๋ ์ด์ด๊ฐ ๋์ ์ ์๋ ์์น๋ค์ ๋ํ ๋ฆฌ์คํธ๋ฅผ ์ป์ด์ด.
1 minute tutorial ¶
๊ธฐ๋ณธ ๋ผ๋ ¶
~cpp from Player import Player class DefaultComputerPlayer(Player): def __init__(self,aStone, aBoard): Player.__init__(self, aStone, aBoard) def name(self): return "MyName~" def execute(self): putableList = self.getPutableList() posX,posY = putableList[0] return self.put(posX,posY)
Evaluator interface ¶
~cpp from evaluator import Evaluator class SimpleEvaluator(Evaluator): def __init__(self,aBoardSize=8): Evaluator.__init__(self,aBoardSize) # ํด๋น ํ์ ๋ํด ํ๊ฐํ๋ ํจ์ # stone ์ ๋ํด์ ์ด ํ์ด ๋ช์ ์ง๋ฆฌ ํ์ธ์ง์ ๋ํด ์ ์๋ฅผ ๋งค๊ธด๋ค def evaluate(self,board,stone): return board.count(stone)
Simple Heuristic Table ¶
50 4 16 12 12 16 4 50 4 -30 -4 -5 -5 -4 -30 4 16 -4 1 0 0 1 -4 16 12 -5 0 0 0 0 -5 12 12 -5 0 0 0 0 -5 12 16 -4 1 0 0 1 -4 16 4 -30 -4 -5 -5 -4 -30 4 50 4 16 12 12 16 4 50
๋์ ๊ฒฐ๊ณผ ¶
ํ๋ช | ์์ฑ์ | ์ฝ๋ |
Namsang | ์์ญ, ์ ํ, ๋ณด์ฐฝ | ALittleAiSeminar/Namsang |
Smart | ๊ธฐ์ , ์ ํธ, ํ๋ | Upload(zeropage):SmartPlayer.py |
NonNamsang | ์์, ํํ, ๊ทํ |

