Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tyfkda/7823a7ab0ebbd0ef6eb76f1a116c4911 to your computer and use it in GitHub Desktop.
Save tyfkda/7823a7ab0ebbd0ef6eb76f1a116c4911 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "三目並べをColab上で対戦",
"provenance": [],
"collapsed_sections": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"5217f1d31e744bfea137faa910c84f55": {
"model_module": "@jupyter-widgets/controls",
"model_name": "GridBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "GridBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "GridBoxView",
"box_style": "",
"children": [
"IPY_MODEL_ac45f7c058a343ea979a69b7534facb3",
"IPY_MODEL_a76ee77c32564f509c411918c0bc339b",
"IPY_MODEL_cdd78034ae024bcd876267cccf4af732",
"IPY_MODEL_e8fb7763d7c64476a3f31d45833ca465",
"IPY_MODEL_1f54c4d92b874387b9f0390ae6c5b13c",
"IPY_MODEL_5bcaa4fd785d47aba04aa98c5133e79b",
"IPY_MODEL_be1761da76814da3bfb17ecd975bc315",
"IPY_MODEL_153778b8e6724a4897eadd0c8f570d41",
"IPY_MODEL_1763bfd4c09e453fb449ccaffb45f55b"
],
"layout": "IPY_MODEL_8d6341f060bd4d93b3740f33a6b697e3"
}
},
"ac45f7c058a343ea979a69b7534facb3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "1, 1",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_73268f8b19174bb9b7c5008779fb42f6",
"style": "IPY_MODEL_51133e1bff7c4e0ab2864324d11452e0",
"tooltip": ""
}
},
"a76ee77c32564f509c411918c0bc339b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "2, 1",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_47fc7360ffc14c048dc7a14257cc67c7",
"style": "IPY_MODEL_ef323f590c55499ea4408faf107d034e",
"tooltip": ""
}
},
"cdd78034ae024bcd876267cccf4af732": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "3, 1",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_8a478bfec4174e2896a57420edd6d3d7",
"style": "IPY_MODEL_82b57f7c3c04453ab22ce61d8bc4d86f",
"tooltip": ""
}
},
"e8fb7763d7c64476a3f31d45833ca465": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "1, 2",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_705597687d074be5a83ed9307cabf5cc",
"style": "IPY_MODEL_645d4c1cf4f041ba8d802fc2d0b33a49",
"tooltip": ""
}
},
"1f54c4d92b874387b9f0390ae6c5b13c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "",
"disabled": true,
"icon": "",
"layout": "IPY_MODEL_ad599d170c5244c48ed44c05ad042f61",
"style": "IPY_MODEL_f44a95a50b5345c4930e082380c2bb7d",
"tooltip": ""
}
},
"5bcaa4fd785d47aba04aa98c5133e79b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "3, 2",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_f43b539d73f74b1cbce4f8445f9526e0",
"style": "IPY_MODEL_2f461b1b58d24679848a5043a3484557",
"tooltip": ""
}
},
"be1761da76814da3bfb17ecd975bc315": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "1, 3",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_baf58b89815c4ec4b5d23519b12014cd",
"style": "IPY_MODEL_d50ae862ef4c4e83a5eb98580c773e02",
"tooltip": ""
}
},
"153778b8e6724a4897eadd0c8f570d41": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "2, 3",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_f82c4230a8274593b27430b1f1dba72a",
"style": "IPY_MODEL_6d73f75d1cde492699f2e09b03b019dc",
"tooltip": ""
}
},
"1763bfd4c09e453fb449ccaffb45f55b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "3, 3",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_791b575a96c34ef89d7d8e5c217a6969",
"style": "IPY_MODEL_8f5a1d9871ed4d04bd43e69ade9fde3b",
"tooltip": ""
}
},
"8d6341f060bd4d93b3740f33a6b697e3": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "4px",
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": "repeat(3, 50px)",
"grid_template_rows": "repeat(3, 50px)",
"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
}
},
"73268f8b19174bb9b7c5008779fb42f6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"51133e1bff7c4e0ab2864324d11452e0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"47fc7360ffc14c048dc7a14257cc67c7": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"ef323f590c55499ea4408faf107d034e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"8a478bfec4174e2896a57420edd6d3d7": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"82b57f7c3c04453ab22ce61d8bc4d86f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"705597687d074be5a83ed9307cabf5cc": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"645d4c1cf4f041ba8d802fc2d0b33a49": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"ad599d170c5244c48ed44c05ad042f61": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"f44a95a50b5345c4930e082380c2bb7d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"f43b539d73f74b1cbce4f8445f9526e0": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"2f461b1b58d24679848a5043a3484557": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"baf58b89815c4ec4b5d23519b12014cd": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"d50ae862ef4c4e83a5eb98580c773e02": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"f82c4230a8274593b27430b1f1dba72a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"6d73f75d1cde492699f2e09b03b019dc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"791b575a96c34ef89d7d8e5c217a6969": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"8f5a1d9871ed4d04bd43e69ade9fde3b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"a3ae7b412a794c9e9773961983b47437": {
"model_module": "@jupyter-widgets/controls",
"model_name": "GridBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "GridBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "GridBoxView",
"box_style": "",
"children": [
"IPY_MODEL_e48239ea180e47f8939124e93187d58d",
"IPY_MODEL_4a23525755d649afb7a1dfd135f8d511",
"IPY_MODEL_a4461f67c5ad4a3695b6de7b12fcf71c",
"IPY_MODEL_033e295ba5ee41ee89014764fd5d5656",
"IPY_MODEL_5b64f16536dc485b83cc065cc6788049",
"IPY_MODEL_0cc1d397d3b145cd8c29496705cfabec",
"IPY_MODEL_b51f19e010dc4e95a9593fece6f82fb5",
"IPY_MODEL_25385a3c4fcb489683fc08d4d514463e",
"IPY_MODEL_67dac693ba6446c6b0fe7692b2880b11"
],
"layout": "IPY_MODEL_35cb23bccffa44258ca4b2ec3b7138fb"
}
},
"e48239ea180e47f8939124e93187d58d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "",
"disabled": true,
"icon": "",
"layout": "IPY_MODEL_637f8d2f824a40d2a7330a68871e7057",
"style": "IPY_MODEL_59bb3cdbf0b546308c614671c03c13ca",
"tooltip": ""
}
},
"4a23525755d649afb7a1dfd135f8d511": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "",
"disabled": true,
"icon": "",
"layout": "IPY_MODEL_0489a3f416de41b4b0322046f31ea214",
"style": "IPY_MODEL_608fe3f3c0024f548cffa6e9217022d9",
"tooltip": ""
}
},
"a4461f67c5ad4a3695b6de7b12fcf71c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "3, 1",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_400175fe85e947458bc932a677cda088",
"style": "IPY_MODEL_fabcdbe07f094fe890ef5e149da505b4",
"tooltip": ""
}
},
"033e295ba5ee41ee89014764fd5d5656": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "1, 2",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_b5a48b694f9340f9b2fb7067bf625676",
"style": "IPY_MODEL_e0fb0a4db8e24ece851d218729c04d3c",
"tooltip": ""
}
},
"5b64f16536dc485b83cc065cc6788049": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "",
"disabled": true,
"icon": "",
"layout": "IPY_MODEL_ad30aea8aef04d8c9c73566bad4bef0b",
"style": "IPY_MODEL_960b75bb82ff4291b76b66b2060e932c",
"tooltip": ""
}
},
"0cc1d397d3b145cd8c29496705cfabec": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "3, 2",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_775b17b1d97044119b13ee9aa1ffd69e",
"style": "IPY_MODEL_c013581fa2a945d4987af139f4f34343",
"tooltip": ""
}
},
"b51f19e010dc4e95a9593fece6f82fb5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "1, 3",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_4ce260d9e1e14d18857a6cf7deda5e95",
"style": "IPY_MODEL_3dfffa6b35d04bca8fd2f187d35c823a",
"tooltip": ""
}
},
"25385a3c4fcb489683fc08d4d514463e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "2, 3",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_dc234722e1d54af68214725e3ba549ac",
"style": "IPY_MODEL_82990d917b3942219af951fa575247cd",
"tooltip": ""
}
},
"67dac693ba6446c6b0fe7692b2880b11": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "3, 3",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_58b9893271154df193869aec47841e50",
"style": "IPY_MODEL_df3ea4fd69384cb2b19229759a65060f",
"tooltip": ""
}
},
"35cb23bccffa44258ca4b2ec3b7138fb": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "4px",
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": "repeat(3, 50px)",
"grid_template_rows": "repeat(3, 50px)",
"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
}
},
"637f8d2f824a40d2a7330a68871e7057": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"59bb3cdbf0b546308c614671c03c13ca": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"0489a3f416de41b4b0322046f31ea214": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"608fe3f3c0024f548cffa6e9217022d9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"400175fe85e947458bc932a677cda088": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"fabcdbe07f094fe890ef5e149da505b4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"b5a48b694f9340f9b2fb7067bf625676": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"e0fb0a4db8e24ece851d218729c04d3c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"ad30aea8aef04d8c9c73566bad4bef0b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"960b75bb82ff4291b76b66b2060e932c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"775b17b1d97044119b13ee9aa1ffd69e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"c013581fa2a945d4987af139f4f34343": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"4ce260d9e1e14d18857a6cf7deda5e95": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"3dfffa6b35d04bca8fd2f187d35c823a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"dc234722e1d54af68214725e3ba549ac": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"82990d917b3942219af951fa575247cd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"58b9893271154df193869aec47841e50": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"df3ea4fd69384cb2b19229759a65060f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"be9a8643dd374045a734aad52ef42359": {
"model_module": "@jupyter-widgets/controls",
"model_name": "GridBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "GridBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "GridBoxView",
"box_style": "",
"children": [
"IPY_MODEL_1205079339624bb2b3a668d7d83b2a13",
"IPY_MODEL_8170dd6b0f0a4cf7a8f47d480ec24823",
"IPY_MODEL_612c193484084f91a111b40904692b70",
"IPY_MODEL_bd516befe8f6491fb4a747827d93dc3b",
"IPY_MODEL_1045ba2f28ca4047b7b650c54bceda69",
"IPY_MODEL_0af4b92840fd44f38086986b0ed22387",
"IPY_MODEL_a0daf464b3b2433e9e860368bec9b7a0",
"IPY_MODEL_df16aeafca31408fae65a1a7407f457b",
"IPY_MODEL_ecf6287091c24f70a1ccf80d9fdcdb73"
],
"layout": "IPY_MODEL_9b50b6adc7c64ad9aef3841098dee48a"
}
},
"1205079339624bb2b3a668d7d83b2a13": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "",
"disabled": true,
"icon": "",
"layout": "IPY_MODEL_5361a95c0047476c984d963999a08de6",
"style": "IPY_MODEL_715cbfc9e2be4eb4b7fe2460030d624b",
"tooltip": ""
}
},
"8170dd6b0f0a4cf7a8f47d480ec24823": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "",
"disabled": true,
"icon": "",
"layout": "IPY_MODEL_e6989e0e732442858e9697be88db6e1e",
"style": "IPY_MODEL_51c86c2836024b37a710393b8404f6c6",
"tooltip": ""
}
},
"612c193484084f91a111b40904692b70": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "3, 1",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_38c7c2b07d68481a91d28a67754b18c6",
"style": "IPY_MODEL_4a5ead5ba38f486897862704fe5aee37",
"tooltip": ""
}
},
"bd516befe8f6491fb4a747827d93dc3b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "1, 2",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_22a97e6aaef74f7187ed649856b22cff",
"style": "IPY_MODEL_05f66aca4f5248cfa422f77b1c671f68",
"tooltip": ""
}
},
"1045ba2f28ca4047b7b650c54bceda69": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "",
"disabled": true,
"icon": "",
"layout": "IPY_MODEL_eb9c7deccbe54273a80c5327d96de4e1",
"style": "IPY_MODEL_d64fa0a044a8406ab189d827a82d2e60",
"tooltip": ""
}
},
"0af4b92840fd44f38086986b0ed22387": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "3, 2",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_c8f43467f78f482b85fe34793c851169",
"style": "IPY_MODEL_91cda5d0bf8a4d93814b97f20d948103",
"tooltip": ""
}
},
"a0daf464b3b2433e9e860368bec9b7a0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "",
"disabled": true,
"icon": "",
"layout": "IPY_MODEL_15c1f37837424c649f55563457dff287",
"style": "IPY_MODEL_4ea172f0533340a69831d99212aa0305",
"tooltip": ""
}
},
"df16aeafca31408fae65a1a7407f457b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "2, 3",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_54793c2d71fd4fe48062f9112c5de6be",
"style": "IPY_MODEL_9dadc6e1120e4ca3aeffefd4262c3bad",
"tooltip": ""
}
},
"ecf6287091c24f70a1ccf80d9fdcdb73": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"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": "",
"disabled": true,
"icon": "",
"layout": "IPY_MODEL_1655e644566240d782cf1733a871188a",
"style": "IPY_MODEL_4463a5d3f41a449490ba6097c91b9da8",
"tooltip": ""
}
},
"9b50b6adc7c64ad9aef3841098dee48a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "4px",
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": "repeat(3, 50px)",
"grid_template_rows": "repeat(3, 50px)",
"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
}
},
"5361a95c0047476c984d963999a08de6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"715cbfc9e2be4eb4b7fe2460030d624b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"e6989e0e732442858e9697be88db6e1e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"51c86c2836024b37a710393b8404f6c6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"38c7c2b07d68481a91d28a67754b18c6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"4a5ead5ba38f486897862704fe5aee37": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"22a97e6aaef74f7187ed649856b22cff": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"05f66aca4f5248cfa422f77b1c671f68": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"eb9c7deccbe54273a80c5327d96de4e1": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"d64fa0a044a8406ab189d827a82d2e60": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"c8f43467f78f482b85fe34793c851169": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"91cda5d0bf8a4d93814b97f20d948103": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"15c1f37837424c649f55563457dff287": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"4ea172f0533340a69831d99212aa0305": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"54793c2d71fd4fe48062f9112c5de6be": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"9dadc6e1120e4ca3aeffefd4262c3bad": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"1655e644566240d782cf1733a871188a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "50px",
"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": "50px"
}
},
"4463a5d3f41a449490ba6097c91b9da8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
}
}
}
},
"cells": [
{
"cell_type": "markdown",
"source": [
"書籍「AlphaZero 深層学習・強化学習・探索 人工知能プログラミング 実践入門」の7章「人間とAIの対戦」で、\n",
"ローカルにTensorFlowを動かせる環境を作るのが面倒なので、Colab上で動かしてみる。"
],
"metadata": {
"id": "szkkY1HLb9iu"
}
},
{
"cell_type": "markdown",
"source": [
"### TensorFlow\n",
"\n",
"バージョン1.xを使用する。"
],
"metadata": {
"id": "RK6_NcVKzvCa"
}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "QIqqjBhMbo_Z",
"outputId": "03ee0e5f-735b-4071-c446-2166d721d679"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"TensorFlow 1.x selected.\n",
"1.15.2\n"
]
}
],
"source": [
"%tensorflow_version 1.x\n",
"import tensorflow as tf\n",
"print(tf.__version__)"
]
},
{
"cell_type": "markdown",
"source": [
"### モジュールの(再)インストール\n",
"\n",
"h5pyの再インストールをする。\n",
"\n",
"インストール後にはいったんインスタンスを再起動して再度先頭から実行する必要がある。"
],
"metadata": {
"id": "mWcMDxh4z31f"
}
},
{
"cell_type": "code",
"source": [
"!pip show h5py\n",
"!pip uninstall -y h5py\n",
"!pip install tensorflow h5py==2.8.0\n",
"!pip show h5py"
],
"metadata": {
"id": "fQQSWKk9pMQ3"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"### ファイルのアップロード\n",
"\n",
"必要なファイル:\n",
"\n",
" * game.py\n",
" * dual_network.py\n",
" * pv_mcts.py"
],
"metadata": {
"id": "Eur5_nUNcO0b"
}
},
{
"cell_type": "code",
"source": [
"from google.colab import files\n",
"uploaded = files.upload()"
],
"metadata": {
"colab": {
"resources": {
"http://localhost:8080/nbextensions/google.colab/files.js": {
"data": "Ly8gQ29weXJpZ2h0IDIwMTcgR29vZ2xlIExMQwovLwovLyBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsKLy8geW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLgovLyBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQKLy8KLy8gICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKLy8KLy8gVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQovLyBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAovLyBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4KLy8gU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAovLyBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KCi8qKgogKiBAZmlsZW92ZXJ2aWV3IEhl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ywKICAgICAgICAgIGZpbGU6IGZpbGUubmFtZSwKICAgICAgICAgIGRhdGE6IGJhc2U2NCwKICAgICAgICB9LAogICAgICB9OwoKICAgICAgbGV0IHBlcmNlbnREb25lID0gZmlsZURhdGEuYnl0ZUxlbmd0aCA9PT0gMCA/CiAgICAgICAgICAxMDAgOgogICAgICAgICAgTWF0aC5yb3VuZCgocG9zaXRpb24gLyBmaWxlRGF0YS5ieXRlTGVuZ3RoKSAqIDEwMCk7CiAgICAgIHBlcmNlbnQudGV4dENvbnRlbnQgPSBgJHtwZXJjZW50RG9uZX0lIGRvbmVgOwoKICAgIH0gd2hpbGUgKHBvc2l0aW9uIDwgZmlsZURhdGEuYnl0ZUxlbmd0aCk7CiAgfQoKICAvLyBBbGwgZG9uZS4KICB5aWVsZCB7CiAgICByZXNwb25zZTogewogICAgICBhY3Rpb246ICdjb21wbGV0ZScsCiAgICB9CiAgfTsKfQoKc2NvcGUuZ29vZ2xlID0gc2NvcGUuZ29vZ2xlIHx8IHt9OwpzY29wZS5nb29nbGUuY29sYWIgPSBzY29wZS5nb29nbGUuY29sYWIgfHwge307CnNjb3BlLmdvb2dsZS5jb2xhYi5fZmlsZXMgPSB7CiAgX3VwbG9hZEZpbGVzLAogIF91cGxvYWRGaWxlc0NvbnRpbnVlLAp9Owp9KShzZWxmKTsK",
"ok": true,
"headers": [
[
"content-type",
"application/javascript"
]
],
"status": 200,
"status_text": ""
}
},
"base_uri": "https://localhost:8080/",
"height": 148
},
"id": "p6JW3VShcJYm",
"outputId": "89a539e3-7e05-422c-83cc-d1f1276a956b"
},
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"<IPython.core.display.HTML object>"
],
"text/html": [
"\n",
" <input type=\"file\" id=\"files-18aeeeea-a4a4-4873-80ca-25aa55f2e092\" name=\"files[]\" multiple disabled\n",
" style=\"border:none\" />\n",
" <output id=\"result-18aeeeea-a4a4-4873-80ca-25aa55f2e092\">\n",
" Upload widget is only available when the cell has been executed in the\n",
" current browser session. Please rerun this cell to enable.\n",
" </output>\n",
" <script src=\"/nbextensions/google.colab/files.js\"></script> "
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"Saving pv_mcts.py to pv_mcts (2).py\n",
"Saving game.py to game (2).py\n",
"Saving dual_network.py to dual_network (2).py\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"### モデルをGoogleDriveからコピー\n",
"\n",
"自分のGoogleDriveの `AlphaZeroBook/TicTacToe/best.h5` に置いているものと仮定。"
],
"metadata": {
"id": "EU4-WoyT0SKp"
}
},
{
"cell_type": "code",
"source": [
"from google.colab import drive\n",
"drive.mount('./drive')\n",
"!ls -l drive\n",
"!mkdir -p model\n",
"!cp ./drive/MyDrive/AlphaZeroBook/TicTacToe/best.h5 ./model/\n",
"#!ls -l model/"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "W-dFrC41dnkH",
"outputId": "b449ceef-4dcc-4ad8-ce01-43ef0eca7c1c"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Drive already mounted at ./drive; to attempt to forcibly remount, call drive.mount(\"./drive\", force_remount=True).\n",
"total 4\n",
"drwx------ 6 root root 4096 Apr 18 06:43 MyDrive\n",
"total 55920\n",
"-rw------- 1 root root 57260864 Apr 18 06:44 best.h5\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"### 盤面描画\n",
"\n",
"グラフィックスはPILの `Image` を `IPython.display` で表示。"
],
"metadata": {
"id": "XIXMg38Jcv8l"
}
},
{
"cell_type": "code",
"source": [
"from PIL import Image, ImageDraw\n",
"from IPython.display import display\n",
"\n",
"W = H = 256\n",
"MARGIN = 16\n",
"\n",
"class Board:\n",
" def __init__(self):\n",
" self.im = Image.new('RGB', (W, H))\n",
" self.draw = ImageDraw.Draw(self.im)\n",
" \n",
" def render(self, state):\n",
" w = (W - MARGIN * 2) // 3\n",
" w0 = (W - w * 3) // 2\n",
"\n",
" self.draw.rectangle((0, 0, self.im.width, self.im.height), fill=(224, 224, 224))\n",
" for i in range(3 - 1):\n",
" x = (i + 1) * w + w0 - 1\n",
" self.draw.line((x, w0, x, w0 + w * 3), fill=(0, 0, 0), width=1)\n",
" self.draw.line((w0, x, w0 + w * 3, x), fill=(0, 0, 0), width=1)\n",
" \n",
" first = state.is_first_player()\n",
" self.render_piece(state.pieces, first, w, w0)\n",
" self.render_piece(state.enemy_pieces, not first, w, w0)\n",
" \n",
" def render_piece(self, pieces, first, w, w0):\n",
" u = w * 1 // 3\n",
" l = 4\n",
" for i in range(3):\n",
" cy = w0 + i * w + w // 2\n",
" for j in range(3):\n",
" cx = w0 + j * w + w // 2\n",
" if pieces[j + i * 3] == 0:\n",
" continue\n",
" if first:\n",
" self.draw.ellipse((cx - u, cy - u, cx + u, cy + u), outline=(255, 0, 0), width=l)\n",
" else:\n",
" self.draw.line((cx - u, cy - u, cx + u, cy + u), fill=(0, 192, 0), width=l)\n",
" self.draw.line((cx + u, cy - u, cx - u, cy + u), fill=(0, 192, 0), width=l)\n",
"\n",
" def display(self):\n",
" display(self.im)\n"
],
"metadata": {
"id": "c_ysxx3wThKO"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"### ゲーム制御\n",
"\n",
" * 人間側の入力UIは[Jupyter widgets](https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Styling.html) を使用"
],
"metadata": {
"id": "co_uFM8DbT_T"
}
},
{
"cell_type": "code",
"source": [
"from game import State\n",
"from pv_mcts import pv_mcts_action\n",
"from tensorflow.keras.models import load_model\n",
"from IPython.display import clear_output\n",
"from ipywidgets import Button, Layout, GridBox\n",
"\n",
"class TicTacToe:\n",
" def __init__(self, model_path):\n",
" self.model = load_model(model_path)\n",
" self.next_action = pv_mcts_action(self.model, 1.0)\n",
" self.reset_game()\n",
" self.board = Board()\n",
"\n",
" def reset_game(self):\n",
" self.state = State()\n",
" self.turn = 0\n",
"\n",
" def play(self):\n",
" while True:\n",
" if self.state.is_done():\n",
" break\n",
" if self.turn % 2 != 0: # Human\n",
" self.show_input_ui()\n",
" return\n",
" action = self.choose_cpu_hand()\n",
" self.play_hand(action)\n",
"\n",
" if self.state.is_lose():\n",
" if self.turn % 2 == 0:\n",
" print('You win!')\n",
" else:\n",
" print('You lose')\n",
" else:\n",
" print('Draw')\n",
"\n",
" def play_hand(self, action):\n",
" self.state = self.state.next(action)\n",
" self.turn += 1\n",
" self.display()\n",
" \n",
" def show_input_ui(self):\n",
" def create_button(i):\n",
" action = i\n",
" legal = self.can_act(action)\n",
" title = f'{i % 3 + 1}, {i // 3 + 1}' if legal else ''\n",
" button = Button(description=title, layout=Layout(width='50px', height='50px'))\n",
" button.disabled = not legal\n",
" if legal:\n",
" def clicked(b):\n",
" self.play_hand(action)\n",
" self.play()\n",
" button.on_click(clicked)\n",
" return button\n",
" ui = GridBox(children=[create_button(i) for i in range(9)],\n",
" layout=Layout(\n",
" grid_template_columns='repeat(3, 50px)',\n",
" grid_template_rows='repeat(3, 50px)',\n",
" grid_gap='4px'))\n",
" display(ui)\n",
"\n",
" def choose_cpu_hand(self):\n",
" return self.next_action(self.state)\n",
"\n",
" def can_act(self, action):\n",
" return action in self.state.legal_actions()\n",
" \n",
" def display(self):\n",
" clear_output()\n",
" self.board.render(self.state)\n",
" self.board.display()\n",
"\n",
"ttt = TicTacToe('./model/best.h5')"
],
"metadata": {
"id": "JI2JMAqdcxcl"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"### ゲームプレイ\n",
"\n",
"モデルは完璧ではなく、勝てる場合でも引き分けにされてしまうこともある。"
],
"metadata": {
"id": "as26JTVkt2Wv"
}
},
{
"cell_type": "code",
"source": [
"ttt.reset_game()\n",
"ttt.play()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 431,
"referenced_widgets": [
"5217f1d31e744bfea137faa910c84f55",
"ac45f7c058a343ea979a69b7534facb3",
"a76ee77c32564f509c411918c0bc339b",
"cdd78034ae024bcd876267cccf4af732",
"e8fb7763d7c64476a3f31d45833ca465",
"1f54c4d92b874387b9f0390ae6c5b13c",
"5bcaa4fd785d47aba04aa98c5133e79b",
"be1761da76814da3bfb17ecd975bc315",
"153778b8e6724a4897eadd0c8f570d41",
"1763bfd4c09e453fb449ccaffb45f55b",
"8d6341f060bd4d93b3740f33a6b697e3",
"73268f8b19174bb9b7c5008779fb42f6",
"51133e1bff7c4e0ab2864324d11452e0",
"47fc7360ffc14c048dc7a14257cc67c7",
"ef323f590c55499ea4408faf107d034e",
"8a478bfec4174e2896a57420edd6d3d7",
"82b57f7c3c04453ab22ce61d8bc4d86f",
"705597687d074be5a83ed9307cabf5cc",
"645d4c1cf4f041ba8d802fc2d0b33a49",
"ad599d170c5244c48ed44c05ad042f61",
"f44a95a50b5345c4930e082380c2bb7d",
"f43b539d73f74b1cbce4f8445f9526e0",
"2f461b1b58d24679848a5043a3484557",
"baf58b89815c4ec4b5d23519b12014cd",
"d50ae862ef4c4e83a5eb98580c773e02",
"f82c4230a8274593b27430b1f1dba72a",
"6d73f75d1cde492699f2e09b03b019dc",
"791b575a96c34ef89d7d8e5c217a6969",
"8f5a1d9871ed4d04bd43e69ade9fde3b",
"a3ae7b412a794c9e9773961983b47437",
"e48239ea180e47f8939124e93187d58d",
"4a23525755d649afb7a1dfd135f8d511",
"a4461f67c5ad4a3695b6de7b12fcf71c",
"033e295ba5ee41ee89014764fd5d5656",
"5b64f16536dc485b83cc065cc6788049",
"0cc1d397d3b145cd8c29496705cfabec",
"b51f19e010dc4e95a9593fece6f82fb5",
"25385a3c4fcb489683fc08d4d514463e",
"67dac693ba6446c6b0fe7692b2880b11",
"35cb23bccffa44258ca4b2ec3b7138fb",
"637f8d2f824a40d2a7330a68871e7057",
"59bb3cdbf0b546308c614671c03c13ca",
"0489a3f416de41b4b0322046f31ea214",
"608fe3f3c0024f548cffa6e9217022d9",
"400175fe85e947458bc932a677cda088",
"fabcdbe07f094fe890ef5e149da505b4",
"b5a48b694f9340f9b2fb7067bf625676",
"e0fb0a4db8e24ece851d218729c04d3c",
"ad30aea8aef04d8c9c73566bad4bef0b",
"960b75bb82ff4291b76b66b2060e932c",
"775b17b1d97044119b13ee9aa1ffd69e",
"c013581fa2a945d4987af139f4f34343",
"4ce260d9e1e14d18857a6cf7deda5e95",
"3dfffa6b35d04bca8fd2f187d35c823a",
"dc234722e1d54af68214725e3ba549ac",
"82990d917b3942219af951fa575247cd",
"58b9893271154df193869aec47841e50",
"df3ea4fd69384cb2b19229759a65060f",
"be9a8643dd374045a734aad52ef42359",
"1205079339624bb2b3a668d7d83b2a13",
"8170dd6b0f0a4cf7a8f47d480ec24823",
"612c193484084f91a111b40904692b70",
"bd516befe8f6491fb4a747827d93dc3b",
"1045ba2f28ca4047b7b650c54bceda69",
"0af4b92840fd44f38086986b0ed22387",
"a0daf464b3b2433e9e860368bec9b7a0",
"df16aeafca31408fae65a1a7407f457b",
"ecf6287091c24f70a1ccf80d9fdcdb73",
"9b50b6adc7c64ad9aef3841098dee48a",
"5361a95c0047476c984d963999a08de6",
"715cbfc9e2be4eb4b7fe2460030d624b",
"e6989e0e732442858e9697be88db6e1e",
"51c86c2836024b37a710393b8404f6c6",
"38c7c2b07d68481a91d28a67754b18c6",
"4a5ead5ba38f486897862704fe5aee37",
"22a97e6aaef74f7187ed649856b22cff",
"05f66aca4f5248cfa422f77b1c671f68",
"eb9c7deccbe54273a80c5327d96de4e1",
"d64fa0a044a8406ab189d827a82d2e60",
"c8f43467f78f482b85fe34793c851169",
"91cda5d0bf8a4d93814b97f20d948103",
"15c1f37837424c649f55563457dff287",
"4ea172f0533340a69831d99212aa0305",
"54793c2d71fd4fe48062f9112c5de6be",
"9dadc6e1120e4ca3aeffefd4262c3bad",
"1655e644566240d782cf1733a871188a",
"4463a5d3f41a449490ba6097c91b9da8"
]
},
"id": "gpoKbmuksCMb",
"outputId": "e10042d0-61f2-4060-f055-e867914c59dc"
},
"execution_count": null,
"outputs": [
{
"output_type":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CADSCADS/gO9R+brJDzGGAAAAABJRU5ErkJggg==\n"
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"GridBox(children=(Button(disabled=True, layout=Layout(height='50px', width='50px'), style=ButtonStyle()), Butt…"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "be9a8643dd374045a734aad52ef42359"
}
},
"metadata": {}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment