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

greedily weighted random rollout

parent 74e410b1
......@@ -4,6 +4,7 @@ using JSON
using LightGraphs
using NearestNeighbors
using Statistics
using StatsBase
using BenchmarkTools
using LinearAlgebra
using PlotlyJS
......@@ -487,8 +488,9 @@ function greedish_rollout(cdata::contourdata)
dep_times[c] = mean(contour_order[deps])
end
temp_avail_list = collect(avail_contours)
_,i = findmax(dep_times[temp_avail_list])
c = temp_avail_list[i] # contour with deps printed most recently
w = dep_times[temp_avail_list]
w = w .- minimum(w)*0.9
c = sample(temp_avail_list, Weights(w))
push!(rollout, c)
contour_order[c] = length(rollout)
......
Markdown is supported
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