Tested move strategy exercises

parent be00b63b
......@@ -352,14 +352,17 @@
"outputs": [],
"source": [
"scheme = paths.DefaultScheme(network)\n",
"# your modifications"
"ensemble_0 = network.transitions[(stateA, stateB)].ensembles[0]\n",
"ensemble_2 = network.transitions[(stateA, stateB)].ensembles[2]\n",
"\n",
"# your modifications below this line"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": false
},
"outputs": [],
"source": [
......@@ -372,7 +375,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"**Exercise 3:** Create a scheme from scratch (specific to this network) that puts each shooting move in its own mover group, instead of having all of them in the `'shooting'` group. See how this affects the frequency of choosing each shooting move. (Note: we can customize this frequency, but that's beyond the scope of this workshop.)"
"**Exercise 3:** Create a scheme from scratch (specific to this network) that puts each shooting move in its own mover group, instead of having all of them in the `'shooting'` group. Also include replica exchange, path reversal, and minus moves, as in the default strategy."
]
},
{
......@@ -384,14 +387,18 @@
"outputs": [],
"source": [
"scheme = paths.MoveScheme(network)\n",
"# your modifications"
"ensemble_0 = network.transitions[(stateA, stateB)].ensembles[0]\n",
"ensemble_1 = network.transitions[(stateA, stateB)].ensembles[1]\n",
"ensemble_2 = network.transitions[(stateA, stateB)].ensembles[2]\n",
"\n",
"# your modifications below this line"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": false
},
"outputs": [],
"source": [
......@@ -400,17 +407,6 @@
"SVG(move_vis.svg())"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# check the frequency of the moves"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -426,7 +422,7 @@
},
"outputs": [],
"source": [
"# build movers from scratch"
"# build movers from scratch in this cell"
]
},
{
......@@ -445,19 +441,19 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": false
},
"outputs": [],
"source": [
"# see what happens if you try to add a strategy to this:\n",
"scheme.append(strategies.OrganizeByMoveGroupStrategy())"
"scheme.append(strategies.NearestNeighborRepExStrategy())"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": false
},
"outputs": [],
"source": [
......@@ -465,6 +461,15 @@
"move_vis = paths.visualize.MoveTreeBuilder.from_scheme(scheme, hidden_ensembles=False)\n",
"SVG(move_vis.svg())"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment