linonymous / Intermediate_Python

0 stars 1 forks source link

TicTacToe | Minimax bot skips some obvious states after alpha beta pruning implementation #6

Closed linonymous closed 6 years ago

linonymous commented 6 years ago

with alpha beta pruning implementation

_ _ _
_ _ _
_ _ _

Enter move for player swpanilrow and column
row:2
col:0
2 0

_ _ _
_ _ _
O _ _

Let JARVIS play....
0 0

X _ _
_ _ _
O _ _

Enter move for player swpanilrow and column
row:0
col:2
0 2

X _ O
_ _ _
O _ _

Let JARVIS play....
0 1

X X O
_ _ _
O _ _

Enter move for player swpanilrow and column
row:

after checking out the commit before alpha beta pruning

Welcome swapnil!! you will play against JARVIS!
Lets start the game...

_ _ _
_ _ _
_ _ _

Enter move for player swapnilrow and column
row:2
col:0
2 0

_ _ _
_ _ _
O _ _

Let JARVIS play....
1 1

_ _ _
_ X _
O _ _

Enter move for player swapnilrow and column
row:
bhosalems commented 6 years ago

Creating pull request https://github.com/linonymous/Intermediate_Python/pull/7

linonymous commented 6 years ago

Will review it! (y)

bhosalems commented 6 years ago

We can optimize further by taking these cells as set in python while we are moving over each cell in min-max. Just check above pull request and then we can discuss more about optimizing further.

linonymous commented 6 years ago

Yup, let me understand this first. What was the wrong happening there?

linonymous commented 6 years ago

Merged the pull request, will verify the case and close the issue.