This is to check behaviour after making the sums of term probabilities constant by taking gradient perpendicular to these.
import $cp.bin.`provingground-core-jvm-dcc4d5d.fat.jar`
import provingground._ , interface._, HoTT._, learning._
repl.pprinter() = {
val p = repl.pprinter()
p.copy(
additionalHandlers = p.additionalHandlers.orElse {
translation.FansiShow.fansiHandler
}
)
}
val A = "A" :: Type
val B = "B" :: Type
val a = "a" :: A
val f = "f" :: (A ->: B)
val lp0 = LocalProver(TermState(FiniteDistribution.unif(a, f(a), f), FiniteDistribution(A -> 0.01, B -> 0.99)), hW = 0, klW = 10).noIsles
import monix.execution.Scheduler.Implicits.global
val gT0 = lp0.expressionEval.flatMap(e => e.generatorIterant(0, 1, 0.000001, e.finalDist).take(100).toListL.map(_.zipWithIndex.filter(_._2 % 15 == 0)) )
val gF0 = gT0.runToFuture
val lp1 = LocalProver(TermState(FiniteDistribution.unif(a, f(a)), FiniteDistribution(A -> 0.8, B -> 0.2))).noIsles
val tF = lp1.tunedGenerators.runToFuture
val tF0 = lp0.tunedGenerators.runToFuture