Commit e54b574c authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

updated greedish rollout approach

parent a1c93c84
......@@ -469,7 +469,9 @@ function greedy_rollout(cdata::contourdata)
end
function greedish_rollout(cdata::contourdata)
function greedish_rollout(cdata::contourdata; α=0.5)
# α=1 is totally greedy
# α=0 is totally random
done_contours = Set{Int}()
avail_contours = Set(cdata.layers[1])
todo_contours = Set(1:length(cdata.contours))
......@@ -489,8 +491,8 @@ function greedish_rollout(cdata::contourdata)
end
temp_avail_list = collect(avail_contours)
w = dep_times[temp_avail_list]
w = w .- minimum(w)*0.9
c = sample(temp_avail_list, Weights(w))
top_choices = w .>= minimum(w) + α*(maximum(w) - minimum(w))
c = rand(temp_avail_list[top_choices])
push!(rollout, c)
contour_order[c] = length(rollout)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment