brent icon indicating copy to clipboard operation
brent copied to clipboard

events that *never* happened

Open koaning opened this issue 6 years ago • 2 comments

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()

image

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.

koaning avatar Mar 09 '19 17:03 koaning

It probably makes the most sense to return all possible states with a 0 probability, right?

MBrouns avatar Mar 10 '19 13:03 MBrouns

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.

koaning avatar Mar 10 '19 15:03 koaning