DarshanScripts commited on
Commit
6ebfa53
·
verified ·
1 Parent(s): c531017

Upload stratego/strategies/random_move.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. stratego/strategies/random_move.py +10 -0
stratego/strategies/random_move.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import random
2
+ from typing import List
3
+ from .base import Strategy
4
+
5
+ class RandomStrategy(Strategy):
6
+ def get_context(self) -> str:
7
+ return "Play randomly: mix offensive and defensive moves."
8
+
9
+ def choose(self, legal_moves, observation):
10
+ return random.choice(legal_moves)