Code to generate, plot, and calculate info about hex maze configurations and optimal barrier change sequences for the hex maze behavioral task used by the Berke Lab at UCSF.
1
stars
2
forks
source link
Change how different hexes are counted when comparing mazes, update plotting functions #6
Change how hexes are counted when computing maze similarity - counts each changed hex that a rat must run through on an optimal path between reward ports exactly once. For example, given the following:
Hexes on optimal paths in the first maze but not the second: {36, 14, 17, 18, 22, 26, 30, 31}.Hexes on optimal paths in the second maze but not the first: {13, 14, 16, 17, 18, 20, 22, 24, 26, 29}
This results in a count of 13 hexes different on optimal paths.
Note that the same hex (e.g. hex 14) may appear on both lists. This is because in maze 1, hex 14 exists on the optimal path between port 1 and port 3, but not on the optimal path between ports 2 and 3. In maze 2, hex 14 exists on the optimal path between ports 2 and 3, but not on the optimal path between ports 1 and 3.
We choose not to count 14 twice even though it appears on both lists. Our count of 13 reflects the size of the combined sets: {26, 22, 18, 14, 17, 13, 16, 20, 24, 29, 31, 36, 30}.
Also adds function plot_hex_maze_comparison to highlight these different hexes on the 2 mazes.
See Tutorials/Hex_Maze_Functions for more info.
Closes #5
Adds optional argument show_stats to plot_hex_maze and related plotting functions.
When show_stats=True, the length of the optimal paths between reward ports is shown on the maze. show_stats is False by default in plot_hex_maze and plot_barrier_change_sequence, but True by default in plot_hex_maze_comparison.
Change how hexes are counted when computing maze similarity - counts each changed hex that a rat must run through on an optimal path between reward ports exactly once. For example, given the following:
Hexes on optimal paths in the first maze but not the second: {36, 14, 17, 18, 22, 26, 30, 31}.
Hexes on optimal paths in the second maze but not the first: {13, 14, 16, 17, 18, 20, 22, 24, 26, 29}
This results in a count of13
hexes different on optimal paths.Note that the same hex (e.g. hex 14) may appear on both lists. This is because in maze 1, hex 14 exists on the optimal path between port 1 and port 3, but not on the optimal path between ports 2 and 3. In maze 2, hex 14 exists on the optimal path between ports 2 and 3, but not on the optimal path between ports 1 and 3.
We choose not to count 14 twice even though it appears on both lists. Our count of 13 reflects the size of the combined sets: {26, 22, 18, 14, 17, 13, 16, 20, 24, 29, 31, 36, 30}.
Also adds function
plot_hex_maze_comparison
to highlight these different hexes on the 2 mazes.See
Tutorials/Hex_Maze_Functions for more info
.Adds optional argument
show_stats
toplot_hex_maze
and related plotting functions.When
show_stats=True
, the length of the optimal paths between reward ports is shown on the maze.show_stats
isFalse
by default inplot_hex_maze
andplot_barrier_change_sequence
, butTrue
by default inplot_hex_maze_comparison
.