Unity¤Ë´ØÏ¢¤¹¤ëµ­»ö¤Ç¤¹

¡¡¡ÊºîÀ®Ãæ¡Ë



Python ¦

Annaconda ¥¤¥ó¥¹¥È¡¼¥ë








Python ´Ä¶­¤ÎºîÀ®


¡¡¥¤¥ó¥¹¥È¡¼¥ë¤È´Ä¶­ºîÀ®¤¬½ªÎ»¤¹¤ë¤È¡¢´Ä¶­¤ò¥¢¥¯¥Æ¥£¥Ö/Èó¥¢¥¯¥Æ¥£¥Ö¾õÂ֤ˤ¹¤ë¤¿¤á¤Î¥³¥Þ¥ó¥É¤¬É½¼¨¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢
¤½¤Á¤é¤«¤é¥¢¥¯¥Æ¥£¥Ö¾õÂ֤ˤ¹¤ë¥³¥Þ¥ó¥É¤òÆþÎϤ·¤Þ¤¹¡£

conda activate mlagents


¡¡²¼µ­¤Î¤è¤¦¤Ë¡¢(ml-agents) C:\Users\¥æ¡¼¥¶¡¼Ì¾> ¤È¤Ê¤ì¤Ð¥¢¥¯¥Æ¥£¥Ö¾õÂ֤ؤÎÀÚ¤êÂؤ¨À®¸ù¤Ç¤¹¡£




Python ¥Ñ¥Ã¥±¡¼¥¸¤Î¥¤¥ó¥¹¥È¡¼¥ë




Py Touch ¥¤¥ó¥¹¥È¡¼¥ë




ML-Agents ¥¤¥ó¥¹¥È¡¼¥ë

Unity ¦

PackageManager ¤«¤é ML-Agents ¥¤¥ó¥¹¥È¡¼¥ë





µ¡³£³Ø½¬¤Î¥µ¥ó¥×¥ë¤Î¥¤¥ó¥¹¥È¡¼¥ë


¡¡²¼µ­¤Î Unity ¸ø¼°Github ¤«¤é¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£

Unity-Technologies/ml-agents
https://github.com/Unity-Technologies/ml-agents


¼Â¹Ô»þ


¡¡³Ø½¬¤ò³«»Ï¤¹¤ë¾ì¹ç¡¢¤Þ¤º¤Ï Anaconda Prompt ¤Ë¤Æ¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¤Þ¤¹¡£
yaml¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤¿¥Õ¥©¥ë¥À¤Þ¤Ç³¬Áؤò°ÜÆ°¤·¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢
º£²ó¤Ç¤¢¤ì¤Ð¡¢config/ppo ¥Õ¥©¥ë¥À¤ò»ØÄꤷ¡¢Â³¤±¤Æ¡¢°Ê²¼¤Î¤è¤¦¤ËÆþÎϤ·¤Þ¤¹¡£

mlagents-learn ./trainer_config.yaml --run-id testId

¡¡³Ø½¬¤Î½àÈ÷¤¬À°¤¦¤È¡¢²¼µ­¤Î¤è¤¦¤Ê Unity ¤Î¥í¥´¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£





¡¡¤½¤Î¸å¡¢Unity ¥¨¥Ç¥£¥¿¡¼¤ÎºÆÀ¸(Play)¥Ü¥¿¥ó¤ò²¡¤¹¤È¡¢³Ø½¬¤¬¥¹¥¿¡¼¥È¤·¤Þ¤¹¡£



¡¡³Ø½¬Ãæ¤Ï¡¢¤º¤Ã¤È Anaconda Prompt Æâ¤Ç¥í¥°¤¬Î®¤ì¤Þ¤¹¡£




²¼µ­¤Î¥í¥°¤¬½Ð¤ë¾ì¹ç

ÀßÄê


¡¡¥³¥ó¥Ý¡¼¥Í¥ó¥È¤È¥Õ¥¡¥¤¥ë¤ÎÀ°¹çÀ­

yaml ¥Õ¥¡¥¤¥ë
behaviors:
  3DBall:¡¡¡¡¡¡¡¡¡¡//¡¡<=¡¡¤³¤Á¤é¤Î̾Á°¤È Behavior ¤¬°ìÃפ·¤Æ¤¤¤Ê¤¤¤È¡¢¥²¡¼¥àµ¯Æ°»þ¤ËPython¤Ç¥¨¥é¡¼¤¬È¯À¸¤·¤ÆÄä»ß¤¹¤ë
    trainer_type: ppo
    hyperparameters:
      batch_size: 10
      buffer_size: 100
      learning_rate: 0.0003
      beta: 0.005
      epsilon: 0.2
      lambd: 0.99
      num_epoch: 3
      learning_rate_schedule: linear
    network_settings:
      normalize: true
      hidden_units: 128
      num_layers: 2
      vis_encode_type: simple
    reward_signals:
      extrinsic:
        gamma: 0.99
        strength: 1.0
    keep_checkpoints: 5
    checkpoint_interval: 500000
    max_steps: 500000
    time_horizon: 64
    summary_freq: 1000
    threaded: true




»²¹Í¥µ¥¤¥È
¤«¤á¤¯¤áÍÍ
Unity¤ÇML-Agents¤ò»È¤Ã¤¿µ¡³£³Ø½¬¤Î´Ä¶­ºî¤ê¤ò¤¹¤ë

¥³¥á¥ó¥È¤ò¤«¤¯


¡Öhttp://¡×¤ò´Þ¤àÅê¹Æ¤Ï¶Ø»ß¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

ÍøÍѵ¬Ìó¤ò¤´³Îǧ¤Î¤¦¤¨¤´µ­Æþ²¼¤µ¤¤

Menu


´ðÁÃ

µ»½Ñ/Ãμ±(¼ÂÁõÎã)

3D¥¢¥¯¥·¥ç¥ó¥²¡¼¥à

2D¤ª¤Ï¤¸¤­¥²¡¼¥à(ȯŸÊÔ)

2D¶¯À©²£¥¹¥¯¥í¡¼¥ë¥¢¥¯¥·¥ç¥ó(ȯŸÊÔ)

2D¥¿¥Ã¥×¥·¥å¡¼¥Æ¥£¥ó¥°(³ÈÄ¥ÊÔ)

¥ì¡¼¥¹¥²¡¼¥à(È´¿è)

2DÊüÃÖ¥²¡¼¥à(ȯŸÊÔ)

3D¥ì¡¼¥ë¥¬¥ó¥·¥å¡¼¥Æ¥£¥ó¥°(±þÍÑÊÔ)

3Dæ½Ð¥²¡¼¥à(È´¿è)

2D¥ê¥¢¥ë¥¿¥¤¥à¥¹¥È¥é¥Æ¥¸¡¼

3D¥¿¥Ã¥×¥¢¥¯¥·¥ç¥ó(NavMeshAgent »ÈÍÑ)

2D¥È¥Ã¥×¥Ó¥å¡¼¥¢¥¯¥·¥ç¥ó(¥«¥¨¥ë¤Î°Ù¤Ë¡Á¡¢¥Ü¥³¥¹¥«¥¦¥©¡¼¥ºÉ÷)

VideoPlayer ¥¤¥Ù¥ó¥ÈϢư¤Î¼ÂÁõÎã

VideoPlayer ¥ê¥¹¥ÈÆ⤫¤é¥à¡¼¥Ó¡¼ºÆÀ¸¤Î¼ÂÁõÎã(ȯŸ)

AR ²èÁüÉÕ¤­¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À®¤Î¼ÂÁõÎã

AR ¥ê¥¹¥ÈÆ⤫¤éÀ¸À®¤Î¼ÂÁõÎã(ȯŸ)

2D¥È¥Ã¥×¥Ó¥å¡¼¥¢¥¯¥·¥ç¥ó(¥µ¥Ð¥¤¥Ð¡¼É÷)

private



¤³¤Î¥µ¥¤¥ÈÆâ¤ÎºîÉʤϥæ¥Ë¥Æ¥£¤Á¤ã¤ó¥é¥¤¥»¥ó¥¹¾ò¹à¤Î¸µ¤ËÄ󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£

´ÉÍý¿Í/Éû´ÉÍý¿Í¤Î¤ßÊÔ½¸¤Ç¤­¤Þ¤¹