Page 67 of 237

Re: FIRS Industry Replacement Set - Development

Posted: 16 Mar 2010 16:29
by andythenorth
This set will need a manual. Not a big manual, I'm trying to keep it simple :) But something.

Would anybody like to help write a manual? Something like the CanSet or HEQS manual. http://www.tt-forums.net/download/file.php?id=103700

cheers,

Andy

Re: FIRS Industry Replacement Set - Development

Posted: 16 Mar 2010 19:28
by zc15-nyonker
Yes! I would love to help! I'm no good at coding or drawing, and I've been waiting for a chance to help with the development of OTTD.

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 09:30
by andythenorth
Announcing - The Great Closure Code Beta Test!
Morning, fancy helping test something?
Simple simple simple. Just load the attached grf (no other grfs), and start a game using the settings in the screenshot.
Don't build anything. Check the map window and make a note of how many power stations exist at game start (should be around 6).

Then run the game on fast forward with the news history window open, and make a note of what date the power stations close. When the last power station has closed, you're done :) Post the starting industry count and the closure dates here for fame and gratitude!

This would be mighty helpful to me, as I have spent a couple of days staring at the game on fast forward. My time would be better spent on code or pixels, but this testing needs to be done before I can do a 0.1 release of FIRS. :D
firs-nightly.tar
(440 KiB) Downloaded 178 times

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 12:31
by Terkhen
I have coded a hackish diff that outputs all industry creation and closing along with the current date.
log_industry_open_close_r19464.diff
(1.95 KiB) Downloaded 204 times
The fastest way to get these results into a text file is launching the patched OpenTTD as follows:

Code: Select all

./openttd -s null -m null -v null -t 1920 -g &> result.txt
This will create a new random game with the current settings and run it without GUI until 1940 (if you want to change that, the final year is hardcoded at the diff file).

The tar file contains 20 game logs I have created to test this diff, using the posted settings and ran for 20 years.
results.tar.gz
(16.96 KiB) Downloaded 151 times
I hope it is useful, tell me if there's something wrong :)

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 13:53
by andythenorth
Terkhen wrote:The tar file contains 20 game logs I have created to test this diff, using the posted settings and ran for 20 years.
Terkhen, that's awesome.

Could any of you (hi readers) plot a chart from this data? I need to see the frequency / distribution of Power Station closures versus other industries, to see if there's any meaningful difference. I'm not much good with excel, matlab etc for this :o

cheers,

Andy

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 13:55
by DJ Nekkid
i'll take a look in excel when i get home from work... Estimated done by 8tonight :)

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 15:04
by Roujin
Ooh, I want to give it a go too :) Let's see what I can come up with..

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 15:10
by Kogut
I prepared basic template.
One questions - Is it OK to make it in .ods? (format of open office).

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 15:27
by Kogut
Quick preview, only one test, only coal mine, forest and power station (easy to epand)

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 19:01
by Roujin
Okay, I'm done.. I see I'm not the first one, but maybe my results give further insight.. and they can be used to view further test data gained from Terkhens diff.


First, here's a hacky lua script. What does it do? It takes the output (in form of consecutively numbered files log01.txt etc.), reads them, interprets them, converts the difference values (got constructed / got closed) to absolute values, averages them and outputs it into a csv file.

The csv file has the different industry types in the columns and the date (month year) in the rows. Content of the cells is how many of that industry type existed at that date.
convert.zip
lua script to convert output of Terkhen's hack to something else in .csv format
(1.34 KiB) Downloaded 129 times
Second, here's the data I generated from Terkhens log files imported in a google spreadsheed and illustrated with nice line graphs: http://spreadsheets.google.com/pub?key= ... BHWQ&gid=4
When you're viewing the line graphs, you can click the colors of the legend to make the particular industry flash, to make them out in the mess :)

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 19:39
by andythenorth
Thanks for those.

So two things stand out.
- The initial dip. That's actually by design for the power station, but won't work for other industries. I'll have to think about that :o
- Roujin's chart shows that my nfo code makes only a little difference to the 'shape' of closures compared to game's code :|

Anyone want to run more tests? (I am coding something else right now!) Got a new new grf with changed values for:
- initial protection period
- likelihood of closure

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 21:28
by Roujin
God, it takes ages. It already took ages to compile, and now it takes ages to run, too. Terkhen, how long is one go supposed to be with your method?
And I'm not even sure if the piping works at all, since I'm on windows. And the windows shell did not like "&>". I ran it just with ">" instead now, and have the bad feeling that it won't work...

Argh.

Well, if someone else would make a couple of test runs and post the results here (like Terkhen's results), I'd offer to convert them and put em in a spreadsheet with those line graphs again.

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 21:45
by frosch
Roujin wrote:And I'm not even sure if the piping works at all, since I'm on windows. And the windows shell did not like "&>". I ran it just with ">" instead now, and have the bad feeling that it won't work...
You need glx' tool http://devs.openttd.org/~glx/convert.zip to turn openttd into a console application. Afaik you need to run the tool from the OTTD folder.

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 21:46
by Terkhen
The &> is to pipe stderr to the file. I don't remember what's the symbol for windows batch, but I'm afraid that you will end up with empty files using only >.

Edit: about the windows binary, just what frosch said.

I'm currently running another group of 20 games. I don't know how much time it took the last time because I left the computer, but shouldn't take more than an hour.

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 22:01
by Roujin
frosch: Thanks, that's certainly going to be handy in future :) For now I'll wait for Terkhens results and work with them.

An hour for 20 runs? I can get nowhere near that..
Is the output also printed in release mode, or only in debug mode?

PS: ah, now that I know what to search for (piping stderr), it's easy to find the solution. It seems to be "2>" in windows.

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 22:16
by Terkhen
IIRC it should be printed in MSVC release mode too. It took roughly half an hour to run all 20 games.

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 22:53
by Roujin

Re: FIRS Industry Replacement Set - Development

Posted: 19 Mar 2010 23:58
by DJ Nekkid
graph :)

Re: FIRS Industry Replacement Set - Development

Posted: 20 Mar 2010 07:34
by George
DJ Nekkid wrote:graph :)
Cool. Could you make the same one for ECS beta 6 (http://george.zernebok.net/temp/ecs%2031/)?

Re: FIRS Industry Replacement Set - Development

Posted: 20 Mar 2010 09:56
by DJ Nekkid
if you provide me with similar datafiles that Terkhen have, no problem :)