CluelessPlus
Moderator: OpenTTD Developers
Re: CluelessPlus
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?
Anyway, I was just wondering... What do all those smilies mean in the station signs and the vehicle names? What is their order?
Re: CluelessPlus
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: CluelessPlus
Thanks I thought they were some sort of information regarding the efficiency of the services...
Re: CluelessPlus
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, .. ):
After a while there will be combinations like ':A' that do not really make sense as smilies.
Code: Select all
)D|(/spOo3SP><{}[]$012456789abcdefghijklmnqrtuvwxyzABCEFGHIJKLMNQRTUVWXYZ?&;#=@!\%
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: CluelessPlus
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.
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.
Re: CluelessPlus
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
Re: CluelessPlus
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)
Junctioneer (a traffic intersection simulator)
Re: CluelessPlus
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:
This is what happens right before going bankrupt, lost vehicles on road pieces that weren't able to be sold on time:
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:
Re: CluelessPlus
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: Changelog
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: 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)
Junctioneer (a traffic intersection simulator)
Re: CluelessPlus
I think that Clueless may sometimes add more vehicles to route, even without station expanding.
- Attachments
-
- Przechwytywanie.PNG (86.78 KiB) Viewed 6237 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: CluelessPlus
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.
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)
Junctioneer (a traffic intersection simulator)
- luk3Z
- Traffic Manager
- Posts: 197
- Joined: 25 Dec 2005 17:42
- Location: Kielce, Poland (Mars sometimes)
Re: CluelessPlus
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 -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
Re: CluelessPlus
Its probably something that the bananas uploader does to the files, like a license entry
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
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
- luk3Z
- Traffic Manager
- Posts: 197
- Joined: 25 Dec 2005 17:42
- Location: Kielce, Poland (Mars sometimes)
Re: CluelessPlus
Rather looks like "nighty" and final:Lord Aro wrote:Its probably something that the bananas uploader does to the files, like a license entry
http://yfrog.com/hqcluelessplusj
but both has signed as v23
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
Re: CluelessPlus
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.
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:
Forum:
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.
Code: Select all
diff -q <dir1> <dir2>
Bananas:
Code: Select all
RETURN_SUCCESS <- 0;
Code: Select all
RETURN_SUCCESS <- 0;
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.
Last edited by Zuu on 21 Nov 2010 08:49, edited 1 time in total.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: CluelessPlus
Maybe windows-linux new line conversion?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
- luk3Z
- Traffic Manager
- Posts: 197
- Joined: 25 Dec 2005 17:42
- Location: Kielce, Poland (Mars sometimes)
Re: CluelessPlus
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.
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 -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: CluelessPlus
Windows line endings are two byte while linux line endings are one.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.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: CluelessPlus
I downloaded CluelessPlus-23.tar through bananas, and from http://www.tt-forums.net/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:Thus, one extra license file, and three changed files.
Looking in more detail into the return_values.nut file: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: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).
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: Select all
$ 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
Looking in more detail into the return_values.nut file:
Code: Select all
$ 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
Code: Select all
$ 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
This happens for the whole file, and for both other files as well (I checked the last part of both other files as well).
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: CluelessPlus
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.
All content should be available from either bananas or the devzone.
- Attachments
-
- Oskarsåker Transport, 1950-08-08.sav
- (339.62 KiB) Downloaded 136 times
-
- Oskarsåker Transport, 1950-08-04.png (91.2 KiB) Viewed 6001 times
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Who is online
Users browsing this forum: No registered users and 39 guests