AIAI

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

Post Reply
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (38) version

Post by Kogut »

Hmmm. Savegame? Is it problem with all maglevs or only sometimes?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AIAI epsilon (38) version

Post by Lord Aro »

sorry,
it's only sometimes (only 1 on this game)
just the station length code needs to be limited to 2, or at least check the train length first
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
User avatar
fanioz
Transport Coordinator
Transport Coordinator
Posts: 320
Joined: 19 Dec 2008 05:03
Location: Indonesia
Contact:

Re: AIAI epsilon (38) version

Post by fanioz »

Special for you :)
Attachments
Tanpa nama, 7 Apr 1975.png
Tanpa nama, 7 Apr 1975.png (202.57 KiB) Viewed 1364 times
aiai, 7 Apr 1975.sav
(429.94 KiB) Downloaded 225 times
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (38) version

Post by Kogut »

fanioz wrote:Special for you :)
Thanks!
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (38) version

Post by Kogut »

Most of bugs (including that emailed) are connected with invalid order lists and following suicide of AIAI. I will try to fix it.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (38) version

Post by Kogut »

New version
DONE: fixed bug with too long trains (probably also with too short maglevs)
DONE: ignore helis during autoreplace
DONE: better strategy
DONE: better debug output
Attachments
AIAI-epsilon(39b).zip
(62.1 KiB) Downloaded 185 times
FIRS_UKRS_TBRS.PNG
FIRS_UKRS_TBRS.PNG (349.51 KiB) Viewed 1364 times
Last edited by Kogut on 11 Nov 2010 19:43, edited 1 time in total.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (39b) version

Post by Kogut »

And next version, with improved railtypes handling:
Attachments
AIAI.PNG
AIAI.PNG (10.82 KiB) Viewed 6486 times
AIAI-epsilon(40).zip
(62.14 KiB) Downloaded 220 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (40) version

Post by Kogut »

DONE: NoAI api updated to 1.0.4
DONE: eyecandy - stations are placed closer to industry.

Code: Select all

list.Valuate(AIMap.DistanceSquare, industry_location); //pure eyecandy (station near industry)
list.Sort(AIAbstractList.SORT_BY_VALUE, AIAbstractList.SORT_ASCENDING);
Result:
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (92.91 KiB) Viewed 6476 times
AIAI-epsilon(41).zip
(62.24 KiB) Downloaded 170 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: AIAI epsilon (41) version

Post by Zuu »

Oh, so you've also started to use the station names as a storage location?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (41) version

Post by Kogut »

Zuu wrote:Oh, so you've also started to use the station names as a storage location?
No, I name it to allow sorting by age without implementing this: http://www.tt-forums.net/viewtopic.php?f=32&t=47535
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Samu
Traffic Manager
Traffic Manager
Posts: 236
Joined: 17 Apr 2007 14:28

Re: AIAI epsilon (41) version

Post by Samu »

AIAI crash. I loaded MegaRail, a TTD save game and I got this error.
Attachments
MegaRail, 1960-11-13.sav
(128.93 KiB) Downloaded 186 times
MegaRail, 1960-11-13.png
(199.97 KiB) Downloaded 2 times
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (41) version

Post by Kogut »

Samu wrote:AIAI crash. I loaded MegaRail, a TTD save game and I got this error.
It looks like company of another ai. Is it possible to protect ai from being loaded as replacement ai?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Samu
Traffic Manager
Traffic Manager
Posts: 236
Joined: 17 Apr 2007 14:28

Re: AIAI epsilon (41) version

Post by Samu »

No, not really, if I remember, it was a save game provided in TTD CD, the company is named Happy Buses, so a human player was there.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AIAI epsilon (41) version

Post by Yexo »

Samu wrote:No, not really, if I remember, it was a save game provided in TTD CD, the company is named Happy Buses, so a human player was there.
In other words: the company was not originally created by AIAI.
Kogut wrote:Is it possible to protect ai from being loaded as replacement ai?
No.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI zeta (45) version

Post by Kogut »

DONE: Error handling for RV order appending. It probably fixes long going problem with invalid orders.
DONE: Unused station deleting now impossible between station construction and vehicle construction. It fixes root cause of errors during order appending.
DONE: Bug reporting page (that thread) showed as http://tinyurl.com/ottdaiai in crash message and menager name. (Thanks Orudge!)
DONE: More statues
Attachments
AIAI-zeta(45).zip
(62.35 KiB) Downloaded 198 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI zeta (45) version

Post by Kogut »

Known problems:
- train engines are not replaced
- adding trains to route is not working
- AIAI with enabled trains have worse start than with disabled
- not AI friendly brake vans in Japan Set
So version 45 will go to bananas with disabled trains.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (41) version

Post by Kogut »

Kogut wrote:
Samu wrote:AIAI crash. I loaded MegaRail, a TTD save game and I got this error.
It looks like company of another ai. Is it possible to protect ai from being loaded as replacement ai?
Fixed in 46.

Code: Select all

if((AICompany.GetName(AICompany.COMPANY_SELF)!="AIAI")&&(AIVehicleList().Count()>0)){
	while(true){
		Sleep(1000);
		Info("Company created by other ai. In result it is not possible for AIAI to menage that company.");
		Info("Zzzzz...")
		}
	}
EDIT:
Known problems:
- train engines are not replaced
- adding trains to route is not working
- AIAI with enabled trains have worse start than with disabled
- not AI friendly brake vans in Japan Set
- stupid rail builder builds depot in stupid place
- too high pf time limit for second track
Attachments
AIAI-zeta(46).zip
(62.54 KiB) Downloaded 193 times
Last edited by Kogut on 21 Nov 2010 08:53, edited 1 time in total.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
gamefreak123
Engineer
Engineer
Posts: 1
Joined: 21 Nov 2010 08:28

Re: AIAI zeta (46) version

Post by gamefreak123 »

I had to report this bug.
Attachments
openttd - report.JPG
openttd - report.JPG (93.08 KiB) Viewed 1364 times
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI zeta (46) version

Post by Kogut »

It is fixed in development version (soon on bananas). You can save game and load to get aiai working again.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI zeta (46) version

Post by Kogut »

Bananas updated with version 46 (showed as 40) with disabled trains.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests