Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jayant Khatkar
tempaware
Commits
a1c93c84
Commit
a1c93c84
authored
Oct 16, 2021
by
Jayant Khatkar
Browse files
greedily weighted random rollout
parent
74e410b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils.jl
View file @
a1c93c84
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment