Hello,
I've made myself a "tool" to help me understand/debug/build player behavior. The idea is to have, along side, the agent moving in the top-down view and some plots which monitor some selected neurons activity.
Running:
$> python debug_plot.py info_switcher.json
using this JSON file will automatically use the model from player_switcher.player_switcher() for debug+plot
{
"player": {
"module": "player_switcher",
"func": "switcher_player"
},
"neurons": {
"nni": {
"indices": [0, 63, 33, 65],
"labels": ["L", "R", "C", "nrj"],
"lim": [-0.05, 1.05]
},
"nnx": {
"indices": [77, 96],
"labels": ["X_f", "X_t"],
"lim": [-0.05, 1.05]
},
"nno": {
"indices": [0],
"labels": ["out"],
"lim": [-6.1, 6.1]
}
}
and gets me this kind of output https://github.com/snowgoon88/braincraft/blob/dev_graph/data/fig_debug_plot_switcher.png
I am not sure this can find its place in the braincraft repo, but you can play with it (in the dev_graph branch of my forked repo: https://github.com/snowgoon88/braincraft/tree/dev_graph)
warning: I had to slightly alter "player_switcher.py" and "player_switcher_alt.py" to make them work with "debug_plot.py", but not changing at all their model. Added import numpy as np at the beginning of files and make sure that the output Ovector is a 2D numpy array. (@vforch uses simple 1D vector).
Hello,
I've made myself a "tool" to help me understand/debug/build player behavior. The idea is to have, along side, the agent moving in the top-down view and some plots which monitor some selected neurons activity.
Running:
$> python debug_plot.py info_switcher.jsonusing this JSON file will automatically use the
modelfromplayer_switcher.player_switcher()for debug+plot{ "player": { "module": "player_switcher", "func": "switcher_player" }, "neurons": { "nni": { "indices": [0, 63, 33, 65], "labels": ["L", "R", "C", "nrj"], "lim": [-0.05, 1.05] }, "nnx": { "indices": [77, 96], "labels": ["X_f", "X_t"], "lim": [-0.05, 1.05] }, "nno": { "indices": [0], "labels": ["out"], "lim": [-6.1, 6.1] } }and gets me this kind of output https://github.com/snowgoon88/braincraft/blob/dev_graph/data/fig_debug_plot_switcher.png
I am not sure this can find its place in the braincraft repo, but you can play with it (in the
dev_graphbranch of my forked repo: https://github.com/snowgoon88/braincraft/tree/dev_graph)warning: I had to slightly alter "player_switcher.py" and "player_switcher_alt.py" to make them work with "debug_plot.py", but not changing at all their
model. Addedimport numpy as npat the beginning of files and make sure that the outputOvector is a 2D numpy array. (@vforch uses simple 1D vector).