Malmo——微軟人工智能項目

Malmo——微軟人工智能項目



Malmo是一個基於Minecraft(我的世界)的人工智能實驗和研究平臺。我們致力於啓發在這個遊戲環境下挑戰新人工智能問題的新一代研究。


開始這個項目

1.下載最新版本,windows版本,Linux版本或者是MacOSX版本

注意:這和直接在GitHub上下載壓縮包不一樣。像這樣做是無法進行的除非你打算編譯這些源代碼(這是一個很長的過程)如果你得到這樣的錯誤“ImportError”

2.爲你的系統安裝依賴項(見下面的補充)。

3.啓動安裝了malmo mod的我的世界。請遵循下面的命令。(見下面的補充)

4.啓動其中一個我們的代理編程平臺,python,lua,C#,C++,java.

5.跟隨這個指導。(見於附錄)

6.探索我們提供的文檔。在安裝包中有readme.htm可以跳轉到我們提供的文檔。



補充1:2.安裝依賴項

預備任務:

1.第一下載windows當前的安裝包

2.設置環境變量

安裝步驟:

1.打開window Powershell然後運行“Set-ExecutionPolicy -Scope CurrentUser Unrestricted"

2.進入環境變量“cd $env:HOMEPATH\Malmo-0.30.0-Windows-64bit\scripts

3.“.\malmo_install.ps1"

在運行的途中系統會提示要使用管理員模式。


補充2:3.啓動安裝了malmo mod的我的世界

我的世界需要創造窗口帶有OpenGL的支持,所以你安裝的機器需要有一個桌面環境。

進入解壓後的文件夾。

cd Minecraft

launchClient(on Windows)

./launchClient.sh (On Linux or MacOSX)

注意:如果你要在啓動器上運行這個,下面會有一行字顯示“創建95%”忽視這句話,不要等到“100%”。只要當我的世界遊戲窗口已經開始了顯示了主菜單,就可以開始了。



Project Malmö is a platform for Artificial Intelligence experimentation and research built on top of Minecraft. We aim to inspire a new generation of research into challenging new problems presented by this unique environment.

Getting Star

1.Download the latestpre-built version, for Windows, Linux or MacOSX.
NOTE: This is not the same as downloading a zip of the source from Github.Doing thiswill not work unless you are planning to build the source code yourself (which is a lengthier process). If you get errors along the lines of "ImportError:No module named MalmoPython" it will probably be because you have made this mistake.

2.Install the dependencies for your OS: Windows, Linux, MacOSX.

3.Launch Minecraft with our Mod installed. Instructions below.

4.Launch one of our sample agents, as Python, Lua, C#, C++ or Java. Instructions below.

5.Follow the Tutorial

6.Explore the Documentation. This is also available in the readme.html in the release zip.

7.Read the Blog for more information.

8.If you want to build from source then see the build instructions for your OS: Windows, Linux, MacOSX.


Launching Minecraft with our Mod:

Minecraft needs to create windows and render to them with OpenGL, so the machine you do this from must have a desktop environment.

Go to the folder where you unzipped the release, then:

cd Minecraft
launchClient (On Windows)
./launchClient.sh (On Linux or MacOSX)

or, e.g. launchClient -port 10001 to launch Minecraft on a specific port.

on Linux or MacOSX: ./launchClient.sh -port 10001

NB: If you run this from a terminal, the bottom line will say something like "Building 95%" - ignore this - don't wait for 100%! As long as a Minecraft game window has opened and is displaying the main menu, you are good to go.

By default the Mod chooses port 10000 if available, and will search upwards for a free port if not, up to 11000. The port chosen is shown in the Mod config page.

To change the port while the Mod is running, use the portOverride setting in the Mod config page.

The Mod and the agents use other ports internally, and will find free ones in the range 10000-11000 so if administering a machine for network use these TCP ports should be open.


Launch an agent:

Running a Python agent:

cd Python_Examples
python run_mission.py

On MacOSX we currently only support the system python, so please use /usr/bin/python run_mission.py if not the default.

Running a Lua agent: (Linux only)

cd Lua_Examples
lua run_mission.lua

Running a Torch agent: (Linux only)

cd Torch_Examples
th run_mission.lua

Running a C++ agent:

cd Cpp_Examples

To run the pre-built sample:

run_mission (on Windows)
./run_mission (on Linux or MacOSX)

To build the sample yourself:

cmake .
cmake --build .
./run_mission (on Linux or MacOSX)
Debug\run_mission.exe (on Windows)

Running a C# agent:

To run the pre-built sample:

cd CSharp_Examples
CSharpExamples_RunMission.exe (on Windows)
mono CSharpExamples_RunMission.exe (on Linux or MacOSX)

To build the sample yourself, open CSharp_Examples/RunMission.csproj in Visual Studio or MonoDevelop.

Or from the command-line:

cd CSharp_Examples

Then, on Windows:

msbuild RunMission.csproj /p:Platform=x64
bin\x64\Debug\CSharpExamples_RunMission.exe

On Linux or MacOSX:

xbuild RunMission.csproj /p:Platform=x64
mono bin/x64/Debug/CSharpExamples_RunMission.exe

Running a Java agent:

cd Java_Examples
java -cp MalmoJavaJar.jar:JavaExamples_run_mission.jar -Djava.library.path=. JavaExamples_run_mission (on Linux or MacOSX)
java -cp MalmoJavaJar.jar;JavaExamples_run_mission.jar -Djava.library.path=. JavaExamples_run_mission (on Windows)

Running an Atari agent: (Linux only)

cd Python_Examples
python ALE_HAC.py


附錄

1.原文地址:https://github.com/Microsoft/malmo

2.安裝後的編程指引:https://github.com/Microsoft/malmo/blob/master/Malmo/samples/Python_examples/Tutorial.pdf

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章