IRC logs for #openttd on OFTC at 2018-09-05
            
00:02:20 *** Thedarkb has joined #openttd
00:08:50 <Samu> AHA
00:09:03 <Samu> i think I figured it out
00:09:54 <Samu> the AI must be selected from the pool of Random AIs
00:10:22 *** Wormnest has quit IRC
00:11:37 *** frosch123 has quit IRC
00:20:12 *** snail_UES_ has joined #openttd
00:21:06 <Samu> guys, your pseudo random number generator always returns 0
00:23:05 <Samu> this->SetSetting((*it).name, InteractiveRandomRange((*it).max_value - (*it).min_value) + (*it).min_value);
00:23:21 <Samu> max value is 1
00:23:23 <Samu> min value is 0
00:23:40 <Samu> InteractiveRandomRange dude has always returned 0
00:23:46 <Samu> out of 14 times
00:23:51 <Samu> that's not very random
00:25:08 <Samu> line 39 of script_config.cpp
00:28:39 <Samu> peter1138: can u look into this?
00:31:09 <Samu> out of 42 times, always 0
00:31:15 <Samu> should I go on?
00:41:42 <Samu> this->SetSetting((*it).name, InteractiveRandomRange((*it).max_value + 1 - (*it).min_value) + (*it).min_value);
00:41:46 <Samu> this fixes it
00:42:01 <Samu> change max_value to max_value + 1
00:42:14 <Samu> because max_value is exclusive
00:43:40 <Samu> for anyone reading :(
00:44:41 <acklen> I was waiting for your 43rd try
00:45:19 <Samu> heh, can you fix it?
00:45:52 *** Thedarkb has quit IRC
00:46:13 <acklen> so, 1-0 doesn't work, but 2-0 does?
00:49:21 <Samu> yes
00:50:04 <Samu> Pick a random number between 0 and \a limit - 1, inclusive.
00:50:11 <Samu> 2-1 = 1
00:50:23 <Samu> 1-0 = 0
00:50:30 <Samu> no wonder it was always returning 0
00:51:23 <Samu> plz fix :) i wanna use this feature in the AI
01:07:55 *** sim-al2 has joined #openttd
01:16:01 *** sim-al2 has quit IRC
01:28:37 <Samu> https://github.com/OpenTTD/OpenTTD/blob/master/src/script/script_config.cpp#L39
01:28:46 <Samu> someone ploz, :(
02:03:06 *** Progman has quit IRC
02:16:46 *** Wacko1976 has quit IRC
02:41:30 *** Samu has quit IRC
03:10:19 *** Supercheese has joined #openttd
03:27:57 *** WWacko1976-work has joined #openttd
03:33:06 *** Supercheese has quit IRC
03:33:27 *** Supercheese has joined #openttd
03:56:00 *** Flygon has joined #openttd
04:11:02 *** chomwitt has quit IRC
04:21:59 *** sim-al2 has joined #openttd
05:16:33 *** KouDy has joined #openttd
05:21:14 *** snail_UES_ has quit IRC
05:22:42 *** snail_UES_ has joined #openttd
05:30:25 *** Hobbyboy has quit IRC
05:30:27 *** rocky113844 has quit IRC
05:33:20 *** haudrauf has quit IRC
05:34:20 *** haudrauf has joined #openttd
05:38:52 *** Hobbyboy has joined #openttd
06:52:50 *** Wacko1976 has joined #openttd
07:07:40 *** Heiki has quit IRC
07:53:56 *** KouDy has quit IRC
08:03:12 *** Supercheese has quit IRC
08:03:34 *** Supercheese has joined #openttd
08:03:39 *** andythenorth has joined #openttd
08:04:40 *** Supercheese has quit IRC
08:05:01 *** Supercheese has joined #openttd
08:06:27 *** Heiki has joined #openttd
08:14:21 *** Wacko1976 has quit IRC
08:22:28 *** andythenorth has quit IRC
08:25:52 *** KouDy has joined #openttd
08:33:12 *** snail_UES_ has quit IRC
08:43:24 *** KouDy has quit IRC
08:45:18 *** Supercheese has quit IRC
08:48:46 *** andythenorth has joined #openttd
08:51:19 *** KouDy has joined #openttd
08:51:38 *** andythenorth has left #openttd
09:06:48 *** sim-al2 is now known as Guest2432
09:06:49 *** sim-al2 has joined #openttd
09:07:36 *** crem has quit IRC
09:13:01 *** Guest2432 has quit IRC
09:14:17 *** KouDy has quit IRC
09:14:28 *** Samu has joined #openttd
09:16:28 *** KouDy has joined #openttd
09:21:03 *** crem has joined #openttd
09:37:16 *** sla_ro|master has joined #openttd
09:43:58 *** Progman has joined #openttd
10:25:17 *** Samu has quit IRC
10:36:40 *** snail_UES_ has joined #openttd
11:43:25 *** KouDy has quit IRC
12:08:20 *** WWacko1976-work has quit IRC
12:13:04 *** WWacko1976-work has joined #openttd
12:17:49 *** KouDy has joined #openttd
12:54:41 *** Wacko1976 has joined #openttd
12:59:24 *** Samu has joined #openttd
13:00:04 *** snail_UES_ has quit IRC
13:14:15 *** WWacko1976-work has quit IRC
13:15:26 *** WWacko1976-work has joined #openttd
14:35:31 *** Thedarkb has joined #openttd
14:58:10 *** [1]sim-al2 has joined #openttd
14:58:10 *** sim-al2 is now known as Guest2451
14:58:11 *** [1]sim-al2 is now known as sim-al2
15:03:50 *** Guest2451 has quit IRC
15:42:42 *** nielsm has joined #openttd
15:44:26 *** Thedarkb has quit IRC
15:45:24 *** Progman has quit IRC
15:46:54 *** Thedarkb has joined #openttd
16:01:15 *** sim-al2 has quit IRC
16:10:27 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on issue #6891: Question Building the project on Windows https://github.com/OpenTTD/OpenTTD/issues/6891#issuecomment-418745172
16:13:53 *** Alberth has joined #openttd
16:13:53 *** ChanServ sets mode: +o Alberth
16:14:01 <Alberth> o/
16:18:38 *** KouDy has quit IRC
16:20:29 <Samu> Alberth: can you fix a bug I reported last night?
16:21:15 <Samu> trying to persuade someone to fix it :p
16:23:24 <LordAro> Samu: did you report it on github?
16:23:29 <LordAro> if not, do that
16:24:08 <Samu> uh i dont have an account
16:24:12 <LordAro> make one
16:36:48 <peter1138> 23:28 < Samu> peter1138: can u look into this?
16:36:51 <peter1138> lol
16:37:06 <peter1138> no, not when i'm driving in London at that time.
16:37:18 <peter1138> Just create a github account already, fucking hell.
16:37:37 <nielsm> "if it's not in a ticket it's not a bug"
16:37:45 <peter1138> +1
16:38:52 <nielsm> (the contrary is not true by the way, just because it is in a ticket doesn't mean it's certainly a bug, tickets can contain non-bugs, but bugs can never be considered if they are not covered by a ticket!)
16:39:21 <Samu> ok
16:40:16 *** Wacko1976 has quit IRC
16:40:21 <peter1138> And if you have a fix you can just file a PR.
16:40:47 *** Wormnest has joined #openttd
16:44:52 <Samu> ok, registered an account let's see what i can do
16:51:52 <Samu> PR?
16:52:59 <peter1138> Might need your own fork for that, I suppose.
16:53:21 <peter1138> But at least the issue tracker will be simple.
16:53:21 <nielsm> Pull Request
16:54:25 <Samu> no idea what's a pull request for or forks
16:54:32 <Samu> bah i knew i shouldn't have registere
16:54:42 <peter1138> Don't worry about them then.
16:55:08 <peter1138> https://github.com/OpenTTD/OpenTTD/issues/new < is what you want.
16:55:49 <LordAro> the horror, you don't understand everything immediately
16:58:38 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick opened issue #6892: CONFIG_RANDOM bug https://github.com/OpenTTD/OpenTTD/issues/6892
16:58:43 <Samu> ok i submited
16:58:49 <Samu> oh, it's here
16:58:50 <Samu> lel
16:59:02 <Samu> too fast
17:03:39 <Samu> btw there is no single AI that uses CONFIG_RANDOM
17:03:53 <Samu> not sure about GS'es
17:05:40 <Samu> so... if u wanna test it
17:05:45 <Samu> i guess i gotta submit my ai?
17:07:00 <Samu> I didn't finish it :(
17:08:47 *** ed-209 has quit IRC
17:09:03 *** quiznilo has joined #openttd
17:11:49 *** andythenorth has joined #openttd
17:11:53 <andythenorth> o/
17:14:54 <andythenorth> Alberth: I had a more complete GS idea https://paste.openttdcoop.org/ps8xl6rne/rdnjbc/raw
17:18:09 <Alberth> lots of ideas, apparently!
17:20:14 <andythenorth> mumble mumble strategies
17:20:35 <andythenorth> only specifying where the player must build is quite boring
17:20:56 <andythenorth> restricting the build, but offering strategic and tactical choices is interesting
17:21:01 <Alberth> Samu: just a script that performs 20 random draw things is sufficient
17:21:27 <Alberth> I never heard of RANDOM_CONFIG at all btw, no idea what you're talking about
17:24:16 <Alberth> problem is somewhat I have sufficient distractions currently
17:24:41 <Samu> AIInfo flags
17:25:09 <Samu> https://noai.openttd.org/api/trunk/classAIInfo.html#5c8349ebc14ec2c4b63187780c33f5b9
17:27:47 <Samu> the AI has to be randomly chosen from a pool of AIs
17:27:56 <Samu> you can't specify it
17:30:18 <andythenorth> Alberth: I wondered about composing this GS from different components
17:30:46 <andythenorth> so a Connection Builder component, which sets connection goals, in a similar player interface to Busy Bee
17:31:12 <andythenorth> and a separate Industry Constructor component which rewards goal completion by building industries, against a pattern
17:31:42 <andythenorth> and an option for the industry constructor to also control map at game start
17:31:49 <andythenorth> 'have a new industry' could incidentally be a reward in Busy Bee
17:34:27 <Alberth> make each component a class, and forward all events from the main loop (possibly using knowledge what events the component wants to have)
17:34:46 <andythenorth> I'm kind of curious about testing GS
17:34:52 <andythenorth> sitting playing them is one valid approach
17:34:54 <andythenorth> but time consuming
17:35:05 <andythenorth> I wonder if they could be 'tested' by logged output
17:35:31 <Alberth> not sure how you make progress in a component, likely you call it from some other point
17:35:52 * andythenorth wonders about a self-test mode :P
17:36:26 <Alberth> I typically test by printing what it decides while building the code
17:37:20 <Alberth> but you could make a separate object that performs game operations, and replace that while testing
17:37:53 <Alberth> then you don't even need openttd, you can just run the bare squirrel interpreter
17:38:11 <Alberth> perhaps with a few mock objects
17:42:51 *** Thedarkb has quit IRC
17:46:31 <Samu> damn it, i thought i had 7-zip installed
17:50:38 <Samu> we can't support that file type?
17:50:43 <Samu> i can't upload .tar
17:56:10 <LordAro> not to github, it only accepts a few types
17:56:43 <LordAro> it'll accept a zip or a tar.gz though
17:56:56 <LordAro> https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/
17:57:25 <LordAro> (*it).max_value - (*it).min_value) + (*it).min_value
17:57:31 <LordAro> that is rather suspicious, isn't it? :)
17:57:56 *** frosch123 has joined #openttd
18:03:40 <Samu> https://github.com/OpenTTD/OpenTTD/issues/6892 uploaded
18:04:47 <Samu> no
18:04:49 <Samu> it's only InteractiveRandomRange((*it).max_value - (*it).min_value)
18:05:07 <Samu> watch parenthesis
18:05:52 <Samu> the result of that is then + (*it).min_value
18:06:27 <andythenorth> quak and so on
18:06:44 <nielsm> why is it written like that and not it->min_value etc...
18:07:06 <Samu> no idea, it's not my code
18:07:19 <frosch123> hoi
18:07:26 <frosch123> nielsm: actually very few people know that
18:08:00 <frosch123> people read about *iterator, and use it like that
18:09:40 *** Flygon has quit IRC
18:12:56 <LordAro> i guess in some ways it's clearer that it's an iterator rather than a pointer?
18:13:01 <LordAro> but eh
18:13:21 <nielsm> the entire point of iterators is to look almost exactly like a pointer, though
18:13:27 <LordAro> aye
18:14:02 <frosch123> everyone i met who uses the (*). syntax got huge eyes when i told them that -> also works, so I doubt it is intentional
18:14:45 <LordAro> Samu: i'm pretty sure there's no situation in which "(a + b) - b" is different to "a + b - b"
18:14:56 <LordAro> (which is the same as "a"
18:14:57 <LordAro> )
18:16:00 <LordAro> even accounting for overflows and what not
18:16:53 <Samu> it is setting a value for a setting
18:17:00 <Samu> :(
18:17:54 <Samu> min_value = 0, max_value = 1
18:19:01 <Samu> the randomizer dude randomizes between its own 0 and the limit -1
18:19:22 <Samu> (a - b) is the limit
18:19:59 <LordAro> Samu: you can stop now
18:20:02 <Samu> ok :(
18:20:03 <LordAro> go work on something else
18:20:05 <LordAro> :)
18:22:23 *** wodencafe has quit IRC
18:27:29 *** KouDy has joined #openttd
18:37:02 *** Laedek has quit IRC
18:42:06 *** Gja has joined #openttd
19:00:59 *** gelignite has joined #openttd
19:04:50 *** Wolf01 has joined #openttd
19:06:53 <Wolf01> o/
19:07:01 <andythenorth> o/
19:18:40 *** HerzogDeXtEr has joined #openttd
19:29:16 *** chomwitt has joined #openttd
19:44:35 <Alberth> o/
19:53:55 *** Progman has joined #openttd
20:00:53 *** Laedek has joined #openttd
20:06:53 *** tokai|noir has joined #openttd
20:06:53 *** ChanServ sets mode: +v tokai|noir
20:12:01 *** Gja has quit IRC
20:13:29 <Samu> damn valuators are lame
20:13:40 *** tokai has quit IRC
20:15:09 <Samu> is this valuator function heavy? https://paste.openttdcoop.org/pjzwj6cj6
20:15:58 <Samu> oh, the optimalfakedist function missing
20:16:13 <Samu> there https://paste.openttdcoop.org/pex5dlqpr
20:19:01 <Samu> what's the newgrf with the most aircraft engines?
20:19:04 *** wodencafe has joined #openttd
20:19:11 <Samu> must put the valuator into some stress test
20:26:47 <Samu> hmm :(
20:27:02 <Samu> i better make a separate function to act as valuator
20:35:48 <DorpsGek_II> [OpenTTD/OpenTTD] RailwAI commented on issue #6890: Crash: disconnecting road vehicle https://github.com/OpenTTD/OpenTTD/issues/6890#issuecomment-418835665
20:46:11 *** Wacko1976 has joined #openttd
21:00:06 *** Thedarkb has joined #openttd
21:03:25 *** KouDy has quit IRC
21:05:01 <Alberth> the early STL implementations didn't do it->
21:09:40 *** Supercheese has joined #openttd
21:14:11 <Samu> it is done differently!
21:16:14 <Samu> https://paste.openttdcoop.org/p8fx5g6cz
21:16:25 <Samu> much lighter valuator now
21:21:45 *** Thedarkb has quit IRC
21:43:55 *** sla_ro|master has quit IRC
21:54:05 *** gelignite has quit IRC
21:55:57 *** nielsm has quit IRC
22:13:15 *** Alberth has left #openttd
22:22:07 *** andythenorth has left #openttd
22:25:29 *** KouDy has joined #openttd
22:30:49 *** Thedarkb has joined #openttd
22:46:56 *** frosch123 has quit IRC
22:48:16 <Wolf01> 'night
22:48:22 *** Wolf01 has quit IRC
23:18:06 *** KouDy has quit IRC
23:25:21 *** Wacko1976 has quit IRC
23:36:08 *** glx has joined #openttd
23:36:08 *** ChanServ sets mode: +v glx
23:37:01 *** KouDy has joined #openttd