Skip to content

Commit

Permalink
oopsie
Browse files Browse the repository at this point in the history
  • Loading branch information
Fur0rem committed Feb 13, 2024
1 parent 3539dd1 commit b237b24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/Strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def min_lanes_attack(graph : CityGraph, nbTimes : int, budget : int, costPerLane
"""Each time, it removes the edge with the least lanes until the budget is reached or no more edges are available"""
return sorted_attack(graph, nbTimes, budget, lambda x : -graph.get_nb_lanes_of_edge(x), costPerLane)

def max_lanes_attack(graph : CityGraph, nbTimes : int, budget : int), costPerLane : bool -> Attack :
def max_lanes_attack(graph : CityGraph, nbTimes : int, budget : int, costPerLane : bool) -> Attack :
"""Each time, it removes the edge with the most lanes until the budget is reached or no more edges are available"""
return sorted_attack(graph, nbTimes, budget, lambda x : graph.get_nb_lanes_of_edge(x), costPerLane)

Expand All @@ -76,7 +76,7 @@ def moving_attack(graph : CityGraph, nbTimes : int, budget : int, costPerLane :
edges = list(graph.edges())

# First time
attacks = random_attack(graph, 1, budget)
attacks = random_attack(graph, 1, budget, costPerLane)

# Next times
# First, find the neighbours of the concerned edges
Expand Down

0 comments on commit b237b24

Please sign in to comment.