The Desert Containment Unity project - latest working Unity version: 2020.3.48f1
This version of the project contains scripts to support AI ground players and and AI operator. It uses the OpenAI for unity package as well as the ElevenLabs API. In order to successfully use this feature you will need to have both an OpenAI and ElevenLabs API key.
HTML documentation can be found in the Assets/Docs/html folder. The Assets/Docs folder also contains some older documentation for the AI functions.
For proper functioning, ensure you clone this repository (as opposed to downloading the project as a .zip folder).
Build the game with both scenes in the Assets/Scenes folder in the folowing order:
Scenes/Desert 0
Scenes/NoConnection 1
For information on how to set up an experiment, please see the Readme file for our Desert Herding game.
You can find several test experiment config files in the Assets/Resources folder.
- bIsChatGPT (bool) - Set to true on the server and false on the clients if using ChatGPT for either the AI players or AI team operator
- iAIteamPlayers (int) - the number of AI players that will be generated for each team. Remove variable or set to 0 if no AI players needed.
- sAInames (string) - The names of the AI players separated by a comma (e.g. Alpha,Bravo,Charlie)
- bIsOperatorAI (bool) - set to true if the operator will be AI and false otherwise. Currently only one AI operator is supported.
-
bSubtitlesOn (bool) - true if subtitles should be displayerd
-
bScrollingSubtitles (bool) - true for scrolling/chat-style subtitles, false for single line subtitles
-
bOperatorOnlySubtitles (bool) - true if subtitles should only display operator's utterances, false to display all player's utterances.
-
fAICommandIgnoreTargetTime (float) - the length of time (in seconds) that an autonomous ground player should ignore local assignment of target agents to pursue.
-
fAICommandFollowTime (float) - the length of time (in seconds) that an autonomous ground player should adhere to a navigation command by the operator.
-
fAIViewDistance (float) - the view distance in metres for the AI ground players.
-
fAILevyPower (float) - the exponent of the Lévy flight distribution, see https://doi.org/10.1038/44831