美文网首页Unity MLAgents - Machine Learning入门
Unity Ml-Agent 完成你的第一个强化学习项目

Unity Ml-Agent 完成你的第一个强化学习项目

作者: zitaoye | 来源:发表于2021-04-12 13:24 被阅读0次

    参考内容

    CodeMonkey - How to use Machine Learning AI in Unity! (ML-Agents)

    Making a New Learning Environment

    Unity官方Github地址和文档内容
    Unity ML-Agents Toolkit Documentation

    CodeMonkey 更多的关于UnityML的系列内容
    Machine Learning AI in Unity (ML-Agents)

    常见问题

    安装python https://www.python.org/downloads/windows/

    如果你的命令行输入不起作用?windows下命令行模式中cd命令无效的原因

    关于pytorch是什么?

    pytorch与tensorflow https://zhuanlan.zhihu.com/p/104842311
    适合PyTorch小白的官网教程 https://zhuanlan.zhihu.com/p/271659551
    An open source machine learning framework that accelerates the path from research prototyping to production deployment. https://pytorch.org/
    如何最简单、通俗地理解Pytorch? https://www.zhihu.com/question/439496333/answer/1715174511
    你可以把 pytorch 理解为一个支持 gpu 的,可以进行求导的计算器。新添的这两个功能现在主要是给神经网络用的,所以 pytorch 里面也加了很多神经网络用的辅助工具

    为什么需要安装Python虚拟机?

    py的虚拟环境 A Virtual Environment is a self contained directory tree that contains a Python installation for a particular version of Python, plus a number of additional packages.
    A Virtual Environment keeps all dependencies for the Python project separate from dependencies of other projects. This has a few advantages:
    It makes dependency management for the project easy.
    It enables using and testing of different library versions by quickly spinning up a new environment and verifying the compatibility of the code with the different version.

    调整超参数

    在assets下面创建config的内容并且创建yaml文件
    配置文件以及HyperParameter-Training Configuration File

    mlagents-learn config/moveToGoal.yaml --run-id=TestParameter
    

    基于模型的再训练

    mlagents-learn config/moveToGoal.yaml --initialize-from=MoveToGoal --run-id=MoveToGoal2
    

    可视化训练成果

    在训练的同时打开另一个cmd
    进入同一个虚拟机后输入

    tensorboard --logdir results
    

    然后在浏览器中输入

    http://localhost:6006/
    

    就可以查看实时的训练结果和目前的效果

    后续其他的内容有待补充

    相关文章

      网友评论

        本文标题:Unity Ml-Agent 完成你的第一个强化学习项目

        本文链接:https://www.haomeiwen.com/subject/awwtlltx.html