Installation Guide AIBootcamp
Installation Guide
This guide will help you install the AIBootcamp DevKit and explain how to use it.
Install & Execute Your First AIBot
Install required software and update windows PATH environment variable.
- Visual Studio 2022 Community Edition (https://visualstudio.microsoft.com/vs/)
* Windows PATH environment variable must contain the MSbuild folder containing its main executable (msbuild.exe).
* Make sure to install v143 Platform Toolset
Ex.: C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
- CMake (https://cmake.org/) (3.27.2 have been tested. More recent versions should also work but haven't been tested yet)
* Windows PATH environment variable must contain the CMake folder containing its main executable (cmake.exe).
- Python (https://www.python.org/) (3.11.4 have been tested. More recent versions should also work but haven't been tested yet)
* Windows PATH environment variable must contain the Python folder containing its main executable (python.exe).
- 7-Zip (https://www.7-zip.org/download.html) (22.01 have been tested. More recent versions should also work but haven't been tested yet)
* Windows PATH environment variable must contain the 7-zip folder containing its main executable (7z.exe).
Check that your programs are installed properly
Open a Command Prompt and execute the following commands:
> cmake -version
> python --version
> msbuild -version
> 7z
If properly installed, you should see outputs specifying version numbers for every softwareInstall AIBootcamp2 Dev Kit
Download the two following files and unzip them in separate folders (download links will be provided in class):
AIBootCamp2-2023.X.XX.zip
AIBootCamp2-MyFirstAIBot-2023.X.XX.zip
*** It is highly recommended to avoid paths including spaces and special characters like accented letters (ex.: é)Generate MyFirstAIBot Visual Studio solution
In the AIBootCamp2-MyFirstAIBot folder, execute the rebuild_vis_sln_x64.bat command in a Command Prompt. This will generate the build-solution-x64 folder, where you can find the MyFirstAIBot.sln visual studio solution file.Open and manage the solution
Open the MyFirstAIBot.sln solution in Visual Studio. You'll see the 2 following projects : myfirstaibot and ALL_BUILD. Make sure your set myfirstaibot project as the startup project by right clicking the myfirstaibot solution and choosing the "Set as Startup Project" option.
To create your custom decision-making system, you should implement your own BotLogic implementation. In the provided project, an empty class implementation is provided named MyBotLogic.
The MyFirstAIBot framework will be explained in detail in class.Build Solution
Choose the proper Build Target (Release|Debug) and simply build the selected project (F7). This step should generate .dll file that will be used by the game launcher.Configure Game Launcher
Edit PlayLocalMatch.bat found in the AIBootCamp2-MyFirstAIBot folder and modify the following lines :
set AIBOOTCAMP2_ENGINE_DIR=
set AIBOT_PATH=
set TEAM=
Please check examples on how to set those variables in comments in the PlayLocalMatch.bat file.Execute Solution
To execute, launch PlayLocalMatch.bat command with the following parameters:
> PlayLocalMatch.bat [LEVEL_ID]
Ex. PlayLocalMatch.bat L_000
*** The list of LEVEL_ID will be provided in class.Watch Game Replay
After having executed your first AIBot (see next section), a .replay file will be generated. In Windows Explorer, navigate to that file and follow these steps :
-Right-click on that file and select Open with -> Choose default program from the pop-up menu.
-Select AIbootcamp.exe and click the Always use the selected program to open this kind of file check box.
Important: When upgrading to newer version of AIBootcamp2.exe, it might be necessary to redo these steps to avoid opening old versions.
Double-click on the genererated .replay file in the Replays folder and enjoy!
Managing MyFirstAIBot.sln solution
Add/remove files to the solution
To add/remove files to the solution, you need to edit the CMakeLists.txt file in the AIBootCamp2-MyFirstAIBot folder . This files contains all the info for CMake to generate and build VisualStudio solutions.
Look for the AIBOT_HEADERS and AIBOT_SRC sections and add/remove files in the list, and regenerate the solution using the rebuild_vis_sln_x64.bat command.
IMPORTANT : It is highly recommanded to add your custom AIBot development files in custom subfolders to ease to process of migrating your code with the future versions of the DevKit.Clean the project
To clean the project, execute the CleanAll.bat command in the AIBootCamp2-MyFirstAIBot folder. This will remove the build-solution-x64 folder and all temporary files. All other files will be left as is.