Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. {
  2. "cell_type": "code",
  3. "execution_count": 2,
  4. "metadata": {},
  5. "outputs": [],
  6. "source": [
  7. "def update_A(params, step, sL, s, _input):\n",
  8. " y = 'box_A'\n",
  9. " add_to_A = 0\n",
  10. " if (s['box_A'] > s['box_B']):\n",
  11. " add_to_A = -1\n",
  12. " elif (s['box_A'] < s['box_B']):\n",
  13. " add_to_A = 1\n",
  14. " x = s['box_A'] + add_to_A\n",
  15. " return (y, x)\n",
  16. "\n",
  17. "def update_B(params, step, sL, s, _input):\n",
  18. " y = 'box_B'\n",
  19. " add_to_B = 0\n",
  20. " if (s['box_B'] > s['box_A']):\n",
  21. " add_to_B = -1\n",
  22. " elif (s['box_B'] < s['box_A']):\n",
  23. " add_to_B = 1\n",
  24. " x = s['box_B'] + add_to_B\n",
  25. " return (y, x)"
  26. ]
  27. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement