jerry871002 / bsi-pt

BSI-PT algorithm in the paper "Opponent Exploitation Based on Bayesian Strategy Inference and Policy Tracking"
https://jerry871002.github.io/bsi-pt/
0 stars 0 forks source link

`performance_model` isn't checked before using #42

Open jerry871002 opened 1 year ago

jerry871002 commented 1 year ago

To pass the mypy type check, I initialized performance_model as None (see the examples below).

https://github.com/jerry871002/bayesian-strategy-inference/blob/e71229871278286cf72590ea3bff5508886092fa/src/grid_world/agent.py#L29

https://github.com/jerry871002/bayesian-strategy-inference/blob/e71229871278286cf72590ea3bff5508886092fa/src/navigation_game/agent.py#L27

https://github.com/jerry871002/bayesian-strategy-inference/blob/e71229871278286cf72590ea3bff5508886092fa/src/soccer_game/agent.py#L29

But I didn't add any check before using it to ensure the value is properly set, e.g. is it properly set to an array-like value and not None. Need to fix this in the future.