This commit is contained in:
2025-12-12 13:42:41 -06:00
parent e5f479e266
commit a20f560cd7
8 changed files with 1735 additions and 465 deletions

View File

@@ -293,7 +293,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "7ee8fb34",
"metadata": {},
"outputs": [
@@ -333,6 +333,7 @@
}
],
"source": [
"# The following was generated by AI - see [19]\n",
"environ = LevPodEnv(use_gui=False, initial_gap_mm=14, max_steps=500) # Start below target\n",
"model = ActorCriticNetwork(environ.observation_space.shape[0], environ.action_space.shape[0]).to(device)\n",
"train_data, reward, gap_error = rollout(model, environ)\n",
@@ -380,7 +381,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "e6f27ed4",
"metadata": {},
"outputs": [
@@ -415,6 +416,7 @@
}
],
"source": [
"# The following was generated by AI - see [20]\n",
"# Visualize the new reward function\n",
"gap_errors_mm = np.linspace(0, 20, 100)\n",
"gap_rewards = np.exp(-0.5 * (gap_errors_mm / 3.0)**2)\n",
@@ -443,7 +445,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "fb554183",
"metadata": {},
"outputs": [
@@ -457,6 +459,7 @@
}
],
"source": [
"# The following was generated by AI - see [21]\n",
"import os\n",
"from datetime import datetime\n",
"\n",
@@ -701,7 +704,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"id": "3678193c",
"metadata": {},
"outputs": [