AroAI - v1.2

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

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

Re: AroAI - V1.0.0

Post by Brumi »

Nice to see an update, now I'm testing your AI a bit longer. :)
It's good to see that the AI already knows how to expand stations, and notices if the vehicle limit is reached.
There was no crash again, good work!
Anyway, do you have any ideas what you will work on next? So, what will be the next feature(s) to be implemented?

And one little note: you forgot to modify the topic title to 'AroAI - V1.0.1' :wink:
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: AroAI - V1.0.0

Post by Zuu »

If you un-tar the AI, you can see a todo-list in the readme file.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: AroAI - V1.0.0

Post by Brumi »

Oops, not seeing farther than my own nose :oops: thanks anyway
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AroAI - V1.0.1

Post by Lord Aro »

thanks Zuu, and as you suggested, i'll probably work on what i call 'original bus stations' next, as soon as i've sorted out the problem here
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
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AroAI - v1.0.2(r59)

Post by Lord Aro »

Updatey goodness!

CHANGELOG


1.0.2 (2010-08-09)
------------------------------------
- Add: Forum url (r59)
- Fix: Variable not declared properly in vehiclemanager.nut (r59)
- Change: rename moneymanager.nut to manager.nut in preparation for something... (r58)
- Fix: Display town name in GetTowns (r57)
- Add: Properly limit AI to management only when vehicle limit reached or unable to build bus route properly (r56)

download in first post or on bananas!

number of total downloads (all versions) = ~115! :mrgreen: 3 figures!
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
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AroAI - v1.1.0(r72)

Post by Lord Aro »

BIG UPDATE!! :mrgreen:

CHANGELOG

1.1.0 (2010-08-21)
------------------------------------
- Change: Simplify the sign remover (r72)
- Change: A debug in loan management to something that makes better sense (r71)
- Feature: Build Bus Stations when drive through bus stations cannot (r70)
- Add: noai.openttd.org url (r69)
- Change: Rewrite build depot code as when out of money the AI could freeze/not build the depot (r68)
- Change: Fiddle around with build route errors (r67)
- Fix: AIAbstractList has been replaced with AIList, so needed to upgrade. AI NOW REQUIRES r20563 OR LATER(r66)
- Feature: Deal with build road depot errors (r65)
- Change: An Error() to a Warning() in Stop(); to make it clearer (r64)
- Change: Rename debugs.nut to util.nut and move some functions into it (r63)
- Feature: Reformed debug output (r62)
- Feature: Events Manager (r61)
- Change: Some debugs in manager.nut (r60)

download in first post or from bananas

number of total downloads (all versions) = ~250! 1/4 of a thousand! :mrgreen:
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
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: AroAI - v1.1.0(r72)

Post by Brumi »

AroAI 1.1.0 crashed immediately on startup: (using OpenTTD r20589)
Attachments
aroai crash.png
aroai crash.png (10.17 KiB) Viewed 7342 times
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AroAI - v1.1.0.1(r73)

Post by Lord Aro »

@&%£!!! :o
didn't change a debug properly :roll:
thanks! :mrgreen:

update in first post or on bananas

CHANGELOG

1.1.0.1 (2010-08-22)
------------------------------------
- Fix: Debug not changed properly [Brumi] (r73)
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
Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: AroAI - v1.1.0.1(r73)

Post by Brumi »

I did a test with 3 AroAIs (and one SimpleAI). I know it's not very wise to use multiple instances of the same AI, but here it wasn't a big problem. But the centre city of the three AroAIs got a bit crammed with bus stations:
bus city.png
bus city.png (340.76 KiB) Viewed 925 times
The problem here is that some of the pink player's stations are unused.
Here is a savegame:
Attachments
AroAI test.sav
(495.22 KiB) Downloaded 197 times
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AroAI - v1.1.0.1(r73)

Post by Lord Aro »

again, something fairly high up on my list of things to do is delete stations when failure building the rest of the route :roll:

expect it in next major release (1.2.0) :mrgreen:
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
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AroAI - v1.1.0.1(r73)

Post by Lord Aro »

oh, and by all means use the bug tracker here, just tell me if you've put something on there!
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
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AroAI - v1.1.0.1(r73)

Post by planetmaker »

Hi,

you AI currently seems to have some problems starting at all in the first place (OpenTTD 1.0.4-RC1). When I start OpenTTD I get these debug lines:

Code: Select all

dbg: [misc] [squirrel] Failed to compile '/Users/ingo/Documents/OpenTTD/content_download/ai/AroAI-1.1.0.1r73.tar/aroai-1.1.0.1r73/info.nut'
Your script made an error: the index doesn't exist

CALLSTACK
*FUNCTION [main()] AroAI-1.1.0.1r73.tar/aroai-1.1.0.1r73/info.nut line [49]

LOCALS
[this] TABLE
Cheers,
pm
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AroAI - v1.1.0.1(r73)

Post by Lord Aro »

Lord Aro wrote:This AI uses 1.1API, so you need a recent nightly for the AI to function (~r20653 or later)
:wink:
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
Samu
Traffic Manager
Traffic Manager
Posts: 236
Joined: 17 Apr 2007 14:28

Re: AroAI - v1.1.0.1(r73)

Post by Samu »

How do I check which r***** version I have? Is 1.05-RC1 compatible? I tried with 1.0.4 and it didn't list it.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: AroAI - v1.1.0.1(r73)

Post by planetmaker »

Samu wrote:How do I check which r***** version I have? Is 1.05-RC1 compatible? I tried with 1.0.4 and it didn't list it.
1.0.x versions obviously aren't. Nightlies are.
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AroAI - v1.1.0.1(r73)

Post by Lord Aro »

Good heavens. Someone posted in this thread :shock:
Yes, I probably should made it clearer:
To use this AI you need a recent nightly (r20563 from memory) or 1.1.0 (when it comes out)

PS: There will be a new release soon. However the computer with it stored on is out of action til further notice :(
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
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: AroAI - v1.1.1(r96)

Post by Lord Aro »

Finally, after 4 months, i have pushed another update!

Changelog:

1.1.1 (2010-12-29)
------------------------------------
- Fix: A temporary fix for an invalid engineID (r96)
- Add: GetEventName() so AI can print event names (r95)
- Add: Some debugs (r94)
- Codechange: some variables were global when they didn't have to be (r93)
- Codechange: Put lots of numbers into constants (r92)
- Change: AutoRenewMonths to -6 (r91)
- Codechange: A variable didn't have a very explanatory name (r90)
- Fix: A building of road failure didn't actually stop the building of roads (r89)
- Doc: Standardise comments (r88)
- Codechange: Standardise some debugs (r87)
- Clean-up: Delete unused variable (r86)
- Fix: BuildBusStop() was using wrong sqrt function (built-in instead of in code) (r85)
- Codechange: Merge BuildRoadDepot() and BuildBusStation() functions (r84)
- Codechange: Combine some unneeded event manager variables (r83)
- Change: Warning debugs were actually errors(ish) (r82)
- Codechange: Merge 2 if statements because they had the same output (r81)
- Fix: Out of money debug was appearing more than necessary (r80)
- Fix: Event debug was appearing when it shouldn't have (r79)
- Change: Increased manageOnly sleeping time (r78)
- Codechange: Make coding style more like OpenTTD (r77)
- Codechange: Make the company naming block a switch block (r76)
- Codechange: Streamline the build bus route code a bit (r75)
- Fix: Another possible lock when another AI built where AI was going to build (r74)

Also, I am looking for suggestions as to what to do with this AI, as all in the TODO list in main.nut can be done fairly quickly (i think)

The next release will have a new version numbering scheme, due to a proper repo at openttdcoop being set up, which i shall endeavour to stick to
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
DeletedUser6
Transport Coordinator
Transport Coordinator
Posts: 294
Joined: 23 Jul 2007 15:13
Location: Somewhere in this page

Re: AroAI - v1.1.1(r96)

Post by DeletedUser6 »

Apologies for allowing this topic to die - but here's a taster of what to expect in 1.2.111 (see point 1)

* new versioning system - that keeps breaking
* the ai is 'unsexist'.
* a rewritten readme.

Amongst other things...

* I'm experimenting with the _cost and _estimate parameters of A*.

Matthew:out
Yay! I'm back! Did you miss me?


...


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

Re: AroAI - v1.2

Post by Lord Aro »

A wild release appeared!

Code: Select all

1.2 (2011-04-15)
------------------------------------
- Feature: New version system (r7-r13)
- Add: Don't reset the company information on load (r15)
- Add: Automatic versioning of readme.txt (r26)
- Change: Rewrite the readme (r24)
- Change: Add 96 to the version compared with the HG repo revision, so there are no incompatibilities caused by the lower version number (r19-r23)
- Change: Switch to openttdcoop hg repo (r-numerous)
- Change: Make the AI un-sexist (r18)
- Fix: A possible infinite loop if no path was found (r27)
Find it in the first post, on BaNaNaS or http://bundles.openttdcoop.org/ai-aroai/releases/LATEST
Have fun :D
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
HUgo8745
Engineer
Engineer
Posts: 29
Joined: 11 Feb 2010 20:05

Re: AroAI - v1.2

Post by HUgo8745 »

Good work with the new release! Will try it tomorrow.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests