In [1]:
using POMDPs
using OPCSPs
using POMDPToolbox

In [2]:
problem = gen_two_cluster_problem();

In [3]:
sim = HistoryRecorder()
policy = RandomPolicy(problem, rng=MersenneTwister(23))
simulate(sim, problem, policy, updater(problem), initial_belief(problem))


Out[3]:
12.815293085591897

In [5]:
sim = RolloutSimulator()
@time simulate(sim, problem, policy, updater(problem), initial_belief(problem))
Profile.clear()
@time @profile begin
    for i in 1:10000
        simulate(sim, problem, policy, updater(problem), initial_belief(problem))
    end
end


  0.000156 seconds (200 allocations: 21.828 KB)
  0.329484 seconds (2.70 M allocations: 216.910 MB, 6.77% gc time)

In [6]:
import ProfileView
ProfileView.view()


Out[6]:
Profile results Function:

In [ ]: