code logs -> 2008 -> Tue, 18 Mar 2008< code.20080317.log - code.20080319.log >
--- Log opened Tue Mar 18 00:00:35 2008
01:17 Derakon[AFK] is now known as Derakon
01:17 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?]
03:57 C_tiger [~c_wyz@Nightstar-16221.nycmny.east.verizon.net] has quit [Ping Timeout]
03:58
<@Reiver>
So I've been fiddling with the conceptual basis for a 4X style game that emphasises scale in favor of micromanagement. This is resulting in various aspects, one of which is that you don't directly build all the ships in your empire - you build goverment craft (Military, dedicated science, etc), but raw trade tonnage is generally done by 'Civilian' craft.
04:00
<@Reiver>
These things are, essentially, built in shipyard facilities that you aren't employing for Federal/Imperial/Xeral projects, and end up ferrying supplies, migrants, trade goods, etc around your empire.
04:01
<@Reiver>
This much is fine, conceptually. But my concern is that I am currently leaning to a 'real time' basis for the empire (Ala Sim City, really) - and accordingly, I'm a bit worried what happens with regards pathfinding and AI overheads computationally.
04:02
<@Reiver>
I was thus wondering just how costly such things are likely to be, on general principles.
04:04
<@Vornicus>
Well, you'll probably do a lot of precomputing paths.
04:05
<@Vornicus>
With interstellar stuff it's just straight lines anyway
04:06
<@Reiver>
I was thinking it may help matters if the game were to have a 'jump gate' kind of approach, where you end up with civilian craft generally flying around a preset network of nodes and distances.
04:07
<@Vornicus>
That actually makes it a certain amount worse - you have composite paths.
04:07 * Reiver hrms, realises he left out a rider: Most ships will have a limited range, so even without the thing, you wouldn't have perfect straight lines.
04:08
<@Vornicus>
the straight line paths - essentially a complete graph - you only ever have to say "what system is this ship coming from, what system is it going to?"
04:08
<@Vornicus>
/ah/
04:08
<@Vornicus>
That's a bit different, yes.
04:08
<@Vornicus>
Well, A* is pretty fast.
04:08
<@Reiver>
So you'd end up going stepping-stone from colony to colony(/Gas Giant/Neutron Star/Black Hole) in order to refuel.
04:09
<@Reiver>
I thus figured that if you had various 'pre-set' jump routes, it would reduce the number of options required?
04:10
<@Vornicus>
(on the other hand, A* is 'one-at-a-time' - Dijkstra has the advantage of allowing you to do the math /once/ and using it over and over)
04:10 * Reiver ponders.
04:10
<@Reiver>
Until the nodes change, anyhow
04:11
<@Reiver>
hmn. Then again, that wouldn't be too often - even in times of war, etc, how often it'd come up in terms of computer overhead would stay pretty rare.
04:11
<@Vornicus>
Yeah. And then you can recalculate around it... I think I saw something about that.
04:11
<@Reiver>
Really?
04:11
<@Vornicus>
Yeah, one moment
04:12
<@Reiver>
So if you set a chunk of the thing to be 'verboten', or indeed, destroyed/blockaded/whatever, it wouldn't Destroy Your Computer Cycles for twenty seconds? >.>
04:12
<@Vornicus>
http://scienceblogs.com/goodmath/2007/07/graph_contraction_and_minors_1.php <--- graph contraction and minors.
04:12
<@Vornicus>
No, it wouldn't.
04:12
<@Reiver>
niiice
04:15
<@Vornicus>
I'm not exactly sure how it works in the context of dijkstra, but I imagine you can get timetables for small chunks of your empire, and then scale it up.
04:16
<@Vornicus>
And then when you change part of the empire, you change the smallest timetable you can.
04:16 * Vornicus is currently back working on the star distribution thing, using a repulsor model.
04:17
<@Vornicus>
and then for the stargate thing I think I'm going to decorate with an MST
04:19 * Reiver is trying to work out what the 'timetable' stuff means. Or for that matter how one works out Minors in general.
04:19
<@Reiver>
Unless you mean that you'd store the within-array commute times in a table that you just look up instead of calculating?
04:19
<@Vornicus>
Yeah.
04:19
<@Vornicus>
And minors are... how do I put it
04:20
<@Vornicus>
A minor in the sense of graph theory isn't exactly a subgraph, but it's a graph that you can get by contraction.
04:21 * Reiver is still tryin' to get his head around that bit, he thinks.
04:21
<@Vornicus>
You don't really need to worry about minors, I don't think
04:21
<@Vornicus>
Contraction will give you a tree of timetables.
04:22 * Derakon eyes his perl script. "Why can't you open this file? It's right there!"
04:22
<@Derakon>
I just want to upload my DF fort images with a minimum of fuss!
04:23
<@Derakon>
I'm getting a "no such file or directory" on this line:
04:23
<@Derakon>
open (OUT, ">$root/index.html")
04:23
<@Derakon>
or die "Couldn't open $root/index.html for writing: $!";
04:23
<@Derakon>
$root/index.html very much exists.
04:25
<@Vornicus>
Sometimes, I love meth.
04:25
<@Vornicus>
math*
04:25
<@Derakon>
...
04:26
<@AFKSkull>
Reiver- if they're not under direct control, then you could model probabilities and then only path for observed ships?
04:26
<@Vornicus>
"They showed that an algorithm to do it in n^3 time must exist - but they didn't show the algorithm.:
04:28
<@Reiver>
ASCII: ...interesting idea, but would that help /save/ computational time instead of just grind away on dead ends?
04:29 * Reiver isn't arguing, insomuch querying as to how thath would work.
04:38
<@AFKSkull>
deends on how detailed it would have to be I suppose. Statistics can be stored in advance though.
04:54
<@AFKSkull>
you could even make it so that commercial hyperspace isn't directly observable at all
05:27
<@McMartin>
Vorn: Proving that something must exist and showing what it is are two different things~
05:28
<@McMartin>
Also, if there's a ridiculously huge constant factor, it may turn out that the exponential version is cheaper for any problem you actually want to solve.
05:28
<@Vornicus>
yes
05:44 GeekSoldier|bed is now known as GeekSoldier|work
06:00 AnnoDomini [AnnoDomini@83.21.80.ns-27252] has joined #Code
06:00 mode/#code [+o AnnoDomini] by ChanServ
06:06 Kazriko [~kaz@Nightstar-26352.gdj-co.client.bresnan.net] has quit [Operation timed out]
06:10 Kazriko [~kaz@Nightstar-26352.gdj-co.client.bresnan.net] has joined #code
06:33 Derakon is now known as Derakon[AFK]
06:55
<@Reiver>
Hm
06:56
<@Reiver>
ASCII: The problem with making commercial hyperspace non-visible is that this defeats the intended goal of the system - not only are there little ships flying around, but they can be commandeered, and attacked. <g>
06:56
<@Reiver>
(Commerce raiders ftw~)
06:56
<@Reiver>
(To say nothing of trying to cut off the opponents logistic supply lines.)
07:00 * Vornicus fiddles with gravity. Okay, now that it looks sensible in code, I want to see the big bang.
07:24 * AnnoDomini flees, almost lost track of time due Nethack.
07:32
<@AFKSkull>
well, uh
07:32
<@AFKSkull>
don't think of them as trucks
07:32
<@AFKSkull>
think of it as a series of tubes
07:32
<@Vornicus>
07:32
<@Vornicus>
07:33
<@AFKSkull>
you don't have to track every water molecule to do a fluid simulation
07:33
<@AFKSkull>
even if that simulation lets you dip your hand in
07:33
<@Vornicus>
I didn't think I'd ever see that used as a serious statement.
07:34
<@AFKSkull>
¬_¬
07:41 Vornicus is now known as Vornicus-Latens
08:15 GeekSoldier|work [~Rob@91.18.96.ns-26390] has quit [Ping Timeout]
08:28
<@McMartin>
Fill the tubes with pirahna plants!
08:32 * Reiver snerks.
08:32
<@Reiver>
I think I see where ASCII is coming from with it, though.
08:33
<@Reiver>
Rather than tracking discrete ships, one merely tracks 'trade routes', which merely measure volume of materiel being shipped.
08:33
<@Reiver>
Thus you fly a warship in the road and that route gets blocked, or such.
08:55
<@AFKSkull>
exactly
08:58
<@Reiver>
...It certainly has its merits.
08:59
<@Reiver>
Though in its simplicity it also loses some of the charm of being able to literally requisition civilian shipping~
08:59
<@AFKSkull>
why can't you?
09:00
<@Reiver>
...Well, when you requisition it for, say, adding to a warfleet, you'd end up with individual ships again, would you not?
09:00
<@Reiver>
Or would you just assign a certain tonnage to a warfleet and assume it's made up of civilian ships, but...
09:01
<@AFKSkull>
well you could wither assign numbers to determine percentages of miliraty/civilian tonnage
09:01
<@AFKSkull>
or you could just pick individual ships out of the stream when you need to
09:01
<@AFKSkull>
removing an amount of trade and adding x amount of statistically available ships to your fleet
09:02
<@Reiver>
At which point you end up with civilian ships flying around anyhow - which I guess works because they're part of the military at that point, but...
09:03
<@AFKSkull>
Well, you already have military fleets flying around, distinguished from civilian cmmerce.
09:03 * Reiver hrms. Suspects his main ponderance is that he is cautious about the idea of treating civilian craft as so fundamentally different to government ones, largely because while it does indeed fix the issue of civilian craft, you end up with the same issue again with lots of govt craft...
09:03
<@AFKSkull>
Your original problem, as I understood it, was the volume of civilian traffic.
09:03
<@AFKSkull>
Well, the military craft would be supervised directly
09:04
<@Reiver>
Hrm. I think my problem is going to be the volume of traffic in general, both civilian and military. The civilian thing being notable in that it is going to be essentially exclusively AI-driven, wheras at least your warships can have the Human involved at points.
09:04
<@Reiver>
(Though I intend to maximize the amount of AI piloting capable there, too.)
09:05
<@Reiver>
(To the point where, if I get this Right(tm), you'll be able to give orders in grand strokes and have your peons follow as desired.)
09:05
<@Reiver>
((I will probably not get this right~))
09:05
<@AFKSkull>
In that case, just statistically model ship distribution based on the stats of their fleet
09:06
<@AFKSkull>
you have a fleet of x stats, you know it has a certain number of any given type of ship, based on availability. You tap into civilians, you hve a general idea of what you're getting too,
09:07
<@Reiver>
...an interesting point. Hrm.
09:08 * Reiver would have to ponder whether people would like this fact or not; it tends to be a major element of 4X games that you get to design your ships to suit your style of tactics.
09:10
<@McMartin>
Mrf. Joseph Weizenbaum, creator of ELIZA, dead at 85.
09:10
<@AFKSkull>
wasn't that a couple days ago?
09:10
<@AFKSkull>
reiv- why can't you still model them?
09:10
<@McMartin>
Yeah, but my news sources are not that up-to-date.
09:12
<@AFKSkull>
Presumably, anybody who micromanages to that level won't need as much optimization to fleet model, and therefore it wont happen(since presumably it wil be largely an effect of what happens when a fleet develops itself)
09:12
<@AFKSkull>
and your designs will just affect the stats of the ship, which will affect representation in a given fleet
09:15 AFKSkull [~none@Nightstar-7066.dyn.optonline.net] has quit [Ping Timeout]
09:17 ASCIISkull [~none@Nightstar-7066.dyn.optonline.net] has joined #code
09:17 ASCIISkull is now known as AFKSkull
09:17
< AFKSkull>
dunno where I cut off
09:19
<@McMartin>
"and your designs will just affect the stats of the ship...."
09:21
< AFKSkull>
ok, right, I think that was pretty much the end of it
09:23
<@McMartin>
Yeah, the sentence was compelte.
09:23
<@McMartin>
complete
09:50 * Reiver ponders, nods.
09:52 * McMartin headdesks
09:52
<@McMartin>
Well, I found my nfrotz bug
09:52
<@McMartin>
I'm going to go hide in a corner now, after I fix it.
09:52 * Reiver eyebrows
09:53
<@McMartin>
I needed to turn a string of 16-bit characters into a string of 8-bit ones (the high byte was always 0).
09:53
<@Reiver>
...this sounds like it'll be good
09:53
<@McMartin>
And I forgot to copy over the null terminator, thus meaning that if the segment wasn't being initialized right it would put random crap at the end. >_<
09:55
<@Reiver>
...oops
09:55
<@McMartin>
But since on the versions of Linux I'd used BSS segments were always zeroed, I never saw this.
09:59
<@Reiver>
Aaah
10:38 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
10:38 mode/#code [+o gnolam] by ChanServ
12:19 AnnoDomini [AnnoDomini@83.21.80.ns-27252] has quit [Ping Timeout]
12:26 AnnoDomini [AnnoDomini@83.21.75.ns-4557] has joined #Code
12:26 mode/#code [+o AnnoDomini] by ChanServ
12:27
<@Reiver>
ASCII: Yeah, I get that bit
12:27
< AFKSkull>
given the time scales, of curse
12:27
<@Reiver>
I'm mostly wondering how it works out, though - basically we don't track individual craft until we need them?
12:27
< AFKSkull>
*course
12:27
< AFKSkull>
yeah.
12:27
<@Reiver>
Well, craft/fleets
12:27
< AFKSkull>
no more than you track individual farmers until it's time to conscript a few
12:28
<@Reiver>
(I had intended convoys to happen)
12:28
< AFKSkull>
i was serious about the tubes thing before, too
12:28
< AFKSkull>
fluid simulation can solve a lot of your problems I imagine
12:29
< AFKSkull>
Its been used for aggegate crowd simulation for over 10 years now...
12:31
<@Reiver>
Would fluid simulation be significantly superior to tracking convoys of craft in computational effort, though?
12:31 * Reiver has always understood it to be a Right Bitch.
12:34
< AFKSkull>
well, you'd be presumably doing at at exceedingly low resolutions
12:36
< AFKSkull>
I mean, heck, you could be a step up from lemmings
12:38
<@Reiver>
*snrk*
12:38
<@Reiver>
Aye, but if I'm a step up from lemmings, why not just be a step down from pathfinding?
12:39
<@Reiver>
(To whit: I'm pretty sure one can autogenerate routes for most craft, as the network isn't going to be changing all that often.)
12:41
< AFKSkull>
well, what you'd be ding is generating paths for a very few craft and then interpolating and extrapolating
12:41 C_tiger [~c_wyz@Nightstar-15409.nycmny.east.verizon.net] has joined #code
12:41 mode/#code [+o C_tiger] by ChanServ
12:48
< AFKSkull>
'lo c
13:17
<@C_tiger>
heya ASCII
15:38
<@AnnoDomini>
I has a databases problem. I have two tables, ORDERS and WARES. ORDERS should contain a list of all orders ever made. WARES should contain a list of all stuff ever available. I need to make it so that a single item in the ORDERS table could reference an undefined, potentially unlimited amount of WARES items, so that clients could buy more than one thing at a time.
15:38
<@AnnoDomini>
How do I do it? The teacher said something about associations, but I didn't understand it.
15:39
<@AnnoDomini>
(If someone knows to how implement whatever solution given in Power Designer, that'd be awesome.)
15:39
< Kazriko>
that sounds like a many-many relationship there.
15:41
< Kazriko>
IIRC, the best way to handle that is an intermediate lookup table, ORDERWARES, you might have a column for orderID, a column for wareID, and then maybe quantities and actual sold prices.
15:41
< Kazriko>
then you just insert a row there for every different item in the order.
15:41
<@AnnoDomini>
Hm... Okay, that sounds like the association thing. But I need to be actually able to use it. How does it work?
15:42
< Kazriko>
well, if you want to find all orders that a ware is in, you link from the wares table to the intermediate table then out to orders. to find all items in an order, you link the other way.
15:43
< Kazriko>
from orders o left join orderwares ow on ow.orderID = o.orderID
15:43
< Kazriko>
anyway, gotta get to work here.
15:44
< Kazriko>
or if you know the order number externally, you can just query orderwares left join wares and get a list of products in your order.
15:44
< Kazriko>
"where ow.orderID = %(ordernumber)s" % orderDict
15:45
< Kazriko>
python code, but should be understandable enough. :)
15:45
< Kazriko>
they should have taught these concepts using relational algebra, though.
15:45
< Kazriko>
anyway, work.
15:48
<@AnnoDomini>
I don't understand... How I'm seeing is I have some order_ID, and some ware_ID, and... The ORDERS are then linked via order_ID to a number of ORDERWARES items, which are in turn linked via ware_ID to WARES... Right? So I'd have ORDERS-one-to-many-ORDERWARES-many-to-one-WARES?
15:49
<@AnnoDomini>
I did have relational algebra last semester, but it was Exceptionally Boring. I attended all the lectures, but couldn't rouse the willpower to listen to the droning.
15:57
< AFKSkull>
¬_¬
16:05 Derakon[AFK] is now known as Derakon
16:06 C_tiger [~c_wyz@Nightstar-15409.nycmny.east.verizon.net] has quit [Ping Timeout]
16:10 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Ping Timeout]
16:11
<@AnnoDomini>
What?
16:12 C_tiger [~c_wyz@Nightstar-24064.nycmny.east.verizon.net] has joined #code
16:12 mode/#code [+o C_tiger] by ChanServ
16:17 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
16:18 mode/#code [+o gnolam] by ChanServ
17:11 EvilDarkLord is now known as Zenon
17:31 GeekSoldier|work [~Rob@91.18.118.ns-4047] has joined #code
17:38 Vornicus-Latens is now known as Vornicus
17:39 GeekSoldier|work is now known as GeekSoldier
17:44 Derakon [~Derakon@Nightstar-6759.hsd1.mn.comcast.net] has left #code []
20:42 GeekSoldier is now known as GeekSoldier|bed
20:57 Brother_Willibald [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
20:58 Zenon is now known as EvilDarkLord
20:58 gnolam is now known as NSGuest-5599
20:58 Brother_Willibald is now known as gnolam
20:59 NSGuest-5599 [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Ping Timeout]
21:47 Doctor_Nick [~nick@Nightstar-23600.hsd1.fl.comcast.net] has joined #code
23:31 Doctor_Nick [~nick@Nightstar-23600.hsd1.fl.comcast.net] has quit [Operation timed out]
23:32 AnnoDomini [AnnoDomini@83.21.75.ns-4557] has quit [Quit: Drive me closer, I want to hit them with my sword!]
--- Log closed Wed Mar 19 00:00:46 2008
code logs -> 2008 -> Tue, 18 Mar 2008< code.20080317.log - code.20080319.log >