Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Sep 23, 2017 8:01 pm

All times are UTC




Post new topic  Reply to topic  [ 55 posts ]  Go to page 1 2 3 Next
Author Message
 Post subject: AroAI - v1.2
PostPosted: Sat Jul 31, 2010 6:23 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
AroAI - Lord Aro's feeble attempt at making an AI. Currently buses only.

Well, I've managed it. I've made my own working AI!
It can currently only use buses, but can max out the default vehicles count within 5 years and be sitting on a £2m pile of cash as well.
Attachment:
File comment: HQtown
AroAI HQtown.png
AroAI HQtown.png [ 335.53 KiB | Viewed 19330 times ]



Attachment:
File comment: Routes built in under 5 years
AroAI Map.png
AroAI Map.png [ 13.09 KiB | Viewed 19330 times ]

The AI uses 1.1 API so you have to have at least r20563/1.1.0-beta1 to use this!

Download it below or from Bananas.

Comments, problems and suggestions are always welcome.

AROAI CHANGELOG
Code:
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)


------------------------------------ Archived Changelog from the SVN repo ------------------------------------
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)

1.1.0.1 (2010-08-22)
------------------------------------
- Fix: Debug not changed properly [Brumi] (r73)

1.1.0 (2010-08-21)
------------------------------------
- Codechange: 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)
- Fix: 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)
- Codechange: 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)

1.0.2 (2010-08-09)
------------------------------------
- Add: Forum url (r59)
- Fix: Variable not declared properly in vehiclemanager.nut (r59)
- Codechange: 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)

1.0.1 (2010-08-02)
------------------------------------
- Fix: A debug output was an Info instead of a Warning (r55)
- Fix: When out of money, the AI would not build the route properly [Brumi] (r54)

1.0.0 (2010-07-31)
------------------------------------
First release of AroAI (r53)
- Feature: Bus support



See readme.txt for more info

Attachment:
AroAI-1.2.tar [80 KiB]
Downloaded 1047 times


Hope you enjoy the AI,
and that the first person to download it doesn't get an error straight away,
Lord Aro


Last edited by Lord Aro on Fri Apr 15, 2011 9:36 am, edited 14 times in total.

Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Sun Aug 01, 2010 6:44 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
(reserved for more screens)
Attachment:
File comment: My AI's first ever profit!
AroAI FIRST PROFIT.png
AroAI FIRST PROFIT.png [ 52.76 KiB | Viewed 19186 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


Last edited by Lord Aro on Mon Aug 02, 2010 9:01 am, edited 1 time in total.

Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Sun Aug 01, 2010 9:05 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Congratulation...

Lord Aro wrote:
EDIT: i can't seem to upload it to bananas - Unexpected error while uploading

I've got that same error sometime ago, but that is because the unsupported license . So, what is the license you've set for the AI?

_________________
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Sun Aug 01, 2010 9:15 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
only gpl 2 :?

_________________
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


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Sun Aug 01, 2010 10:53 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Thats right. What about the tar content? Is there any other text except ai script?

_________________
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Sun Aug 01, 2010 11:09 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
Its exactly the same as the download above

_________________
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


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Sun Aug 01, 2010 11:16 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
If you tried to upload to bananas the same tar file that you have uploaded to the forums, then you could try to create a new tar file where you remove the COPYING file. When you select the GPL 2 license on the upload page, it will try to add a standard COPYING file. When I reread the Terms of Service it does not actually state that you must not include a copying file if you select a non-custom license. The only thing could be is that they use lower-case letters for the COPYING, README and LICENSE files.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Sun Aug 01, 2010 6:06 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 873
Congratulations Lord Aro! :D Considering that you did it without any programming experience beforehand, it's a great achievement. :))

I gave it a short test (I will test it more of course :) ) and there was no crash. But the AI has problems when it doesn't have enough money to finish a road.
Attachment:
not enough money.png
not enough money.png [ 52.4 KiB | Viewed 19260 times ]


And again, congratulations for the first release :)


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 2:38 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
@Zuu

nope, removing the COPYING file hasn't worked
i'm trying to input this infomation, see anything wrong with it:

edit: remove attachments becasue problem fixed

@Brumi
Thanks! :D

@Brumi's AI problem
are you sure it was just that it didn't have enough money? could you possibly post the debug? because when it doesn't have enough money to build a road it's supposed to wait for a while (500 ticks) before trying again. In fact, i've seen it do it properly my self. Even so, expect an update soon!
Edit: although, i've never seen it have a problem with the same tile twice, so maybe that's the problem area

_________________
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


Last edited by Lord Aro on Thu Aug 05, 2010 12:32 pm, edited 1 time in total.

Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 3:04 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Have u tried to remove all file except only *.nut file?

_________________
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 3:17 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
just have!
no...

_________________
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


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 4:00 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Fri Dec 19, 2008 5:03 am
Posts: 308
Location: Indonesia
Last effort ...
Try upload this


Attachments:
AroAI-1.0.0(r53).tar [40 KiB]
Downloaded 288 times

_________________
Correct me If I am wrong - PM me if my English was bad :D

**[OpenTTD AI]** Image
***[NewGRF] *** Image
Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 4:57 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
thats got it! :mrgreen:
AI is now 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


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 7:51 am 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 873
Lord Aro wrote:
@Brumi's AI problem
are you sure it was just that it didn't have enough money? could you possibly post the debug? because when it doesn't have enough money to build a road it's supposed to wait for a while (500 ticks) before trying again. In fact, i've seen it do it properly my self. Even so, expect an update soon!

Sorry I don't have the savegame, but I remember that there were many yellow 'Waiting for money' lines in the debug window. Later the AI seemed to turn to other things.


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 8:51 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
Update!

Changelog:
1.0.1 (2010-08-02)
------------------------------------
- Fix: When out of cash, the AI would not build the route properly (Brumi) 8)
- Fix: A debug output was an Info instead of a Warning

download in first post or off bananas

total downloads as of posting: ~16! :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


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 9:08 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Feb 09, 2006 7:15 pm
Posts: 3815
Lord Aro wrote:
EDIT: i can't seem to upload it to bananas - Unexpected error while uploading
Congratulations! You are the first (of over 1000 BaNaNaS uploads) that used '(' or ')' in their filename, so we didn't know that that would break the uploading. Now it should be quite a bit sturdier and allow such uploads! Or in other words: the failure to upload should be resolved now.


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 11:30 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4532
Location: /home/sweden
Congratulations to getting your AI ready for a first release. I decided to give it a test run, but it had problems with my settings.

Problem:When building drive through stations on town roads is disabled, then the AI fails to build road stations instead of falling back to building them on new/own road.


Attachments:
Unnamed, 26th May 1965.png [68.02 KiB]
Downloaded 2 times
File comment: Saved with nightly r20279.
AroAI.sav [51.43 KiB]
Downloaded 246 times

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 11:38 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
Thanks Zuu, its near the top of my todo list (which is quite lengthy - 15+things - see readme or main.nut for full list)

_________________
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


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 2:42 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Tue Apr 17, 2007 2:28 pm
Posts: 236
I don't see it on banana :(


Top
   
 Post subject: Re: AroAI - V1.0.0
PostPosted: Mon Aug 02, 2010 4:01 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
I'm going to be answering a lot of this - AroAI is the first AI released to use 1.1API (i think) so you need a recent nightly to use this

_________________
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 55 posts ]  Go to page 1 2 3 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.