diff options
author | Jack Vehmeier <vehme003@umn.edu> | 2021-04-27 13:37:43 -0500 |
---|---|---|
committer | Jack Vehmeier <vehme003@umn.edu> | 2021-04-27 13:37:43 -0500 |
commit | dea5598b51831b89f3f11e84db7d8a6418417590 (patch) | |
tree | 5cd2d369dd4ec853ed636e4ec95cde341785f4a6 /python/alphaBeta.py | |
parent | changed the get move to minimax (diff) | |
download | csci4511w-dea5598b51831b89f3f11e84db7d8a6418417590.tar csci4511w-dea5598b51831b89f3f11e84db7d8a6418417590.tar.gz csci4511w-dea5598b51831b89f3f11e84db7d8a6418417590.tar.bz2 csci4511w-dea5598b51831b89f3f11e84db7d8a6418417590.tar.lz csci4511w-dea5598b51831b89f3f11e84db7d8a6418417590.tar.xz csci4511w-dea5598b51831b89f3f11e84db7d8a6418417590.tar.zst csci4511w-dea5598b51831b89f3f11e84db7d8a6418417590.zip |
vehme003
Diffstat (limited to 'python/alphaBeta.py')
-rw-r--r-- | python/alphaBeta.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/alphaBeta.py b/python/alphaBeta.py index 66040d5..c15f371 100644 --- a/python/alphaBeta.py +++ b/python/alphaBeta.py @@ -41,9 +41,10 @@ class ABNode(object): # A class for Node related operations class AlphaBeta(object): def miniMax(State, Ply_num): # Function for the minimax algorithm + start=ABNode(State) possiblemoves=State.get_moves() for x in possiblemoves: - if (x[0],x[1],x[2]) not in State.children: + if (x[0],x[1],x[2]) not in start.children: State.Make(x[0],x[1],x[2]) if Ply_num < 2: return (i, j) @@ -52,7 +53,7 @@ class AlphaBeta(object): r = 0 c = 0 o = "" - for k, z in State.children.items(): + for k, z in start.children.items(): Result = Algo.Maximum(z, Ply_num - 1, Minimum_Score) if Minimum_Score > Result: Minimum_Score = Result |