diff --git a/Hypertension.rb b/Hypertension.rb index afe96f4..af43498 100644 --- a/Hypertension.rb +++ b/Hypertension.rb @@ -275,11 +275,11 @@ def problem(state, tasks, debug = false, ordered = true) def task_permutations(state, tasks, goal_task = nil) # All permutations are considered tasks.permutation {|task_list| - @state = state task_list = Marshal.load(Marshal.dump(task_list)) task_list << goal_task if goal_task plan = planning(task_list) return plan if plan + @state = state } nil end