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

User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AIAI epsilon (31) version

Post by Lord Aro »

Kogut wrote:- Other updates to 1.1 NoAI API
i'm afraid this meaning this AI is now nightly only... :?
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
deamonhunter11
Engineer
Engineer
Posts: 56
Joined: 10 Mar 2010 08:23

Re: AIAI epsilon (31) version

Post by deamonhunter11 »

Lord Aro wrote:
Kogut wrote:- Other updates to 1.1 NoAI API
i'm afraid this meaning this AI is now nightly only... :?
I just comfirmed that.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (31) version

Post by Kogut »

Maybe I can downgrade it to 1.0 API
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 (31) version

Post by Kogut »

After downgrade it is visible as AI but it crashes on
Attachments
Przechwytywanie.PNG
Przechwytywanie.PNG (730 Bytes) Viewed 5897 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AIAI epsilon (31) version

Post by Yexo »

Yes, that is documented in the [url="http://noai.openttd.org/docs/trunk/ai__ ... _8hpp.html']changelog[/ur]. In 1.1 IsEnd is added, it's not available in 1.0. HasNext is not available in 1.1 (however it is available in 1.1 if your AI uses the 1.0 api version).
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (31) version

Post by Kogut »

But not with 0.7 api (that is why I upgraded it). Anyway there is a lot to do before creating bananas quality of trains.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AIAI epsilon (31) version

Post by Yexo »

HasNext should also be available for the 0.7 api compatibilty in 1.1. If it isn't that's a bug and you should report it at bugs.openttd.org
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AIAI epsilon (31) version

Post by planetmaker »

A small comment dedicated to this AI as based from my (short) competitive run with a number of other AIs: you won, you did very well!

Best areas of improvements now seem to be from this brief test: add train support and make use of them. AdmiralAI seems to spend much more money on re-structuring and building statues, expanding stations, which allows it to catch up.

Attached a screenshot which compares this AI with the best AI (AIAI) and the best train-using AI (simpleAI)

All in all: kudos, you did a great job :-)
Attachments
operating profit and company value
operating profit and company value
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (31) version

Post by Kogut »

Thanks!
Trains and statues are added/reworked in dev version, but train part still have many bugs/flaws/things that should be improved.
Attachments
AIAI-epsilon-34.tar
(256 KiB) Downloaded 177 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 (31) version

Post by Kogut »

Yexo wrote:Yes, that is documented in the [url="http://noai.openttd.org/docs/trunk/ai__ ... _8hpp.html']changelog[/ur]. In 1.1 IsEnd is added, it's not available in 1.0. HasNext is not available in 1.1 (however it is available in 1.1 if your AI uses the 1.0 api version).
No, AIAI 37 (1.0 api) crashes in trunk.

Anyway: 37 AIAI!

changelog
- smarter railway station construction
- bugfixes
- better rail pathfinder (updated choochoo's pf)
- better handling of newgrf railway station
- old TODOs done (including better chosing quantify of planes, better airport management)
- downgraded to 1.0 API
Attachments
AIAI-epsilon-37.tar
(255 KiB) Downloaded 163 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: AIAI epsilon (31) version

Post by Yexo »

Kogut: AIAI 37 runs fine in trunk (it only build 2 airports, but it didn't crash). If you really think there is a bug with HasNext in trunk then make a very small AI that crashes on it and create a bugreport with that AI attached on bugs.openttd.org.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (31) version

Post by Kogut »

OK, in 29k61 it is working. (except that it refuses to construct smart trains) *investigates*
fixed!
(it only build 2 airports, but it didn't crash)
Freeze/money gathering/unprofitable planes?
Attachments
AIAI-epsilon-38.tar
(255 KiB) Downloaded 256 times
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 »

is it me, or is the latest version (38) not on bananas?
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
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (38) version

Post by Kogut »

Lord Aro wrote:is it me, or is the latest version (38) not on bananas?
Yes it require
- improvement(s) for strategy
- hunting for weird bug
- removing trains after industry clousure
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 »

but why is the latest version on there only delta3? surely some of the epsilon versions could go on?
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
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (38) version

Post by Kogut »

Lord Aro wrote:but why is the latest version on there only delta3? surely some of the epsilon versions could go on?
No, because there are still flaws and one weird bug (train with 1 wagon and 13 engines). I send to Bananas only "stable" versions.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Ruudjah
Engineer
Engineer
Posts: 44
Joined: 12 Nov 2007 11:09

Re: AIAI epsilon (38) version

Post by Ruudjah »

I noticed jams due to the way you layout truck stations & depots. A better way which cannot cause jams at any time is to have the depot behind the drive-trhough station, using three orders:
  • Full load station X
  • Unload station Y
  • Non-stop to depot X
After the truck has unloaded, it will pass through the laoding station non-stop, and enter the depot. It creates a 'black hole' within your network, therefore eliminating any possible jams.

Since a pic says more then thousand words, here goes:
Attachments
depotstation.png
depotstation.png (87.06 KiB) Viewed 1170 times
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: AIAI epsilon (38) version

Post by Kogut »

Ruudjah wrote:I noticed jams due to the way you layout truck stations & depots. A better way which cannot cause jams at any time is to have the depot behind the drive-trhough station, using three orders:
  • Full load station X
  • Unload station Y
  • Non-stop to depot X
After the truck has unloaded, it will pass through the laoding station non-stop, and enter the depot. It creates a 'black hole' within your network, therefore eliminating any possible jams.

Since a pic says more then thousand words, here goes:
Thanks for idea!
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: AIAI epsilon (38) version

Post by ostlandr »

That is a strategy I use in my games, especially when a vehicle has a long run and/or is set to "wait for full load."

For passengers and mail, I would use something like this:
[*]Non-stop to station A
[*]Non-stop to station B (no loading)
[*]Non-stop to depot X
[*]Non-stop to station B

This keeps the vehicle from being loaded with passengers/mail while being serviced. It also works for CargoDist.

Of course it also works for multiple station runs, like A-B-C-B-A(no load)-depot
Ruudjah wrote:I noticed jams due to the way you layout truck stations & depots. A better way which cannot cause jams at any time is to have the depot behind the drive-trhough station, using three orders:
  • Full load station X
  • Unload station Y
  • Non-stop to depot X
After the truck has unloaded, it will pass through the laoding station non-stop, and enter the depot. It creates a 'black hole' within your network, therefore eliminating any possible jams.

Since a pic says more then thousand words, here goes:
Who is John Galt?
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 »

i realise development has paused( :P ) for AIAI, but i wish to report this bug with AIAI trains:
Attachments
aiai trains.png
aiai trains.png (76.67 KiB) Viewed 5404 times
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
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 38 guests