{"cells":[{"metadata":{},"cell_type":"markdown","source":"# What's this\n- 主にチーム内での情報共有を目的とした文書ですがせっかくなのでpublicにしています\n- このNotebookは本コンペのルールの翻訳など、とにかく参加する前に読んでおくと良さそうなことをまとめていきます"},{"metadata":{},"cell_type":"markdown","source":"# コンペについて\n- コンウェイのライフゲームの事前状態を機械学習で予想する\n- 25×25のサイズ\n- 上端と下端がつながっている(トーラス)\n- 初期状態と最終状態、最終状態に至るまでのステップ数が与えられる\n- 50000パターンのデータが提供されているが当然いくらでも生成可能\n- 完全にランダムに生成されているわけではなく以下のステップでボードの選定が行われている\n  \n  \n1. 1%~99%の間でランダムな密度でボードを作成\n2. 5 step 処理を進めこれを初期状態とする\n3. 1~5の間でランダムにdeltaを決定\n4. 初期状態からdelta step分進める\n5. 終了状態でボードが空の場合破棄する"},{"metadata":{},"cell_type":"markdown","source":"# コンウェイのライフゲーム\n- 以下の4つのルールで構成される\n- 誕生\n  - 死んでいるセルに隣接する生きたセルがちょうど3つあれば、次の世代が誕生する。\n- 生存\n  - 生きているセルに隣接する生きたセルが2つか3つならば、次の世代でも生存する。\n- 過疎\n  - 生きているセルに隣接する生きたセルが1つ以下ならば、過疎により死滅する。\n- 過密\n  - 生きているセルに隣接する生きたセルが4つ以上ならば、過密により死滅する。\n  \n (https://ja.wikipedia.org/wiki/%E3%83%A9%E3%82%A4%E3%83%95%E3%82%B2%E3%83%BC%E3%83%A0)"},{"metadata":{},"cell_type":"markdown","source":"# データについて\n## train\n- deltaと初期状態、最終状態\n## test\n- deltaと最終状態\n## submit\n- 初期状態"},{"metadata":{},"cell_type":"markdown","source":"# evaluation (評価関数)\n- 各セルについて0-1の2値分類\n- submit fileの各行ごとにaccuracyを出し\n- 全体の mean absolute error\n"},{"metadata":{},"cell_type":"markdown","source":"# EDA\n- データの中身を見てみる"},{"metadata":{"trusted":true},"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 5GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train = pd.read_csv('/kaggle/input/conways-reverse-game-of-life-2020/train.csv')\ntest = pd.read_csv('/kaggle/input/conways-reverse-game-of-life-2020/test.csv')\nsample_submission = pd.read_csv('/kaggle/input/conways-reverse-game-of-life-2020/sample_submission.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train.describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"test","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"test.describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"sample_submission","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"sample_submission.describe()","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat":4,"nbformat_minor":4}