Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu May 23, 2013 4:21 am

All times are UTC




Post new topic Reply to topic  [ 158 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8  Next
Author Message
 Post subject: Re: CluelessPlus
PostPosted: Fri Aug 13, 2010 7:10 am 
Offline
Chief Executive
Chief Executive

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 640
Congrats on the new release! :)

Anyway, I was just wondering... What do all those smilies mean in the station signs and the vehicle names? What is their order?


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Fri Aug 13, 2010 7:51 am 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2219
Location: Poland
viewtopic.php?p=869033#p869033

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Fri Aug 13, 2010 8:20 am 
Offline
Chief Executive
Chief Executive

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 640
Thanks :) I thought they were some sort of information regarding the efficiency of the services...


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Fri Aug 13, 2010 12:04 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 3986
Location: /home/sweden
Regarding the order, it will take the first combination that is unused for the current industry/town + cargo combination. If you read the explanation that Kougut linked, you know that ':' is zero. From the source code ( http://noai.openttd.org/svn/ai-clueless ... helper.nut ) you can find all the other symbols (1, 2, 3, .. ):

Code:
)D|(/spOo3SP><{}[]$012456789abcdefghijklmnqrtuvwxyzABCEFGHIJKLMNQRTUVWXYZ?&;#=@!\%


After a while there will be combinations like ':A' that do not really make sense as smilies.

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


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sat Aug 14, 2010 12:43 am 
Offline
Engineer
Engineer

Joined: Tue Aug 03, 2010 8:47 pm
Posts: 4
Version 22 works good for me now.

I noticed a thing that could be improved... the AI seems to always max out the bank loans, and never repays them, even when it has a lot of money.


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Mon Aug 23, 2010 8:34 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Fri Jan 19, 2007 7:26 pm
Posts: 274
In my current game CluelessPlus is performing quite good, even better than NoCab and AdmiralAI! There is however one issue: Dr. Clue demolishes roads to build his own stations. This destroyed the fastest path of my busses so they have to take a large detour. On small maps micromanagement is fun but on a large map with many new routes to build, I like to 'set and forget' as much as possible. I guess avoiding that makes it a lot harder to build the stations though... :)


Attachments:
J. van Bokhorst Transport, 1954-06-01.png [669.54 KiB]
Downloaded 2 times
Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Mon Aug 23, 2010 5:41 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 3986
Location: /home/sweden
Thanks for the report. I will take a look into it. I don't want CluelessPlus to be too much in the way of players but rather stick to its business.

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


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sun Nov 07, 2010 12:00 am 
Offline
Traffic Manager
Traffic Manager

Joined: Tue Apr 17, 2007 2:28 pm
Posts: 236
There is some weird behaviour with CluelessPlus. Right after it has build a connection with trucks or buses, it immediately starts to manage them and sells all the vehicles it has just built:
Attachment:
Sem nome, 29 Jan 1951.png [139.6 KiB]
Downloaded 2 times

Attachment:
Sem nome, 29 Jan 1951.sav [77.51 KiB]
Downloaded 44 times


It does this in 2 or 3 connections and ends up removing the road even with its own vehicles on it.


This is what happens right before going bankrupt, lost vehicles on road pieces that weren't able to be sold on time:
Attachment:
Sem nome, 5 Jan 1952.png [94.54 KiB]
Downloaded 2 times


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sun Nov 07, 2010 9:22 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 3986
Location: /home/sweden
Thanks samu for the report.

It looks that your problem is caused by the code I had in place to make my AI work for OpenTTD versions without AIOrder.IsOrderInvalid. However since 1.0.4 (or 1.0.3) I think this function has been added to the stable versions, so I didn't bother to fix the backward compatibility code to both work on old and new OpenTTD versions, instead I have made it so that if you use a too old OpenTTD version where AIOrder.IsOrderInvalid does not exist, it will simply not detect vehicles with invalid orders. My hope is that most users now has a recent enough OpenTTD stable/trunk that it shouldn't be a problem. (and if someone has problem with keeping up to date on Windows, they could take a look on my OpenTTD Auto Update program ;-) )

I've also fixed the bug posted above when the AI would block an old road by building a bus stop in it. This I guess has happened due to the road was previously owned by a company that went bankrupt. Thus CluelessPlus had the rights to destroy it while it didn't own the tile so it didn't think it was something to protect. (in theory CluelessPlus could before this fix do the same harm to one of its own routes if it used road owed by nobody)

These two fixes have been published as Version 23 - already uploaded to BaNaNaS, and for you who can't use bananas for one or another reason here's the tar-file:
Attachment:
File comment: Dependencies: (AI libraries that you need to make sure you install correctly, if you download CluelessPlus manually)
Pathfinder.Road - version 3
Queue.FibonacciHeap - version 2
SuperLib - version 6

CluelessPlus-v23.tar [200 KiB]
Downloaded 54 times


Changelog
  • Fixed problem with checking for invalid orders that caused correct orders to be seen as invalid (reported by bokkie)
  • Be more careful when expanding stations to not block an existing road (reported by samu)

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


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sat Nov 13, 2010 8:03 am 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2219
Location: Poland
I think that Clueless may sometimes add more vehicles to route, even without station expanding.


Attachments:
Przechwytywanie.PNG
Przechwytywanie.PNG [ 86.78 KiB | Viewed 1974 times ]

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sat Nov 13, 2010 10:46 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 3986
Location: /home/sweden
Thanks for the feedback, not sure why it does not add more trucks. Maybe it already have 500 road vehicles? Do you have a savegame?

Edit: Nevermind - I found the problem stations in the yes.sav that you posted in your test game thread.

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


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sun Nov 21, 2010 8:10 am 
Offline
Engineer
Engineer
User avatar

Joined: Sun Dec 25, 2005 5:42 pm
Posts: 69
Location: Poland
I don't know why but I downloaded this CluelessPlus-v23.tar [200 KiB] from here and from BaNaNaS and I noticed that some files in archive have different size (I checked choochoo AI and it also has different). So what is the original CluelessPlus-v23 ?

_________________
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> http://bananas.openttd.org/en/


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sun Nov 21, 2010 8:28 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2241
Location: Suffolk, UK
Its probably something that the bananas uploader does to the files, like a license entry

_________________
AroAI - A really feeble attempt at an AI

  • Unix *is* user-friendly. It is not ignorant-friendly and idiot-friendly.
  • Duct tape is like the force. It has a light side, a dark side, and it holds the universe together... -- Carl Zwanzig
  • I am always doing that which I cannot do, in order that I may learn how to do it. -- Pablo Picasso
  • Time LINE...? Ehh, time isn't made out of LINES. It is made out of circles. That is why clocks are round! -- Caboose, RvB


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sun Nov 21, 2010 8:42 am 
Offline
Engineer
Engineer
User avatar

Joined: Sun Dec 25, 2005 5:42 pm
Posts: 69
Location: Poland
Lord Aro wrote:
Its probably something that the bananas uploader does to the files, like a license entry


Rather looks like "nighty" and final:

http://yfrog.com/hqcluelessplusj

but both has signed as v23

_________________
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> http://bananas.openttd.org/en/


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sun Nov 21, 2010 8:43 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 3986
Location: /home/sweden
Hmm, I'm not sure why. But indeed there is some differences. I've untared both one version 23 from the forum and one from bananas.

Code:
diff -q <dir1> <dir2>


This gives me a few files. I checked one file return_values.nut and ran a diff on those files and came up with that these two lines differed:

Bananas:
Code:
RETURN_SUCCESS <- 0;


Forum:
Code:
RETURN_SUCCESS <- 0;


However, I can't visually see what the difference is nor does gvim show any partial new-line characters.

I've also checked the other files that are reported different and they all show similar strange reports.


Edit: The differences are most likely an effect of the re-packaging that bananas does. Especially since it is very long time since I touched the return_values.nut file. For uploading to bananas and forum, I use the same tar file which is generated by a script. Between those versions there is the SVN version that of course could differ, but then you need an SVN client to get hold of the AI code.

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


Last edited by Zuu on Sun Nov 21, 2010 8:49 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sun Nov 21, 2010 8:45 am 
Offline
Tycoon
Tycoon

Joined: Wed Aug 26, 2009 6:33 am
Posts: 2219
Location: Poland
Maybe windows-linux new line conversion?

_________________
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sun Nov 21, 2010 8:55 am 
Offline
Engineer
Engineer
User avatar

Joined: Sun Dec 25, 2005 5:42 pm
Posts: 69
Location: Poland
Files have diffrent size but they are the same inside.
I cheked these files in WinMerge and it says that files have diffrent EOL (end of line) signs.

_________________
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> http://bananas.openttd.org/en/


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sun Nov 21, 2010 9:02 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 6978
Location: Sol d
luk3Z wrote:
Files have diffrent size but they are the same inside.
I cheked these files in WinMerge and it says that files have diffrent EOL (end of line) signs.

Windows line endings are two byte while linux line endings are one.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Sun Nov 21, 2010 9:40 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 2454
Location: home
I downloaded CluelessPlus-23.tar through bananas, and from viewtopic.php?p=912081#p912081 I downloaded CluelessPlus-v23.tar .

When unpacking, the bananas version creates a directory CluelessPlus-23 (I renamed it to CluelessPlus-23_bananas), while the manually downloaded one creates directory CluelessPlus (renamed to CluelessPlus_download).

Running diff gives:
Code:
$ diff --brief --recursive CluelessPlus-23_bananas CluelessPlus_download 
Only in CluelessPlus-23_bananas: license.txt
Files CluelessPlus-23_bananas/pairfinder.nut and CluelessPlus_download/pairfinder.nut differ
Files CluelessPlus-23_bananas/return_values.nut and CluelessPlus_download/return_values.nut differ
Files CluelessPlus-23_bananas/strategy.nut and CluelessPlus_download/strategy.nut differ
Thus, one extra license file, and three changed files.

Looking in more detail into the return_values.nut file:
Code:
$ xxd CluelessPlus_download/return_values.nut | head -5
0000000: 0d0a 5245 5455 524e 5f53 5543 4345 5353  ..RETURN_SUCCESS
0000010: 203c 2d20 303b 0d0a 5245 5455 524e 5f46   <- 0;..RETURN_F
0000020: 4149 4c20 3c2d 2031 3b0d 0a52 4554 5552  AIL <- 1;..RETUR
0000030: 4e5f 4e4f 545f 454e 4f55 4748 5f4d 4f4e  N_NOT_ENOUGH_MON
0000040: 4559 203c 2d20 323b 0d0a 5245 5455 524e  EY <- 2;..RETURN
The 'xxd' command dumps the whole file in hex format, 'head -5' limits the output to the first 5 lines. Doing the same for the banas variant:
Code:
$ xxd CluelessPlus-23_bananas/return_values.nut | head -5
0000000: 0a52 4554 5552 4e5f 5355 4343 4553 5320  .RETURN_SUCCESS
0000010: 3c2d 2030 3b0a 5245 5455 524e 5f46 4149  <- 0;.RETURN_FAI
0000020: 4c20 3c2d 2031 3b0a 5245 5455 524e 5f4e  L <- 1;.RETURN_N
0000030: 4f54 5f45 4e4f 5547 485f 4d4f 4e45 5920  OT_ENOUGH_MONEY
0000040: 3c2d 2032 3b0a 5245 5455 524e 5f54 494d  <- 2;.RETURN_TIM
As you can see, the windows end-of-line \r\n (0d 0a) sequences got replaced by unix end-of-line \n (0a).

This happens for the whole file, and for both other files as well (I checked the last part of both other files as well).


Top
 Profile  
 
 Post subject: Re: CluelessPlus
PostPosted: Thu Mar 10, 2011 7:02 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 6978
Location: Sol d
I just started a test game I'm running with a couple of AI for the rest of the day. A detailed analysis will follow later, but what I saw when I just looked around the map initially is the behaviour of CluelessPlus on its first bus route: it seems quite overloaded with busses.

All content should be available from either bananas or the devzone.


Attachments:
Oskarsåker Transport, 1950-08-08.sav [339.62 KiB]
Downloaded 30 times
Oskarsåker Transport, 1950-08-04.png
Oskarsåker Transport, 1950-08-04.png [ 91.2 KiB | Viewed 1738 times ]

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 158 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8  Next

All times are UTC


Who is online

Users browsing this forum: Majestic-12 [Bot] and 0 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-2013 phpBB Group

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