code logs -> 2007 -> Wed, 28 Nov 2007< code.20071127.log - code.20071129.log >
--- Log opened Wed Nov 28 00:00:11 2007
00:03 GeekSoldier|bed [~Rob@Nightstar-4747.pools.arcor-ip.net] has quit [Ping Timeout]
00:06 GeekSoldier|bed [~Rob@Nightstar-4747.pools.arcor-ip.net] has joined #code
00:09 GeekSoldier|bed [~Rob@Nightstar-4747.pools.arcor-ip.net] has quit [Ping Timeout]
00:15 GeekSoldier|bed [~Rob@Nightstar-4747.pools.arcor-ip.net] has joined #code
00:21 GeekSoldier|bed [~Rob@Nightstar-4747.pools.arcor-ip.net] has quit [Ping Timeout]
00:36 GeekSoldier|bed [~Rob@Nightstar-4747.pools.arcor-ip.net] has joined #code
00:43 Vornicus-Latens [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout]
00:43 GeekSoldier_ [~Rob@Nightstar-4747.pools.arcor-ip.net] has joined #code
00:44 GeekSoldier|bed [~Rob@Nightstar-4747.pools.arcor-ip.net] has quit [Ping Timeout]
00:46 GeekSoldier_ [~Rob@Nightstar-4747.pools.arcor-ip.net] has quit [Ping Timeout]
00:48 GeekSoldier_ [~Rob@Nightstar-4747.pools.arcor-ip.net] has joined #code
00:52 GeekSoldier_ [~Rob@Nightstar-4747.pools.arcor-ip.net] has quit [Ping Timeout]
00:55 You're now known as TheWatcher[T-2]
00:56 Derakon[AFK] is now known as Derakon
00:58 You're now known as TheWatcher[zZzZ]
01:03 GeekSoldier_ [~Rob@Nightstar-4747.pools.arcor-ip.net] has joined #code
01:08 GeekSoldier_ [~Rob@Nightstar-4747.pools.arcor-ip.net] has quit [Ping Timeout]
01:12
<@McMartin>
In other news, more UQM resource hackery: http://www.stanford.edu/~mcmartin/new_indices.txt
01:14
<@Derakon>
Did you know Grunk has an LJ?
01:16
<@McMartin>
Yes
01:20
<@Derakon>
"But then Kogluk get mad again, say Grunk not get to play Poke-Her any more, because Grunk win all times. Say Grunk cheat. Is cheat to remember that Grunk ate threes? Kogluk saw Grunk eat threes too, but Kogluk forgot. Oh well."
01:52 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: ]
02:41 Derakon is now known as Derakon[AFK]
03:36 Forj [~Forj@Nightstar-10789.ue.woosh.co.nz] has joined #code
03:36 mode/#code [+o Forj] by ChanServ
04:14 Chalain [~chalain@74.7.18.ns-26825] has joined #code
04:14 mode/#code [+o Chalain] by ChanServ
04:15 Chalcedon [~Chalcedon@Nightstar-10789.ue.woosh.co.nz] has joined #code
04:15 mode/#code [+o Chalcedon] by ChanServ
04:15 Derakon[AFK] is now known as Derakon
04:31 GeekSoldier|bed [~Rob@Nightstar-3884.pools.arcor-ip.net] has joined #code
04:40 GeekSoldier|bed is now known as GeekSoldier|work
04:42 Vornicus [~vorn@Admin.Nightstar.Net] has joined #code
04:42 mode/#code [+o Vornicus] by ChanServ
05:10
<@Vornicus>
My ploy worked!
05:11 * Vornicus has drawn SamW out of the shadows!
05:11
<@Derakon>
The enemy didn't suspect a thing!
05:11
<@Derakon>
Great! Who's SamW?
05:11
<@Vornicus>
He's the old-skool game hacker I know.
05:11
<@Derakon>
Neat.
05:11
<@McMartin>
Uh oh! The network have started to move!
05:12
<@Vornicus>
hehe.
05:14 * Vornicus never even got that far in Metal Gear, kinda sucked at it.
05:15
<@Derakon>
Likewise. Frickin' dogs...
05:16
<@McMartin>
It's really not terribly impressive
05:16
<@McMartin>
Though the TAS is hilarious because you can avoid all damage by pausing at just the right times.
05:16
<@McMartin>
This lets you, for instance, breathe underwater.
05:17
<@Derakon>
Super Metroid has a similar quirk - you can't die if you're pausing when you take the damage.
05:17
<@McMartin>
This is sillier. Damage is inflicted every Xth frame unless you're paused in hazardous conditions (underwater, electrified floor, poison gas).
05:18
<@McMartin>
So, be paused every Xth frame for one frame = no damage
05:18
<@Derakon>
...heh, so the counter increments even when paused?
05:18
<@McMartin>
Yup
05:24
<@Derakon>
Man, the LoZ second quest TAS is old.
05:25
<@Derakon>
Created 2004-05-14.
05:26 * Vornicus pokes around data formats. Probably just CSV, really, but then the associations are a bit tricky.
05:30
<@Vornicus>
Okay, so. Castles.
05:31 Derakon is now known as Derakon[AFK]
05:34 * Vornicus fiddles.
05:40
<@Vornicus>
I need to think about castles in a couple different ways. First, walking into a castle (thus matching positions with it) looks up that castle and lets me attack it (or use it as a garrison, if I own it). Entering the town it's associated with gives information - the owner, and the armies in it. Using Castle Gate lists /all/ the castles you've been to, and teleports you to whichever one you pick. Find Villain tells you which castle the current villain
05:40
<@Vornicus>
n.
05:42
<@Vornicus>
Then, there's generation. Each castle gets populated at the beginning of the game according to what continent it's on - both in terms of what villains it might get (there are 26 castles and 17 villains, spread over 4 continents) and what armies it gets if there's no villain.
05:44
<@McMartin>
What's the actual gameplay of KB like?
05:44
<@McMartin>
You have to dig up The Magic Widget, I recall, but other than that...
05:45
<@Vornicus>
So, it's like this
05:45
<@Vornicus>
you scour the continent, picking up treasure and fighting small armies.
05:46
<@Vornicus>
And you recruit armies yourself.
05:46
<@Vornicus>
Then, when you're strong enough, you get yourself some siege weapons, walk over to the castle of a villain, attack, and capture the villain.
05:47
<@McMartin>
How does this translate to Magic Widget?
05:48
<@Vornicus>
Capturing the villain gives you cash, advances you along the promotion track (which increases your leadership, income, spell power, and the kinds of armies you can recruit from Maximus) and a piece of the map to the stolen scepter.
05:48
<@Vornicus>
there's 17 villains and 8 artifacts, and 25 map pieces.
05:49
<@Vornicus>
Corresponding exactly to the 25 square's worth of world you can see from any particular vantage point.
05:49
<@McMartin>
Aha, so, by simply getting enough, you can get a good guess as to where it needs to be?
05:50
<@Vornicus>
Indeed.
05:50
<@Vornicus>
My most recent game, I had found the location of the stolen scepter after defeating just six villains and finding three artifacts.
05:50
<@McMartin>
Nice.
05:50 * McMartin is still snickering at the TAS
05:50
<@McMartin>
"Uh, m'lord? You left the scepter in your back garden."
05:51
<@Vornicus>
Once you figure out where it could be, you dig there, and if you're right, you get a nice victory procession.
05:51
<@Vornicus>
You don't, of course, need to defeat all the villains.
05:51
<@McMartin>
They're just chilling in their villas, after all.
05:51 * McMartin yawns
05:51
<@McMartin>
OK, home time
05:52
<@Vornicus>
And on the harder levels itt is essentially impossible to do so - you only get 200 days, and you're guaranteed to have to cross the Saharia desert at least once.
05:52
<@Vornicus>
(crossing the desert takes 1 day per step, as opposed to like 30 per step on normal ground)
05:53
<@Vornicus>
(which reminds me, I need to figure out the speeds for walking, sailing, and flying)
05:55
<@Vornicus>
(if you have only armies from four of the 25 races - Archmages, Dragons, Demons, and Vampires - they can carry you; you can cross deserts, thick forests, and mountains without any difficulty)
06:04
<@McMartin>
Er, shouldn't that be 30 steps per day?
06:05
<@Vornicus>
Yes.
06:05 * Vornicus meant that.
06:06
<@McMartin>
See, its easier to cross the desert quickly because there isn't anything in the way!
06:08
<@Vornicus>
Anyway, combat: your armies start on the left (or on the bottom, if you're attacking a castle) and your enemies start on the right (or on the top) and you move your armies toward each other. Then when you meet you "walk into" the other army to attack. The first army to attack a particular army in melee gets retaliated against.
06:09
<@Vornicus>
And so it continues until one side or the other is dead.
06:09
<@Vornicus>
Some armies - archers archmages druids elves giants orcs - can shoot.
06:10
<@McMartin>
Can you leave armies behind so as to fly more easily?
06:10
<@McMartin>
Also, how do you jump continents?
06:10
<@Vornicus>
You can leave armies behind in castles you own.
06:11
<@Vornicus>
Note that if you own a castle but do not leave an army in it, you lose the castle at the end of the week.
06:11
<@Vornicus>
To jump continents, you need to first find a chart to that continent - which you can find on the previous continent - and then you get yourself a boat.
06:11
<@Vornicus>
Get in the boat, choose "go to new continent", and you get there at the start of a new week.
06:12
<@Vornicus>
Once you've explored some, you can use Town Gate and Castle Gate to go to any town or castle you've visited, anywhere in the world.
06:13
<@McMartin>
Aha.
06:14
<@Vornicus>
(Town Gate and Castle Gate are two of fourteen spells that you can get in the game. You get spells by either finding them in treasure chests (not that common) or purchasing them at towns - each town gets exactly one spell you can buy)
06:18
<@Vornicus>
(there are seven noncombat spells - town gate, castle gate, bridge, find villain, instant army, raise control, and time stop - and seven combat spells - fireball, lightning bolt, turn undead, teleport, freeze, resurrect, and clone)
06:19
<@Reiver>
...damn, the LJ came before the IF?
06:19
<@Vornicus>
whut?
06:19
<@Vornicus>
oh, Lost Pig?
06:19
<@Vornicus>
Yes.
06:23
<@Vornicus>
http://www.rpgclassics.com/shrines/genesis/kingbounty/ <--- here's a lot of data.
06:23
<@Vornicus>
Note that these are from the Genesis version of the game.
06:24
<@Vornicus>
But I haven't found anything that's actually wrong.
06:24
<@Reiver>
That's a highly useful bit of info though, isn't it?
06:25
<@Vornicus>
Quite.
06:25
<@Reiver>
What do Town Gate and Castle Gate do?
06:25
<@Reiver>
oh, nm
06:25 * Reiver missed a few lines above.
06:25
<@Vornicus>
heh
06:59
<@Vornicus>
Okay. All towns have: a name, a location, a town gate direction (telling you where the town gate drops you), a boat direction (telling you where the boat gets dropped if you rent it there), a castle (which castle it gives you information for), and a spell (randomly generated; but Hunterville always gives Bridge)
07:00
<@Vornicus>
All castles have: a name, a location, an owner, and up to five armies.
07:25 * Vornicus decides to stop futzing with all that and just write some code that renders.
08:10
<@McMartin>
http://sc2.svn.sourceforge.net/viewvc/sc2?view=rev&revision=2868 Booyah
08:24 Chalcy [~Chalcedon@Nightstar-10789.ue.woosh.co.nz] has joined #code
08:24 mode/#code [+o Chalcy] by ChanServ
08:24 Chalcedon [~Chalcedon@Nightstar-10789.ue.woosh.co.nz] has quit [Ping Timeout]
08:35 Chalcy [~Chalcedon@Nightstar-10789.ue.woosh.co.nz] has quit [Quit: Gone]
09:17 Forj [~Forj@Nightstar-10789.ue.woosh.co.nz] has quit [Quit: Gone]
09:29
<@Vornicus>
Bitchrod.
09:30
<@Reiver>
?
09:31
<@Vornicus>
McM's commit
09:31
<@Reiver>
Oh, sweet
09:39 GeekSoldier|work [~Rob@Nightstar-3884.pools.arcor-ip.net] has quit [Ping Timeout]
09:52 You're now known as TheWatcher
09:52 Thaqui [~Thaqui@Nightstar-26276.jetstream.xtra.co.nz] has left #code [Leaving]
09:57
<@Reiver>
Query: Sqrt is x^1/2 - is Log thus x^1/10?
09:57
<@Vornicus>
Nope.
09:57
<@Reiver>
...No?
09:57
<@Vornicus>
Log is the number such that log(x) = e^x
09:57
<@Vornicus>
er, rather
09:58
<@Reiver>
Hm, I should have specified Log10
09:58
<@Vornicus>
Log is the number such that x = e^(log(x))
09:58
<@Vornicus>
Log10 is the number such that x = 10^(log10(x))
09:58
<@Vornicus>
sqrt is the number such that x = sqrt(x)^2
09:58
<@Reiver>
So they're, uh, recursive f unctions?
09:58
<@Vornicus>
No, they're inverse.
09:58
<@Reiver>
...That's no use at all >.>
09:59
<@Reiver>
Is Sqrt x^1/2, then?
09:59
<@Reiver>
Or did I have that bit of math wrong entirely?
09:59
<@McMartin>
Yes.
09:59
<@McMartin>
x^(1/n) is the nth root of x.
09:59
<@Vornicus>
Sqrt is x^(1/2)
09:59
<@Reiver>
Can one notate log10 in a similar manner?
09:59
<@Vornicus>
No.
09:59
<@Reiver>
Right, then.
10:00
<@Vornicus>
logarithms are tricky, to say the least.
10:00
<@Reiver>
Is it possible to have a curve less drastic than sqrt? By which I mean it starts getting shallow more slowly?
10:00
<@McMartin>
Yes.
10:00
<@McMartin>
Trivial example: Cube root.
10:01
<@Vornicus>
That's more drastic.
10:01
<@McMartin>
Not as drastic as log.
10:01
<@Vornicus>
But it's still more drastic than sqrt.
10:01
<@Reiver>
Granted, but I was after less drastic than sqrt~
10:01
<@McMartin>
sqrt and cube root are, strictly speaking, still polynomial.
10:01
<@McMartin>
Cube root of the square of x.
10:01 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
10:01 mode/#code [+o gnolam] by ChanServ
10:01
<@McMartin>
Which is x^(2/3).
10:02 * Reiver eyes that.
10:02
<@Reiver>
That's an... interesting number.
10:02
<@McMartin>
I'm guessing that what you're looking for here, basically, is sub-linear polynomial growth.
10:02
<@Reiver>
...Oh wait I see what that did.
10:02
<@Reiver>
I am, aye.
10:02
<@McMartin>
(x^2)^(1/3)
10:03
<@McMartin>
And you want it of degree greater than one half
10:03
<@McMartin>
Well, there's an infinity of rationals between 1/2 and 1, so pick one~
10:04
<@McMartin>
Log, however, is as much more drastic than these as 2^x is to x^2.
10:04
<@McMartin>
So you probably don't want to be looking at those.
10:04
<@Reiver>
Is there any sub-linear curves other than polynomials and logs? I'm really after... how to put it
10:04
<@McMartin>
There's stuff that's even more shallow than log.
10:04
<@McMartin>
And generally, polynomials are superlinear.
10:05
<@Reiver>
Wrong direction then~
10:05
<@McMartin>
In computer science, these tend to show up:
10:05
<@McMartin>
Constant: O(1)
10:05
<@McMartin>
Inverse Ackerman's function: Nobody uses this, instead using iterated logarithm: O(log*n)
10:05
<@McMartin>
Logarithmic: O(log n)
10:05
<@McMartin>
Linear: O(n)
10:05
<@McMartin>
"Linearithmic": O(n*log n)
10:06
<@McMartin>
Polynomial: O(n^k)
10:06
<@McMartin>
Exponential: O(2^n)
10:06
<@McMartin>
WTF: O(n!), O(n^n), etc.
10:07
<@Reiver>
...n^n is scary
10:07 * McMartin has managed it.
10:07
<@Reiver>
What were you /doing/?
10:07
<@McMartin>
You had N unique objects, and you needed to brute-force search through every way of picking N of them, with duplicates allowed.
10:08
<@McMartin>
(If duplicates aren't allowed, it's merely O(N!).)
10:08
<@McMartin>
(And that's searching through permutations blindly.)
10:08
<@Reiver>
Ah-hah
10:08 * Reiver ponders. Is it possible to have an exponential-gradient curve that levels off instead of rising?
10:08
<@McMartin>
The problem in question involved a grammar transformation in the presence of free variables.
10:09
<@McMartin>
... Double-asymptotic.
10:09
<@McMartin>
Google "Sigmoid Curve", see what you get.
10:09
<@Reiver>
Ah!
10:09
<@Reiver>
Awesome. Cheers, McM!
10:10 * Reiver was fuzzily aware it existed, but not its name.
10:10
<@McMartin>
There's also Boring Asymptotes, like y = 5-(1/x).
10:15 * Reiver was also after a slightly-more-than-linear, but found that easily enough in the n*log(n), which he was familiar from in compsci >.>
10:16
<@McMartin>
I never know what level to pitch my explanations.
10:17 * Reiver appreciates that you try. It's especially tricky with him, for he's had compsci training, but the memory impairment means he simply /fails to recall/ vast swaths of it on any given day. >.<
10:18
<@Reiver>
(I don't have a bad memory. I in fact have the equivalent of a nigh-photographic one... and a 50% chance of failure in data retrieval. >.>)
10:18
<@Reiver>
(Well, not 50%, but you know what I mean~)
10:59 * Vornicus fiddles. Wonders at the probability of 26 items from 14 groups with at least one group absent.
11:29 GeekSoldier|work [~Rob@Nightstar-4992.pools.arcor-ip.net] has joined #code
11:57 * Vornicus fiddles, finds a completely hidden-state-free method of generating groupings.
11:58
<@Reiver>
?
11:59
<@Vornicus>
I'm trying to figure out how many ways you can get 26 objects from 14 groups, and end up with one or more groups missing.
11:59
<@Vornicus>
So I've got 26; 25 1; 24 2; 24 1 1...
12:02
<@Vornicus>
And it turns out you can generate these pretty easily - from any grouping, to get the next: find the last item in the grouping that has two more than the 14th item, subtract 1... then for all the items after that, the value is the minimum of the previous item and 26 - the sum of all previous items.
12:03 * Reiver nods.
12:04
<@Vornicus>
(for the numbers 14 and 26, this is. Obviously you can use any numbers you want.)
12:04
<@Reiver>
Right
12:06
<@Vornicus>
...the "value" of any grouping is something that still eludes me though
12:07
<@Reiver>
What is this for?
12:07
<@Vornicus>
I was wondering - if I assign spells completely randomly to towns, what's the probability that the game will be missing a spell?
12:08
<@Reiver>
Ohhhhhh
12:08
<@Vornicus>
and since there's 14 spells and 26 towns...
12:09
<@Reiver>
So the question you're working on is: 26 samples of 14 things, randomly - What's the odds you'll miss at least one?
12:09
<@Vornicus>
right
12:10
<@Reiver>
It's an exponential, isn't it?
12:10
<@Reiver>
No, not exponential. Factorial.
12:10
<@Reiver>
! thingy.
12:10
<@Reiver>
I think.
12:10
<@Reiver>
(26 will break most calculators~)
12:10 * Reiver ponders.
12:11
<@Vornicus>
It's quite factorial, yes. I believe the value of a grouping is something like...
12:11
<@Vornicus>
Actually the total number of possible layouts is exponential - 26**14
12:11
<@Reiver>
!roll 26C14
12:11 Schlock [~schlock@Nightstar-8551.hsd1.wa.comcast.net] has joined #code
12:11 mode/#code [+v Schlock] by ChanServ
12:11
<@Vornicus>
But the value of a particular grouping is, uh
12:12
<@Reiver>
!roll 26C14
12:12
<+Schlock>
Dice Rolled For Reiver: 26C14 = 9657700
12:12
<@Reiver>
Hrm
12:13
<@Reiver>
Each spell has a 1 in 14 chance of being chosen. This is calculated 26 times.
12:13
<@Vornicus>
26! / (product(grouping[k]! for k) times... something I'm not sure how to express.
12:14
<@Vornicus>
well, okay, I do - what you do is you take the grouping items, /count/ them - so for instance 5 5 5 5 3 3 0 0 0 0 0 0 0 0 would be 4, 2, 8
12:14 DiceBot [~Reiver@Nightstar-11723.xdsl.xnet.co.nz] has joined #Code
12:14 mode/#code [+v DiceBot] by ChanServ
12:14
<@Vornicus>
and then do 14! / product(each one of those!)
12:14
<@Reiver>
!(1/14) * 26
12:14
<+DiceBot>
[Reiver] (1/14) * 26 = 1.857143.
12:14
<@Reiver>
Heh~
12:14
<@Vornicus>
try (1/14)**26
12:15
<@Reiver>
Yeah, I missed an asterisk
12:15
<@Reiver>
!(1/14) ** 26
12:15
<+DiceBot>
[Reiver] (1/14) ** 26 = 0.
12:15
<@Reiver>
hm
12:15
<@Vornicus>
It's a really small number.
12:15
<@Reiver>
!(1/14)**26
12:15
<+DiceBot>
[Reiver] (1/14)**26 = 0.
12:15
<@Vornicus>
!(13.0/14)**26
12:15
<+DiceBot>
[Vornicus] (13.0/14)**26 = 0.
12:15
<@Vornicus>
!(13.0/14)^26
12:15
<+DiceBot>
[Vornicus] (13.0/14)^26 = 0.145612.
12:15
<@Reiver>
Aha. Wrong sign!
12:15
<@Attilla>
That game you mentioned earlier, sounds like Heroes of Might and Magic, at least a little bit
12:15
<@Reiver>
!(1/14)^26
12:15
<+DiceBot>
[Reiver] (1/14)^26 = 0.
12:15
<@Vornicus>
Attilla: Good reason for that.
12:15
<@Vornicus>
It's the predecessor to HoMM.
12:15
<@Reiver>
Still~
12:16
<@Reiver>
Actually, hm.
12:16
<@Reiver>
No, Vorn has it right I think?
12:16
<@Reiver>
Because we then do it 14 times.
12:17 * Vornicus isn't sure about all this, is doing it the way he knows.
12:18 * Vornicus Pythons at it.
12:20
<@EvilDarkLord>
Hm. Chance that a single given spell is contained in the game should be... 1 - (13/14) ** (14 * 26)
12:21
<@EvilDarkLord>
!(13/14.0)^(14*26)
12:21
<+DiceBot>
[EvilDarkLord] (13/14.0)^(14*26) = 0.
12:22
<@Reiver>
EDL: You want the chance that a single given spell /won't/ be in the game. I'm pretty sure that screws with the math somehow.
12:23
<@Vornicus>
well, except that it's not a single given spell
12:23
<@Vornicus>
it's /any/ spell.
12:23
<@Reiver>
...oh shits. Right.
12:23
<@EvilDarkLord>
You want the chance that all spells are in the game, right, or its complement?
12:24
<@Vornicus>
Right
12:25
<@EvilDarkLord>
(1 - answer above)^14? Though I'll have to think it through.
12:26
<@EvilDarkLord>
(That seems to come to approximately ten nines before any other numbers)
12:28
<@EvilDarkLord>
(This is not too unreasonable, I think, given how you have 14 spells and 364 random values)
12:29
<@Vornicus>
I think I will poke at my way to see what it comes up with.
12:29 * Vornicus likes Brute Force.
12:30
<@EvilDarkLord>
What kind of algorithm do you use? I'm assuming you don't go through all 364 ** 14 configurations :p
12:31
<@Vornicus>
26 ** 14, for one thing
12:31
<@Vornicus>
and what I'm doing is figure all possible groupings, and their weights, and adding.
12:32
<@EvilDarkLord>
So, the probability that a given spell is not in a particular city then?
12:32
<@EvilDarkLord>
Er, that a city does not contain all of them, sorry.
12:32
<@Vornicus>
er
12:32
<@Vornicus>
Each city contains exactly one spell.
12:32
<@EvilDarkLord>
Aha!
12:33
<@Vornicus>
Man that's pretty. 2241 distinct loadouts.
12:37
<@Vornicus>
...also, there are a lot of loadouts (unweighted, yet) that don't have all 14. A great majority, at that.
12:40
<@EvilDarkLord>
Hum. Looks like 11 % or less of cities contain all spells, if there's not something blatantly wrong with my calculations.
12:40
<@EvilDarkLord>
Er, worlds. Grah.
12:41 McMartin [~mcmartin@Nightstar-16277.dsl.pltn13.sbcglobal.net] has quit [Operation timed out]
12:45 McMartin [~mcmartin@Nightstar-16277.dsl.pltn13.sbcglobal.net] has joined #code
12:45 mode/#code [+o McMartin] by ChanServ
12:47
<@Vornicus>
6.61%
12:48
<@EvilDarkLord>
How sharply does that increase with more cities?
12:48
<@Vornicus>
Dunno.
12:51 * Vornicus is cruel o his computer.
12:53
<@Vornicus>
10% at 28 cities; 20% at 32 cities; 30% at 36; 40% at 39; 50% at 42...
12:53
<@Vornicus>
60% at 46
12:54 * Vornicus stops it at 50, dumps into Excel.
12:58
<@Vornicus>
Would probably be more efficient if I did the factorial parts the friendlier way.
12:59
<@EvilDarkLord>
And you can always use psyco if you need some more speed after algorithmic improvements.
12:59
<@Vornicus>
It's not that slow.
13:00
<@Vornicus>
And the algorithmic improvements would be a vast increase in speed, because the majority of my problem is really big numbers.
13:02
<@Vornicus>
http://vorn.dyndns.org/~vorn/representation.png
13:07 * Vornicus can tell he got the weights right, because they add up right.
13:08 * Vornicus thinks he's killed the chat.
13:10 * Vornicus thinks he's killed the /network/.
13:11
<@EvilDarkLord>
Keep up the good job.
13:11 * EvilDarkLord fiddles with converting one db's tables to another db's tables.
13:11
<@Vornicus>
Fun fun.
13:15 * EvilDarkLord finds that caching can be implemented trivially in Python without resorting to globals or classes. Yay!
13:25
<@EvilDarkLord>
(Well, at least as long as all variables are kept in lists)
13:25
<@EvilDarkLord>
(Or dictionaries)
13:39
<@EvilDarkLord>
Yay, finally got the silly bugs sorted. Caching factorial function: http://pastie.caboo.se/123028
13:46
<@Vornicus>
Yeah, I can do that too - in this case though it's not a real factorial.
13:46
<@Vornicus>
Well, it is, but there's a way to do it so you don't get nearly as high as the real one.
13:47
<@Vornicus>
Does that make sense?
13:47
<@EvilDarkLord>
It's the x! / y! variety?
13:48
<@Vornicus>
Yeah, except there's a whole lot of ys.
13:50 * Reiver scratches his heead.
13:50
<@Vornicus>
n = 1; result = 1; for x in list: for k in xrange(1,x+1): result = result * n / k; n += 1
13:50
<@Reiver>
Is there a mathematical equation for the following thingy?
13:51
<@Vornicus>
you mean, a nice friendly one?
13:51
<@Reiver>
Each step, add 500 to the current value, then subtract 1%.
13:51
<@Vornicus>
Because I can fit a curve to anything.
13:51 * Reiver wants a curve for it. Also wants to know if the size of the first number makes a difference in how fast it reaches equilibrium.
13:51 * Reiver (suspects not, but is curious.)
13:52 * Reiver knows the X% makes a difference, but that's fairly obvious~
13:52
<@Vornicus>
The size of the initial value makes a difference.
13:52
<@Vornicus>
As a ratio to the "add 500" step.
13:52
<@Reiver>
Aha
13:53
<@Reiver>
Well, I guess that's logical. If you start at 1000, you've skipped the first 20 steps (+ a bit more, at that)
13:53
<@Vornicus>
(obviously if you start at 5000 it's going to get there several steps faster than if you start at 0.
13:53
<@Reiver>
Right
13:54 * Vornicus can do it as a diffeq. wonders if there's something that matches it more cleanly.
13:54 * Reiver curiouses?
13:54
<@Vornicus>
dy/dx = 500 - 0.01y
13:55
<@Vornicus>
well, actually I think those numbers are wrong. But, hm. let's see.
13:55
<@Reiver>
...Yeah, that's not right
13:55
<@Vornicus>
it's close.
13:55
<@Reiver>
!500/0.01
13:55
<+DiceBot>
[Reiver] 500/0.01 = 50000.
13:56
<@Reiver>
So it takes fifty thousand to hit the equilibrium... still, that's not all that surprising when I think about it. That's the final edge of the curve, innit?
13:58
<@Vornicus>
okay. at y = 0, dy/dx = 495
13:58
<@Reiver>
Ok?
13:59
<@Reiver>
y = 0 means...?
13:59 * Reiver is rusty on the differential equation thingies. Knows what you're doing, just not what it means~
13:59
<@Vornicus>
Which is to say the "current value" is 0
13:59
<@Vornicus>
...except that's kinda wrong too. I have forgotten how to do this!
14:00
<@Vornicus>
...it's an amortization table, only backwards.
14:01
<@Reiver>
Now we're getting somewhere.
14:01
<@Reiver>
Care to explain what one of those is?~
14:01
<@Vornicus>
http://en.wikipedia.org/wiki/Amortization_(business)
14:01
<@Reiver>
*snrk*
14:01
<@Vornicus>
The equation there.
14:01
<@Vornicus>
your r is actually 0.01010101...
14:02
<@Vornicus>
and your A is 500.
14:02
<@Vornicus>
and n is your level.
14:02
<@Reiver>
My r is 0.01010101010101 because it is a cumulative effect, yes?
14:04
<@Vornicus>
Your r is that because you're going from 99 to 100.
14:04
<@Vornicus>
This is backwards, see
14:04
<@Reiver>
Uh...huh.
14:05
<@Vornicus>
If you were to try to do this the way it says, what you would do is /multiply/ by 1.01010101... and then /subtract/ 500.
14:06
<@Reiver>
Because we're trying to go up instead of down.
14:08
<@Vornicus>
...except it's acting odd. Hrm.
14:09
<@Vornicus>
Ah, because the parens were wrong.
14:10
<@Vornicus>
=500*(1 - (1/(100/99)^%Level%))/(1/99) <--- here's a thing for SEV
14:10
<@Vornicus>
erp
14:10 * Vornicus did it in excel, and screwed up the transition
14:11
<@Vornicus>
=500*(1 - (1/(100.0/99)**%Level%))/(1.0/99)
14:11
<@Reiver>
...Uh-huh. Throw me the excel formula thingy? I'm curious, and want to draw pretty graphs~ >.>
14:12
<@Vornicus>
In B2, put: =500*(1 - (1/(100/99)^A2))/(1/99)
14:13
<@Vornicus>
in A2 put 0
14:13
<@Vornicus>
and then fill it down with sequential numbers in column A.
14:15
<@Vornicus>
You can increase the speed at which it flattens out by increasing r; you can change the value it flattens to by changing A.
14:17
<@Reiver>
r being 99, aka 100-%?
14:17
<@Vornicus>
1/99 in this case
14:18
<@Reiver>
r is 1/99
14:18
<@Reiver>
What about the 100/99?
14:18
<@Vornicus>
1 + 1/99
14:18
<@Reiver>
OK: If I want to calculate for 5%, what numbers changes to what? >.>
14:19
<@Vornicus>
104/99 and 5/99
14:19
<@Vornicus>
er, that's wrong
14:19
<@Vornicus>
100/95 and 5/95
14:20
<@Vornicus>
=500*(1 - (1/(1+B$1)^$A2))/(B$1) <--- this one is adjusted so you can put an r in the top of the column and get a graph for that.
14:21
<@Vornicus>
Note that the value it flattens to is A / r
14:21
<@Reiver>
1+B$1 instead of ... hm
14:21
<@Vornicus>
And I was wrong - increasing r makes it take longer.
14:22 * gnolam stabs GNU Make repeatedly.
14:22
<@Reiver>
longer?
14:23
<@Vornicus>
It takes longer to level off, yes.
14:23
<@Vornicus>
But it also gets a lot higher for higher r.
14:23
<@Vornicus>
So it's about right.
14:24 * ToxicFrog patpats gnolam, offers pm instead
14:24
<@Vornicus>
=(500*B$1)*(1 - (1/(1+B$1)^$A2))/(B$1) <--- this one will always converge on 500.
14:24
<@Vornicus>
...and I was wrong again, because I'm an idiot.
14:24
<@MyCatVerbs>
Dear Carmack:
14:24
<@MyCatVerbs>
w00t
14:24
<@MyCatVerbs>
Signed, MyCatVerbs.
14:24
<@ToxicFrog>
What's he done now?
14:24 * MyCatVerbs hugs DOOM2's sourcecode. <3
14:24
<@ToxicFrog>
Aah.
14:25
<@Reiver>
Increasing the -%age should speed the process up.
14:25
<@MyCatVerbs>
I has a bunch of modifications done to support a user-interface experiment. Really easy, too. ^_^
14:25
<@Vornicus>
Increasing the percentage does.
14:26
<@Vornicus>
r = 0.001 gets to just 196 after 500 steps, in the latest version of the thing.
14:27
<@Vornicus>
Part of my problem is I kept misreading the graph because I was controlling the wrong thing.
14:27
<@Reiver>
So
14:27
<@Reiver>
What happens if we start above the desired value?
14:28
<@Vornicus>
It drops down.
14:28
<@Vornicus>
This equation can't handle that though.
14:28
<@Reiver>
Aha. That's what I was wondering.
14:29
<@Reiver>
...Is there a postscript plugin for Python?~
14:29
<@Vornicus>
Probably.
14:29 * Reiver is half tempted to start Fiddling, which as we all know is dangerous indeed.
14:29
<@ToxicFrog>
...as in, a rendering plugin?
14:29
<@ToxicFrog>
You just popen() gs, I'd think.
14:29
<@Reiver>
Huh. Nifty.
14:29
<@Reiver>
I'll think about it more in the morning, though.
14:29
<@Reiver>
This whole thing has been fascinating, though.
14:30
<@Vornicus>
That's if you get tired of fucking with other people's libraries.
14:30
<@ToxicFrog>
Then you send your postscript down the pipe, and finish it off with "showpage quit"
14:30 * Reiver is especially curious as to ways to make it rise quickly, drop slowly. Or vice versa. Suspects that just ends up using an if statement, but what the hell~
14:32
<@MyCatVerbs>
I think ghostview/script also has something like a -watch mode too, which will automatically update the display if the input changes.
14:33
<@MyCatVerbs>
popen() gs sounds more sensible, though. -watch works by polling the mtime of a file on disk, which is baaaaaad.
14:35
<@Reiver>
(This is for ship experience, y'see. What I want is for a ship that's done nothing but cruise around on patrol to slowly rack up experience, but top out at a certain level - competent, but nothing fancy - after a year or two, as the crew gets the handle of the controls. Actual combat experience will send the values skyhigh very quickly, of course. Assuming you live~)
14:35
<@Reiver>
(Meanwhile, if a ship is left to languish, it will lose what experience it has already gained - back down to the predisposed competent level. So if your Legendary crew proceed to sit on their asses for the next five years, they lose a lot of their prestige. I figure this all makes a reasonable amount of sense, y'know?)
14:47 * Vornicus fiddles.
14:48
<@Vornicus>
I can't really tell. If you can, uh
14:48
<@Vornicus>
if you can calculate experience as a modification on current experience, you should be able to handle this though
14:49
<@Reiver>
Oh, yes.
14:50
<@Reiver>
The intention is to take Z current experience, add X, then -Y%
14:50
<@Reiver>
And carry on from there.
14:51
<@Reiver>
It'll be a per-turn script that's running. I don't need to calculate it in an actual formula other than when trying to model it to work out the right values~
14:51
<@Vornicus>
Personally I'd just sim it.
14:51
<@ToxicFrog>
Yeah.
14:51
<@Reiver>
Hence my temptation to stick it into Python.
14:52
<@Reiver>
And hence why I thus was curious as to whether you can postscript in Python, so I had pretty graphs to look at >.>
14:52
<@Vornicus>
Sure. Just pipe the sucker into gs, and you have yourself a pretty graph.
14:53
<@Reiver>
Excelent.
14:53
<@Vornicus>
...that said, I would personally probably /do the simulation in PostScript/, but
14:53 * Reiver will do that in the morning, then, as it is 4AM and he has a headcold.
14:53
<@Reiver>
And the manic insomnia is finally wearing off. >.<
14:54
<@ToxicFrog>
X=10; Y=10; Z=0; printf("0 0 moveto 1 setlinewidth 0 setcolor\n"); for i=0,2^16 do Z = Z + X; Z = Z - Z * Y; printf("%d %f lineto\n", i, Z); end; printf("showpage quit\n")
14:55
<@ToxicFrog>
| gs -sDEVICE=x11 -g1024x65535 -q
15:02
<@Vornicus>
are you bashing at gs?
15:03
<@Vornicus>
You have to stroke before you do the showpage
16:06 GeekSoldier|work [~Rob@Nightstar-4992.pools.arcor-ip.net] has quit [Ping Timeout]
16:09 GeekSoldier|work [~Rob@Nightstar-4992.pools.arcor-ip.net] has joined #code
16:17
<@ToxicFrog>
Oh right.
16:17
<@ToxicFrog>
And that's actually Lua.
16:17
<@ToxicFrog>
But that was just a demonstration of how simple it is to drive ps to generate graphs.
16:20 GeekSoldier|work [~Rob@Nightstar-4992.pools.arcor-ip.net] has quit [Ping Timeout]
16:23 GeekSoldier|work [~Rob@Nightstar-4992.pools.arcor-ip.net] has joined #code
16:36 GeekSoldier|work [~Rob@Nightstar-4992.pools.arcor-ip.net] has quit [Ping Timeout]
17:02 GeekSoldier|work [~Rob@Nightstar-5159.pools.arcor-ip.net] has joined #code
19:17 GeekSoldier|work [~Rob@Nightstar-5159.pools.arcor-ip.net] has quit [Ping Timeout]
19:38
<@MyCatVerbs>
That looks pretty close to bash. >>
20:35 GeekSoldier|work [~Rob@Nightstar-4952.pools.arcor-ip.net] has joined #code
20:37 GeekSoldier|work is now known as GeekSoldier|
20:37 GeekSoldier| is now known as GeekSoldier|bed
20:39 Vornicus is now known as Vornicus-Latens
20:46
<@gnolam>
FROM HELL'S HEART I STAB AT THEE, OPENOFFICE!
21:08 AbuDhabi [AnnoDomini@Nightstar-29021.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
21:14 AnnoDomini [AnnoDomini@Nightstar-29310.neoplus.adsl.tpnet.pl] has joined #Code
21:14 mode/#code [+o AnnoDomini] by ChanServ
21:42 Kyrre [~Z@87.72.35.ns-26506] has quit [Connection reset by peer]
21:42 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
21:43 Netsplit DeepThought.NY.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: @Pi, @Vornicus-Latens, @AnnoDomini, @jerith, @Reiver, @Chalain
21:43 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
21:43 mode/#code [+o ToxicFrog] by ChanServ
21:43 Derakon[AFK] [~Derakon@Nightstar-8000.hsd1.wa.comcast.net] has quit [Ping Timeout]
21:44 Kyrre [~Z@87.72.35.ns-26506] has joined #Code
21:44 Netsplit over, joins: AnnoDomini
21:44 mode/#code [+o AnnoDomini] by ChanServ
22:19 Otto_Flick [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
22:19 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Ping Timeout]
22:19 Otto_Flick is now known as gnolam
23:30 jerith [~jerith@IRCop.Nightstar.Net] has joined #Code
23:30 mode/#code [+o jerith] by ChanServ
23:30 Reiver [~reaverta@Admin.Nightstar.Net] has joined #Code
23:30 Pi [~sysop@Nightstar-24414.hsd1.wa.comcast.net] has joined #Code
23:30 mode/#code [+o Reiver] by ChanServ
23:30 Vornicus-Latens [~vorn@Admin.Nightstar.Net] has joined #Code
23:30 ServerMode/#Code [+o Vornicus-Latens] by Troika.TX.US.Nightstar.Net
23:30 mode/#code [+o Pi] by ChanServ
23:30 mode/#code [-o Vornicus-Latens] by ChanServ
--- Log closed Thu Nov 29 00:00:17 2007
code logs -> 2007 -> Wed, 28 Nov 2007< code.20071127.log - code.20071129.log >