Skip to content

Commit

Permalink
"finished greedy"
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbai98 committed Oct 9, 2021
1 parent d5d6497 commit e6de9b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions players/g6_greedy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def get_icecream(self,top_layer,curr_level,level,i,j):
return value, amount
def greedy(self, top_layer, curr_level,maxAmount):
bestValue = -1.0 # best mean value of ice-cream
bestPos=(-1,-1) # the position of bestValue
bestAmount=0 # the amount of ice-cream of bestValue
bestPos=(-1,-1) # position of bestValue
bestAmount=0 # amount of ice-cream of bestValue
for i in range(23):
for j in range(14):
level = get_level(self,curr_level,i,j)
Expand Down
2 changes: 1 addition & 1 deletion players/g6_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def serve(self, top_layer: np.ndarray, curr_level: np.ndarray, player_idx: int,
{"action": "scoop", "values" : (i,j)} stating to scoop the 4 cells with index (i,j), (i+1,j), (i,j+1), (i+1,j+1)
{"action": "pass", "values" : i} pass to next player with index i
"""
action = None
action = "no action"
values = None
if (self.state["count"]<24):
pos,amount = self.greedy(self, top_layer, curr_level, 24-self.state["count"])
Expand Down

0 comments on commit e6de9b1

Please sign in to comment.