OtviAI (version 423)

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Maninthebox
Engineer
Engineer
Posts: 113
Joined: 08 Aug 2008 11:35
Contact:

Re: OtviAI (version 1.4 aka svn280)

Post by Maninthebox »

non-drive through bus stops + articulated vehicles = worse mix
User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

Re: OtviAI (version 1.4 aka svn280)

Post by Roest »

Sure but maybe don't use full load orders for busses and mail transporters. Especially in small towns this results in traffic jams.
Maninthebox
Engineer
Engineer
Posts: 113
Joined: 08 Aug 2008 11:35
Contact:

Re: OtviAI (version 282)

Post by Maninthebox »

Time for an update again :) Most important change is that the subsidy ai is now merged into the main ai, so if otviAI is having enough money and an interesting subsidy pops up, it will try to get it. Other changes include updates to latest api and minor things like indentation and fancier debug (the same used in rondje). Latest version is as always available in bananas or in the first post.
Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

Re: OtviAI (version 282)

Post by Morloth »

Maninthebox wrote:Time for an update again :) Most important change is that the subsidy ai is now merged into the main ai, so if otviAI is having enough money and an interesting subsidy pops up, it will try to get it. Other changes include updates to latest api and minor things like indentation and fancier debug (the same used in rondje). Latest version is as always available in bananas or in the first post.
Sweet! Good to have you back. Will try the new version immediately :).
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: OtviAI (version 282)

Post by Alberth »

I found a packaging error:
In the openttd debug output I saw:

Code: Select all

dbg: [ai] Registering two AIs with the same name and version
dbg: [ai]   1: /home/hat/.openttd/content_download/ai/OtviAI.1.4.tar/otviai.1.4/main.nut
dbg: [ai]   2: /home/hat/.openttd/content_download/ai/OtviAI.282.tar/otviai.282/main.nut
dbg: [ai] The first is taking precedence.
In other words, I get 1.4 instead of 282.

The fault appears to be in the info.nut file (with thanks to Yexo). In both versions, the "GetVersion()" returns value 1, so to OpenTTD both versions are equal.
You may want to change your GetVersion() function to prevent the above behavior.

Sincerely,
Albert
Maninthebox
Engineer
Engineer
Posts: 113
Joined: 08 Aug 2008 11:35
Contact:

Re: OtviAI (version 283)

Post by Maninthebox »

Ahhh.. thanks for noticing that. I see I have to make something automagic to include the subversion number in my info.nut file. Updated manually for now :)
User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 320
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

Re: OtviAI (version 283)

Post by fanioz »

And it is nice to see that my Ai can't compete to win the subsidy from otviAi. :) good job maninthebox.
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image
Maninthebox
Engineer
Engineer
Posts: 113
Joined: 08 Aug 2008 11:35
Contact:

Re: OtviAI (version 283)

Post by Maninthebox »

Hehe, I didn't know your AI was trying to get them as well so the first time I saw the "Failed to win the subsidy" debug in my AI debug window I was wondering what bug I had introduced this time, but it turned out there is competition :)
Maninthebox
Engineer
Engineer
Posts: 113
Joined: 08 Aug 2008 11:35
Contact:

Re: OtviAI (version 310)

Post by Maninthebox »

As it's update time: a minor update for OtviAI as well. I updated it to include the newer aisubsidy api calls. The tarball is in the first post again. Have fun!
User avatar
jklamo
Engineer
Engineer
Posts: 66
Joined: 30 May 2004 00:10
Contact:

Re: OtviAI (version 310)

Post by jklamo »

Will try new version (have some problems with old version). On Bananas is still old version.
Maninthebox
Engineer
Engineer
Posts: 113
Joined: 08 Aug 2008 11:35
Contact:

Re: OtviAI (version 310)

Post by Maninthebox »

True. For two reasons: I wanted to have 30000 downloads before the next update (bulls*** reason of course, but I'm at 29105 already and for some reason the download counter resets when you update). The other (and actual) reason is that I have to check what I have to enter as minimum version because of the new aisubsidy calls it's using.
User avatar
exelsiar
Engineer
Engineer
Posts: 19
Joined: 04 Nov 2007 14:17
Location: Fleet, Hampshire, UK
Contact:

Re: OtviAI (version 310)

Post by exelsiar »

using 7.3 and OtviAI dl'd from here and got this error message. strangely enough the version on the content downloader worked fine.
Attachments
Unnamed, 6th Oct 1943.png
(95.51 KiB) Downloaded 1 time
Another unspeakably horrible act commited by:
Image
Maninthebox
Engineer
Engineer
Posts: 113
Joined: 08 Aug 2008 11:35
Contact:

Re: OtviAI (version 310)

Post by Maninthebox »

The version here uses trunk version API calls, whereas the one in bananas uses 0.7.2/0.7.3 api calls. If you're using a normal release version: use the online content downloader, and for the nightlies you can use either one.
Itzamna
Engineer
Engineer
Posts: 6
Joined: 09 Jan 2010 06:20

Re: OtviAI (version 310)

Post by Itzamna »

Hello.

I dont know if this AI is still under maintenance but i just wanted to post a error im getting with it.


It happens on both beta2 and on 0.75 versions of the game. The ai version is the one found on the content manager.


It all runs smoothly with the AI, its really nice with a fast pace construction... the problem is when i save and then load the game. The AI always crashes. This the error i get:
Attachments
otviai.jpg
otviai.jpg (15.87 KiB) Viewed 5146 times
Maninthebox
Engineer
Engineer
Posts: 113
Joined: 08 Aug 2008 11:35
Contact:

Re: OtviAI (version 312)

Post by Maninthebox »

Bug fixed, new version is attached to the first post in this thread. Actually saving and loading is still something on the todo-list I'm afraid, but the AI will run after a save/load again.
User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: OtviAI (version 312)

Post by ostlandr »

Interesting thing happens with OTV in my games:
Lowville & Beaver River, 29th Apr 1957.png
I guess OTV and the Heavy Equipment Set just don't get along. Unless the AI is deliberately jamming up traffic in my towns? :wink:
Who is John Galt?
Maninthebox
Engineer
Engineer
Posts: 113
Joined: 08 Aug 2008 11:35
Contact:

Re: OtviAI (version 312)

Post by Maninthebox »

OtviAI has not been tested with most of the newgrfs, so they might not get along. However, the picture shows no significant traffic jam ;) But yes, the AI makes a real traffic jam (and then I'm talking 100+ busses) in combination with some other AIs every now and then :)
User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: OtviAI (version 312)

Post by ostlandr »

Understood. I forgot to say thanks for all the hard work on these. Thanks!!! :D

When I feel like a challenge, I use "vanilla" OTTD, all the AIs, and get my butt kicked by endless lines of buses, and by trucks hauling coal halfway across the map. :oops:
Maninthebox wrote:OtviAI has not been tested with most of the newgrfs, so they might not get along. However, the picture shows no significant traffic jam ;) But yes, the AI makes a real traffic jam (and then I'm talking 100+ busses) in combination with some other AIs every now and then :)
Who is John Galt?
User avatar
Michiel
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 13 Jul 2008 00:57
Contact:

Re: OtviAI (version 312)

Post by Michiel »

ostlandr wrote:Interesting thing happens with OTV in my games:
Lowville & Beaver River, 29th Apr 1957.png
Unless the AI is deliberately jamming up traffic in my towns? :wink:
That's not a traffic jam! This is a traffic jam:

Image

;)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OtviAI (version 312)

Post by planetmaker »

I just re-loaded my yesterday's AI game, unfortunately OtViAI (v283) failed to continue its work:

Code: Select all

dbg: [ai] [7] [S] Your script made an error: wrong number of parameters
dbg: [ai] [7] [S] 
dbg: [ai] [7] [S] 
dbg: [ai] The AI died unexpectedly.
The status with which it started today, some nice PAX and mail routes, though some could need a bit better service which might especially in a competitive environment help it:

EDIT: hm... thread title says v312, but bananas only gave me the v283 which I used. Maybe time to update the version there, too? Much higher chance people will then report back on the performance of the newer versions... or use a scheme like NoCAB with a "stable" and a "bleeding edge" version, both available via bananas.
Attachments
OTVI, 04-04-1989.png
OTVI, 04-04-1989.png (167.58 KiB) Viewed 4868 times
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 28 guests