Xpilot-AI works by allowing a programmer to easily inject code within the framework of the game during the same time that the system would read user input and draw the current frame. We refer to this code that will be injected as the AI loop. There are many functions included in Xpilot-AI which allow a programmer to effortlessly read information from the XPilot client and send instructions to the ship in the same way a player could see the display and use the keyboard and mouse.

An important note: If the Xpilot-AI libraries are not installed to your library path, then you will need to set the library path to where they are located.

For example, in Ubuntu, if the bots are located in the same folder as the library .so, as is the default method, the following line should be run once, before executing the bot:


If you get errors about libraries, try that first!