WormAI: An OpenTTD AI First version based on WrightAI. More...
#include "libversions.nut"
#include "util.superlib"
#include "AILib.List"
#include "pathfinder.rail"
#include "utils.nut"
#include "money.nut"
#include "strings.nut"
#include "math.nut"
#include "tiles.nut"
#include "valuators.nut"
#include "airmanager.nut"
#include "railmanager.nut"
#include "railbuilder.nut"
#include "planner.nut"
Variables | |
SuperLib | |
SUPERLIB_VERSION | |
ExtendedList | |
AILIBLIST_VERSION | |
RailPathFinder | |
const | SLEEPING_TIME = 100 |
Default time to sleep between loops of our AI (NB: should be a multiple of 100). | |
const | DEFAULT_DELAY_BUILD_AIRPORT = 500 |
Default delay before building a new airport route. | |
const | DEFAULT_DELAY_BUILD_RAIL = 300 |
Default delay before building a new rail route. | |
const | ERROR_BUILD_TRAIN_BLACKLISTED |
Train engine or wagon was blacklisted (unusable for our purposes). | |
SuperLib imports | |
Result = SuperLib.Result | |
Log = SuperLib.Log | |
Helper = SuperLib.Helper | |
Data = SuperLib.DataStore | |
ScoreList = SuperLib.ScoreList | |
Money = SuperLib.Money | |
Tile = SuperLib.Tile | |
Direction = SuperLib.Direction | |
Engine = SuperLib.Engine | |
Vehicle = SuperLib.Vehicle | |
Station = SuperLib.Station | |
Airport = SuperLib.Airport | |
Industry = SuperLib.Industry | |
Town = SuperLib.Town | |
Order = SuperLib.Order | |
OrderList = SuperLib.OrderList | |
Road = SuperLib.Road | |
RoadBuilder = SuperLib.RoadBuilder | |
ERROR CODE constants | |
const | ALL_OK = 0 |
There was an error finding a spot for airport 1. | |
const | ERROR_FIND_AIRPORT1 = -1 |
There was an error finding a spot for airport 1. | |
const | ERROR_FIND_AIRPORT2 = -2 |
There was an error finding a spot for airport 2. | |
const | ERROR_BUILD_AIRPORT1 = -3 |
There was an error building airport 1. | |
const | ERROR_BUILD_AIRPORT2 = -4 |
There was an error building airport 2. | |
const | ERROR_FIND_AIRPORT_ACCEPTANCE = -5 |
We couldn't find a suitable airport but we lowered our acceptance rate limit so we can try again. | |
const | ERROR_FIND_AIRPORT_FINAL = -6 |
We couldn't find a suitable airport and we are at the minimum acceptable acceptance limit. | |
const | ERROR_NO_SUITABLE_AIRPORT = -7 |
There is no suitable airport type available. | |
const | ERROR_MAX_AIRCRAFT = -10 |
We have reached the maximum allowed number of aircraft. | |
const | ERROR_MAX_AIRPORTS = -11 |
We have reached the maximum number of airports. | |
const | ERROR_NOT_ENOUGH_MONEY = -20 |
We don't have enough money. | |
const | ERROR_BUILD_AIRCRAFT = -30 |
General error trying to build an aircraft. | |
const | ERROR_BUILD_AIRCRAFT_INVALID = -31 |
No suitable aircraft found when trying to build an aircraft. | |
const | ERROR_BUILD_TRAIN = -40 |
General error trying to build a train (engine, wagon). |
WormAI: An OpenTTD AI First version based on WrightAI.
Main class and loop of our AI for OpenTTD. License: GNU GPL - version 2 (see license.txt) Author: Wormnest (Jacob Boerema) Copyright: Jacob Boerema, 2013-2016.
const ERROR_BUILD_TRAIN_BLACKLISTED |
Train engine or wagon was blacklisted (unusable for our purposes).