Skip to content

Instantly share code, notes, and snippets.

@ruescasd
Created December 20, 2013 22:36
Show Gist options
  • Select an option

  • Save ruescasd/8062717 to your computer and use it in GitHub Desktop.

Select an option

Save ruescasd/8062717 to your computer and use it in GitHub Desktop.
def ratioTrend3(ratioMin: Double, ratioMax: Double, vertices: Int, questions: Int, maxQuestions: Int, inc: Double = 0.5) = {
val ratios = for {
r <- ratioMin until (ratioMax, inc)
q <- 1 until maxQuestions
} yield(r, q)
val values = ratios.map{ rq =>
val graph = getRandomGraph(vertices, rq._1)
val lfa = new Lfa2(questions, graph)
println(lfa.maxScore)
val state = lfa.randomState(rq._2)
val end = lfa.search(state, 3000, 1)
List(rq._1, rq._2, lfa.score(state), lfa.score(end))
}
exportList(values, "ratio-score")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment