diff_cpd = TabularCPD('diff', 2, [[0.2], [0.8]])

"""
Explanation: diff cpd:
|diff:  |        |
|-------|--------|
|easy   |   0.2  |
|hard   |   0.8  |
End of explanation
"""


intel_cpd = TabularCPD('intel', 3, [[0.5], [0.3], [0.2]])

"""
Explanation: intel cpd:
|intel: |        |
|-------|--------|
|dumb   |   0.5  |
|avg    |   0.3  |
|smart  |   0.2  |
End of explanation
"""


grade_cpd = TabularCPD('grade', 3,
                         [[0.1,0.1,0.1,0.1,0.1,0.1],
                         [0.1,0.1,0.1,0.1,0.1,0.1], 
                         [0.8,0.8,0.8,0.8,0.8,0.8]],
                         evidence=['intel', 'diff'],
                         evidence_card=[3, 2])

student.add_cpds(diff_cpd, intel_cpd, grade_cpd)

# Finding active trail
student.active_trail_nodes('diff')
{'diff', 'grade'}

# Finding active trail with observation
student.active_trail_nodes('diff', observed='grade')
{'diff', 'intel'}

"""
Explanation: grade cpd:
|diff: | easy | easy | easy    | hard | hard | hard  |
|------|------|------|---------|------|------|-------|
|intel:| dumb |  avg |  smart  | dumb | avg  | smart |
|gradeA| 0.1  | 0.1  |   0.1   |  0.1 |  0.1 |   0.1 |
|gradeB| 0.1  | 0.1  |   0.1   |  0.1 |  0.1 |   0.1 |
|gradeC| 0.8  | 0.8  |   0.8   |  0.8 |  0.8 |   0.8 |
End of explanation
"""


