Skip to content

Commit

Permalink
Made GarrukV3 default policy.
Browse files Browse the repository at this point in the history
  • Loading branch information
DiddiZ committed Jan 17, 2021
1 parent 8dc85c9 commit ec5b506
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def frames():
env = WebsocketEnv(os.environ["URL"], os.environ["KEY"], os.environ["TIME_URL"])

# Create policy
pol = load_named_policy("Garruk")
pol = load_named_policy("GarrukV3")

while True:
try:
Expand Down
15 changes: 15 additions & 0 deletions policies/named_policies/DonnaV3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from policies import ActionSearchPolicy
from heuristics import CompositeHeuristic, PathLengthHeuristic, RegionHeuristic

pol = ActionSearchPolicy(
CompositeHeuristic(
[
PathLengthHeuristic(15),
RegionHeuristic(),
],
weights=[15, 1],
),
depth_limit=6,
expanded_node_limit=5000,
occupancy_map_depth=3,
)
25 changes: 25 additions & 0 deletions policies/named_policies/GarrukV3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from policies import (
ConditionalPolicy,
load_named_policy,
HeuristicPolicy,
EndgamePolicy,
)
from heuristics import (
RegionHeuristic,
)
from heuristics.conditions.named_conditions import (
EndgameCondition,
MidgameCondition,
LategameCondition,
)

pol = ConditionalPolicy(
policies=[
load_named_policy("HollyV2"),
load_named_policy("DonnaV3"),
load_named_policy("Elspeth"),
load_named_policy("ElspethV7"),
],
conditions=[EndgameCondition(), LategameCondition(), MidgameCondition()],
thresholds=[True, True, True],
)

0 comments on commit ec5b506

Please sign in to comment.