Code Monkey home page Code Monkey logo

fanioz / ai-trans Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 891 KB

Trans AI is in-game 'computer' player to beat you playing OpenTTD. It try to transporting cargoes from/to any towns and industries using Bus, Truck, Tram, Train, Aircraft and Ship. In the future it would try to use all available vehicles. Current strategy is try to use only one type of industry (if possible) as the destination of transporting cargo named "Cargo Concept", As described

License: GNU General Public License v2.0

Squirrel 99.70% PowerShell 0.30%
openttd ai scripting-language

ai-trans's Introduction

Trans AI

Trans is an AI for OpenTTD. It try to transporting cargoes from/to any towns and industries using Bus, Truck, Tram, Aircraft and Ship. In the future it would try to use all available vehicles. Current strategy is try to use only one type of industry (if possible) as the destination of transporting cargo named Cargo Concept. See implemented feature at ROADMAP.md.

What is this repository for?

  • Quick summary

OpenTTD since version 0.7 allowing us to implement custom AIs to play with. This repository contain code of Trans, in-game AI opponent player for OpenTTD.

How do I get set up?

  • Summary of set up
  1. Cloning repository directly to ai folder
  2. Cloning repository to another folder and manual deploying
  • Clone this repository to :
  • Linux : $(HOME)/.openttd/ai
  • MacOs : $(HOME)/Documents/OpenTTD/ai
  • Windows :
   - `C:\My Documents\OpenTTD\ai` (95, 98, ME)
   - `C:\Documents and Settings\<username>\My Documents\OpenTTD\ai` (2000, XP)
   - `C:\Users\<username>\Documents\OpenTTD\ai` (Vista, 7, 8, 10)
  • Deployment instructions

To create bundle package for deploying to bananas: run powershell script "bundle.ps1". Tar (archive) file produced by this script could be used to upload to bananas or be installed to 'ai' folder.

  • Dependencies

Trans AI would need :

  1. AI Library - Common
  2. AI Library - List
  3. AI Library - String

Extract the .gz into .tar and put in your ../ai/library folder. OpenTTD can read both AI and AILibrary inside tar files but it does not extract .tar.gz files by itself.

Versioning

We uses rolling release model with YYMMDD format for versioning. This number is generated by script bundle.ps1 according to the latest commit date. If you are cloning the AI directly to ai folder, you will get the version number years ahead as written in info.nut. This is to ensure that you are running the latest version from repository. For the last bananas versions, see the bananas tags.

Licensing

Trans AI is licensed under the GNU General Public License version 2.0. For the complete license text, see the file license.txt. This license applies to all files in this distribution. By contributing your code, you agree to license your contribution under the GNU GPL v2 License.

Contributing

Using the issue tracker

The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests, refer to ROADMAP.md for contributing.

Authors

  • Rifani Arsyad - a.k.a fanioz -

ai-trans's People

Contributors

fanioz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

ai-trans's Issues

I had the following error

Just wanted to let you know, I did have the exclusive transport rights in all the same cities the AI had.

image

edit, I can provide a save file just after the error happend

Error: xvehicle.notline

As politely requested in the error message, I'm attaching the error log.
Note that the AI seems to be sometimes building train stations that lead nowhere. Maybe because the map is small and crowded, so it can't find a path?
Dondington Transport, 4th Nov 2020

Runway too short

Describe the bug
Got notification the airport runway was too short for the aircraft

To Reproduce

  1. Run the game. Ensure AI allowed to build aircraft
  2. Activate cheat, switch to play as Trans AI
  3. Wait until notification arise

Expected behavior
To be decided later

Attachment
Too short

Version:

  • OpenTTD Version 1.8

Train got stuck

Describe the bug
Train got stuck if more than two train run on single track.

Expected behavior
Detect train that stuck and send him back to depot

Attachment
TrainStuck

Version:

  • OpenTTD Version 1.8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.