Skip to content
Farming Strategy Planner for Arknight 明日方舟最优刷图策略规划
Python Jupyter Notebook
Branch: master
Clone or download
Latest commit c1c5e00 Aug 28, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
ArkPlannerWeb @ 37dd362 update submodule Jul 11, 2019
.gitignore adjust gitignore; slightly modify MP to work with Jul 11, 2019
.gitmodules add submodule Jun 13, 2019
LICENSE Create LICENSE Jun 8, 2019 add new functions Jul 19, 2019 Update Aug 28, 2019
demo.ipynb now fit for current data format Jun 8, 2019
required.txt add new functions Jul 3, 2019 adjust display Jul 22, 2019


Web Demo at Penguin-Stat is available now. Demo is based on the Front-end version implemented by @invisiblearts.


ArkPlanner is a tiny python tool for the mobile game Arknight. The variety of items dropping at different stages and the complicate synthesize system make it difficult to make the most efficient plan to obtain items. ArkPlanner helps you to make the optimal plan for any given combinations of the required item based on open-sourced stats data and items synthesize rules, and linear programming algorithms.

Note: the linear programming is based on the items dropping expectations estimated by the existing samples. Due to the randomness, divergence may occur especially when you require a small number of items.

安装说明 - Installation

1. 环境配置 - Environment requirements

需要安装Python 3.5以上版本。Web 服务器则需要 3.6 以上。Windows系统可通过此链接安装Anaconda。强烈推荐使用Jupyter notebook,详情请百度。

Python >= 3.5 (3.6 for web server) Required. For Windows users, I recommend installing Anaconda. Jupyter notebook is highly recommended. Google it for more details.

2. 安装 - Installation

在命令行中执行以下命令,或手动下载解压。Run the following commands in command lines.

git clone
cd ArkPlanner
python install

Note: 如何打开命令行?Windows下可从Anaconda或Win+R开启运行对话框,输入cmd并回车。Mac下control+空格并搜索“终端”/“Terminal”。

使用说明 - Usage

1. 在命令行中使用

  • 找到 required.txt 以及 owned.txt 两个文件,在 required.txt 中列出你所需要的材料以及数量,材料和数量间空格隔开,多个材料用回车隔开,在 owned.txt 中列出你现有的材料及数目,格式同上。

    Find and edit the files required.txt and owned.txt. List the items you need and you already have. Seperate item name and quatity by space and two items by return. For example:


    双极纳米片 4
    RMA70-24 5
  • 修改完成后保存并关闭,在命令行中运行

    Then save the files and run the following command in your command line:



    You shall find some outputs like this:

    Optimization terminated successfully, Computed in 0.0324 seconds,
    Estimated total sanity cost <----(预计消耗的总体力)
    Farm at following stages: <----(以下是你要刷哪些副本以及次数)
    Stage 3-1 (5 times) ===> 双酮(1), 酮凝集组(2)
    Stage 4-10 (9 times) ===> 源岩(2), 固源岩(3), 全新装置(2), 赤金(1)
    Stage 1-7 (59 times) ===> 源岩(7), 固源岩(75), 破损装置(2), 酯原料(4), 代糖(4), 异铁碎片(2), 双酮(3)
    Stage 2-10 (47 times) ===> 代糖(7), 糖(6), 异铁碎片(4), 异铁(4), 双酮(6), 酮凝集(4), RMA70-12(13)
    Stage S3-1 (12 times) ===> 代糖(1), 糖(19), 异铁碎片(1), 异铁(1), 双酮(1), 酮凝集(2)
    Synthesize following items: <----(以下是你要合成哪些材料以及次数)
    双极纳米片(4) <=== 改量装置(4) , 白马醇(8) 
    RMA70-24(5) <=== RMA70-12(5) , 固源岩组(10) , 酮凝集组(5) 
    白马醇(8) <=== 扭转醇(8) , 糖组(8) , RMA70-12(8) 
    改量装置(3) <=== 全新装置(3) , 固源岩组(6) , 研磨石(3) 
    酮凝集组(2) <=== 酮凝集(8) 
    糖组(7) <=== 糖(28) 
    固源岩组(16) <=== 固源岩(80) 
    酮凝集(4) <=== 双酮(12) 
    糖(4) <=== 代糖(12) 
    固源岩(3) <=== 源岩(9)
  • 由于数据中记录较少的副本掉落偏差较大,因此代码中默认过滤掉统计频次低于20的记录,如需修改,可在 中将第6行改为

    My code filters the records by their frequency from Penguin-Stats since records with low frequency may cause bias. To customize your filter, replace line 6 in with

        mp = MaterialPlanning(filter_freq=n)


    where n is the lower bound of acceptable frequence. If n=0, no filter will be applied.

2. Jupyter Notebook 或在你自己的代码中调用


Please refer to demo.ipynb.

3. 运行 Web 服务器 python 将在 监听 8000 端口,可供调试。

然而,对于生产环境,建议使用python -m sanic --host=<your_host> --port=<your_port> --workers=<workers_num>,以获得更好的性能和灵活性。

For debugging, simply run python, which spins up a server listening at

For deployment, however, python -m sanic --host=<your_host> --port=<your_port> --workers=<workers_num> is recommended for better performance and flexibility.

4. 更新数据


If new items or stages are updated, delete the data folder and run the following command as usual.


鸣谢 - Acknowledgement


You can’t perform that action at this time.