Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [],
- "source": [
- "def update_A(params, step, sL, s, _input):\n",
- " y = 'box_A'\n",
- " add_to_A = 0\n",
- " if (s['box_A'] > s['box_B']):\n",
- " add_to_A = -1\n",
- " elif (s['box_A'] < s['box_B']):\n",
- " add_to_A = 1\n",
- " x = s['box_A'] + add_to_A\n",
- " return (y, x)\n",
- "\n",
- "def update_B(params, step, sL, s, _input):\n",
- " y = 'box_B'\n",
- " add_to_B = 0\n",
- " if (s['box_B'] > s['box_A']):\n",
- " add_to_B = -1\n",
- " elif (s['box_B'] < s['box_A']):\n",
- " add_to_B = 1\n",
- " x = s['box_B'] + add_to_B\n",
- " return (y, x)"
- ]
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement