{ "cells": [ { "cell_type": "markdown", "id": "a592e123", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Mastermind" ] }, { "cell_type": "markdown", "id": "85a69884", "metadata": { "slideshow": { "slide_type": "-" }, "tags": [ "remove-cell" ] }, "source": [ "**CS1302 Introduction to Computer Programming**\n", "___" ] }, { "cell_type": "code", "execution_count": 1, "id": "2b95cb61", "metadata": {}, "outputs": [], "source": [ "import random" ] }, { "cell_type": "markdown", "id": "ac045872", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "In this notebook, you will write a game called [*Mastermind*](https://en.wikipedia.org/wiki/Mastermind_(board_game)). Play the video below to learn about the rule of the game." ] }, { "cell_type": "code", "execution_count": 2, "id": "9253aa9b", "metadata": { "code_folding": [ 0 ], "slideshow": { "slide_type": "-" }, "tags": [ "hide-input" ] }, "outputs": [ { "data": { "text/html": [ "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%html\n", "" ] }, { "cell_type": "markdown", "id": "129c9e72", "metadata": {}, "source": [ "1. **Mastermind** first creates a hidden `code` of length `code_length` consisting code pegs with possibly duplicate colors chosen from a sequence of `colors`.\n", "1. **Coderbreaker** provides a `guess` of the `code`.\n", "1. **Mastermind** generates a `feedback` consisting of key pegs of black and white colors:\n", " - The number of black pegs (`black_key_pegs_count`) is the number of code pegs that are the correct colors in the correct positions. \n", " - The number of white pegs (`white_key_pegs_count`) is the number of code pegs that are the correct colors but in incorrect positions.\n", " - Each code peg should be counted only once, i.e., a code peg cannot be awarded more than one key peg. E.g.,\n", " - If the `code` is `'RBGG'` and `guess` is `'BGGG'`, then \n", " - the feedback should be `'bbw'` with \n", " - `black_key_pegs_count == 2` because of `__GG` in the guess, and\n", " - `white_key_pegs_count == 1` because of `_B__` in the guess. \n", " - `_G__` in the `guess` should not be awarded an additional white peg because `__GG` in the `code` has been counted.\n", "1. **Codebreaker** wins if the code is correctly guessed within a certain number (`max_num_guesses`) of guesses." ] }, { "cell_type": "markdown", "id": "9ff9a8da", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Random Code Generation" ] }, { "cell_type": "markdown", "id": "5ecbc4a3", "metadata": {}, "source": [ "The first exercise is to generate a random hidden code so even one person can play the game as Codebreaker. Watch the following video to understand how computers generate random numbers." ] }, { "cell_type": "code", "execution_count": 3, "id": "7694c1f5", "metadata": { "code_folding": [], "tags": [ "hide-input" ] }, "outputs": [ { "data": { "text/html": [ "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%html\n", "" ] }, { "cell_type": "markdown", "id": "fba9d1ec", "metadata": {}, "source": [ "To generate random content in Python, we can use the `random` module imported at the beginning of the notebook. The module provides some useful functions to generate random objects as follows." ] }, { "cell_type": "code", "execution_count": 4, "id": "b9787898", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.7827968849417102\n", "0.7912710422467361\n", "0.18580256638087056\n", "0.15141340652226887\n", "0.4816758500421424\n", "0.1835795997968771\n", "0.60719381222744\n", "0.2645502008598918\n", "0.1308987733962963\n", "0.6784929837440095\n" ] } ], "source": [ "for i in range(10):\n", " print(random.random()) # random floating point numbers in [0,1)" ] }, { "cell_type": "code", "execution_count": 5, "id": "6274bdca", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "10 10 6 5 7 7 4 8 6 9 " ] } ], "source": [ "for i in range(10):\n", " print(random.randint(3, 10), end=\" \") # random integer in range [3,10]" ] }, { "cell_type": "code", "execution_count": 6, "id": "fe0d6189", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "GGBBGGGGRR" ] } ], "source": [ "for i in range(10):\n", " print(random.choice(\"RBG\"), end=\"\") # random element in the sequence 'RBG'" ] }, { "cell_type": "markdown", "id": "6a2cea1e", "metadata": {}, "source": [ "We can generate a reproducible *pseudo-random* sequence by specifying the *seed*." ] }, { "cell_type": "code", "execution_count": 7, "id": "d764118d", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "7 3 5 3 4 3 7 3 4 6 " ] } ], "source": [ "# repeatedly run the cell to see new sequences.\n", "random.seed(123456)\n", "for i in range(10):\n", " print(random.randint(3, 10), end=\" \")" ] }, { "cell_type": "markdown", "id": "8ba43139", "metadata": {}, "source": [ "By default `random` uses the system time as the seed. We can call `seed` without any argument to revert to the default behavior." ] }, { "cell_type": "code", "execution_count": 8, "id": "35c45dbc", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "4 6 3 10 7 3 3 7 4 4 " ] } ], "source": [ "# repeatedly run the cell to see new sequences.\n", "random.seed()\n", "for i in range(10):\n", " print(random.randint(3, 10), end=\" \")" ] }, { "cell_type": "markdown", "id": "fd67648e", "metadata": {}, "source": [ "**Exercise** Define a function that generates a random `code`. The functions take in\n", "- a string `colors` whose characters represent distinct colors to choose from, and\n", "- a positive integer `code_length` representing the length of the code.\n", "\n", "For instance, `get_code('ROYGBP',4)` returns a code of `4` code pegs randomly with colors chosen from \n", "- `'R'`ed, \n", "- `'O'`range, \n", "- `'Y'`ellow, \n", "- `'G'`reen, \n", "- `'B'`lue, and \n", "- `'P'`urple. \n", "\n", "One possible outcome is `'ROYY'`." ] }, { "cell_type": "code", "execution_count": 9, "id": "67249027", "metadata": { "deletable": false, "nbgrader": { "cell_type": "code", "checksum": "d59f8563fadcc14bd000b7ad3f4cc333", "grade": false, "grade_id": "get_code", "locked": false, "schema_version": 3, "solution": true, "task": false }, "tags": [ "remove-output" ] }, "outputs": [], "source": [ "def get_code(colors, code_length):\n", " code = ''\n", " # YOUR CODE HERE\n", " raise NotImplementedError()\n", " return code" ] }, { "cell_type": "code", "execution_count": 10, "id": "7bc42b7f", "metadata": { "code_folding": [], "deletable": false, "editable": false, "nbgrader": { "cell_type": "code", "checksum": "62902a60a692b540a10122e45e87c23a", "grade": true, "grade_id": "test-get_code", "locked": true, "points": 1, "schema_version": 3, "solution": false, "task": false }, "slideshow": { "slide_type": "-" }, "tags": [ "remove-output", "remove-cell" ] }, "outputs": [], "source": [ "# hidden tests" ] }, { "cell_type": "markdown", "id": "3a273010", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Guess Validation" ] }, { "cell_type": "markdown", "id": "6a26b469", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "**Exercise** Define a function `valid_code` that \n", "- takes `colors`, `code_length`, and `guess` as the first, second, and third arguments respectively, and\n", "- returns `True` if `guess` is a valid code, i.e., a string of length `code_length` with characters from those of `colors`, and\n", "- `False` otherwise." ] }, { "cell_type": "code", "execution_count": 11, "id": "7498f13f", "metadata": { "deletable": false, "nbgrader": { "cell_type": "code", "checksum": "cf136637816a072f4c2cf89b0a55ebe0", "grade": false, "grade_id": "valid_code", "locked": false, "schema_version": 3, "solution": true, "task": false }, "slideshow": { "slide_type": "skip" }, "tags": [ "remove-output" ] }, "outputs": [ { "ename": "NotImplementedError", "evalue": "", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNotImplementedError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# YOUR CODE HERE\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mNotImplementedError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mNotImplementedError\u001b[0m: " ] } ], "source": [ "# YOUR CODE HERE\n", "raise NotImplementedError()" ] }, { "cell_type": "markdown", "id": "b8c7f51c", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "````{hint} \n", "\n", "Solution template: \n", "```Python\n", "def ___(colors, code_length, guess):\n", " if len(guess) ___ code_length:\n", " is_valid = ___\n", " else:\n", " for peg in guess:\n", " for color in colors:\n", " if peg == color: ___\n", " else:\n", " is_valid = ___\n", " ___\n", " else:\n", " is_valid = ___\n", " return is_valid\n", "```\n", "\n", "````" ] }, { "cell_type": "code", "execution_count": 12, "id": "d44db4ef", "metadata": { "code_folding": [ 0 ], "deletable": false, "editable": false, "nbgrader": { "cell_type": "code", "checksum": "cbf569c8afbea2a08eb2305aafcc735c", "grade": true, "grade_id": "test-valid_code", "locked": true, "points": 1, "schema_version": 3, "solution": false, "task": false }, "slideshow": { "slide_type": "skip" }, "tags": [ "remove-output", "hide-input" ] }, "outputs": [ { "ename": "NameError", "evalue": "name 'valid_code' is not defined", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# tests\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32massert\u001b[0m \u001b[0mvalid_code\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"RBG\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"R\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;32massert\u001b[0m \u001b[0mvalid_code\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"RBG\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"B\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32massert\u001b[0m \u001b[0mvalid_code\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"RBG\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"RP\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32massert\u001b[0m \u001b[0mvalid_code\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"RBG\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mNameError\u001b[0m: name 'valid_code' is not defined" ] } ], "source": [ "# tests\n", "assert valid_code(\"RBG\", 1, \"R\") == True\n", "assert valid_code(\"RBG\", 2, \"B\") == False\n", "assert valid_code(\"RBG\", 2, \"RP\") == False\n", "assert valid_code(\"RBG\", 0, \"\") == True" ] }, { "cell_type": "code", "execution_count": 13, "id": "8dc2d2eb", "metadata": { "deletable": false, "editable": false, "nbgrader": { "cell_type": "code", "checksum": "6e1eac45d1d088c1f467f0d5ba8acd70", "grade": true, "grade_id": "hidden_test-valid_code", "locked": true, "points": 1, "schema_version": 3, "solution": false, "task": false }, "tags": [ "remove-cell" ] }, "outputs": [], "source": [ "# hidden tests" ] }, { "cell_type": "markdown", "id": "9d1e672f", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "## Feedback Generation" ] }, { "cell_type": "markdown", "id": "78e37d23", "metadata": {}, "source": [ "According to the rules of Mastermind, double-counting of a single peg (as black and white) is not allowed. To facilitate this check, we have written a new module `markposition` that allows you to mark any non-negative integer position as counted." ] }, { "cell_type": "markdown", "id": "949a1b10", "metadata": {}, "source": [ "**Exercise** Write an `import` statement to import from the module `markposition` the functions \n", "- `mark_as_counted`\n", "- `check_if_counted`, and \n", "- `reset_all_to_not_counted`." ] }, { "cell_type": "code", "execution_count": 14, "id": "b046f961", "metadata": { "deletable": false, "nbgrader": { "cell_type": "code", "checksum": "29cd783448a79b5283dc57a836654b78", "grade": false, "grade_id": "markposition", "locked": false, "schema_version": 3, "solution": true, "task": false }, "tags": [ "remove-output" ] }, "outputs": [ { "ename": "NotImplementedError", "evalue": "", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNotImplementedError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# YOUR CODE HERE\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mNotImplementedError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mNotImplementedError\u001b[0m: " ] } ], "source": [ "# YOUR CODE HERE\n", "raise NotImplementedError()" ] }, { "cell_type": "code", "execution_count": 15, "id": "34df0b15", "metadata": { "code_folding": [ 0 ], "deletable": false, "editable": false, "nbgrader": { "cell_type": "code", "checksum": "b1d9b6dbbc29fa2c568f18df0098c6f4", "grade": true, "grade_id": "test-markposition", "locked": true, "points": 1, "schema_version": 3, "solution": false, "task": false }, "tags": [ "remove-output", "hide-input" ] }, "outputs": [ { "ename": "NameError", "evalue": "name 'reset_all_to_not_counted' is not defined", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# tests\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mreset_all_to_not_counted\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mmark_as_counted\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32massert\u001b[0m \u001b[0mcheck_if_counted\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mcheck_if_counted\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mNameError\u001b[0m: name 'reset_all_to_not_counted' is not defined" ] } ], "source": [ "# tests\n", "reset_all_to_not_counted()\n", "mark_as_counted(3)\n", "assert check_if_counted(3) and not check_if_counted(0)" ] }, { "cell_type": "code", "execution_count": 16, "id": "938e5d6c", "metadata": { "deletable": false, "editable": false, "nbgrader": { "cell_type": "code", "checksum": "f70bbfcfc76bbfbcce386ca54cb96d78", "grade": true, "grade_id": "hidden_test-markposition", "locked": true, "points": 1, "schema_version": 3, "solution": false, "task": false }, "tags": [ "remove-cell" ] }, "outputs": [], "source": [ "# hidden tests" ] }, { "cell_type": "markdown", "id": "3511fc14", "metadata": {}, "source": [ "**Exercise** Using the functions imported from `markposition`, mark only the positions `0`, `2`, `4`, `6`, `8`, and `10` as counted. All other positions are not counted. Use `help` to learn how to use the imported functions." ] }, { "cell_type": "code", "execution_count": 17, "id": "9341c13e", "metadata": { "deletable": false, "nbgrader": { "cell_type": "code", "checksum": "609c9d44fcf604b968abd407bf05b82f", "grade": false, "grade_id": "reset_all_to_not_counted", "locked": false, "schema_version": 3, "solution": true, "task": false }, "tags": [ "remove-output" ] }, "outputs": [ { "ename": "NotImplementedError", "evalue": "", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNotImplementedError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# YOUR CODE HERE\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mNotImplementedError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mNotImplementedError\u001b[0m: " ] } ], "source": [ "# YOUR CODE HERE\n", "raise NotImplementedError()" ] }, { "cell_type": "code", "execution_count": 18, "id": "edcfa20d", "metadata": { "code_folding": [ 0 ], "deletable": false, "editable": false, "nbgrader": { "cell_type": "code", "checksum": "27ef71bbc231faa498d5ae445378c50a", "grade": true, "grade_id": "test-reset_all_to_not_counted", "locked": true, "points": 1, "schema_version": 3, "solution": false, "task": false }, "tags": [ "remove-output", "hide-input" ] }, "outputs": [ { "ename": "NameError", "evalue": "name 'check_if_counted' is not defined", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# tests\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m11\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0;32massert\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mcheck_if_counted\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mi\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0;36m2\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0mcheck_if_counted\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mNameError\u001b[0m: name 'check_if_counted' is not defined" ] } ], "source": [ "# tests\n", "for i in range(11):\n", " assert not check_if_counted(i) if i % 2 else check_if_counted(i)" ] }, { "cell_type": "code", "execution_count": 19, "id": "48f34d7c", "metadata": { "deletable": false, "editable": false, "nbgrader": { "cell_type": "code", "checksum": "c4999cec10997e4055c0b558d13bbd46", "grade": true, "grade_id": "hidden_test-reset_all_to_not_counted", "locked": true, "points": 1, "schema_version": 3, "solution": false, "task": false }, "tags": [ "remove-cell" ] }, "outputs": [], "source": [ "# hidden tests" ] }, { "cell_type": "markdown", "id": "3f1f1bda", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "**Exercise** Define a function `get_feedback` that \n", "- takes `code` and `guess` as the first and second arguments respectively, and\n", "- returns a feedback string that starts with the appropriate number of characters `'b'` (for black key pegs) followed by the appropriate number of characters `'w'` (for white key pegs)." ] }, { "cell_type": "code", "execution_count": 20, "id": "fd8222b9", "metadata": { "deletable": false, "nbgrader": { "cell_type": "code", "checksum": "578b868697e5a6346fa2935ba0008739", "grade": false, "grade_id": "get_feedback", "locked": false, "schema_version": 3, "solution": true, "task": false }, "slideshow": { "slide_type": "skip" }, "tags": [ "remove-output" ] }, "outputs": [ { "ename": "NotImplementedError", "evalue": "", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNotImplementedError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# YOUR CODE HERE\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mNotImplementedError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mNotImplementedError\u001b[0m: " ] } ], "source": [ "# YOUR CODE HERE\n", "raise NotImplementedError()" ] }, { "cell_type": "markdown", "id": "5dc5d571", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "````{hint} \n", "\n", "Solution template: \n", "```Python\n", "def get_feedback(code, guess):\n", " black_key_pegs_count = white_key_pegs_count = counted = 0\n", " reset_all_to_not_counted()\n", " for i in ___:\n", " if ___:\n", " black_key_pegs_count += 1\n", " mark_as_counted(i)\n", " for i in range(len(guess)):\n", " for j in range(len(code)):\n", " if ___:\n", " white_key_pegs_count += 1\n", " mark_as_counted(j)\n", " break\n", " key = 'b' * black_key_pegs_count + 'w' * white_key_pegs_count\n", " return key\n", "```\n", "\n", "````" ] }, { "cell_type": "code", "execution_count": 21, "id": "d614f177", "metadata": { "code_folding": [ 0 ], "deletable": false, "editable": false, "nbgrader": { "cell_type": "code", "checksum": "7dcb41e05fc7ec16cf494e6612f280c1", "grade": true, "grade_id": "test-get_feedback", "locked": true, "points": 1, "schema_version": 3, "solution": false, "task": false }, "slideshow": { "slide_type": "skip" }, "tags": [ "remove-output", "hide-input" ] }, "outputs": [ { "ename": "NameError", "evalue": "name 'get_feedback' is not defined", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 12\u001b[0;31m \u001b[0mtest_get_feedback\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m10\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;34m\"b\"\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m\"w\"\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"RGBRGBRGBY\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"RGBRGBRGBY\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 13\u001b[0m \u001b[0mtest_get_feedback\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;34m\"b\"\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m\"w\"\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m10\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"RGBRGBRGBY\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"YRGBRGBRGB\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[0mtest_get_feedback\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m8\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;34m\"b\"\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m\"w\"\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"RGRGRGRG\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"RGRGRGRG\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m\u001b[0m in \u001b[0;36mtest_get_feedback\u001b[0;34m(feedback, code, guess)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# tests\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mtest_get_feedback\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfeedback\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mguess\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mfeedback_\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_feedback\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcode\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mguess\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mcorrect\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfeedback\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mfeedback_\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mcorrect\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mNameError\u001b[0m: name 'get_feedback' is not defined" ] } ], "source": [ "# tests\n", "def test_get_feedback(feedback, code, guess):\n", " feedback_ = get_feedback(code, guess)\n", " correct = feedback == feedback_\n", " if not correct:\n", " print(\n", " f'With code=\"{code}\" and guess=\"{guess}\", feedback should be \"{feedback}\", not \"{feedback_}\".'\n", " )\n", " assert correct\n", "\n", "\n", "test_get_feedback(10 * \"b\" + \"w\" * 0, \"RGBRGBRGBY\", \"RGBRGBRGBY\")\n", "test_get_feedback(0 * \"b\" + \"w\" * 10, \"RGBRGBRGBY\", \"YRGBRGBRGB\")\n", "test_get_feedback(8 * \"b\" + \"w\" * 0, \"RGRGRGRG\", \"RGRGRGRG\")\n", "test_get_feedback(0 * \"b\" + \"w\" * 8, \"RGRGRGRG\", \"GRGRGRGR\")\n", "test_get_feedback(0 * \"b\" + \"w\" * 6, \"RRRRGGG\", \"GGGGRRR\")\n", "test_get_feedback(1 * \"b\" + \"w\" * 6, \"RRRRGGG\", \"GGGRRRR\")\n", "test_get_feedback(5 * \"b\" + \"w\" * 2, \"RRRRGGG\", \"RRRGGGR\")\n", "test_get_feedback(1 * \"b\" + \"w\" * 0, \"RRRRGGG\", \"RYYPPBB\")\n", "test_get_feedback(0 * \"b\" + \"w\" * 1, \"RRRRG\", \"GBBBB\")\n", "test_get_feedback(0 * \"b\" + \"w\" * 0, \"RRRRG\", \"YBBBB\")" ] }, { "cell_type": "code", "execution_count": 22, "id": "aeea2432", "metadata": { "deletable": false, "editable": false, "nbgrader": { "cell_type": "code", "checksum": "453ed0a08437282653ce78edb0db8fa8", "grade": true, "grade_id": "hidden_test-get_feedback", "locked": true, "points": 1, "schema_version": 3, "solution": false, "task": false }, "tags": [ "remove-cell" ] }, "outputs": [], "source": [ "# hidden tests" ] }, { "cell_type": "markdown", "id": "c05f33f1", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Play the Game" ] }, { "cell_type": "markdown", "id": "34d48021", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "After finishing the previous exercises, you can play the game as a code breaker against a random mastermind." ] }, { "cell_type": "code", "execution_count": 23, "id": "7c21633f", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "944b2a6311ce45f0880b372de84c00cc", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(IntSlider(value=10, description='# guesses:', max=15, min=5), IntSlider(value=4, description='C…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# mastermind\n", "import ipywidgets as widgets\n", "from IPython.display import HTML, display\n", "\n", "\n", "def main():\n", " \"\"\"The main function that runs the mastermind game.\"\"\"\n", " max_num_guesses = code_length = code = num_guesses_left = None\n", " is_game_ended = True\n", " colors = \"ROYGBP\"\n", " color_code = {\n", " \"R\": \"#F88,#F00,#800\",\n", " \"O\": \"#FD8,#F80,#840\",\n", " \"Y\": \"#FF8,#FF0,#AA0\",\n", " \"G\": \"#8F8,#0F0,#080\",\n", " \"B\": \"#88F,#00F,#008\",\n", " \"P\": \"#F8F,#F0F,#808\",\n", " \"b\": \"#888,#000,#000\",\n", " \"w\": \"#FFF,#EEE,#888\",\n", " }\n", "\n", " # returns the HTML code for a colored peg.\n", " def getPeg(color, size=30):\n", " return \"\"\"
\n", "
\"\"\".format(\n", " color_code[color], size\n", " )\n", "\n", " colors_display = widgets.HBox(\n", " [widgets.Label(value=\"Color codes:\")]\n", " + [\n", " widgets.HBox([widgets.Label(value=color), widgets.HTML(getPeg(color))])\n", " for color in colors\n", " ]\n", " )\n", "\n", " max_num_guesses_input = widgets.IntSlider(\n", " min=5, max=15, value=10, description=\"# guesses:\"\n", " )\n", " code_length_input = widgets.IntSlider(\n", " min=2, max=10, value=4, description=\"Code length:\"\n", " )\n", " code_input = widgets.Password(description=\"Code:\")\n", " start_new_game_button = widgets.Button(description=\"Start a new game\")\n", "\n", " guess_input = widgets.Text(description=\"Guess:\")\n", " submit_guess_button = widgets.Button(description=\"Submit guess\")\n", " board = widgets.Output()\n", " message = widgets.Output()\n", "\n", " display(\n", " widgets.VBox(\n", " [\n", " max_num_guesses_input,\n", " code_length_input,\n", " colors_display,\n", " widgets.HBox([code_input, start_new_game_button]),\n", " widgets.HBox([guess_input, submit_guess_button]),\n", " board,\n", " message,\n", " ]\n", " )\n", " )\n", "\n", " # A listener that starts a new game\n", " def start_new_game(button):\n", " nonlocal code, num_guesses_left, is_game_ended, max_num_guesses, code_length\n", " max_num_guesses = max_num_guesses_input.value\n", " code_length = code_length_input.value\n", " board.clear_output()\n", " message.clear_output()\n", " code = code_input.value or get_code(colors, code_length)\n", " with message:\n", " if not valid_code(colors, code_length, code):\n", " display(\n", " HTML(\n", " \"\"\"

The code {} is invalid.
\n", " Leave the code box empty to randomly generated a code.\n", "

\"\"\".format(\n", " code\n", " )\n", " )\n", " )\n", " is_game_ended = True\n", " else:\n", " num_guesses_left = max_num_guesses\n", " is_game_ended = num_guesses_left <= 0\n", " display(\n", " HTML(\n", " \"

Game started! {} Guesses left.

\".format(num_guesses_left)\n", " )\n", " )\n", "\n", " # A listener that submits a guess\n", " def submit_guess(button):\n", " nonlocal num_guesses_left, is_game_ended\n", " guess = guess_input.value\n", " with message:\n", " message.clear_output()\n", " if is_game_ended:\n", " display(\n", " HTML(\n", " \"\"\"

Game has not started.
\n", " Please start a new game.

\"\"\"\n", " )\n", " )\n", " return\n", " if not valid_code(colors, code_length, guess):\n", " display(HTML(\"

Invalid guess.

\"))\n", " return\n", " feedback = get_feedback(code, guess)\n", " num_guesses_left -= 1\n", " with board:\n", " content = \"\"\n", " for k in guess:\n", " content += getPeg(k)\n", " content += \"\"\"
Feeback:
\n", "
\"\"\"\n", " for k in feedback:\n", " content += getPeg(k, 28)\n", " content += \"
\"\n", " display(HTML(content))\n", "\n", " with message:\n", " message.clear_output()\n", " if feedback == \"b\" * code_length:\n", " is_game_ended = True\n", " display(\n", " HTML(\n", " \"

You won with {} guesses left!

\".format(num_guesses_left)\n", " )\n", " )\n", " return\n", " is_game_ended = num_guesses_left <= 0\n", " if is_game_ended:\n", " display(HTML(\"

Game over...

\"))\n", " return\n", " display(HTML(\"

{} Guesses left.

\".format(num_guesses_left)))\n", "\n", " start_new_game_button.on_click(start_new_game)\n", " submit_guess_button.on_click(submit_guess)\n", "\n", "\n", "main()" ] } ], "metadata": { "jupytext": { "text_representation": { "extension": ".md", "format_name": "myst", "format_version": 0.13, "jupytext_version": "1.10.3" } }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.8" }, "source_map": [ 14, 18, 23, 27, 31, 40, 55, 59, 63, 69, 73, 78, 83, 86, 90, 95, 99, 104, 120, 141, 163, 167, 174, 194, 217, 243, 262, 266, 270, 277, 295, 318, 335, 339, 357, 379, 398, 404, 424, 449, 491, 510, 514, 518 ], "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "0056476798c3469caf0d80a5a8b03f4e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "02b7a277a6e9441687db3e69367ac9e4": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "06d0d6b7fb2d4187bcf9f073a3b02637": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "06fdc295aa834db8b9f2befba4a648ba": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_0f67194d254d42df9b9198acf10140a5", "IPY_MODEL_09b99963a487431aa7d882a729556787" ], "layout": "IPY_MODEL_532398e6070045a7842ac7c4df2325f7" } }, "08b95c23e33843dda6b5c8d48e11a944": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "0958260cd095432ba80c16b8e23915cc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "LabelModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_997423ea9666402bb580d24ec710f4a5", "placeholder": "​", "style": "IPY_MODEL_d47aa0f6b1304ef693461c8a33ac15a6", "value": "O" } }, "09b99963a487431aa7d882a729556787": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_2381d838cb954465aaae503fbfeaaf97", "placeholder": "​", "style": "IPY_MODEL_14636379afef4417b6f46311c55e6dd1", "value": "
\n
" } }, "0a0e55d40522448e896801e4d6191434": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "0f67194d254d42df9b9198acf10140a5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "LabelModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_19d856b1107c456b80cdbf1f0c19b2a2", "placeholder": "​", "style": "IPY_MODEL_9e4dfea85a2d46f3b81e9ea8cb1841b4", "value": "Y" } }, "143de380104f490ab8512aabdb8ce00e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "14636379afef4417b6f46311c55e6dd1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "1520e261c0b141ad81e9fe6e94e28289": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "19af2ed3aeff4e3bad6bc44c2b2e2f91": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_02b7a277a6e9441687db3e69367ac9e4", "placeholder": "​", "style": "IPY_MODEL_08b95c23e33843dda6b5c8d48e11a944", "value": "
\n
" } }, "19d856b1107c456b80cdbf1f0c19b2a2": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "19df450669ac4fd58079b86b50f0085f": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "1c3f9e59c7a24eb0bcf514b10aa12df4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "PasswordModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "PasswordModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "PasswordView", "continuous_update": true, "description": "Code:", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_48fdb050e8ff4581ace3fb60fed0a071", "placeholder": "​", "style": "IPY_MODEL_783489476a9b43b59c25f216f87dfc73", "value": "" } }, "23491e27c7364bc4b497692ea82e1221": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "237e52a581f94c7d831dcba826ad7f09": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ButtonView", "button_style": "", "description": "Start a new game", "disabled": false, "icon": "", "layout": "IPY_MODEL_58f76efe53f84028910583acb4590fbc", "style": "IPY_MODEL_c2362310b5b94d7a9191c80e151b49a6", "tooltip": "" } }, "2381d838cb954465aaae503fbfeaaf97": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "24451017b38747b99fa8474c2ecaa594": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "2555a41f7f24422ea818664d935d6177": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "26fbd3dfc1034f368895867e791a7466": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ButtonView", "button_style": "", "description": "Submit guess", "disabled": false, "icon": "", "layout": "IPY_MODEL_bb1b27ca00ed4754abf3d339064b03b1", "style": "IPY_MODEL_8cb46e1785574f4385c5d4beabebe069", "tooltip": "" } }, "3c9e5478baa74f04b79e372e909a8b28": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "3ecef0e8ffd449f6827040aa5336e9c5": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_fa7954389c3141e1b34f148b6ce77856", "msg_id": "", "outputs": [] } }, "48fdb050e8ff4581ace3fb60fed0a071": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "4a42b996d1bd4f259326d26db6e5759e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "532398e6070045a7842ac7c4df2325f7": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "5655c6a521274a638a4857fc9f643d46": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "58e0068a971c4e14b1ed3220570b9a99": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "LabelModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_849c1bfc61fd4c7488f10eb93be1bad2", "placeholder": "​", "style": "IPY_MODEL_23491e27c7364bc4b497692ea82e1221", "value": "P" } }, "58f76efe53f84028910583acb4590fbc": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "5b8175a7100646678bfa7817c29d2e31": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "5bab3d41eb444d72afba3a7862671dc7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_1c3f9e59c7a24eb0bcf514b10aa12df4", "IPY_MODEL_237e52a581f94c7d831dcba826ad7f09" ], "layout": "IPY_MODEL_d5f64e6a84c94da9841929abe4ce612f" } }, "646274e6e91442918afd96e5c7347113": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "IntSliderModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "IntSliderModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "IntSliderView", "continuous_update": true, "description": "# guesses:", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_4a42b996d1bd4f259326d26db6e5759e", "max": 15, "min": 5, "orientation": "horizontal", "readout": true, "readout_format": "d", "step": 1, "style": "IPY_MODEL_7b85d64effef4cb98ad5aaba7492f546", "value": 10 } }, "6715610014644e56b79ec4cf35d26b0a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "69e472ea2b374eedb218f3cbe85b2be6": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "72cd65b4c91e4876b9e55a4d8bc7d69a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_0958260cd095432ba80c16b8e23915cc", "IPY_MODEL_b87dc051f6e54c50974f35c7ab4ef9e1" ], "layout": "IPY_MODEL_5b8175a7100646678bfa7817c29d2e31" } }, "7784dbad70f64afa8f8e22cd29cad4b6": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "783489476a9b43b59c25f216f87dfc73": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "7a46114da02149e58106775c9b962a7d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_ddaaf95b341a463b9a1a9fc6237db8b3", "IPY_MODEL_fee746773b7e4700b3bddb0a4b5e857c", "IPY_MODEL_72cd65b4c91e4876b9e55a4d8bc7d69a", "IPY_MODEL_06fdc295aa834db8b9f2befba4a648ba", "IPY_MODEL_c4c80472c4554a5ba88c3c09430fbe88", "IPY_MODEL_9b540853df3e463cae18570feb143022", "IPY_MODEL_a05324bf3ad04024b8b39129703f3c00" ], "layout": "IPY_MODEL_cb605a6bfcf94bdea5862a808afa34e9" } }, "7afb1bea45644f5ebc1065d950576677": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "LabelModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_c48bb78ed96f49e48fb8b908a2be3ee0", "placeholder": "​", "style": "IPY_MODEL_5655c6a521274a638a4857fc9f643d46", "value": "B" } }, "7b85d64effef4cb98ad5aaba7492f546": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "SliderStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "SliderStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "", "handle_color": null } }, "7bb39ca716ff4e679a19bccfc5e4b509": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "81d115835f5f4832b70abe0c8d8687b7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "LabelModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_e1f6315468e04fe3ab4348150a5e35c0", "placeholder": "​", "style": "IPY_MODEL_6715610014644e56b79ec4cf35d26b0a", "value": "R" } }, "82ba5eb32ec8479a9bd0bb5d8b73a22a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "849c1bfc61fd4c7488f10eb93be1bad2": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "8cb46e1785574f4385c5d4beabebe069": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "button_color": null, "font_weight": "" } }, "944b2a6311ce45f0880b372de84c00cc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "VBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "VBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "VBoxView", "box_style": "", "children": [ "IPY_MODEL_646274e6e91442918afd96e5c7347113", "IPY_MODEL_ae0c41a8ec4f4956a6f284672eb3c14e", "IPY_MODEL_7a46114da02149e58106775c9b962a7d", "IPY_MODEL_5bab3d41eb444d72afba3a7862671dc7", "IPY_MODEL_ed45f81a0c894cfb99c79e27bbc969f7", "IPY_MODEL_bb8cde33d6b64b3da7d59b1d5d4a5a27", "IPY_MODEL_3ecef0e8ffd449f6827040aa5336e9c5" ], "layout": "IPY_MODEL_d2d89e21ead0460c96d8f77f5355e7bb" } }, "982ad5a36cef4e19bf5b2be9f99955d5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_9b139310880c4d269e7a529084b37369", "placeholder": "​", "style": "IPY_MODEL_7784dbad70f64afa8f8e22cd29cad4b6", "value": "
\n
" } }, "997423ea9666402bb580d24ec710f4a5": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "99a7ed0d8f624ca49a2616e51dce4a1b": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "9b139310880c4d269e7a529084b37369": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "9b1bbb12ceed460dbb38eae9192d7a61": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "TextModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "TextModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "TextView", "continuous_update": true, "description": "Guess:", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_19df450669ac4fd58079b86b50f0085f", "placeholder": "​", "style": "IPY_MODEL_3c9e5478baa74f04b79e372e909a8b28", "value": "" } }, "9b540853df3e463cae18570feb143022": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_7afb1bea45644f5ebc1065d950576677", "IPY_MODEL_ab1dc505be1f4f108b7428297d7b34be" ], "layout": "IPY_MODEL_7bb39ca716ff4e679a19bccfc5e4b509" } }, "9e4dfea85a2d46f3b81e9ea8cb1841b4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "a05324bf3ad04024b8b39129703f3c00": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_58e0068a971c4e14b1ed3220570b9a99", "IPY_MODEL_c58591bbb9c64e159468ad37cc1e1b73" ], "layout": "IPY_MODEL_dfe530d174c144f892f3718707cdaffc" } }, "a0a6c16ce1984d609185cf6e93bfbcef": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "a1918453cbc2431abc94440b0a49985d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "a3ecc21ca14943f2ac6a899b3cead6b4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "SliderStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "SliderStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "", "handle_color": null } }, "ab1dc505be1f4f108b7428297d7b34be": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_99a7ed0d8f624ca49a2616e51dce4a1b", "placeholder": "​", "style": "IPY_MODEL_06d0d6b7fb2d4187bcf9f073a3b02637", "value": "
\n
" } }, "ae0c41a8ec4f4956a6f284672eb3c14e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "IntSliderModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "IntSliderModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "IntSliderView", "continuous_update": true, "description": "Code length:", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_24451017b38747b99fa8474c2ecaa594", "max": 10, "min": 2, "orientation": "horizontal", "readout": true, "readout_format": "d", "step": 1, "style": "IPY_MODEL_a3ecc21ca14943f2ac6a899b3cead6b4", "value": 4 } }, "b53cdcd9053c45b9a37e7a7521c4da01": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "b87dc051f6e54c50974f35c7ab4ef9e1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_ed6d05e811e84632b53cd7f530ac534c", "placeholder": "​", "style": "IPY_MODEL_a0a6c16ce1984d609185cf6e93bfbcef", "value": "
\n
" } }, "bb1b27ca00ed4754abf3d339064b03b1": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "bb8cde33d6b64b3da7d59b1d5d4a5a27": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/output", "_model_module_version": "1.0.0", "_model_name": "OutputModel", "_view_count": null, "_view_module": "@jupyter-widgets/output", "_view_module_version": "1.0.0", "_view_name": "OutputView", "layout": "IPY_MODEL_2555a41f7f24422ea818664d935d6177", "msg_id": "", "outputs": [] } }, "c156d7c84fa54cd182c56d4cea43d3fe": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "LabelModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_1520e261c0b141ad81e9fe6e94e28289", "placeholder": "​", "style": "IPY_MODEL_a1918453cbc2431abc94440b0a49985d", "value": "G" } }, "c2362310b5b94d7a9191c80e151b49a6": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ButtonStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ButtonStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "button_color": null, "font_weight": "" } }, "c48bb78ed96f49e48fb8b908a2be3ee0": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "c4c80472c4554a5ba88c3c09430fbe88": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_c156d7c84fa54cd182c56d4cea43d3fe", "IPY_MODEL_982ad5a36cef4e19bf5b2be9f99955d5" ], "layout": "IPY_MODEL_0056476798c3469caf0d80a5a8b03f4e" } }, "c58591bbb9c64e159468ad37cc1e1b73": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HTMLModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HTMLModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HTMLView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_eb73b6e3f514405cb341ac279c743305", "placeholder": "​", "style": "IPY_MODEL_143de380104f490ab8512aabdb8ce00e", "value": "
\n
" } }, "cb605a6bfcf94bdea5862a808afa34e9": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "d2d89e21ead0460c96d8f77f5355e7bb": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "d47aa0f6b1304ef693461c8a33ac15a6": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "d5f64e6a84c94da9841929abe4ce612f": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "ddaaf95b341a463b9a1a9fc6237db8b3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "LabelModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "LabelModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "LabelView", "description": "", "description_tooltip": null, "layout": "IPY_MODEL_82ba5eb32ec8479a9bd0bb5d8b73a22a", "placeholder": "​", "style": "IPY_MODEL_0a0e55d40522448e896801e4d6191434", "value": "Color codes:" } }, "dfe530d174c144f892f3718707cdaffc": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "e1f6315468e04fe3ab4348150a5e35c0": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "eb73b6e3f514405cb341ac279c743305": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "ed45f81a0c894cfb99c79e27bbc969f7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_9b1bbb12ceed460dbb38eae9192d7a61", "IPY_MODEL_26fbd3dfc1034f368895867e791a7466" ], "layout": "IPY_MODEL_69e472ea2b374eedb218f3cbe85b2be6" } }, "ed6d05e811e84632b53cd7f530ac534c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "fa7954389c3141e1b34f148b6ce77856": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "fee746773b7e4700b3bddb0a4b5e857c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_81d115835f5f4832b70abe0c8d8687b7", "IPY_MODEL_19af2ed3aeff4e3bad6bc44c2b2e2f91" ], "layout": "IPY_MODEL_b53cdcd9053c45b9a37e7a7521c4da01" } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }