OtviAI (version 415)

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: 107
Joined: 08 Aug 2008 11:35
Contact:

Re: OtviAI (version 398)

Post by Maninthebox » 29 Feb 2012 08:51

Thanks for the report, I'll have a look at it!

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

Re: OtviAI (version 399)

Post by Maninthebox » 14 Mar 2012 14:29

With OpenTTD version 1.2 almost there it was time to make the jump to API 1.1 :)

Changelog:
- update to API 1.1
- stop building like a madman once maximum number of vehicles has been reached
- improved initial industry route selection
- improved maintenance handling
- fixed some depots for industry routes
- fixed cargo going to town (thanks Steffl for the bug hunting!)
- better money check
- and a few small tweaks

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

Re: OtviAI (version 411)

Post by Maninthebox » 01 May 2012 13:25

The version 1,2 release has arrived! The biggest change being that boats are now supported! That code is still a bit beta quality, so if you find a bug: let me know. Other changes: better vehicle selection function (solves the problem with some newgrfs); further improvements on the money flow and changed the way orders are given to new vehicles and some small changes/tweaks/fixes.

As usual, it's available in bananas or in the first post of this thread.

Brumi
President
President
Posts: 904
Joined: 18 Jul 2009 17:54

Re: OtviAI (version 411)

Post by Brumi » 01 May 2012 18:36

Great! Nice to see a new ship using AI :D

Sometimes your AI builds the docks in unconnected waters, however.
screenshot.png
(118.05 KiB) Downloaded 8 times
EDIT: I think you should update your AIInfo::GetDescription, your AI already transports freight :wink:

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

Re: OtviAI (version 411)

Post by Maninthebox » 01 May 2012 19:58

Hmmmm... it seems some debugging is in order indeed... Either AIMarine::AreWaterTilesConnected isn't doing what I expect or I'm feeding it the wrong things :P I'll look into it :) And I'll update that text too indeed.

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: OtviAI (version 411)

Post by Zuu » 01 May 2012 21:49

Maybe you missed this precondition:
API documentation wrote:'tile_from' and 'tile_to' are directly neighbouring tiles.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)

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

Re: OtviAI (version 413)

Post by Maninthebox » 15 May 2012 16:52

Bugfix version released. Boat implementation is greatly improved. (the bug was not in that precondition, but in the fact that I should feed it the waterside tile of the possible dock location, not the landside tile).

If you can still break it: let me know :)

kazocsaba
Engineer
Engineer
Posts: 1
Joined: 26 May 2012 19:55

Re: OtviAI (version 413)

Post by kazocsaba » 26 May 2012 20:06

Hello,

I'm getting errors about the fact that the index 'GetName' does not exist.
Attachments
OtvAI v413 error.PNG
(63.14 KiB) Downloaded 8 times

hydrogeek
Engineer
Engineer
Posts: 1
Joined: 15 Jul 2012 22:50

Re: OtviAI (version 413)

Post by hydrogeek » 15 Jul 2012 23:09

I know the thread is old, but I 've had this crash a few times so far...

https://www.dropbox.com/s/c0z50z59dmpa7 ... -08-20.jpg

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

Re: OtviAI (version 414)

Post by Maninthebox » 09 Aug 2012 15:25

New updated version!

Fix the bug reported by kazocsaba: thanks!

Apart from the bugfix it's a lot of changes in the train code to better handle 2cc, ECS and nutracks and combinations.

------
@Hydrogeek: that link of yours doesn't point to a file I can look at.. if it's the same bug as kazocsaba reported: it's fixed, otherwise: could you give me a working link for what you're trying to show or just add the picture to your post here?

Steffl
Engineer
Engineer
Posts: 103
Joined: 23 Feb 2010 15:44

Re: OtviAI (version 414)

Post by Steffl » 17 Nov 2012 13:32

Hi,
OTVI version 414 has problems with subtropical climate. It crashes every time short after it started.
I didn't make a screenshot because it happens everytime and you can look at it yourself in game.
Bye :-)

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

Re: OtviAI (version 414)

Post by Maninthebox » 08 Jan 2013 16:46

Bug found, bug squashed. Looking at the code I fail to see how this worked without problems in the other climates though, cause it's a bug that should have popped up in any climate :)

The newer version is in bananas as usual. Thanks for the bug report!

Samu
Traffic Manager
Traffic Manager
Posts: 236
Joined: 17 Apr 2007 14:28

Re: OtviAI (version 415)

Post by Samu » 10 Apr 2013 23:31

What is the preferable Path AI for OTVIs ships? I see some ships with only 1 order in schedule.

ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION
A vehicle got lost! Ships always with only 1 order unless I missed something.

Currently using YAPF. 90 degrees is turned off.

Samu
Traffic Manager
Traffic Manager
Posts: 236
Joined: 17 Apr 2007 14:28

Re: OtviAI (version 415)

Post by Samu » 11 Apr 2013 00:38

Another problem.

(Many) Ship depots blocking own dock and opponents' dock (that's NoCAB).

I'm using oTVI v415.
Attachments
screenshot#2.png
(128.21 KiB) Downloaded 10 times

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

Re: OtviAI (version 415)

Post by Maninthebox » 11 Apr 2013 09:05

Heh... I can perhaps get away with calling blocking opponents' docks a feature, but blocking my own docks is not so smart... I seem to have some troubles with boats and YAPF sometimes and then boats get stuck humping the coast instead of going around the peninsula. The fact that the boat then has only one order is an attempt at removing all orders from the unprofitable boat and sending it to a depot. I'm afraid I will have to start adding buoy support...

I'm currently in the process of finetuning the next version, which will also have aircraft. I'll try to fix this as well in this release.

Thanks for the reports!

Phrossi_TTD
Engineer
Engineer
Posts: 79
Joined: 12 Feb 2013 17:29

Re: OtviAI (version 415)

Post by Phrossi_TTD » 02 Jun 2013 15:45

any updates ? :roll: :mrgreen:
Activity-absent for now.
PLEASE DO NOT REPLY TO MY MESSAGES ANYMORE!

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

Re: OtviAI (version 415)

Post by Maninthebox » 05 Jun 2013 14:59

Yep. There's a new version :)

This one adds semi-decent air support and improved selection of what engine to use: it now roughly calculates for all available engines how profitable it would be on that distance with that cargo and no longer selects engines that would be known unprofitable (they exist due to NewGRF mostly). This release is mostly a lot of very small changes, too many to name all here. It successfully completes all tests that I have here (aka: doesn't crash or go bankrupt) so if you find a situation in which it does crash or go bankrupt: please give me the configuration parameters! There's still a long TODO list of things I want to change, so onwards to the next version :)

Phrossi_TTD
Engineer
Engineer
Posts: 79
Joined: 12 Feb 2013 17:29

Re: OtviAI (version 415)

Post by Phrossi_TTD » 05 Jun 2013 20:29

Maninthebox wrote:Yep. There's a new version :)

This one adds semi-decent air support and improved selection of what engine to use: it now roughly calculates for all available engines how profitable it would be on that distance with that cargo and no longer selects engines that would be known unprofitable (they exist due to NewGRF mostly). This release is mostly a lot of very small changes, too many to name all here. It successfully completes all tests that I have here (aka: doesn't crash or go bankrupt) so if you find a situation in which it does crash or go bankrupt: please give me the configuration parameters! There's still a long TODO list of things I want to change, so onwards to the next version :)
that is better, it bought other AIs that had planes and the ai did not manage them.
there is also an problem with water in which the ai connects towns not connected via water, so the AI needs to build cannals and locks.
thanks for the new version, i will try it!
Activity-absent for now.
PLEASE DO NOT REPLY TO MY MESSAGES ANYMORE!

User avatar
skippern
Traffic Manager
Traffic Manager
Posts: 199
Joined: 30 Oct 2013 13:57

Re: OtviAI (version 415)

Post by skippern » 08 Dec 2013 17:45

Just had an incident where OtviAI sabotaged my shipping trade. Is that something purpose built into the AI? (I have version 418 downloaded from in game download content menu)

See thread I started on the topic: http://www.tt-forums.net/viewtopic.php?f=65&t=69632 (sorry for creating a new thread, found this thread only afterwards)
Skippern
OpenTTD Mac user

Baldy's Boss
Tycoon
Tycoon
Posts: 1308
Joined: 23 Feb 2014 22:02

Re: OtviAI (version 415)

Post by Baldy's Boss » 15 Apr 2015 16:24

Just noting that at least in "league table" terms,I find OTVIs to be my closest competitors of a bunch of AIs,though it seems they eventually go bust.
Has work been done on renewing and pruning aging networks?

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 2 guests