brent
brent copied to clipboard
events that *never* happened
this is a graph for the RISK boardgame.
from brent import DAG, Query
from brent.examples import generate_risk_dag
dag = generate_risk_dag()
q = Query(dag).given(losses=1).given(best_a1=1).given(best_a2=1)
q.plot()

when querying this we get an empty result
> q.infer()
{'d2': {},
'best_d2': {},
'd1': {},
'best_d1': {},
'a1': {},
'a2': {},
'a3': {},
'best_a2': {},
'best_a1': {},
'losses': {}}
it's certainly not bad behavior but maybe a better way of dealing with this can be thought of.
It probably makes the most sense to return all possible states with a 0 probability, right?
Something in me worries about floating point arithmetic, but yeah it seems sensible. If the output ever gets normalised with all zeros then some crazy voodoo might happen on the user' side.