IRC logs for #openttd on OFTC at 2018-08-16
            
00:12:22 *** Wormnest has quit IRC
00:33:55 *** Progman has quit IRC
00:39:19 *** keoz has quit IRC
00:57:51 *** Wolf01 has quit IRC
01:15:02 *** HerzogDeXtEr has quit IRC
01:58:46 *** AndroUser2 has joined #openttd
02:01:59 *** eirc has quit IRC
02:38:12 *** AndroUser2 has quit IRC
02:38:29 *** AndroUser2 has joined #openttd
02:41:50 *** AndroUser2 has quit IRC
02:58:18 *** snail_UES_ has joined #openttd
02:59:30 *** Samu has quit IRC
03:22:34 *** Flygon has joined #openttd
03:36:19 *** Thedarkb-T60 has quit IRC
03:53:08 *** urdh_ has joined #openttd
03:53:10 *** urdh has quit IRC
04:08:55 *** glx has quit IRC
04:23:21 *** chomwitt has quit IRC
05:14:14 *** haudrauf has quit IRC
05:14:40 *** KouDy has quit IRC
05:16:05 *** haudrauf has joined #openttd
05:49:48 *** Gustavo6046 has quit IRC
05:58:30 *** KouDy has joined #openttd
06:05:19 *** agentw4b_ has quit IRC
06:23:42 *** Progman has joined #openttd
07:06:14 *** snail_UES_ has quit IRC
07:20:23 *** Progman has quit IRC
07:36:44 *** Supercheese has joined #openttd
07:38:37 *** ttech2 has quit IRC
07:38:37 *** ccfreak2k has quit IRC
07:38:37 *** Extrems has quit IRC
07:39:04 *** ccfreak2k has joined #openttd
07:39:38 *** Extrems has joined #openttd
07:40:30 *** Ttech has joined #openttd
07:47:53 *** Supercheese has quit IRC
07:48:15 *** Supercheese has joined #openttd
08:06:45 *** andythenorth has joined #openttd
08:18:32 <andythenorth> o/
08:19:54 *** sla_ro|master has joined #openttd
08:28:35 *** keoz has joined #openttd
09:12:37 *** keoz has quit IRC
09:36:18 *** eirc has joined #openttd
09:39:55 *** eirc has quit IRC
09:40:06 *** eirc has joined #openttd
10:04:12 *** eirc has quit IRC
10:15:13 *** Supercheese has quit IRC
10:22:18 *** andythenorth is now known as Guest1041
10:22:18 *** andythenorth has joined #openttd
10:23:31 *** andythenorth has quit IRC
10:27:29 *** Guest1041 has quit IRC
11:04:59 *** eirc has joined #openttd
11:06:45 *** eirc has joined #openttd
11:20:30 *** andythenorth has joined #openttd
12:25:04 *** andythenorth is now known as Guest1054
12:25:08 *** andythenorth has joined #openttd
12:30:19 *** Guest1054 has quit IRC
12:49:47 *** keoz has joined #openttd
13:06:30 *** eirc has quit IRC
13:12:07 *** eirc has joined #openttd
13:14:33 *** Wolf01 has joined #openttd
13:15:47 <Wolf01> Moin
13:15:54 <andythenorth> o/
13:15:58 <crem2> \o
13:16:03 <crem2> Why am I 2
13:16:05 *** crem2 is now known as crem
13:16:06 *** eirc has quit IRC
13:18:18 *** stefino has joined #openttd
13:21:44 <stefino> hi, has OTTD any limit of sprites? number of sprites in all newgrf files
13:22:23 <peter1138> Yes but no.
13:27:05 *** eirc has joined #openttd
13:31:34 <Eddi|zuHause> limitation disturbs me very sprites
13:35:47 <peter1138> goes it throw out limitation?
13:35:58 <stefino> yes but no? :D
13:37:33 <stefino> i read something that there is a limit +-65k
13:37:55 <peter1138> It's around 16.7 million. There is a limit, but you won't reach it.
13:37:56 <Eddi|zuHause> no, that was increased
13:38:13 <Eddi|zuHause> like 10 years ago
13:39:36 <stefino> oh...so this is ok :D that's good to know. I was scared caue due long vehicles we have really a lot of sprites.
13:44:37 <stefino> but on the other hand, big grf files make the game more laggy or not? It is due multiplayer maybe but when we built big infrastructure, it was laggy when zoom out the map. Is it general problem of big 32bpp graphics sets?
13:46:39 <Eddi|zuHause> that is a general problem of how zoom out works
13:47:21 *** sla_ro|master has quit IRC
13:48:00 <stefino> okay, thanks :)
13:49:40 *** stefino has quit IRC
14:00:33 *** andythenorth has left #openttd
14:34:04 *** snail_UES_ has joined #openttd
14:41:29 *** Samu has joined #openttd
15:05:26 *** snail_UES_ has quit IRC
15:22:48 *** eirc has quit IRC
15:24:32 *** AndroUser2 has joined #openttd
15:29:52 *** eirc has joined #openttd
15:33:48 *** AndroUser2 has quit IRC
15:34:06 *** Mahjong has joined #openttd
15:34:19 *** AndroUser2 has joined #openttd
15:36:44 *** Maraxus has joined #openttd
15:47:02 *** sla_ro|master has joined #openttd
15:50:01 *** AndroUser2 has quit IRC
15:53:05 *** AndroUser2 has joined #openttd
15:59:28 *** AndroUser2 has quit IRC
15:59:47 *** AndroUser2 has joined #openttd
16:07:03 *** sim-al2 has quit IRC
16:10:08 *** Gustavo6046 has joined #openttd
16:13:49 *** AndroUser2 has quit IRC
16:14:18 *** AndroUser2 has joined #openttd
16:14:43 *** Thedarkb-T60 has joined #openttd
16:18:38 *** AndroUser2 has quit IRC
16:18:55 *** AndroUser2 has joined #openttd
16:26:56 *** agentw4b has joined #openttd
16:30:14 *** agentw4b_ has joined #openttd
16:33:55 *** AndroUser2 has quit IRC
16:34:19 *** Thedarkb-T60 has quit IRC
16:34:33 *** AndroUser2 has joined #openttd
16:34:59 *** agentw4b has quit IRC
16:36:14 *** Alberth has joined #openttd
16:36:14 *** ChanServ sets mode: +o Alberth
16:36:21 <Alberth> hi hi
16:37:22 <Samu> hi
16:38:28 *** Wormnest has joined #openttd
16:57:29 *** roidal has joined #openttd
17:07:49 *** Samu has quit IRC
17:09:06 *** Samu has joined #openttd
17:26:55 *** synchris has joined #openttd
17:29:01 *** agentw4b_ has quit IRC
17:32:26 <Samu> is there anything you can do about "excessive CPU usage in valuator function"?
17:45:31 *** Flygon has quit IRC
17:51:39 *** Gustavo6046 has quit IRC
17:59:53 *** agentw4b_ has joined #openttd
18:01:47 <Samu> there is a Valuate inside a Valuate, is this what causes excessive cpu usage?
18:04:50 <Samu> tileList.Valuate(Utils.valuateTruckStopTile, cargoClass, stationId);
18:05:46 <Samu> and inside valuate truck stop tile there is: cargoList.Valuate(AICargo.HasCargoClass, cargoClass);
18:06:02 <Samu> Wormnest:
18:06:04 <Samu> hi
18:07:50 <Samu> Looking at LuDiAI source code
18:13:51 <acklen> cargoList is probably pretty small though? tileList may be huge
18:13:53 *** Progman has joined #openttd
18:20:02 <Samu> I see rectangles
18:20:18 <Samu> tileList.AddRectangle
18:22:10 <Samu> there's another square
18:22:22 <Samu> square.AddRectangle
18:22:45 <Samu> It adds rectangles to rectangles?
18:23:02 <Samu> that's confusing, I better give up
18:23:36 <LordAro> Samu: it's defining an area of tiles to search
18:24:04 <LordAro> if it decides to define an overly large area (could be that a coordinate is mismatched or something), that could take a long time to search through
18:25:38 <Samu> the town it was working on, was a big one, already serviced with a bus stop and with an airport, it crashed evaluating here
18:27:18 <Samu> the evaluation should return 0, meaning it was already serviced
18:30:22 *** Thedarkb-T60 has joined #openttd
18:30:30 <Samu> here's the evaluator: https://paste.openttdcoop.org/po4hqnzmp
18:30:33 <Samu> is it big?
18:34:41 *** AndroUser2 has quit IRC
18:39:06 <Samu> strange that I'm not getting it to crash
18:39:10 <Samu> seems to be very rare
18:39:30 <acklen> perhaps you should reduce the amounts of valuations in valuateTruckStopTile()
18:39:37 <Samu> it was the first time I had a excessive CPU usage on LuDiAI
18:39:47 <acklen> the cargoList could be created once and then passed in
18:40:15 <acklen> other valuations like AITile.IsBuildable, etc could reduce the tile set as well
18:40:26 <acklen> then pass the reduced array to valuateTruckStopTile()
18:44:53 *** wodencafe has joined #openttd
19:09:38 *** frosch123 has joined #openttd
19:28:51 *** KouDy has quit IRC
19:41:52 *** HerzogDeXtEr has joined #openttd
19:44:15 *** Supercheese has joined #openttd
19:47:43 <Eddi|zuHause> i'm screwing up my system now, was nice knowing you guys...
19:47:51 *** Eddi|zuHause has quit IRC
19:48:51 *** andythenorth has joined #openttd
19:50:43 <LordAro> rip eddi
19:53:33 *** gelignite has joined #openttd
19:53:51 <Samu> I think I found the issue
19:53:55 <Samu> "think"*
19:54:23 <Samu> local rectangleCoordinates = estimateTownRectangle(town);
19:54:56 <Samu> this creates a rectangle consisting of tiles where the town has influence
19:55:07 <Samu> if the town is too large
19:55:23 <Samu> it will be valuating all those tiles
19:55:29 <Samu> to build a station
19:57:24 <Samu> i got to retry this AI with very large towns, and hope it crashes early
19:57:30 <LordAro> still, i wouldn't expect that to go over the cpu limit
19:57:38 <LordAro> unless it's doing something expensive inside
19:58:15 *** KouDy has joined #openttd
20:00:56 <Samu> holy moly
20:01:00 <Samu> it crashed right away
20:01:32 <Samu> right on the first service
20:03:16 <Samu> https://imgur.com/qmNxFdR
20:03:23 <Samu> town was sized like that
20:03:31 <Samu> 23k population
20:03:45 <LordAro> weird
20:03:53 <LordAro> guess you need to check what that valuator function is doing
20:04:19 <LordAro> unless you've fiddled with the AI execution count
20:04:24 <LordAro> i seem to recall you doing that?
20:04:35 <Samu> no, im using 1.8.0
20:04:46 <LordAro> i mean the config setting
20:04:51 <LordAro> can't remember what it's actually called
20:04:52 <LordAro> opcount?
20:05:04 <Samu> ah, it's at #10.000
20:05:28 *** tokai has joined #openttd
20:05:28 *** ChanServ sets mode: +v tokai
20:06:08 <LordAro> mm, that's the default
20:06:58 <Samu> line 143
20:06:59 <Samu> tileList.Valuate(Utils.valuateTruckStopTile, cargoClass, stationId);
20:07:11 <Samu> that's this https://paste.openttdcoop.org/po4hqnzmp#line-50
20:07:33 <Samu> gonna try edit the code a bit
20:07:42 <Samu> do what acklen said
20:09:02 <Samu> the tileList at this point is a giant rectangle
20:09:13 <Samu> tileList.Valuate
20:09:28 <Samu> given by that estimation
20:09:34 <Samu> local rectangleCoordinates = estimateTownRectangle(town);
20:12:11 *** tokai|noir has quit IRC
20:19:56 *** synchris has quit IRC
20:21:26 <Samu> @calc 40 * 40
20:21:26 <DorpsGek> Samu: 1600
20:21:36 <Samu> it is valuating 1600 tiles
20:23:20 <acklen> is that just the count of tileList?
20:23:24 <Wormnest> Looks like it wants to do too much inside the Valuator. Valuators should be short functions
20:23:33 <Samu> yes
20:23:42 <Samu> tileList contains 1600 tiles
20:24:26 <Samu> and it does this https://paste.openttdcoop.org/po4hqnzmp 1600 times I guess
20:25:07 <Wormnest> yes, which has another for loop in it and another valuator
20:27:27 *** agentw4b__ has joined #openttd
20:34:58 *** agentw4b_ has quit IRC
20:45:41 *** Thedarkb-T60 has quit IRC
20:49:58 *** andythenorth is now known as Guest1077
20:49:59 *** andythenorth has joined #openttd
20:51:23 *** Guest1077 has quit IRC
20:52:27 <Samu> i got a crash in CargoList now
20:52:29 <Samu> hmm
20:53:29 *** Eddi|zuHause has joined #openttd
20:53:34 *** glx has joined #openttd
20:53:34 *** ChanServ sets mode: +v glx
20:58:05 *** gelignite has quit IRC
21:06:18 *** Gustavo6046 has joined #openttd
21:08:31 *** Supercheese has quit IRC
21:08:57 *** Supercheese has joined #openttd
21:13:52 <Samu> forgot something
21:14:30 <Samu> if I use break inside 2 for cycles, does it break only the last for cycle? or breaks all fors?
21:20:01 <LordAro> only breaks the inner most
21:23:51 <Samu> ty
21:26:08 <Samu> I think I fixed the AI
21:26:22 <Samu> or probably broke it
21:26:26 <Samu> somewhere else
21:42:10 *** Maraxus has quit IRC
21:51:17 *** cHawk has quit IRC
21:59:52 *** sla_ro|master has quit IRC
22:00:56 <Samu> how do I square a number in code?
22:01:02 <Samu> ^2?
22:01:48 <peter1138> x*x
22:02:23 *** roidal has quit IRC
22:03:51 <Samu> oh, i would have to use a variable to store the first result :(
22:04:34 <Samu> I want to ^2 here local areasize = (AIMap.GetTileX(rectangleCoordinates[1]) - AIMap.GetTileX(rectangleCoordinates[0]) + 1);
22:04:43 <LordAro> so?
22:05:09 <Samu> maybe
22:05:19 <Samu> areasize = areasize * areasize;
22:05:24 <Samu> lel
22:09:35 <Samu> local areasize = (AIMap.GetTileX(rectangleCoordinates[1]) - AIMap.GetTileX(rectangleCoordinates[0]) + 1); areasize = areasize * areasize; AILog.Info("Estimated " + AITown.GetName(town) + " area: " + areasize + " tiles [(" + AIMap.GetTileX(rectangleCoordinates[0]) + "," + AIMap.GetTileY(rectangleCoordinates[0]) + ") - (" + AIMap.GetTileX(rectangleCoordinates[1]) + "," + AIMap.GetTileY(rectangleCoordinates[1]) + ")]");
22:09:51 <Samu> this works
22:12:50 *** cHawk has joined #openttd
22:14:43 *** Alberth has left #openttd
22:22:04 *** agentw4b__ has quit IRC
22:26:18 <Eddi|zuHause> anyone familiar with hwmon/fancontrol stuff?
22:26:39 <Samu> I use HWInfo
22:26:40 <Eddi|zuHause> i have 3 fans connected to my mainboard, and hwmon provides me with 3 pwm controls
22:26:45 <Eddi|zuHause> but they don't match up
22:27:00 <Samu> guess it's not the same program
22:27:06 <Eddi|zuHause> fan1 seems to be controlled by both pwm1 and pwm3, and fan3 is unaffected by everything
22:27:49 <Eddi|zuHause> is that a driver fail? or a bios fail? or what?
22:29:29 <Eddi|zuHause> that fan running at constant speed is driving me nuts
22:36:03 *** Thedarkb-T60 has joined #openttd
22:50:49 *** sim-al2 has joined #openttd
23:10:11 *** Eddi|zuHause has quit IRC
23:21:03 *** Eddi|zuHause has joined #openttd
23:35:48 *** HerzogDeXtEr has quit IRC
23:41:01 *** andythenorth has left #openttd
23:43:35 *** Eddi|zuHause has quit IRC
23:56:31 *** Wormnest has quit IRC