All times are UTC.
28 04:11 <aleksi> For the 2*PI point, good notice!
28 04:11 <dave> I just started the logging
28 04:11 <lennon> i can also just leave my irc client running, and save the log again when i get back
28 04:12 <dave> well unless my machine crashed, I got everything under control
28 04:12 <lennon> cool
i'll be back in 2-3 hours, fed and watered and ready to go
28 04:13 <dave> ok, I should be here
28 04:13 <lennon> and feel free to rip the code apart as you see fit...i seem to be having some major brain cramps this evening
see you all later
28 04:14 <dave> ok
seeya
28 04:16 <daniel> Okay, this module thing just has to go.
Right, then, how's this: use the module statement only for functions/whatever that you don't expect anyone else to call. For example, once we get pluggable strategies going, you might use Module to hide some functions not intended for general consumption.
28 04:18 <dave> ok, so they will have to include the module to get them
alright, I'll pull out all modules, and they can be added as necessary
28 04:19 <daniel> Good.
Well I'll be ... my ruby didn't include Test::Unit.
28 04:22 <dave> I know, I guess its in 1.8 by default
28 04:25 <daniel> * daniel__ peers at ruby1.8 in Debian unstable and wonders if he should grab it
28 04:25 <dave> modules are gone
28 04:45 <aleksi> rudimentary checks pass now for my fixed point class
28 04:51 <dave> yer still up?
28 04:52 <daniel> I see. I think that we can in fact declare your FixedPoint class is the proper implementation of FPN and switch units.rb, constants.rb, etc. over to that.
If you don't mind, I'll be cutting the code out of aleksi_first_idea and dropping it into units.rb
28 04:52 <aleksi> I won't mind
just check what you're dropping that it's ok and really working
28 04:53 <daniel> of course
28 04:53 <aleksi> if this class fails we're tracking bugs for the rest of the weekend
28 04:57 <dave> who all is using emacs?
ruby-mode ?
28 04:57 <aleksi> me
28 04:57 <daniel> I am, sometimes.
28 04:59 <dave> ok, I noticed lennon is using tabs as indents, should I add some ruby code to each file to display tabs as 4 spaces
also I can make ruby-indent-level set to 4 spaces, and then indent-tabs-mode t
which should make everybody compatible
28 05:00 <aleksi> you speak like a guru :)
28 05:00 <daniel> What function is called with evalutating (-a)? Is it the same function as is called to evaluate (a-b), only with no argument?
28 05:02 <dave> good question, probably just -() ??
28 05:02 <aleksi> I guess it's @- but I haven't defined it
just worked around to get the test pass, it's useful feature to have unary negation around, so please add it
28 05:03 <daniel> Ok. I'm also cleaning up the way you treat Float's and FixNum's differently.
28 05:10 <aleksi> well, you have the tests to back you up, so go for it
28 05:13 <dave> I just added the code for the ruby-mode support
I'll go through now and re-indent all the files
emacs should now indent with tabs, not spaces, (I usually like it the other way, but lennons using tabs)
also tabs should be 4 spaces wide
28 05:22 <aleksi> what is the equality or comparison method that needs to be defined for FixedPoint in order to be able to compare two FixedPoints if they are equal?
28 05:22 <daniel> Isn't it just ==?
Rather, ==
28 05:24 <dave> yes ==
28 05:25 <aleksi> should we really indent up to 4? I've always seen ruby code with 2 indentation
28 05:25 <dave> I find 2 a little small, but if its the popular choice, sure I dont care
I actually like 3 the best :-)
its only us emacs users that it matters
28 05:30 <daniel> Ok, so I can't check in my cvs modifications because the files have changed while I've been editing them - what do I do here?
28 05:30 <aleksi> daniel_, which files are you editing?
28 05:30 <dave> damn, after I checked in the indent changes I thought that might happen
28 05:31 <daniel> constants.rb and units.rb
28 05:31 <dave> should I rollback the changes so you can check your code in, how big are you changes?
are you using emacs?
28 05:31 <daniel> So what do I do here - how do I merge changes together?
28 05:31 <aleksi> anyway, you take copy of your editings (cp foobar.rb foobar_daniel_before_merge.rb)
then say cvs update
28 05:31 <batsman> hello, how are things doing?
28 05:31 <daniel> Oh how awful. That's really what you do?
Ok.
28 05:31 <dave> wait
have you tried checking them in yet?
28 05:32 <aleksi> then open up merged foo.rb, go manually through the code and merge by hand all <<< ... --- ... >>> dot areas
28 05:32 <dave> wait :-)
28 05:32 <aleksi> then ci in your newly manually merged version
28 05:32 <dave> you dont have to do it that waty
28 05:32 <aleksi> if everything went well you can then delete the backup
28 05:32 <dave> daniel__: what changes
28 05:33 <daniel> ncheels: never mind. I've got a way to do it.
28 05:33 <dave> ok ..
28 05:34 <aleksi> daniel, most of the time merging isn't any big deal and cvs can do most of it for you, but if two coders change exactly the same section of code cvs can't decide which one is correct (often both are partially :)
but I hate to lose any of my code, so I take backups just in case
batsman, hello, we're doing fine
batsman, have you checked out the source from CVS?
or read the contest
28 05:35 <batsman> yes
read the contest
28 05:35 <aleksi> ok, so get in speed, take the code and start whereever you want
28 05:35 <batsman> and just sent an email to get access to CVS
28 05:35 <dave> daniel__: you did the png's right?
28 05:35 <aleksi> for example lots of FixedPoint tests should and could be made
28 05:35 <dave> batsman: that guy is away for a bit
28 05:35 <daniel> I did.
28 05:36 <batsman> sorry for being soo late, but I thought sleep deprivation wouldn't help in the long run
28 05:36 <dave> daniel__: ok, how can I find the starting point?
batsman: where are you (geographically)?
28 05:36 <batsman> Stuttgart
28 05:36 <daniel> Ah. That. Well, it's a single gray dot...
28 05:36 <dave> uh, what country is that in :-)
daniel__: can you make the dot bigger?
28 05:37 <daniel> Not easily. I think.... hrm. Maybe...
28 05:37 <dave> maybe make it white or yellow or some other colour that might stick out more
not easy, dont worry
28 05:37 <batsman> Germany
28 05:38 <dave> batsman: ok cool
28 05:38 <daniel> Okay, done. We now have a passable FPN implementation in units.rb
28 05:38 <dave> I am in calgary canada, I have never left the continent
28 05:39 <daniel> Wieviel Uhr ist es jetzt bei Ihr?
28 05:39 <batsman> hehe 7:39 in my localtime. BTW my language of choice for communicating here is still English :-P
28 05:39 <daniel> Though someone could still add comparison functions...
'kay. My German is a bit rusty anyway.
28 05:40 <dave> mine too :-)
28 05:40 <batsman> mine too, which is quite shameful :)
being here at the moment...
28 05:41 <aleksi> daniel__, which comparison functions, into what? My FixedPoint class has equality, but it's in fixed_point_test.rb.
I keep working on it, and ncheels could do merging from my version into arithm.rb or whatever you're using in a "main trunk" every once in a while when it's needed.
28 05:41 <batsman> I'm a little stuck at the moment, w/o CVS access
28 05:42 <aleksi> hmm.. we can't give you access as it's actually day-reynolds whose machine we're using, but maybe we can give you the source code anyway.
I'll take a snapshot for you. What's your email?
28 05:43 <dave> I'll just give my password
28 05:43 <batsman> thanks
28 05:43 <dave> I can change it when lennon gets back, anybody oppose?
28 05:43 <batsman> batsman DOT get AT yahoo DOT com
28 05:43 <dave> ok
28 05:43 <aleksi> ncheels, even better idea!
this phase is pretty hectic as we're setting up infrastructure
28 05:44 <dave> so whats with the -@ method
28 05:44 <aleksi> after a while we can concentrate on the path planner and it'll be quite a bit different job, cvs won't ring then all the time
28 05:44 <dave> I haven't seen that before
28 05:44 <aleksi> do it
28 05:44 <dave> is it for unary - ?
I have been off and on working on a simple first run path finder
28 05:45 <aleksi> ok, just def @-(); FixedPoint.new(-@fp); end;
28 05:46 <dave> batsman: mail was sent
28 05:46 <batsman> is there any change we might make it into the lightning division?
28 05:46 <dave> ok aleksi_ I see it now in the Numeric class
batsman: maybe !
28 05:47 <batsman> thanks
28 05:47 <dave> umm, t c=just bounced
oops, the mail bounced I meant to say
batsman.get (AT) yahoo (DOT) com
?
28 05:48 <batsman> s/get/geo/
28 05:48 <dave> oh
28 05:48 <batsman> I'm stupid
sorry
28 05:48 <dave> no prob check - your mail
28 05:49 <batsman> gonna take some caffeine, this is no good. Making typos so early :-P
ok
got it
thanks
28 05:49 <dave> k
28 05:49 <batsman> will check out and review the code for a while
28 05:50 <dave> dont let it take a while, its not that stable
its just forming
28 05:50 <batsman> ok
28 05:50 <dave> you won't get a whole lot from it, ask questions if you like
should I switch the tab-width to 2 ?
28 05:51 <aleksi> couple of points
ncheels, let's change if it gets in way, let's not force another merge now
batsman, aleksi_first_idea.rb is what I've been working with. fixed_point_test.rb has accompanying test cases. Actually for multiple classes.
28 05:52 <dave> aleksi_: this would only change one line per file (near the bottom) the worst is done now, it shouldn't cause any conflicts
28 05:53 <aleksi> guys have been working on model directory and test
ok, sounds good. Still, I'm not bothered right now.
batsman, do you prefer 2 or 4 space indent?
28 05:54 <batsman> I'm used to 4
28 05:54 <dave> batsman: do you use emacs
28 05:54 <batsman> vim
28 05:54 <dave> its only emacs specific indentation we're figuring out
28 05:54 <aleksi> ok, let's keep it that way
28 05:54 <batsman> tabstop=4 shiftwidth=4
28 05:54 <daniel> There. units.rb now has as complete an implementation of FPN as we'll ever need, and I shouldn't have spot this much time on it.
28 05:54 <dave> batsman: correct
28 05:55 <aleksi> ok, now I'm going to start testing my simulator
ncheels, would you review if my version of Trace / Track classes should be adopted / merged / rejected
28 05:55 <dave> uh ok
28 05:56 <daniel> Now go get started on the real stuff, like something that'll take a [x,y,v,d] 4-tuple and a command (a, al, ar, l, r, ., or b) and return the next 4-tuple
28 05:56 <aleksi> I haven't looked at lennon's code at all
28 05:56 <daniel> * daniel__ wanders away towards bed
28 05:56 <aleksi> Daniel, I have that almost ready already, but it hasnt' been tested yet.
28 05:56 <dave> I think he's gone
Trace looks straight forward
28 06:00 <aleksi> there's a trick in there that needs at least a comment
I'm stripping dots away from the commands
so "a." becomes "a" and "." becomes ""
28 06:01 <dave> yeah, I noticed, but its good to comment
28 06:02 <aleksi> would you think through once more what is really said on page 3 of the spec. "You may do things for a total of seven possible maneuvers at each time-step".
28 06:03 <dave> what are you wondering about?
28 06:03 <aleksi> Een.trk doesn't exhibit that behavior, so I haven't seen what's meant with it.
It says like you can do a command like "alraabl.". How's that then interpreted. In order? The routine on page 3 is a algorithm for a single time step.
28 06:05 <dave> you can't do alraabl.
28 06:05 <aleksi> Ie. are multiple commands / timestep actually a loop of a time step code, and *real* time step code contains that multiple command loop.
28 06:05 <dave> thats too many
I dont get you hang on
28 06:06 <aleksi> "alraabl".size
7
oh yes, there was extra dot at the end
ok, let's make a test case out of this
28 06:07 <dave> 7 means you can do either "." or "a." or "b." or "l." or "r." or "al." or "ar."
but not 7 together in one step
28 06:08 <aleksi> assume state [x: 123, y:345, v:567, d:789] (very small numbers, close to 0), what's after interpretation of a command.
okok, now I start to get it
many thanks
28 06:08 <dave> k
28 06:08 <aleksi> I read it all the time like that "You may combine commands up to seven simultaneous commands for a single time step."
It is deceiving, since Een.trc contains command like xa, ra and la which are not mentioned on a page 5.
28 06:11 <aleksi> So I naturally established that you can combine the commands as you wish.
28 06:11 <dave> Een.trc is for the rally racing, which you can do more types of movement
28 06:11 <aleksi> the code on page 3 is then If("accelerate") -> if(command =~ /a/) in ruby, isn't it
28 06:11 <batsman> xa is for rally traces
28 06:11 <aleksi> ncheels, ah, ok, thanks for that too
28 06:13 <dave> yeah x signifies the start of a rally race
28 06:22 <batsman> I see 2 FPN implementations, FixedPoint (aleksi_first_idea.rb) and FPN (units.rb)
I assume the latter is the one to stay
28 06:23 <aleksi> yes
my source is where the current came from, and my version has still evolved on it's own (I don't know if units.rb has been developed)
every now and then, when needed, my version should be migrated or merged to the "main trunk*"
28 06:25 <batsman> ok. switching to xchat, back in a minute
28 06:28 <batsman> back w/ xchat
ok, I've read through the code. Anything you want me to work on?
28 06:29 <dave> anything you want to do?
that you see needs doing?
28 06:30 <batsman> well
28 06:30 <aleksi> I'd like to see more and more thorough tests
28 06:30 <batsman> I think I'll just add more tests for the moment
28 06:30 <aleksi> especially for fixnum
28 06:31 <batsman> gut :)
28 06:31 <aleksi> :)
28 06:33 <dave> aleksi_: the Track in model/track.rb is pretty much the same as yours, a bit more complete tho
your Trace and Simulator look good
tho, I will do a couple changes to Trace,
28 06:37 <aleksi> ncheels, []= and distance are not needed so far and initialize and finish are slower than mine, but otherwise it's better or equivalent
28 06:37 <dave> well the initialize could be sped up
28 06:40 <dave> in FPN I dont think we should overload *
I think we should follow their convention of using mul and div to remain unambiguous
28 06:40 <aleksi> uh, debugger won't stop to a row I state
28 06:41 <dave> you mean a line? which debugger?
28 06:41 <aleksi> ruby -r debug, then I say b 110, for which l 110 lists the right row, but c(ontinue) won't break on that row
28 06:42 <dave> what does it do?
strange
28 07:21 <dave> is there a ruby linked list implementation?
28 07:24 <aleksi> nope, but where would you need it?
28 07:26 <dave> to implement the path finder, each time I have a new path to try, I would rather copy the tail of the list instead of copying a whole array
28 07:28 <aleksi> class Element; attr_accessor :next, :data; ... end; class LinkedList; attr_accessor :head, :tail; ... def copy_tail_of(other_list); @tail.next = @other_list; @tail = @tail.next while @tail.next; end; end; ...
class Element; attr_accessor :next, :data; ... end; class LinkedList; attr_accessor :head, :tail; ... def copy_tail_of(other_list); @tail.next = @other_list; @tail = @tail.next while @tail.next; end; end; ...
sorry
28 07:29 <dave> lol
I can do a linked list, just didnt know if Ruby had one
well I knew there wasn't a main one, wondered if there was a common 3r party
28 07:33 <batsman> bug in FixedPoint, or do I seriously need caffeine? ->
f = FixedPoint.new(-8)
r = f / FixedPoint.new(3)
# correct:
# -8 / 3 * 65536 = 174762 (.7) have to truncate!!!
assert_equal(-174762, r.fp, "Should have div correctly negative numbers.")
1) Failure!!!
test_div(TC_FixedPoint) [fixed_point_test.rb:60]:
Should have div correctly negative numbers.
<-174762> expected but was
<-174763>
28 07:33 <dave> i am too tired to parse all that :-)
28 07:34 <batsman> well, I believe it is rounding incorrectly negative numbers
28 07:34 <aleksi> it's a feature :)
28 07:34 <dave> ok, fix it :-)
28 07:34 <batsman> well
it's just that I'd like to know if I am right or not :-P
don't want to fix it if it's my brain that's broken, not the code
28 07:35 <aleksi> you're probably right, I mean expected is right
but how to fix it is another matter, as I get always confused with round, floor and to_i
28 07:36 <batsman> I noticed something strange in irb
28 07:37 <dave> what?
28 07:37 <batsman> irb(main):019:0* -8 / 3
=> -3
irb(main):020:0> - ( 8 / 3)
=> -2
28 07:37 <aleksi> this issue has been discussed on ruby-talk some time ago, ie. should negative numbers floor towards zero or less or equal to
28 07:37 <dave> yeah programming languages seem to diverge on it
28 07:38 <aleksi> -8/3 -> -2.66, which to_i or floor presses to -3
28 07:38 <batsman> the second one is the right one for the contest
28 07:38 <aleksi> -(8/3) -> -(2.66.to_i) -> -(2) -> -2
28 07:38 <batsman> I believe that's the source of the bug
28 07:38 <aleksi> the thing is that our main computational class is coming heavily bloated
we already check incoming parameter type and react accordingly, and now we should also check whether we should round the other way around negative numbers
but, still, it should be correct first, then elegant
28 07:39 <batsman> anyway
I can cvs ci some unit tests, right?
28 07:41 <aleksi> I hope you don't mess up aleksi*.rb or associated test, but you're free to mess up model/*
28 07:41 <batsman> ¿? ¿? I've just added a few lines in fixed_point_test.rb
28 07:41 <aleksi> it's all ok, I just have to merge
28 07:42 <batsman> thought that eventually we'd just do s/FixedPoint/FPN/g and take it
28 07:42 <aleksi> and I secretly wish I can delegate the merging for someone else :)
batsman, yes we will, and dash my code simultaneously :)
28 07:43 <dave> is the merging messy? is it cause of my indent changes?
28 07:43 <aleksi> nope, it's not messy at all
it just seems, because we have only couple of hundreds of lines, not thousands of which hundred line chunks change
28 07:47 <aleksi> batsman, are you going to ci something?
or shall I, I'm ready
the part I thought to prepare before leaving is now ready (for more extensive testing)
ie. simulator works and one can poke it's state, there are very simple tests for all of this
28 07:48 <batsman> I just did ci
it's just adding some lines
shouldn't conflict (I hope)
28 07:49 <aleksi> ok, no conflict, easy piece
ok, checked in
now we swap with tobias
28 07:50 <tobias> hi folks sorry could not make it on midnight gmt
28 07:50 <batsman> good, I'm updating
hi
28 07:50 <aleksi> he's well slept and I'll go to bed
so next steps include something like:
28 07:51 <batsman> perhaps it's a good time to sum up
28 07:51 <tobias> i have read the task now
28 07:51 <aleksi> 1) merge (cut & paste & ci) my code under model/*
2) forget my code, and let's all start to work on common codebase
3) add lot's of test for the infrastructure
28 07:52 <batsman> ok, one more thing before you go sleep :) who's working on what right now??
and then, for the long run, any experts in AI here?
28 07:53 <tobias> what infrastructure? Do you have an irc log somewhere?
28 07:53 <dave> I am working on a Navigator, (path solver)
very basic
28 07:53 <aleksi> 3.1) simulator especially needs hand calculated checks for all of the commands, the test script could for example run Een.trc against Een.trk and check that the output matches Een.dump
4) pursue on the most challenging task, that is to plan, design, prototype and code the path finder, even most simple for starters
28 07:54 <batsman> tobias: no log AFAIK
maybe we can reuse last year's path finder?
the one used for the robot thing
28 07:54 <aleksi> the goal should be to have viable entry for the lightning portion GMT-0 today
28 07:55 <dave> there is one log for earlier, that lennon was gonna put online, dont know if he did
28 07:55 <batsman> instead of writing from scratch...
28 07:55 <dave> I have a log since that initial point
batsman: where is it?
28 07:55 <batsman> have to look up the links
28 07:55 <aleksi> if there will more people than files to edit, few people should form groups and start developing the more advanced version of path finder
28 07:57 <aleksi> tobias, now your questions: with infrastructure I mean fixedpoint calculation, and basic class for the simulation (track, trace and Simulator
28 07:57 <tobias> yes, we need the arithmetics
28 07:58 <aleksi> all that is ready in a primitive form, accompanied with tests
ncheels is pursuing on simple planner
28 07:58 <batsman> found the following in last's year ICFP wiki node: http://www.gameai.com/software.html
28 07:58 <aleksi> you can decide what you want to do
I suggest one of you helps out ncheels by doing for infra what he needs for the planner
28 07:59 <tobias> i see a file fixed-points-test.rb. The arithmetics itself is in aleksi_first_idea.rb?
28 07:59 <batsman> right now some part
we have two branches of FPN
28 08:00 <aleksi> other one could do more advanced planner, or help ncheels direcly
28 08:00 <tobias> i have only little time right now -- one kid sleeps, the other is away with mom
28 08:00 <batsman> the one in aleksi_first_idea.rb, called FixedPoint
the other if FPN in units.rb
28 08:00 <gus> Hi guys.
28 08:00 <aleksi> tobias, batsman has it right. The real sources are ending up under model directory
28 08:00 <gus> How can I have acces to CVS?
28 08:01 <batsman> normally, the unit tests for FixedPoint should work w/ FPN, by doing s/FixedPoint/FPN/g
well
28 08:01 <aleksi> root/aleksi_first_idea and fixed_point_test.rb are my initial versions to be migrated.
hello gus
28 08:01 <gus> Hi aleksi_
28 08:01 <aleksi> you can have access as soon as lennon gets back (couple of hours he said)
28 08:01 <batsman> gus: you've got to send an email to ['lennon', ['com', 'day-reynolds'].reverse.join('.')].join('@')
in the mean time
28 08:02 <tobias> gus: its all on the wiki page
28 08:02 <gus> I did send an email, about 4 hours ago
28 08:02 <aleksi> but even before we can loan you access, I guess ncheels would fill you in
28 08:02 <batsman> somebody gave me his passwd
28 08:02 <gus> I personaly just woke up (4:02 am)
28 08:02 <aleksi> thanks guys for the first night, I'm sure you'll go forward during my absence
28 08:03 <tobias> thanks aleksi for your work!
28 08:03 <aleksi> see ya in 6-11 hours
28 08:03 <gus> see ya
28 08:03 <tobias> i will be there in 11 hours
28 08:03 <dave> thanks aleksi_
28 08:04 <aleksi> <daniel__> Okay, what do people think of
+http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=PathStrategies
28 08:04 <dave> 2:04am here :-)
28 08:04 <aleksi> <lennon> i can also just leave my irc client running, and save the log again
+when i get back
28 08:05 <dave> I have logs since lennon lefty
28 08:05 <batsman> cu aleksi_, thanks for everything
28 08:06 <dave> gus: want my password?
I already gave it to batsman, why stop now :-)
28 08:07 <tobias> Regarding the PathStrategies example: I'd assign different distances for diagonal directions. say horizontal/vertical step counts 10, then a digonal step counts 14
28 08:08 <gus> ncheels: yes I do
28 08:08 <tobias> we may even look further than just to the nearest neighbours
28 08:08 <gus> Somebody said everything is on the wiki
Where?
28 08:08 <dave> not my password
I will email it, whats your email?
28 08:09 <gus> guillaume.marcais@free.fr
28 08:09 <tobias> i said this. i wa in error. i thought you had not mailed lennon.
28 08:09 <dave> wiki is at http://www.urusai.org/cgi-bin/cvs/icfp/wiki
email is sent
28 08:11 <batsman> ok, I'd like to plan things
we have aleksi_ sleeping for 6-11 hours, tobias out for 11H
28 08:12 <tobias> begin
yes
28 08:12 <gus> Thanks
28 08:12 <batsman> so right now that's GnuVince, gus, ncheels and me
we will soon have lennon back
28 08:13 <dave> I guess
28 08:13 <batsman> ncheels is working on the path strategy, ncheels in the "official" structure
GnuVince: what are you doing?
28 08:14 <dave> I just checked a *completely* untested file navigator.rb
I GnuVince has been mostly lurking, I dont know if anyone has talked to him, or if he has talked with us
28 08:15 <batsman> we need to know who's working _now_ to organize efforts
28 08:15 <dave> wow I feel pretty good for it being 2am
I am full of pepsi, I should prob try to sleep at some time if I want to be useful
28 08:16 <batsman> ncheels: are you planning to sleep?
28 08:17 <dave> planning on it, yeah
but not within the next little bit
28 08:17 <batsman> jtra: hallo??
28 08:17 <dave> I like the idea of discussion, looking where we are at, deciding where to go next
28 08:18 <batsman> I think it's essential. Spend 10 minutes to safe 3 hours
so at the moment ncheels and me are active!!! anybody else?
28 08:18 <dave> dont worry, I am not going away
28 08:18 <tobias> no thats it.
28 08:18 <dave> lol
I think gus is prob getting initialize'd
I just sent my user/pass for him to get cvs access
28 08:19 <batsman> aleksi_: out, sleep, back in 6-11H. GnuVince: ??. gus: ??? got CVS, and?. jtra: ???. tobias: back in 11hours
ok he'll need some time to read things
28 08:20 <dave> I guess its me an you
yer in the eastern tz ?
no, yer in germany :-)
28 08:20 <gus> Yeah, trying to catch up
28 08:20 <dave> some place I never heard of
28 08:20 <gus> I got CVS
28 08:20 <batsman> ncheels: lol
28 08:20 <gus> I am looking at it and the path strategy
28 08:20 <batsman> ok
I can merge aleksi_'s work in the main branch
28 08:21 <dave> batsman: how do you have aleksi_'s work?
28 08:21 <batsman> modify some things so that tests run out of the box
28 08:21 <dave> gus: png versions of the maps can be found at http://snowplow.org/martin/trkpngs/
kl
k
28 08:22 <batsman> heeeem, isn't it in aleksi_first_idea.rb??
we're in quite a bad position otherwise
we cannot wait for him to come back in 11H to merge in
28 08:23 <tobias> yes its in there
28 08:23 <batsman> ok
tobias: I see you're still here, but cannot code at the moment or what? you said you'd be back in 11H
28 08:24 <tobias> my kid wakes up anytime, i have to leave then
28 08:24 <dave> here's how I see the path solution, use simple A* to find the shortest path, and then use the car movement model to calculate the required moves for each time step
28 08:24 <batsman> ok
so if I got it right
28 08:24 <tobias> what about the walls
28 08:24 <batsman> it first gets the path
then steers the car to follow it
but that doesn't take into account the speed, does it?
28 08:25 <dave> tobias: the A* won't go over the walls, they are impassible
28 08:25 <batsman> it's better to have a longer path _if_ it allows greater speed
28 08:26 <tobias> yes, but do we have to change the cell values to avoid wall crashes
28 08:26 <dave> no it doesnt take into account speed, we will figure out how to attain top possible speed at every given step
28 08:26 <batsman> but then
this complicates the thing a lot
as the shortest path in distance
is not the sortest in time...
28 08:26 <dave> true
28 08:26 <tobias> correct
28 08:26 <dave> but it should be the next easiest milestone
28 08:27 <batsman> however, the winning criteria are
1) number of tracks solved
2) time
3) solving rally circuit
4) time for rally
28 08:27 <tobias> 3) is a completely different problem,
28 08:27 <batsman> in 1 and 3, "solve" means complete the track w/o running on the walls
28 08:27 <tobias> mor, rather, a superset
28 08:28 <dave> yep
28 08:28 <batsman> so we have to be *absolutely* sure we won't hit them
28 08:28 <tobias> yes
28 08:28 <batsman> even some lame path will be better than a bad one
28 08:29 <tobias> yes if you go from time frame to time frame only, you might end up at some point where you annot avoid a crash
28 08:29 <batsman> so ncheels' navigator.rb is a good fall-back if the "optimum" thing doesn't work
28 08:29 <dave> I guess we also use some sort of heuristic, where we balance between trying to attain top speed while keeping minimum distance away from the optimal path
I mean shortest path
the main tracks have no skidding, should be much easier to make sure we dont hit the wall
28 08:31 <dave> tobias: we won't go step to step, without knowing that we can not crash
plus we dont have to do a command performance, we won't send them results that have our car crashing
that'd be dumb :-)
28 08:32 <batsman> ok
28 08:32 <dave> in case anyone is wonder, ncheels == NC Tar Heels :-)
brb
gotta try to get a thrid IP from my ISP
28 08:32 <batsman> what about doing some lame paths by hand?
28 08:33 <tobias> perhaps some human-aided path search
28 08:40 <dave> I am getting a bit tired ...
28 08:41 <batsman> well well
then I'll be the only one active (w/ gus perhaps) for a while
28 08:41 <gus> Does anybody have a tool to generate png or else from tracks
28 08:41 <batsman> yes!!
28 08:41 <gus> Beside the website
28 08:41 <dave> its in cvs
28 08:41 <gus> Oops
28 08:41 <dave> it generates xpm
28 08:41 <gus> Haven't look in great details yet
28 08:42 <dave> whats wrong with the website?
28 08:42 <batsman> in the website
is does tracks FROM png
in the cvs
we do XPM FROM tracks
28 08:42 <gus> Cool
28 08:43 <batsman> we can use our tool to take a look at the tracks
then make paths by hand
28 08:43 <tobias> nice tracks, really
28 08:43 <gus> I am not convinced following the shortest path will be any fast solution
28 08:43 <dave> http://snowplow.org/martin/trkpngs/
28 08:43 <batsman> and submit those if needed
28 08:43 <dave> gus: I agree
but its prob an easy milestone to get to
28 08:44 <tobias> yes. maybe try to find paths with long straights
28 08:44 <batsman> gus: we all agree, but this is a good fall-back alg.
28 08:44 <gus> Have you looked at a "smart" brut force solution.
Meaning, we look at the tree of possible move
And try to be "smart" in eliminating bad solution
to keep it of reasonable size
28 08:45 <tobias> wish you a good time folks, have to disconnect now. will be back approx. 19:00 GMT
28 08:45 <gus> I choose the best paths found
out of the bunch we looked at
28 08:46 <batsman> http://snowplow.org/martin/trkpngs/7_Gothenburg.png is a nightmare!!!
28 08:46 <gus> Obiously we could weed out everything that's stop
Find a way to say: getting closer to finish line
And weed out solution which go the other way
28 08:47 <batsman> tracks 7, 8 and 9 are crazy!
28 08:47 <gus> Any thoughts?
28 08:47 <dave> well ony many of the tracks you have to go the other way
batsman: yes crazy tracks
28 08:48 <batsman> if we solve them, by hand or otherwise, we have chances :)
28 08:49 <dave> I have a question:
28 08:49 <gus> Well, if you take the shortest path as a reference path
Give it a direction
28 08:49 <dave> is the "time" taken to finish a ttack, the number of steps you take
28 08:50 <batsman> I believe so
what else???
certainly not computation time
28 08:50 <gus> The projection of your position on this line must always increase
Otherwise, weed
28 08:51 <batsman> ummm, so projecting into that line and taking only positive increments
seems nice
28 08:52 <dave> what do you mean by projection?
vector projection?
28 08:52 <batsman> kinda
what about the following:
make the shortest path
each point on that line
28 08:53 <gus> Yes, vector projection
28 08:53 <dave> I remmeber reading some stuff for game theory, like chess, where you have too many positions to possibly calculate all possible series of moves
28 08:53 <batsman> has got a coordinate in that curvilinear ref. system
then from a given car pos.
28 08:53 <gus> That is why you have to weed your tree in a "smart" way
28 08:53 <dave> so what you have to do is use heuristiscs to trim the branches,
28 08:53 <batsman> we find the point the the highest coordinate
28 08:54 <dave> I guess thats what we're all talking about
28 08:54 <batsman> that can be reached from the current position going straight
and aim for it
28 08:54 <dave> what do you mean highest?
28 08:54 <batsman> this means doing some kind of ray casting
umm, start of the path == coordinate 0
end == coordinate 1
points in the middle: between 0 and 1
for each point in the path
see if it's reachable from the current car position, in a straight line
28 08:55 <gus> path == shortest path
28 08:55 <batsman> select the one with the highest coordinate and aim for it
28 08:55 <gus> Or the path we follow at this time
28 08:56 <batsman> repeat
path = shortest path
what do you think?
28 08:56 <dave> I think these ideas need to be expressed on a non-irc medium ...
28 08:56 <gus> That means you stick to the shortest path
28 08:56 <batsman> where?
in the wiki?
28 08:56 <dave> ok
:-)
28 08:57 <gus> You might not even be able to follow the shortest path
28 08:57 <dave> sure, the shortest path can be followed
28 08:57 <batsman> gus: mostly
28 08:57 <dave> it wouldn't be a path if you couldn't follow it
SP belongs to the set of all possible paths
28 08:57 <gus> No, because you have inertia
28 08:57 <batsman> but it indicates what to do if your actual path is not the shortest path
28 08:58 <gus> If the SP makes a sharp angle
28 08:58 <dave> I am talking driving paths, not physical coordinate paths
28 08:58 <gus> You cannot follow that with your car
28 08:58 <batsman> you're of course right
28 08:58 <gus> Unless you manage to stop at this point
And even then, I don't think you can change direction without moving
Can you?
28 08:59 <batsman> I think you can
the simulator does
28 08:59 <dave> you can "l" which is roll and turn left
or "r" for right
28 08:59 <gus> OK
28 08:59 <dave> but you will still go forward some
28 08:59 <batsman> if("turn left") d -= div(T, v*v + L)
yes you move
_but_ you can turn without moving, too
28 09:00 <dave> batsman: I dont think so
not unless you were already going slow enough that the frictions caused you to stop
in which case your d may changed, but your x and y wont
28 09:01 <batsman> ?
28 09:01 <dave> you have to have v>0 in order to turn, I think ?
28 09:01 <batsman> what I mean is that even if v = 0, d can change
?? reading the simulator model, it seems you can turn w/o moving
28 09:02 <dave> yes
yes d can change but very fractionally
28 09:02 <batsman> you can do l. and r., and the model will update d even if v = 0
28 09:02 <dave> 64/20000
28 09:03 <gus> True, you can turn without moving
28 09:03 <batsman> emmm
28 09:03 <dave> which is a huge time waster, we shouldn't be going so fast uncontrllably in the first place
28 09:03 <gus> But I doubt an optimal solution would
28 09:03 <batsman> that rate of change in d
is actually the highest possible one, isn't it?
if v > 0, d will change even less
28 09:04 <gus> Yes, I believe so
28 09:04 <dave> haha, yep
28 09:05 <gus> Do you already have an alg to get the SP
In drawable sens
?
28 09:06 <dave> in drawable sense?
28 09:06 <gus> Or implementation?
28 09:06 <dave> A* ?
28 09:06 <batsman> does navigator.rb do that?
28 09:06 <gus> What is A*
28 09:06 <batsman> the code seems too neat and nice :-)
28 09:06 <gus> ?
28 09:06 <dave> navigator.rb find the first possible path, could be anything :-)
28 09:06 <batsman> ok
28 09:06 <dave> http://www.ccg.leeds.ac.uk/james/aStar
if you can do applets, that will be your visual
28 09:08 <batsman> it's like dynamic programming, isn't it??
28 09:08 <dave> yes
28 09:09 <gus> Do we have a ruby implementation of A*?
28 09:10 <dave> someone was saying there was one from last years icfp contest
28 09:10 <batsman> I'm looking for last year's code
it should have an A* implementation
as they had to find the optimum path for robots
w/o running into the water
if we can steal it, we win precious time
28 09:11 <gus> Yep!
But we don't even need it in ruby
But it would be nice :)
28 09:13 <batsman> if we have to hack it, it's better if lang == ruby
28 09:13 <gus> Agreed
But if we can steal it
It can be anything
28 09:13 <dave> http://www.gameai.com/software.html
28 09:13 <gus> As long as we can interface with it nicely
28 09:14 <dave> it was in the irc logs
so I sent it
the thing with A* is will need to consider the possible positions of trying each one of the 7 moves, rather than each one of the adjacent squares
28 09:15 <dave> which means that its possible to get to a certain physical location on the race track, from two different but possibly equally valuable paths
normal A* if you get to a position, you look at all the other ways to that position, and discount the all but the one with the smallest value
in this case, a big value at internal position X could give better results than a path that took lesser time to get to internal position X
28 09:18 <batsman> yes, that's quite more complicated because of the state (velocity = speed + direction)
28 09:18 <gus> I am going back to my brut force solution
28 09:19 <dave> I think to find the absolute fastest path, you would need to remove the dynamic portion of A* an instead check every possible path
28 09:19 <gus> We use the A* track a general direction
28 09:19 <batsman> ok
we can do the following:
define a common format to specify a path
and then everyone tries his one algo. if he wants
28 09:19 <dave> format == trace
the same trace we need to submit
28 09:20 <batsman> then we can run them all and take the fastest
28 09:20 <gus> Sounds great!
28 09:20 <batsman> you're right, we feed that to the simulator and check everything
28 09:21 <gus> Who is tackling A* implementation?
28 09:21 <batsman> ncheels
28 09:21 <dave> I guess
...
28 09:21 <gus> You got volonteered :)
28 09:22 <dave> yep
28 09:23 <batsman> I'm back in 10 minutes
28 09:23 <dave> k
28 09:24 <gus> I look at my solution, given that we already have the SP.
28 09:24 <dave> k
28 09:30 <tobias> i managed to look at the two fixedpoint implementations. they both have bugs. batsman, are you working on unify them?
bugs are in constructor, in - , have not looked further
28 09:32 <batsman> hi again
tobias: summary of activity
we've been discussing on the path finding algo
28 09:33 <tobias> ok
28 09:33 <batsman> ncheels is working on his A* alg.
gus is going his own way
it's ok as we all use the same trace format
so several algos can be developped concurrently
28 09:34 <tobias> ok
28 09:34 <batsman> I'm now going to take a shower, I'm back in 10 minutes ready for deep hack mode
28 09:34 <tobias> but we need the arithmetics fixed
28 09:34 <batsman> I'll try to clean the code base and unify aleksi_'s work
yes!!!
28 09:34 <tobias> very good
28 09:34 <batsman> we have to merge FixedPoint into FPN
28 09:34 <dave> I am gonna have to sleep RSN
28 09:35 <batsman> change some more things
etc
ok
28 09:35 <tobias> i'll try implement unit tests against FPN
28 09:35 <batsman> ummm
tobias, you can reuse most of the tests for FixedPoint
28 09:35 <tobias> yes
28 09:35 <batsman> just s/FixedPoint/FPN/g
28 09:35 <tobias> i'll add some to show the current bugs
28 09:35 <batsman> great
you can put that in test/
say, test/test_fpn.rb
28 09:36 <tobias> ok, i'll add it there
28 09:36 <batsman> good
28 09:36 <tobias> have a nice shower
28 09:36 <batsman> in 10mins, I'm going to merge aleksi's code w/ the main branch
cu
have a nice sleep, ncheels
28 09:37 <dave> thanks
28 09:37 <batsman> (back in 10 mins)
28 09:37 <gus> Has anybody worked on car.rb implementation?
28 09:37 <dave> no
28 09:38 <gus> I'll work on it
Baby is crying
!!
I'll be back
28 09:45 <batsman> ok, I'm back
28 09:46 <gus> I am working on car.rb
28 09:47 <dave> I am still going, still thinking
;-)
its a tough problem
28 09:49 <dave> crap, its almost 10h
28 09:51 <batsman> yes, we've been discussing a lot for the last 3H, but little code has been done :P
well, I'm merging things now
28 09:51 <dave> I knwo, little code
28 10:01 <dave> nap time
28 10:01 <tobias> have a good sleep
28 10:01 <dave> I will put the recent irc logs at ...
someone wanna start recording?
28 10:01 <tobias> me can't
28 10:02 <batsman> ummm, if you tell me how to do that in Xchat :-P
28 10:02 <tobias> batsman is showering?
28 10:02 <batsman> I'm no IRCer
28 10:02 <dave> settings > preferences
28 10:02 <tobias> batsman: I've checked in test/test_fpn.rb
28 10:02 <dave> chatting > logging
28 10:02 <batsman> good
ok, done
28 10:03 <tobias> the first three tests show the current bugs
28 10:03 <dave> batsman: yer logging now?
28 10:03 <batsman> actually I enable logging some time ago, I forgot :P
where do the logs go?
$HOME?
28 10:03 <dave> .xchat/xchatlogs
28 10:03 <batsman> ok
I've been logging since Jun 28 08:28:07 (local time zone)
28 10:04 <tobias> the rest are converted from fixed_point_test.rb
28 10:04 <batsman> that's GMT 06:28
ok
28 10:05 <tobias> some of these fail on the "units.rb" implementation -- have not looked further
till evening, then
28 10:06 <batsman> ok ncheels, have a nice sleep
28 10:07 <dave> batsman: thanks, my logs are at http://cherryville.org/rubyicfp-jun27-04:11:11-10:04:43.log
28 10:08 <batsman> till later
28 10:08 <dave> I'll prob sleep for 3-4h
we'll see
28 10:38 <batsman> anybody there? gus??
ok, seems I am alone :) For the record, I cvs ci some changes in unit tests and overall reorganization of code
28 10:41 <gus> I am still here
I'll update your change
28 10:41 <batsman> ok
28 10:41 <gus> I wrote on my side car.rb
But there is not much beside getting the next pos given a command
28 10:42 <batsman> wait a sec
that's what model/simulator.rb does, isn't it???
model/simulator.rb is just aleksi's code
28 10:42 <gus> Dunno
28 10:43 <batsman> simulator takes the current pos & speed, and simulates one time step
using the eqs. in page 3
28 10:43 <gus> I don't have model/simulator.rb!!!
Is it in CVS?
28 10:44 <batsman> yes
right now
I just moved the code from aleksi's to model/
as I told you :P
28 10:46 <gus> OK, does what I did
What's the purppose of car.rb then?
28 10:46 <batsman> dunno
I didn't create it in the first place :-P
28 10:46 <gus> I think it doesn't belong in here any more then
28 10:47 <batsman> is your implementation very different from aleksi's?
perhaps we could run both
28 10:47 <gus> No, very simular
28 10:47 <batsman> and compare results
28 10:48 <gus> Maybe it makes sens to take the step part out of the simulator and put it in car.rb
28 10:48 <batsman> do you think so?
28 10:48 <gus> We should have two cars: a non-slidding one and a sliding one
28 10:48 <batsman> simulator uses the track
as I see it
that'd be two different simulators
class RallySimulator < Simulator
and modify RallySimulator#step
28 10:49 <gus> Well, it is the same track for both standard and rally
Simulator get a track and a car
28 10:50 <batsman> yes, and???
28 10:50 <gus> And runs each step until a crash or finish line
class Car; end; class RalltyCar < Car; end
No?
28 10:51 <batsman> but as I see it, the dynamics of the simulation don't belong in the Car
but in Simulator
perhaps Car would be the thing to provide the trace commands (?)
28 10:52 <gus> I see your point
28 10:53 <batsman> umm, news from the ICFP organizers
Correction published to rally model
hi lennon
28 10:53 <gus> Hi lennon
28 10:53 <lennon> hello
don't let me interrupt
28 10:53 <gus> Good sleep?
28 10:53 <lennon> no sleep
night from hell
28 10:53 <batsman> :-?
28 10:54 <lennon> i was one of two designated drivers for a group of 15 people celebrating someone's 21st birthday
28 10:54 <batsman> !!!!
28 10:54 <gus> Ouch!
28 10:54 <lennon> and the other one went home at 12:15am
28 10:54 <gus> Is your brain functional?
28 10:54 <lennon> sure
i'm putting some coffee on
28 10:55 <gus> Or bathing in untold liquids?
28 10:55 <batsman> really? mine wouldn't be :P
28 10:55 <lennon> it's the one perk of not drinking for the whole night
28 10:55 <batsman> what time is it in your timezone?
28 10:55 <lennon> ~4am
GMT-7
28 10:55 <batsman> ouch
28 10:56 <lennon> i tend to be up for 24 hours or so at a stretch, though...
28 10:56 <gus> I woke up at 3:20 am
28 10:56 <batsman> it's 12:55 here, GMT+2 in Germany
28 10:56 <gus> :)
28 10:56 <lennon> ...the fireman's rotation, as i like to think of it
28 10:56 <batsman> we'll have people coming in around 5 hours
aleksi & ncheels are sleeping now
tobias should join by 18H GMT
28 10:57 <gus> Batsman: so the Car is the "brain" class for you?
28 10:57 <batsman> maybe
I expected somebody to give me an idea of the bigger picture
28 10:58 <lennon> i had some scratch code before i left, working on doing the basic kinetics algorithms inside a method of the Car class
28 10:58 <batsman> but as I've been for quite some time here
I guess I have to decide on my own :)
28 10:58 <lennon> but then again, i probably don't have much of an idea of the "big picture" any more
28 10:58 <batsman> have you taken a look at the current CVS?
I've been moving around some code
and messing w/ the unit tests
28 10:59 <lennon> i'm browsing it right now
looks like the cvstrac install is going to do me some good after all ;)
28 11:00 <batsman> it's a nice thing, thanks
28 11:00 <gus> I don't have the big picture either
28 11:00 <batsman> BTW
28 11:00 <lennon> well, i still need to post the IRC logs from the first few hours of discussion
28 11:00 <batsman> we're all using ncheels login/pw with CVS :-)
28 11:00 <lennon> i was just about to ask about that
28 11:01 <gus> I sent an email to you earlier today
28 11:01 <batsman> you have some logs at http://cherryville.org/rubyicfp-jun27-04:11:11-10:04:43.log
28 11:01 <gus> 12:00am GMT-4
28 11:01 <lennon> hmm...
that's not from me
28 11:01 <batsman> I sent mine at 7am GMT+2 (05::05 GMT)
28 11:01 <lennon> i've got the first four hours
28 11:01 <batsman> I know, it's ncheels'
28 11:02 <lennon> which should have some of the "big picture", if anyone's still missing pieces
28 11:02 <gus> IRC logs are painful to parse
28 11:02 <lennon> i was going to do raw text for now
28 11:02 <batsman> as I see it
the architects of the "big picture" are mostly gone now (all of them but you, lennon)
28 11:03 <lennon> but maybe after my brain stops working so well, but before the caffeine wears off, i'll see if i can't hack up a regexp parser for my logs, at least
28 11:03 <batsman> and I don't know how precise their idea was...
28 11:03 <lennon> well, i suppose it's good that i'm back, then ;)
from what i saw, nothing was too precise
they were looking at using a modified A* algorithm for path finding,
28 11:04 <batsman> we shouldn't then worry too much about looking for things in the IRC logs
28 11:04 <lennon> and spent a lot of time doing fixed point math implementation
28 11:04 <batsman> ok
28 11:04 <daniel> Entirely too much time. *sigh*
28 11:04 <batsman> by now we have a mostly working FPN
but it still fails some unit tests (which are more comprehensive now)
we have a simulator
28 11:05 <gus> Are you finishing the clean up of FPN?
28 11:05 <lennon> gus: may i presume you're guillaume?
28 11:05 <gus> Yes
28 11:05 <lennon> who emailed earlier?
ok
28 11:05 <batsman> gus: actually, it was essentially the same as aleksi's
28 11:05 <lennon> i'm setting up your cvs account now
28 11:05 <batsman> could you set up mine, too? :-)
28 11:05 <lennon> you're next
28 11:05 <batsman> thanks
28 11:05 <lennon> did you email me, too?
28 11:06 <batsman> yes, I'm batsman DOT geo AT yahoo DOT com
28 11:06 <lennon> tell you what: anyone who wants an account, please send me a private message with your email address, desired username, and initial account password
that way i don't have to parse through the last 7 hours work of email to find who gets what
28 11:07 <batsman> ok
doing it
28 11:08 <daniel> So who's fixing FPN?
I'm just saying that I'll start doing it if no one else is.
28 11:08 <batsman> of
28 11:08 <lennon> is that a critical issue right now?
28 11:08 <batsman> ok by me
28 11:08 <gus> That's your EMail, right? ['lennon', ['com', 'day-reynolds'].reverse.join('.')].join('@')
28 11:08 <lennon> yup, that's me, the anti-spam-paranoia-guy
of course, the next day, i went and registered for the yahoo group, so it seems kind of silly to go to that much effort
28 11:09 <batsman> should we have some CVS commit policies?
such as "commit as soon as you have a functional unit test for it"
or "as soon as the corresponding unit test has no errors, only failures"
28 11:11 <lennon> by "functional", do you mean complete interface coverage?
or just an initial useful bit of code?
28 11:11 <batsman> initial is OK, I guess
commit early, commit often
so people can get code as fast as possible
daniel: you're working on FPN, right??
28 11:12 <gus> I am going to start a brute force approach
I'll create a new directory in CVS
28 11:12 <batsman> daniel: there's quite a few cases that fail
name?
28 11:13 <lennon> batsman: your account is active
28 11:13 <batsman> thanks
28 11:13 <lennon> gus: i just got your email, so it'll be about 60 seconds
28 11:13 <daniel> I am, and I've gotten the cases down to 4 fails.
28 11:13 <batsman> good
be sure to ci ASAP :)
28 11:13 <gus> force?
I'll rely an A*, that ncheels is suppose to right
28 11:14 <batsman> mmmm, have you read navigate.rb?
s/navigate/navigator/
28 11:14 <gus> Actually, no!
28 11:14 <lennon> gus: your account is up, too
28 11:14 <gus> Thanks
28 11:15 <lennon> what's this i see:
linked lists?
has someone been reading "Teach Yourself Scheme in Fixnum Days" lately?
28 11:16 <batsman> that's ncheels algo
28 11:16 <daniel> * daniel has.
28 11:16 <batsman> cause??? does it have a working A*?
28 11:17 <daniel> However, I'm not responsible for ncheels's stuff.
28 11:17 <lennon> does anyone know if he had a reason for using cons cells, instead of arrays?
28 11:17 <daniel> Okay, three tests fail now. Could someone more familiar with the intricacies of Raise tell my why test_subtract_nil still fails?
28 11:18 <batsman> I'll check it
28 11:18 <gus> I thought we still didn't have a A* implementation yet
I am not sure of what navigate.rb does yet
28 11:19 <lennon> it looks like basically a path-finding package
with support classes
28 11:19 <batsman> it's not A*, just something that creates one valid path
28 11:19 <lennon> right now, it's just doing a naive pass
28 11:19 <batsman> not the optimum, or anything, if I got it right
28 11:19 <lennon> not even close to optimum
it might find solutions to some of the courses in bounded time
28 11:22 <lennon> if i'm reading it correctly, of course
and the coffee's still brewing, so no promises ;)
28 11:22 <gus> The "force" I am looking at
follows roughly the A* path
and try to get the 'fastest' path
without blowing up the stack!
28 11:23 <batsman> :)
that makes me think of another thing
who's going to run the program to create the traces?
the most time spent on that, the better
28 11:24 <gus> If we all the tools, we can share the load
28 11:24 <batsman> my main machine is a K7 at 1.7GHz, 512MB RAM
28 11:24 <lennon> i've got an 800mhz g4, and a 500mhz PIII -- nothing too speedy
28 11:24 <gus> G4 533 128Mb
If I cheat, I can get a double Xeon 2Ghz
Just don't tell my boss!
28 11:25 <lennon> do you mean at the end, when it's all finished?
28 11:25 <batsman> I can moreover get access to a dual Pentium Pro at 700Mhz,
yes
but hopefully
we should be able to submit something today
even if it's only brute force
28 11:25 <lennon> hell, i'll go scrounge up CPU cycles at my gf's college iMac lab, if we need 'em
28 11:26 <batsman> they accept several entries if they're different enough
and the final algo. should differ quite a lot from brute force
28 11:26 <lennon> anyone know off the top of their head if A* parellelizes well?
28 11:26 <batsman> no idea
but anyway, Ruby has green threads
28 11:27 <gus> No clue
28 11:27 <lennon> ok, i'll wait until dave or jim are back online
i don't mean an smp box -- i mean an ad-hoc cluster
should be about ten lines with drb, right? ;)
28 11:27 <batsman> :-)
but the bandwidth requirements would be pretty high
and drb isn't the fastest thing on earth...
28 11:28 <lennon> that's why i suggested the college computer lab -- they've got like 40 new g4 imacs on 100mbit ethernet,
almost no users in the summer,
and i know some it folks there
anyway, just a late-night /.'ers fantasy :)
28 11:32 <daniel> Ok, FPN is fixed and passes all tests except for throwing the wrong kind of exception with FPN.new(5) / nil
28 11:34 <batsman> ? I've just cvs update'd and FPN passes for me
28 11:35 <lennon> has anyone done a rough benchmark to compare the FPN code to Float?
28 11:35 <daniel> batsman: it may be an issue with my version of ruby then.
28 11:35 <batsman> well, I have changed the following
< assert_raises(Exception, "Subtracting nil is implemented"){
---
> assert_raises(RuntimeError, "Subtracting nil is implemented"){
could it be?
28 11:36 <daniel> Oh. Probably.
28 11:36 <batsman> but it's not FPN.new(5) / nil
it's FPN.new(1,1) - nil
28 11:36 <daniel> Right.
28 11:36 <batsman> :P
ok
then I ci it
28 11:37 <daniel> I'd originally implemented that because I thought that's how ruby might call unary negation.
28 11:38 <batsman> I see, it turns out it's -@, but I didn't know that before reading units.rb :)
28 11:38 <lennon> ok, i'm looking over some of the changes to the Track model implementation, and think i see a couple of bugs...
28 11:38 <batsman> FYI, I'm implementing the following policy on cvs ci: commit on every change, no matter how small, if it doesn't break things and won't normally affect people
28 11:39 <lennon> i think i can fix the test cases
at least
28 11:39 <batsman> nice
gonna rest for some time (I've been here around 5H30 now), need some food
I'll read on AI in the mean time, and track changes in CVS
28 11:39 <lennon> alright
thanks for the updates
28 11:40 <batsman> wish I could have done more
but I'm definitely gonna be more helpful after lunch
28 11:40 <daniel> Who owns the simulator code?
I just want to go ahead and add a "set_state" function
28 11:41 <batsman> it's aleksi's
28 11:41 <daniel> Well, since he's not here... ;)
28 11:41 <batsman> but you can safely play w/ it, he's sleeping now, and we have taken it from his file when merging anyway
28 11:41 <lennon> but dave did the last two commits
28 11:41 <batsman> hehe
dave is me
28 11:41 <lennon> not that you shouldn't do anything
28 11:41 <batsman> before I had the account
:-)
28 11:41 <lennon> right
okay, i'll just stop trying to trace who did what
and concentrate on what happened overall
28 11:42 <batsman> hehe, I think dave's entries in the CVS log after 3:00 are mine
28 11:42 <lennon> gotcha
28 11:42 <batsman> so you can safely work on these things, he's sleeping now
28 11:43 <lennon> or, i should work on them quickly, before he wakes up?
* lennon winks
28 11:44 <batsman> last thing he said...
he'd be back by 14H GMT
after sleeping for 3 or 4 hours
so you still have at least a couple hours to play
28 11:45 <mneumann> hi
28 11:45 <batsman> hi
28 11:46 <lennon> hello
28 11:47 <mneumann> are there any tasks?
28 11:47 <batsman> at the moment
we're facing the thoughest question
what to do next :-)
28 11:48 <lennon> i'm poking around in the track and trace code,
looking for testcase cleanups and quick optimizations
28 11:48 <batsman> mneumann: is it your first time here, or did you log in before 7H GMT+2
28 11:48 <gus> I have started my brute force search
28 11:49 <daniel> Could I be selfish batsman and ask you to implement the necessary structure for http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=PathStrategies ?
28 11:49 <batsman> ok
I'll read it while I have lunch
28 11:49 <mneumann> no my first time, and I can't stay very long online, as my gateway was destroyed by a blizz last Monday :(
28 11:49 <batsman> and try to write stuff in a while
28 11:49 <daniel> Actually, the code there isn't quite right - it doesn't account for the fact that the finish line must be entered from the left
28 11:49 <batsman> ok neumann, I guess you need some help them
we have a (mostly) working fixed point impl.
code to load the tracks
a simulator (uses equations on page 3)
28 11:51 <batsman> then we have navigator.rb
which finds one path
and gus working on a brute-force approach
28 11:52 <daniel> Hey! FPN _is_ working now.
28 11:53 <batsman> nice :)
daniel: I'm still thinking on PathStrategies
28 11:53 <mneumann> isn't brute force too slow?
28 11:54 <batsman> daniel: actually reading :-P
well, it's not complete brute force
it's brute force
trying to get close to the shortest path (SP)
computed using the A* alg.
so it doesn't explore all possibilities
but only those that get close to the SP
however
take into account that the SP might not be the fastest!!!
28 11:55 <lennon> one thing i brought up shortly after the problem was released was exactly that
i was talking with my roommate, who used to be a driving instructor,
and we sort of hashed out some informal heuristics that car drivers use to make fast laps
28 11:56 <batsman> :-)
28 11:56 <lennon> in fact SP will *not* be the fastest path for many cases
28 11:56 <batsman> agree, especially in rally mode!!
28 11:57 <lennon> that's one thing i wasn't totally sure about when i read the spec earlier:
is there no possibility of skidding in the standard simulation?
28 11:57 <batsman> AFAIK no
28 11:58 <lennon> in that case...maybe SP is the way to go, for those races at least
nevermind
it's not that simple
since the turning rate is limited,
you can't just take the shortest path at maximum speed
you have to slow down to make the tight curves
even without skidding, your speed has to be controlled
right?
28 11:59 <batsman> IMHO yes
28 11:59 <daniel> Right. This makes judging the "best" possible tracks tricky
28 11:59 <lennon> so the curves the car follows *should* be more like the ones race drivers use
which are weird, non-symmetrical curves
28 12:00 <batsman> yes, but how do you program that?? :)
28 12:00 <daniel> * daniel would settle at this point for /any/ solution to each of the tracks.
28 12:01 <lennon> a naive solution should be pretty easy: just look one curve ahead at a time,
28 12:01 <mneumann> i've not invested many thoughts into the problem, but might some kind of optimization technique,
28 12:01 <lennon> and make sure your speed isn't higher than the maximum to make it exactly centered in the course
28 12:01 <batsman> I thought of some kind of dynamic programming
28 12:01 <mneumann> random, treshold or something similar, help to find the way (similar to solve TSP).
28 12:01 <gus> I am working on a solution that follow SP from afa
afar
28 12:01 <daniel> mneumann: yes.
28 12:01 <gus> It does brute force as it looks at all the possible next step
28 12:02 <daniel> That is, that's pretty much what I had in http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=PathStrategies
28 12:02 <lennon> SP is certainly one approximation to start from
28 12:02 <gus> But it keeps only the on that progress along the SP
28 12:02 <mneumann> daniel: is there an implementation for this already
28 12:03 <batsman> afaik no
28 12:03 <daniel> Well, no.
That's the problem.
28 12:03 <mneumann> is there cvsweb anywhere
28 12:04 <daniel> I'm working on getting the grid I wanted up.
28 12:04 <batsman> there's cvs, isn't it good enough?
28 12:04 <daniel> http://www.urusai.org/cgi-bin/cvs/icfp/index
28 12:04 <mneumann> hmm, only windows here, but should work
28 12:04 <lennon> you beat me to it, daniel
28 12:05 <batsman> my eyes are hurting now, been stuck for 7H+ in front of my CRT
28 12:05 <lennon> mneumann: if you send me your email address, desired login name, and initial password, i can set up a cvs and wiki account for you
batsman: go eat, and rest, and think
we (for some value of 'we') will be here when you get back
28 12:06 <batsman> I'm resting for a while now (didn't before) and I'll come back w/ renovated energy for making support code for PathStrategies or whatever
28 12:06 <lennon> on second thought, don't think
;)
28 12:06 <batsman> oooh, thinking should be ok, the problem's my eyes
28 12:07 <mneumann> lennon: uu9r@stud.uni-karlsruhe.de, login: mneumann (can you create simple password and send me?)
28 12:07 <lennon> mneumann: just a sec
28 12:08 <mneumann> btw, do we have problems with performance?
28 12:08 <lennon> we'd have to be able to run something, first ;)
28 12:09 <mneumann> ok :-)
should have a look at the sources, first
28 12:09 <lennon> there's plenty of areas to work on, if you get to feeling inspired
and the SP algo will need a fair bit of work, i think...
...it's using cons cells, implemented as class instances with 'head' and 'tail' attributes, after all
28 12:10 <mneumann> great, looking forward to hack something up ;-)
28 12:11 <lennon> mneumann: is you irc client showing any private connection request? i want to send your password...
nevermind, i'll just email it
28 12:15 <lennon> ok, quick:
103.chr => 'g'
'g'.??? => 103
anyone?
28 12:16 <mneumann> [0]
'g' is a String, not a character
28 12:17 <lennon> duh
28 12:17 <mneumann> :-)
28 12:17 <lennon> * lennon smacks forehead
that's what i get for thinking in C while writing Ruby
28 12:18 <gus> Is anybody working on FPN?
28 12:18 <lennon> nope
i'm not sure that it's a critical thing to worry about right now
28 12:18 <dave> man on man
28 12:18 <lennon> then again, i was all for just using floats for the first 24 hours
28 12:19 <gus> Just need extra functionality
floor
ceil
28 12:19 <dave> 2h sleep, sorta
28 12:19 <gus> Hi
28 12:19 <lennon> ncheels: better than me
28 12:19 <gus> Feel better?
28 12:20 <daniel> * daniel notes that floor with fpn can be done as: def floor { @fp >> 16 }
28 12:20 <dave> gus: probably worse :-)
28 12:20 <mneumann> lennon: CVS "mneumann: no such user"
28 12:20 <dave> my history doesn't scroll back far enough, anybody wanna give an over view
28 12:20 <gus> Work is good for you :)
28 12:21 <dave> lennon: I gave 2 people my user/pass since you weren't around'
28 12:21 <lennon> ncheels: i heard...
ncheels: they have accounts now
mneumann: sorry, forgot to submit the account creation form
should work now
28 12:22 <mneumann> yes it does
28 12:22 <gus> daniel, what does def floor { @fp >> 16 } mean?
28 12:23 <mneumann> I get some food, will be back in 1h
28 12:24 <daniel> * daniel was saying that's how to add floor to the class FPN
28 12:24 <dave> whats the current state, anybody have any questions, suggestions, directions for me?
28 12:24 <lennon> ncheels: i was actually wondering about a couple of things in 'navigator.rb'
28 12:25 <dave> dont waste the mental energy on it :-)
28 12:25 <lennon> ok
28 12:25 <dave> but fire away if you want
28 12:25 <lennon> i was kind of worried when i saw the 'LinkedList' class
28 12:25 <dave> looking back in the logs
28 12:25 <gus> Hold on, this is not proper ruby syntax!
Did some crapy html creeped in?
28 12:25 <lennon> sorry, brb...gotta go nicotinate my brain
28 12:26 <daniel> gus: just do a cvs update of units.rb - I added floor
28 12:26 <batsman> I'm gonna visit a friend of mine
28 12:26 <gus> Thanks
What about ceil?
Or am I too demanding?
28 12:27 <dave> lennon: each time I try a new direction, I didn't want to create copies of the trace array, so instead I used a linked list structure
28 12:27 <daniel> * daniel leaves it as an exercise for the reader
28 12:28 <dave> but that navigator should be gabage anyway
28 12:28 <batsman> ... who happens to be a mathematician
he should be able to tell me a couple things about optimization theory
and I might get some books on this, but not sure
28 12:28 <dave> batsman: ok
28 12:28 <lennon> i should call up my old employers...some of them did real slick scheduling and resource allocation work
28 12:28 <batsman> it's a nice way to rest, get some fresh air and info at the same time
I'll be back in a while.
28 12:29 <dave> so who all is active, and active on what?
28 12:30 <daniel> * daniel is trying to get the number grid he imagined in http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=PathStrategies working
And trying not to break units.rb along the way...
28 12:30 <lennon> ncheels: i've mostly been doing admin stuff on the cvstrac box, with some minor cleanups to the Track class
had a brain cramp earlier on chars-vs-strings-vs-ints in the lookup and comparison methods, which is mostly fixed now
more signs of the evil Python contagion not being fully cleared from my brain
in Python, array-accessing a string gets you a single-character string back, not an int
28 12:32 <dave> hehe
28 12:32 <lennon> so "foo"[0] == "f" works
28 12:32 <dave> oh
28 12:33 <lennon> so, stepping back a bit from the minutae...
is there a naive algorithm less code and processing-intensive than SP that we can use for the 24 hour deadline?
28 12:33 <dave> I have an strategy for driving on the first 5 or 6 tracks, I wanna run it by who ever is listening and see what people think
28 12:33 <lennon> shoot
28 12:34 <dave> SP ?
28 12:34 <lennon> shortest path
28 12:34 <dave> ok, I am gonna shot
for the tradition tracks (1-5 at least)
28 12:35 <daniel> Hey - how do you get irb to re-read a file?
28 12:35 <dave> picture the race track in the small
daniel: load?
race track is small enough for someone with long arms to touch both walls, but just barely
28 12:36 <daniel> d'oh. right
28 12:36 <lennon> okay, i'm picturing...
28 12:36 <dave> no for each step, picture that this person chooses the action that allows them to keep there fingers touching both walls
28 12:37 <lennon> that's kind of what i was thinking earlier
28 12:37 <dave> kinda of a line normal to the walls if I remember my terminology
28 12:37 <lennon> safest course is smack dab in the middle
also terribly inefficient, but at least it's a solution
28 12:37 <dave> now for each step there is a delta d (change in directional heading)
I wasn't think smack dab in the middle
28 12:38 <lennon> sorry
continue
28 12:38 <dave> but I was thinking we can use that delta D to ensure we don't turn more than it, cause if we do we will have to run back a bit at some point to compensate, which is like not a good thing
agree, disagree?
28 12:39 <lennon> i'm unclear on how we calculate the delta
unless you just mean the rotation
28 12:39 <dave> sorta
if you are going around the corner, your angle changes, the difference in your direction from one step to the next
28 12:41 <lennon> or, the change in direction of the course, assuming we can plot a smooth curve through it?
28 12:41 <dave> like if at one step I am facing d = 0 (completely east), but the corner is north, my next step would have a delta d in the north direction
I should say the corner turns north
28 12:41 <daniel> lennon: It seems that in Track#[] you should switch x and y
28 12:42 <lennon> daniel: i was just noticing that the last few failing tests would work if i did that, but wasn't sure if that was because the Track impl was wrong, or the tests
28 12:43 <daniel> lennon: otherwise, doing track.x_dim.times {|x| track.y.y_dim.times {|y| what(x,y)}} will blow up
* daniel thinks track's impl is wrong, because he just hit that too.
28 12:43 <lennon> daniel: okay...do you want to make the swap, or should i?
28 12:44 <dave> actually, the car might wanna turn more than delta d if they are heading into a corner wide, to make a tight turn
28 12:44 <daniel> * daniel just did.
28 12:44 <lennon> ncheels: now you're talking optimization, though
28 12:45 <dave> true
but if you want lightning, it could be simplified into stay in the middle like you said
28 12:47 <lennon> daniel: i'm commiting the same swap for the start and finish position-finding code in the initializer, as well; all the TC_Track cases pass for me now!
28 12:47 <daniel> Oh, right. I missed that one.
28 12:49 <lennon> all: one last test case cleanup -- in test_simulator, all the expected values are floats, but the simulator state is coming back as FPNs
shall i change the expected values, or just convert the simulator state?
28 12:49 <daniel> I'd prefer if you didn't revert
28 12:50 <lennon> the former is probably more correct, but the latter only requires changing one line
revert?
28 12:50 <daniel> Please don't.
28 12:50 <lennon> was that change already made once?
28 12:51 <daniel> * daniel thinks that the state should come back as FPNs. Add a "state_f" method to return floating point states
28 12:51 <lennon> in the test case, or in the simulator code?
28 12:51 <daniel> If state comes back as FPN's, then we can easily save and restore state.
28 12:51 <lennon> so, in the simulator, not the test case, right?
is anyone else sitting on uncommited changes in that file?
28 12:52 <daniel> Oh, wait... I might be.
* daniel will add state_f for you
28 12:52 <lennon> sounds good
sorry, ncheels
anyway, back to path finding (that is what the code is actually supposed to do, right? ;)
28 12:53 <dave> lennon: hopefully
do you know about the ?c syntax
I noticed you were asking about the string []-index returning a char/int
instead of testing like '.'[0] you could just do == ?.
28 12:55 <lennon> much nicer, thanks
28 12:55 <dave> just an fyi
28 12:57 <lennon> daniel: okay, so now i'm getting floats out of the simulator, but they're way outside of the delta -- like 355.0 expected, 374.99... returned
28 13:01 <lennon> it's not anything like an x, y swap, but maybe it's just a scaling issue in the simulator algorithms?
28 13:03 <daniel> lennon: I missed that last bit - my client up and died at a bad moment.
28 13:03 <lennon> daniel: i think i found the problem in the simulator
28 13:03 <daniel> Oh?
28 13:03 <lennon> it's using its own constants, which are ints
28 13:03 <mneumann> back gain
28 13:04 <daniel> Right; so it is.
28 13:04 <lennon> or at least, that's my naive guess
28 13:04 <daniel> Silly aleksi
28 13:04 <lennon> shall i just update it to use the constants module?
and see if that helps?
28 13:05 <daniel> Yeah. The easiest would probably be to change things like the "A = 24" at the top to be "A = Acceleration"
28 13:05 <lennon> sure
i'm also going to move the FPN:: module constants into constants.rb, just to make things consistent
if no one's editing units.rb, of course
28 13:07 <lennon> hmm...maybe we should start using 'cvs edit'?
28 13:07 <daniel> Nah.
28 13:07 <lennon> alright
28 13:07 <daniel> Just change stuff at will. If people need to merge stuff later, then they need to merg stuff later.
28 13:07 <lennon> anyway, i'll go make those changes real quick-like
28 13:10 <dave> sweet, I just had an idea, tho it relies on calculus I dont remember
again its for optimizing, not for simple solution
28 13:10 <lennon> that's fine
how about we start moving this discussion onto the cvstrac wiki?
28 13:11 <dave> uh ok,
28 13:11 <lennon> the IRC channel can stay open for just-in-time stuff that way
28 13:11 <dave> like editing the pathfinder page or whatever it is?
28 13:11 <lennon> and we have a (hopefully) easily-readable (and commentable) log
or make a new link from the frontpage
i'm not that worried about organizing it, just getting it written down
28 13:12 <jimm> Good morning (USA Eastern, at least). Is the URl for the Wiki http://www.urusai.org/wiki/ ?
28 13:12 <lennon> nope
http://www.urusai.org/cgi-bin/cvs/icfp/
that's the main index page, anyway
it's not a totally-open wiki
only people with active cvs accounts can edit pages
28 13:14 <jimm> Thank you.
28 13:15 <lennon> ok, nevermind...i can't move PI and its ilk out of FPN completely without creating a circular dependency between units.rb and constants.rb
sweet!
all test cases pass now!
28 13:17 <lennon> so it looks like we're actually getting some working infrastructure
28 13:19 <mneumann> who is working on the path finder?
28 13:19 <daniel> Okay, what do people think of http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=OverallStructure - it's a bit clearer than PathStrategies.
28 13:20 <dave> lennon: did you change my password for cvstrac?
28 13:28 <dave> morning jim
28 13:28 <lennon> ncheels: i don't think so
28 13:29 <dave> maybe one of the people I gave it to did
I have still been able to get cvs access
but I can't log into the cvstrac web interface
28 13:29 <lennon> ncheels: what browser are you using?
i found out last night that moz 1.3+ can't login to cvstrac, due to some weird cookie incompatibility
which is kind of a big deal for a linux-friendly open source webapp
28 13:30 <dave> lennon: yep moz 1.4
28 13:30 <lennon> that's why i'm using my roommate's powerbook w/safari for my browsing pleasure this weekend
28 13:30 <dave> s/1.4/1.3/
I have by ibook here, I was using it before I will use it again
28 13:31 <lennon> any chance you could stomach grabbing an opera freebie for the weekend?
28 13:31 <dave> which powerbook?
28 13:31 <lennon> g4 12"
:)
28 13:31 <dave> cool
28 13:32 <lennon> it belongs to the "former driving instructor", who buys all kinds of tech toys, and then doesn't use them...which is fine with me :)
i had his first-gen TiBook for almost a year
28 13:32 <dave> hehe
I need a friend like that
28 13:33 <lennon> anyway, if folks want to take a look at the comments i added to the bottom of OverallStructure, i'd appreciate it
28 13:33 <dave> I need a dual-g5 powerbook with 10.3 on it, I'll go buy it now :-)
28 13:34 <lennon> it may just be the sleep-dep talking at this point, but i think i may want to think about the model i outline there some more over the next few hours
during which time i'll be sleeping, hopefully, or at least giving my eyes and fingers a rest
28 13:34 <dave> OK
28 13:36 <batsman> hi again
back from my friend's
he's having exams
so he cannot help me
28 13:36 <lennon> that's too bad
28 13:36 <batsman> _but_
I got some info
one Taschenbuch der Mathematik
(maths handbook)
w/ info on optimization theory
28 13:37 <dave> great
28 13:37 <batsman> and I got the CD w/ HTML inside
so actually
if anybody can read German here
I can send it :)
just give me some time to skim it
and check if it's really useful
28 13:38 <dave> we're all se
set
28 13:39 <mneumann> batsman: we had optimization theory some years ago, are you looking for something special?
28 13:39 <batsman> just a quick read
I want to see if I can apply anything
28 13:42 <mneumann> I guess combining shortest path with optimizing a configuration would give quite good results
28 13:42 <batsman> I'm checking the CVS logs
it seems the most important changes while I was out were
fixes all over the place
more consistent use of FPN
and the pointgrid experiment
right?
28 13:43 <daniel> pointgrid isn't in a useable state
I'm just starting in on it.
I give it maybe a 20% chance at this point of producing something useful
28 13:45 <batsman> ok
I've had some time to think on your method
28 13:46 <dave> I have some thoughts going through my head about path solving, trying to understand them
28 13:46 <lennon> well, gentlemen, i'm noticing myself starting to "lose focus", to say the least...
...so i'm going to go sleep before i pass out at the keyboard
28 13:46 <batsman> it seems to me it's gonna be like O(n^4)
28 13:46 <lennon> expect me back in three or four hours
28 13:46 <batsman> cu
28 13:46 <daniel> lennon: I still don't understand your objection to my structure
28 13:47 <lennon> which objection?
28 13:47 <daniel> lennon: but I suppose that can wait.
Sleep.
28 13:47 <lennon> sorry
28 13:47 <dave> night
(actually morning)
28 13:47 <batsman> daniel: I think there's one flaw in the method (if I understood it)
28 13:47 <lennon> daniel: feel free to write up some more on it in the wiki, or email me
28 13:47 <daniel> okay
28 13:47 <lennon> or just ignore my rantings for now, and see what you can get into code
28 13:48 <batsman> and I believe I have the fix :-)
28 13:48 <lennon> i'll probably understand it better that way, anyway
28 13:48 <daniel> batsman: there are a few problems with what I said in PathStrategies
28 13:48 <batsman> as I see it
you need to do several passes
28 13:48 <daniel> I've put the structural bits into OverallStructure, and I think those make sense
28 13:48 <batsman> to propagate the "low distance" values
28 13:49 <daniel> Yeah, that's the current problem with pointgrid
28 13:49 <batsman> I believe it makes it around O(n^3)
28 13:49 <daniel> It's dog, /dog/ slow
28 13:49 <batsman> but I think I have one fix
28 13:49 <lennon> almost forgot one thing:
28 13:49 <batsman> that makes it O(n^2)!!!
just consider one region
and grow it in the border
28 13:50 <lennon> does someone else want admin privs on cvstrac, so that new accounts can still happen while i'm out?
28 13:50 <batsman> propagating the values
28 13:50 <daniel> * daniel hrms at batsman. I'm not quite sure how to do that.
28 13:51 <batsman> I have thought of that
you basically need to have 3 sets of points
28 13:51 <dave> lennon: I will
28 13:51 <lennon> okay, just a sec
28 13:51 <batsman> those that are inside your already scanned area
28 13:51 <dave> since I was giving out my account before
28 13:51 <batsman> those that were added on the last expansion
and those that are outside
then
on each iteration
enlarge the region by taking the points around those in the "last enlarged" set
add the previous "last enlarged" set to the "middle" set
and the newly added become the next "border set"
this makes it O(n^2)
28 13:52 <lennon> ncheels: you should have it now. in the titlebar of the main cvstrac index page, there should be a link called 'users'; go there, and there will be a new one called 'add user'
dave: from there, it's pretty self-explanator, i hope
28 13:53 <batsman> as the region is growing from the goal
28 13:53 <daniel> batsman: right.
28 13:53 <batsman> the points closer to the goal are scanned before the ones which are far away
28 13:53 <lennon> dave: ok?
28 13:53 <dave> lennon: ok thanks
28 13:53 <batsman> daniel: do you see a flaw in my logic?
28 13:53 <lennon> okay, i'm leaving for real this time
28 13:54 <dave> bye
28 13:54 <batsman> ok, cu later
28 13:54 <daniel> batsman: no, I'm just thinking of how to implement it.
28 13:54 <batsman> I have the idea
the sets are just arrays of points
we use Ruby's cheap sets aka Arrays :-)
why cannot I edit the wiki?
28 13:55 <daniel> Actually, I'm not certain we do. I think instead we use hashes.
batsman: are you logged in?
28 13:56 <batsman> I login w/ the CVS log and pw
and then have no "edit" link or anything ??
28 13:56 <dave> batsman: which browser?
28 13:56 <batsman> galeon
mozilla core
28 13:56 <dave> lennon says moz 1.3 has problems
28 13:56 <batsman> I can switch to, say, konqueror
ok, switching now
28 13:56 <dave> I couldn't log in with moz 1.3
28 13:56 <daniel> Does the top-left corner say "logged in as batsman"?
28 13:57 <batsman> no
nothing
not logged in
even after logging
28 13:57 <dave> even with konq ?
28 13:57 <batsman> I have cookies enabled
let me check qith konq
28 13:57 <daniel> Then you aren't really logged in. Is your browser automatically rejecting all cookies?
28 13:57 <batsman> they're enabled :-P
??? with konq, when logging, it sends one cookie, I accept it, and then get again "not logged in" ???
28 14:00 <daniel> Are you accessing the site as www.urusai.org and not as urusai.org ?
28 14:00 <batsman> www.urusai.org
28 14:00 <dave> batsman: lennon suggest opera ...
28 14:01 <batsman> urusai.org doesn't revolve for me
aarg, have no opera. I guess I can put it in Rubygargen's wiki
28 14:01 <daniel> And I assume that the simple trick of reloading pages after logging in also does not help, right?
28 14:01 <dave> or you could maybe grab the latest mozilla binary (1.4beta-something) see if it works
28 14:01 <batsman> just wanted to write a little bit on my idea to find the shortest path
28 14:01 <daniel> * daniel thinks it's something else - he's using a 1.2.1 mozilla just fine.
28 14:02 <dave> daniel: lennon says moz 1.3 has problems
a fresh copy of moz 1.4 should just work, I would guess
28 14:03 <batsman> I'm trying with phoenix, I think it's based on mozilla 1.2
28 14:03 <dave> k
28 14:04 <batsman> worked!!!!
28 14:04 <dave> nice
28 14:04 <gus> daniel: in OverallStructure, shouldn't we pass around something else than [x, y, v, d]?
An object slightly more clever
that can do stuff like is_finish?
is_crash?
Kinda what simulator does...
28 14:07 <batsman> ok, I'm soon adding a desc. of my idea to the wiki
28 14:07 <gus> Or make simulator compute this type of stuff based on the 4-tuple (x, y, v, d)?
28 14:18 <daniel> batsman: And I think I've implemented your idea :)
28 14:18 <batsman> nice
just when I had explained it in the Wiki :-P
guess I should have kept it for myself }:-)
28 14:19 <daniel> batsman: At least, the pointgrid experiment can finish in reasonable time now on the simple tracks. I'm going to try is one of the tougher tracks.
28 14:19 <batsman> you can have a look at http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=PathStrategies to see if we're thinking the same
you mean the pointgrid you had before, or the modified with the area growing thing?
28 14:20 <daniel> Ah... No, that's not quite what I did. Check model/pointgrid.rb
28 14:20 <batsman> ok
well, now that you can see my idea in the wiki, is your code better, or should I try to implement my idea?
28 14:22 <daniel> Hrm - actually, after a second look at your idea, that is very close to what I did.
28 14:22 <batsman> :)
yes, it's the same thing
28 14:23 <daniel> Except that I keep track only of the borderset, not both the borderset and the centerset
28 14:24 <batsman> but then you end up going back to the center, don't you?
I mean, you grow the border, but it grows in both directions,
28 14:24 <daniel> Well, first off the border only grows in one direction since we can only approach the finish from the left.
But I just keep going until I run out of border points - a point is only added to the border if I change its value.
28 14:25 <batsman> ok, makes sense
I see: if ((hisv == nil) or (hisv > myv + 1))
28 14:27 <batsman> starting growing on the negative x direction at first is really clever
28 14:28 <daniel> Well, "clever" in so far as necessary according to the rules.
28 14:28 <batsman> but it's a nice way to eliminate paths from the beginning
well
now that my idea has become obsolete (already implemented), is there anything to work on?
28 14:29 <daniel> Okay, it looks like this can finish an analysis of even track 8, which would be the least hospitable to this sort of thing.
28 14:30 <gus> batsman: a-star?
28 14:30 <batsman> umm
the problem is I'd have to read on that
as I know very little :|
28 14:30 <gus> Same here
28 14:31 <dave> a* is very complicated for this problem
I am trying to work on a solution right now
28 14:31 <batsman> is there anybody knowledgeable on this that could work on A* and leave other work to us?
28 14:31 <gus> Pointgrid gives a path
28 14:31 <dave> if a* is just blindly applied, there are too many possible interior states
batsman: I am trying to right now
28 14:31 <gus> Maybe we can work on improving that path after we have it
28 14:31 <batsman> ok, then, what do I do??
I have one idea
28 14:32 <dave> I am not really knowledgable on A* but I think I get it enough to try
28 14:32 <gus> Is the OverallStructure being implemented?
28 14:32 <dave> my solution will only work for the first 5 maps, the rest will need alternate algorithms
28 14:32 <batsman> why? too much time?
28 14:33 <dave> but I hope it would give really optimal results
28 14:33 <batsman> it gets the shortest path
but there's still a long way to having the car drive along it
28 14:33 <dave> because the first 5 are all normal tracks with no possible loop backs
28 14:33 <batsman> that needs some work
28 14:33 <dave> what gets the shortest path?
28 14:34 <batsman> well, what I used to call my idea :-P
28 14:34 <dave> the A* I am trying gets the quickest driving instructions, hopefully, so its dealling with steps not locations
28 14:34 <batsman> it's the shortest path distance-wise
28 14:34 <jimm> Can we chop up the "loopy" maps and solve sub-sections?
28 14:34 <gus> How do you use your pointgrid?
28 14:35 <batsman> anyway loops are not problem are they?
28 14:35 <dave> jimm: hopefully, but right now I am trying to put my ideas for the normal tracks into code
then maybe I can extend the idea to handle loopy tracks
28 14:35 <batsman> the "distance" values of each cell won't increase
ok, now I am lost
model/pointgrid.rb call find a shortest path, cannot it?
28 14:36 <daniel> pointgrid could be used to find a shortest path, yes
28 14:36 <batsman> this is not the same thing as fastest path, but it's a good start, ok?
so, now you're finished with pointgrid, and working on A*
which will hopefully give the fastest way, right?
28 14:37 <daniel> Hrm... Anyone have opinions on whether I should bias pointgrid away from diagonal jumps?
28 14:37 <batsman> are you still working on pointgrid.rb, or can I fix some obvious things?
28 14:37 <daniel> I've checked in my changes
So, go ahed
28 14:37 <batsman> for instance grid_value(p[0] + dx, p[1] + dy) without checking dimensions, etc
ok
28 14:38 <daniel> batsman: Actually, it does do a chack (implicitly)
check, rather
28 14:38 <batsman> oooo, right, inside grid_value, sorry about the noise
28 14:38 <daniel> grid_value does the check, and border points come back as -1, so...
28 14:39 <batsman> yes, yes, got it.
I'm still looking for something to work on, then
so what about trying to translate the SP into the sequence of driving instructions?
28 14:39 <daniel> Implement a Strategy class as described in OverallStructure.
28 14:40 <batsman> then, later, we can evaluate the cost of that
28 14:40 <daniel> All you need to do for the basic class is have next() return the set of next states that don't crash
28 14:41 <gus> daniel: are you implementing the OverallStructure?
28 14:41 <batsman> and then score based on the distance to the optimum path?
28 14:41 <gus> I am working on a strategy
28 14:41 <batsman> perhaps taking into account direction?
28 14:41 <daniel> Not yet.
28 14:42 <batsman> ok
28 14:42 <daniel> Actually, I think I'll begin to write a ruby script that will take a track and a Strategy and run that strategy through.
28 14:42 <batsman> I'm doing model/strategy, then
ok?
28 14:42 <dave> is proper step handling supported?
there was something in Simulate before
28 14:43 <daniel> Could you check it in as soon as you have stubs there - say, just returning an empty list for next and 1.0 from score?
model/simulator.rb should do what you want, davel
28 14:43 <dave> so if I want to take one point and an action (for example "al.") is there code that will return me the new point
28 14:43 <gus> Could we pass around something better than [x, y, v, d]?
28 14:43 <dave> daniel: ok, is there tests for it?
28 14:43 <daniel> gus: maybe. Is there really reason to?
28 14:44 <batsman> right, working on model/strategy.rb now
28 14:44 <daniel> davel: test/test_simulator exists, but I don't know what's in it
28 14:44 <gus> Well, as davel ask, it nice to be able to get the next point
Simulator carries its own state
doesn't work on [x, y, v, d]
28 14:44 <dave> daniel: I like abstraction, CarState (or something) is nicer than a quad-tuple
28 14:45 <daniel> gus: That's what simulator's state and state= functions are for.
28 14:45 <dave> yeah Car class (in model/car.rb) was supposed to do this kinda stuff
I think it should be moved to Car
28 14:45 <gus> I tend to agree with davel
Oops!
28 14:46 <dave> Car.step("al.") or something like that
it can count the steps taken
Car.x Car.y Car.v Car.d
28 14:47 <batsman> I want to know what the state is
28 14:47 <dave> is much nicer than tuple[0] tuple[1] tuple[2] tuple[3]
28 14:47 <batsman> need it to actually write any code in model/strategy.rb
28 14:47 <dave> batsman: the state is x,y,v,d
28 14:47 <daniel> Fine by me.
Who wants to move stuff from simulator to car?
28 14:47 <batsman> yes, but do I take it as [x,y,v,d] or attributes of car?
28 14:47 <dave> batsman: I think it should be car
28 14:48 <batsman> it's ok by me to have it in car, but then Simulator has to be modified to work on a car
28 14:48 <daniel> Okay, then we need to change the signature of strategy - next() should receive a car, and return a list of cars.
28 14:48 <batsman> yes
can I do all this?
28 14:48 <daniel> * daniel and batsman are clearly sharing the same brain
28 14:48 <batsman> strategy.rb, put state in car, etc?
28 14:48 <daniel> Go for it.
28 14:48 <batsman> thanks
28 14:49 <daniel> batsman: a suggestion: make Car.step() return a new car.
batsman: Car.step! can then update the current one.
28 14:49 <batsman> yes, using the given Simulator
28 14:49 <gus> daniel: I am not sure I understood the entire discussion with pointgrid
28 14:49 <batsman> right
28 14:50 <gus> What do you get as a result of running fill_grid?
28 14:50 <daniel> Actually, car.step() is probably most easily implemented by having a way to clone a car followed by car.step!...
28 14:53 <daniel> gus: Here's the deal. After running fill_grid, you can then call grid_value(x,y) on a track - this returns an integer, and going toward the neighboring grid with the lowest integer follows the shortest path to the goal.
28 14:53 <batsman> ummm, if I move the state to car, I'm breaking all the unit tests from simulator
will take me some time to fix it
28 14:53 <daniel> for "neighboring grid" read "neighboring cell"
batsman: do it only if you want to.
28 14:53 <batsman> please tell me if you depend on model/car or model/strategy, cause I have to break quite some things
it's OK by me, but I don't want to break interfaces you depend on
28 14:54 <daniel> batsman: that is, only fix the unit tests if you feel you have to.
28 14:54 <batsman> OTOH, I think that having everything inside car is much nicer
ok, I'm going on
it'll take me a whil
28 14:54 <gus> Please, go on
We support you :)
daniel: OK, good with me.
But it takes an awfull long time to process!
28 14:55 <daniel> gus: you'll probably want to use grid_value(x,y, SOMEREALLYBIGCONSTANT) in practice. That way the boundary cells don't get you into trouble.
gus: You should have seen it before I implemented batsman's "border" algorithm.
28 14:57 <gus> Maybe I need to get some unused cycles somewhere else!
OK, I see.
28 14:58 <daniel> gus: It will seem to work faster if you comment out the line that prints the border size every time through the loop.
gus: At least, it won't seem so depressingly hung.
28 14:59 <gus> The "Changed" message is enough for now.
Would an extract method, returning an array of Point be nice
28 15:00 <daniel> gus: Oh, you're back on version 1.2 or 1.3
28 15:00 <gus> Oh!
Let me update quickly!
An array representing the SP
28 15:01 <dave> who is working on the car?
28 15:01 <daniel> model/pointgrid.rb is now at 1.5. Currently, it is able to digest (read from file and do fill_grid) track 8 in 1m45s on my box.
28 15:02 <gus> I updated. I'll see how long it takes
What is your box? Mine is G4/533 128mb
28 15:03 <daniel> AMD 1Ghz Athlon. 256mb
I'm now trying track 9...
28 15:04 <jimm> Is code speed an issue? We are submitting car instructions and don't need to worry how fast the thing runs, do we?
28 15:04 <dave> jimm: right
28 15:04 <gus> Yeah, but we have to be able to get the result before monday night!!!
28 15:04 <daniel> Well, we do have to have the tracks computed in under 9 hours from now for the lightning round.
28 15:04 <dave> gus: exactly
28 15:05 <jimm> good points
28 15:05 <gus> I exagerate, but if we want to do some testing, the faster the better
28 15:10 <daniel> Oh, drat.
I just need to vanish for approx. an hour
28 15:14 <gus> I saddly need to go. I should return sometime tonight (10pm Eastern).
28 15:15 <batsman> who's staying here?
28 15:15 <dave> me
28 15:15 <batsman> I'm fixing the unit tests right now
28 15:15 <gus> Bye
28 15:15 <dave> are/were you working on car?
28 15:15 <batsman> yes
car now holds the state
28 15:15 <jimm> I'm still lurking.
28 15:15 <batsman> I moved everything from Simulator there
28 15:16 <dave> batsman: ok
does car hold state?
more specifically, does it know which x,y it just came from?
28 15:17 <batsman> it only knows the x and y it is in
28 15:17 <dave> if possible, can you make it know its prev_x and prev_y
28 15:17 <batsman> so it's got essentially [x,y,v,d]
mmmm
you told me to instantiate a new car...
28 15:17 <dave> and then move the crash? method (and related aliases) from Track to Car
28 15:18 <batsman> I moved the crash?, finish? and valid? methods from simulator to car
28 15:18 <dave> and have the crash method not only look to see if a position is a wall
ok
28 15:18 <batsman> ok, just give me some time
have to fix some things
28 15:18 <dave> does the crash check to see if it crosses the finish line from the wrong side, cause that is considered a crash too
28 15:19 <batsman> what's the default state of a car when initialized?
28 15:19 <dave> it should be able to tell us if a move is a crash, whether its a wall or crossing the finish from the wrong side
28 15:19 <batsman> x, y = the starting point given by the track
speed = 0
d = ?
0?
28 15:19 <dave> yep, v = 0 and d = 0
28 15:20 <batsman> ok
28 15:20 <dave> d = 0 means due east
actually to check for crossing the finish line incorrectly, all you need is prev_x
then in the crash? method, return true if its a wall, or if its the finish line and prev_x > x
28 15:26 <batsman> I'm feeling a great pressure to ci
but I still have one error in the unit tests
28 15:26 <dave> lol
28 15:26 <batsman> TypeError: FPN can't be coerced into Float
:-)
I'm fixing it
well
28 15:28 <batsman> I'd better ci now
so you don't have to wait forever
I'm fixing the thing right after
28 15:31 <batsman> ok, just did ci
now I'm going to make the unit tests work again :)
28 15:32 <dave> k
28 15:32 <batsman> found something interesting, one bug in FPN
164: other.kind_of(Float)
and I got the TypeError above
changed to kind_of?
and now have another error :-)
28 15:37 <dave> whats the new err
28 15:37 <batsman> well
NoMethodError: undefined method `cos' for 0.0:Float
./model/simulator.rb:26:in `step'
./test//test_simulator.rb:23:in `test_step'
test.rb:12
it seems the state is getting transformed into Floats
instead of staying as FPN
I'm looking for the bug
28 15:38 <dave> k
28 15:38 <batsman> got one big one
right now
I was screwing the states badly
forgot to clone some things
28 15:39 <dave> hehe
28 15:39 <batsman> think I got it
it's nice that I got the other one
cause then I saw:NoMethodError: allocator undefined for Float
and saw right away the problem :-)
28 15:42 <dave> yeo
yep
28 15:42 <batsman> but I keep finding bugs
mine, and others ;-)
it seems moving the code around helps taking the garbage out
yeah! passes
28 15:44 <batsman> please do cvs update
28 15:44 <dave> k
28 15:44 <batsman> there is one failure in the unit test
state variable x differs.
<355.00179> and
<355.000244140625> expected to be within
<0.001> of each other
is this bad?
28 15:45 <dave> good question
28 15:47 <batsman> right, now the car has got its state, it knows where it came from, checks whether it crossed the goal line the right way, etc
28 15:49 <dave> good
28 15:50 <batsman> oops, forgot to cvs add strategy.rb
it's there now
28 16:00 <batsman> davel? still here?
am I alone now???
28 16:01 <dave> I am here
28 16:01 <batsman> ok
28 16:01 <dave> just focusing on my code
28 16:01 <batsman> seems we're the only ones now
28 16:01 <dave> yeo
tep
28 16:02 <batsman> still working on A*
?
28 16:02 <dave> sorta
heres a little run down of what I am trying to do
I break up the track into sections
a section ends when the walls diverge (if the both go in the exact same direction, or exact opposite direction, then the section continues)
28 16:04 <dave> for example if one section of the track starts to narrow or widen, its still a section
28 16:04 <batsman> can I help you in any way?
28 16:04 <dave> but when one wall goes N for example, and the other goes W
batsman: dont know ...
I'll finish the overview
28 16:05 <batsman> it's because I ended moving the stuff
28 16:05 <dave> and then you tell me your thoughts and we can go from there
so when the walls directions diverge, that ends one section and starts a new one
then I start to simulate moves, but in order to limit the positions of the car, I have the head light system
28 16:07 <batsman> ?
28 16:07 <dave> at any point in a section, the car's headlights form a trianle with the end of the section
and for the rest of the subsequent moves within the section, I discount any moves that take the car out of the headlights triangle
----
/
/
oops lets try that again
28 16:08 <batsman> this means the car goes straight till the end of the section?
28 16:08 <dave> ----
/
no it doesnt go straight
it tired every possible move, . a. b. l. r. al. ar.
28 16:09 <batsman> within the triangle, right?
28 16:10 <dave> and if any move takes it out of the headlight triangle, then it discounts all the moves up to that point
28 16:10 <batsman> so it's like
-----------E-----------
wait a sec, I'm gonna draw it
28 16:10 <dave> draw it on what?
-----------
28 16:10 <batsman> you'll see
28 16:10 <dave> /
/
/
/
/
/
/
/
/
*
\
\
\
\
\
\
\
\
\
\
-----------
28 16:12 <batsman> ====================== line showing end of section
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\ /
car
well, kinda
28 16:12 <dave> yeah
28 16:12 <batsman> with the walls on the left and the right hand side, right?
28 16:12 <dave> yeah, but after each move, the headlights readjust
28 16:13 <batsman> ok
thanks for taking the time to explain it
28 16:13 <dave> so for example if the car starts moving left, then angle will change
28 16:13 <batsman> yes, interesting
28 16:13 <dave> it should eliminate lots of steps
and make it a bit more possible to do A*
but it means I have to write code that finds the walls, creates sections, creates headlights, and perform A* on each move
28 16:14 <batsman> ....
can I help??
seems complicated
28 16:15 <dave> sure I am at the beginning of code
yeah its gonna be a bit of work
right now I am trying to code up the section code
which needs to find the walls, check their divergence, and create sections
28 16:16 <batsman> ummm
should I use gridpoint now
28 16:17 <dave> do you think you could add something to the Car class that takes a TrackSection, and makes crash? (or some other method) tell us when we have gone out of the headlights
28 16:17 <batsman> so we can leave some machine working full-time to have something by the end of the day?
I don't know how slow the alg. is
28 16:17 <dave> gridpoint? I haven't been following it at all
28 16:18 <batsman> mmm, depends on what info the Tracksection has
28 16:18 <dave> start_line and finish_line
28 16:18 <batsman> gridpoint was daniel's work, right?
28 16:19 <dave> which will both be a pair of points, either an array or some class which has x() and y()
I think so
28 16:19 <batsman> daniel logged out at 17:11:15 (GMT+2)
28 16:19 <dave> I think I was wrong, the headlights don't adjust after ever move
28 16:19 <batsman> 17:11:12 <daniel> I just need to vanish for approx. an hour
28 16:19 <dave> whatever they are heading into a certain section is how they stay for the whole section
28 16:20 <batsman> ummm
I don't know if this makes it less powerful
28 16:20 <dave> what having the headlights stay the same?
28 16:20 <batsman> yes
OTOH
28 16:20 <dave> more powerful correct I think
28 16:20 <batsman> if it were changing
the car would tend to zigzag in the end
28 16:21 <dave> cause if the headlights change, you could find yourself close to the wall, and out of the original headlights, but still valid
28 16:21 <batsman> consider what happens when it's close to the end line
ummm
28 16:21 <dave> yeah the headlights definitely need to stay the way they are at the beginning of a section
28 16:21 <batsman> I believe the triangle is guaranteed to be inside the first one
28 16:21 <dave> otherwise they are useless
28 16:21 <batsman> but they have to stay the same
otherwise, the car starts 'zigzagging'
as it approaches the end line
and the angle gets smaller and smaller
28 16:22 <dave> if you re-adjust the triangle after each move then you're not really doing much
as it gets close to the finish line the angle should get bigger
think of your diagram
28 16:23 <batsman> yes
actually
I was thinking of what happens
once the car gets close to one of the edges of the original triangle
28 16:23 <dave> lets say the car comes into that section with d angled sharply towards the wall
28 16:23 <batsman> then the car could possibly start oscillating
from one edge to the other
28 16:23 <dave> well with A* it will try everything
28 16:24 <batsman> as it overreacts
28 16:24 <dave> but as soon as it crosses the original triangle A* should drop the set of steps that were taken to get there
cause now we're in the no drive zone
28 16:24 <batsman> but it's a matter of choosing the right constant to avoid overshot, as in filter
ok
I had better let you work
28 16:25 <dave> uh ok
28 16:25 <batsman> ci ASAP and I'll help you
in the meantime
28 16:25 <dave> well my code isn't run worthy
28 16:25 <batsman> I'm taking a look at gridpoint
28 16:25 <dave> prob not even compile worthy
28 16:25 <batsman> to see if i can really make it work easily so we have something at least
28 16:25 <dave> compile/parse same thing
28 16:25 <batsman> because even if the SP is found
28 16:26 <dave> this isn't SP, its Fastest Path
28 16:26 <batsman> we do still have to create the driving commands to follow it
I now, that's your code
I mean gridpoint, which does SP
28 16:26 <dave> ok
28 16:26 <batsman> so I let you work on the better solution
28 16:26 <dave> the driving commands will be generated with the A*
28 16:26 <batsman> while I get the worse one to work
28 16:27 <dave> at the end, whatever gets to the finish line in the fewest number of steps will have its steps kept track of
ok I will get going
28 16:27 <batsman> ok
28 16:27 <dave> going on the code that is
28 16:27 <batsman> got it
28 16:27 <dave> do you have any graphics ability?
28 16:27 <batsman> I'm taking a look at gridpoint and cheap solutions
you mean?????
representation of paths?
making tracks?
28 16:28 <dave> no, I was thinking a quick graphic showing my idea, since I explained it to you
28 16:28 <batsman> ok
28 16:28 <dave> then when other people get in they can visualize it
hopefully
28 16:28 <batsman> I might be able to draw something
28 16:29 <dave> if not no big deal, but it might help
28 16:29 <batsman> so I'll wander for a while to find things to do now
ok
28 16:29 <dave> k
28 16:42 <batsman> ok, I've added doc/daves-scheme.ps which contains a crappy diagram of the triangle
28 16:43 <dave> ok
28 16:45 <dave> sweet thanks batsman
28 16:46 <batsman> well, it's a crappy graphic, sorry :P
I'm gonna write the simulator for Rally mode
this needs a couple changes to car, too
28 16:46 <dave> better than nothing, good idea
28 16:46 <batsman> and some other things
as now the state has got a new var
t, direction of motion
t == d in normal mode
but differs in rally
28 16:47 <dave> k
28 16:50 <daniel> Is anyone doing something that depends on strategy?
I ask because I want to change the signature of the constructor
And actually, I want to change a few other things too...
28 16:51 <batsman> I am extending car and Simulator to support rally mode
it's fine by me
28 16:51 <daniel> 'kay
28 16:52 <batsman> and davel is working on his A* thing
btw, please add your emacs stuff at the bottom :-)
28 16:55 <daniel> Right.
28 16:57 <dave> batsman: I am starting to see flaws in my idea
I am rethinking stuff
28 16:57 <batsman> :-P
28 16:59 <dave> batsman: ok, here's a slightly modified version
28 17:01 <batsman> yes???
crap, my internet connection died
28 17:07 <batsman> hi??
anybody there?
28 17:07 <dave> hi
28 17:08 <batsman> my internet connection got down
28 17:08 <dave> you predicted it too
28 17:08 <batsman> this bloody cable modem is a piece of crap
28 17:08 <dave> cause your crap my internet connection died message made it here
28 17:08 <batsman> how could it???
I couldn't even ping machines outside the LAN????
anyway
I'm extending FPN
28 17:09 <dave> k
28 17:09 <batsman> to do the things required for Rally mode
there's quite a lot we forgot, there
28 17:09 <dave> good
lets hope we get there :-)
28 17:10 <batsman> well, still 7H to go
28 17:11 <dave> I'd be surprised if I have mine done by then
28 17:11 <batsman> uh
well I keep w/ Rally mode
28 17:12 <dave> k
28 17:12 <batsman> and hope we're getting some help in the following 7H
28 17:13 <dave> I am gonna make the track member of Car a static (aka class) variable
we will only ever need on instance of the track at one time
28 17:13 <batsman> class var?
28 17:13 <dave> @@track
28 17:13 <batsman> so only one track per program run?
28 17:13 <dave> yeah but it can be changed
28 17:13 <batsman> ok
28 17:13 <dave> but each Car won't have its own track
28 17:14 <batsman> k
28 17:14 <dave> I need to create many Car's and dont wanna pass @track all the time (I think maybe it should be called CarState, what do you think)
28 17:14 <daniel> I suggest you look at what I just did to strategy.
28 17:15 <dave> who all of us?
28 17:15 <batsman> my stuff shouldn't affect or be affected by model/
28 17:15 <daniel> Well, it makes the most sense with that implementation of strategy to have car not know about the track.
28 17:15 <batsman> in just changing units.rb
28 17:17 <daniel> Since the strategy has to know about the track.
28 17:17 <dave> yeah I know
the track should just be a global variable
or maybe a Thread local variable
other wise it will be passed around all the time
lets make it Thread local ?
which is essentially global, unless we start doing multiple threads
28 17:21 <daniel> Hey, in ruby, if I have an array, say a = [4,5,6], how can I call a function with the parameters that are the contents of the array (e.g.) foo(4,5,6)
28 17:21 <dave> foo(*array)
28 17:21 <daniel> Ah, right. I knew I'd seen that syntax somewhere.
28 17:29 <batsman> daniel, I see that now strategy has no simulator iv.
it uses Simulator directly
however
if someday we get RallySimulator, we'll want strategy to work with both
28 17:30 <daniel> Oh. Hrm.
28 17:30 <batsman> nothing serious
the really serious thing
is that we're 6H30 from first release
28 17:31 <daniel> Yeah.
28 17:31 <batsman> and don't have a clear path to follow
28 17:33 <batsman> I am a bit concerned
it's been some time since we last seemed to be on track
28 17:35 <daniel> Well, do people have a problem writing more strategies?
28 17:35 <batsman> mmm
could I write a strategy that tries to stick to the SP?
or something like that?
28 17:35 <dave> I am working on something, tho its not a strategy
28 17:36 <batsman> ??
28 17:36 <dave> batsman: sounds good
28 17:36 <batsman> first get the SP using gridpoint
28 17:36 <dave> not a Strategy as in it doesn't extend the Strategt class
28 17:36 <batsman> then try to approximate it when generating the commands
28 17:36 <dave> how does gridpoint calc SP
* davel hasn't looked at the source
28 17:37 <batsman> http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=PathStrategies
there's an explanation
read the bottom part
28 17:37 <dave> oh ok, yeah I read that
28 17:37 <daniel> And as I keep working and checking stuff in, the runstrategy.rb script in the top directory
28 17:37 <dave> I am gonna shower, bbiab
28 17:38 <batsman> cu
for the record
I stopped my efforts w/ rally mode
as I see we'll be lucky if we get the standard one to work in time :)
28 17:39 <dave> you mean for the lightning or the full contest?
28 17:39 <batsman> lightning
28 17:40 <dave> k
28 17:40 <batsman> man, I hope we get rally by the end of the full contest... X)
I'm going to see what I can do w/ gridpoint
28 17:41 <daniel> batsman: please do. You can write a separate strategy, though.
28 17:41 <batsman> that's what I'm planning to do
28 17:42 <daniel> * daniel is a bit pessimistic about easily using the point grid because of how painfully slow the cars start
28 17:42 <batsman> just subclass it, and put it in a separate file
I'll take a look
something is definitely better than nothing
28 17:47 <batsman> I think there's a problem w/ our logic
28 17:52 <daniel> Hrm?
28 17:52 <batsman> here:
@track.finish?(car.x, car.y) and
(car.d > HalfPi or car.d < -HalfPi)
and here
def crash?()
@track.crash?(@x,@y) || (@track.finish?(@x,@y) && @prev_x > @x)
end
28 17:53 <daniel> Oh.
Right, I should be deferring to car#crash?
28 17:54 <batsman> btw, your check in strategy is redundant, Car already checks
well, that's not the problem :)
the issue is
what if the speed is bigger than one square per time slice
and we go through the goal line
without ever being _on_ it?
28 17:55 <daniel> The speed can't ever be bigger than 1 square per time slice.
28 17:55 <batsman> you're right
fine, then :)
28 17:55 <daniel> That's one of the nice things about the constants they use.
28 17:56 <dave> back
fresh and clean
28 17:56 <batsman> good
28 17:56 <dave> I am gonna break down my stuff into subtasks
28 17:57 <batsman> then tell us... why is the speed smaller than 1 square per time slice?
by design (of the constants)?
28 17:57 <dave> first thing I am gonna try to generate some png maps with the sections deliniated
28 17:57 <batsman> I don't see any explicit check in the Simulator algo
28 17:57 <dave> I think it must be design of the constants
28 17:58 <batsman> so we need not check these things in Simulator, do we?
28 17:58 <dave> because they say its garaunteed that it wont be more than one square
28 17:58 <daniel> But there is a nasty bug in strategy that I just committed a fix to. (switched the car and move in the return value of next)
28 17:58 <dave> I dont think so
I think the friction causes the car to reach some sort of terminal velocity
28 17:58 <daniel> Oh, no - the math (and the constants they chose) guarantee that the speed is always less than 1
28 17:59 <batsman> sure 100%? what if this is a catcha thing?
28 17:59 <dave> yeah thats what I am saying
28 17:59 <daniel> Yes, I'm sure.
28 17:59 <dave> me too
28 17:59 <batsman> they often do such things
ok
28 17:59 <dave> the friction ensures it
28 17:59 <batsman> we assume it, ok
28 17:59 <daniel> Actually, I'm pretty sure that the maximum velocity is significantly less than 1...
28 17:59 <dave> its a quadratic equation, I could prob find the max velocity hang on
28 18:01 <dave> I think the max speed is 1/2
28 18:01 <batsman> hi
28 18:01 <dave> the ratio of F2 to F1 is 2
28 18:01 <tobias> hi
28 18:01 <daniel> davel: no, at 1/2 you can still keep accelerating.
28 18:02 <dave> yeah V will go up by 24
but down by F0 + F1*v + F2*v*v
28 18:02 <daniel> It's the value of v that makes this zero: (20/B) - (12/B) * v - (24/B) * v^2, where B is 65536
28 18:03 <tobias> correct
28 18:03 <daniel> I'm confident it's less than 1
28 18:03 <tobias> it's somewhere at approx. 0.75
28 18:03 <dave> k
28 18:04 <tobias> will calculate it ...
28 18:04 <batsman> .6965 and -1.1964
negative solution discarded => .7 if you got the equation right
28 18:04 <daniel> So we're fine.
28 18:05 <batsman> yes, it's safe, good to know
28 18:05 <daniel> Except for the fact that turns happen very slowly, so cruising along a 0.5 may in fact be way too fast for some turns
28 18:06 <tobias> i got 0.69648, the same as batsman
28 18:06 <daniel> Whereas the cars going that fast might initially appear to be the best we have.
28 18:09 <batsman> daniel: the stuff in runstrategy.rb is really interesting
daniel: looking forward to seeing it work :-)
28 18:09 <tobias> if nobody complains i would now review the fixed-point arithmetics again
28 18:09 <batsman> good
there's more work to be done on FPN
to be able to implement RallySimulator
_but_ we will never have that working today
28 18:10 <tobias> ok. atan2, sqrt i think?
28 18:10 <batsman> so better skip that :)
that's it
but we're already having problems to meet the 24H deadline now
so there's no need to complicate any further w/ things we will anyway not use
28 18:11 <daniel> batsman: Me too. I'm trying to finally run it now....
And NameError... Well, I was kind of expecting some of those.
28 18:11 <dave> the lighting division doesn't really matter to me, but I will help short term stuff if thats what everyone wants
28 18:12 <tobias> if you have plans on participating lightning, you might have a suggestion on what else i should work?
28 18:12 <daniel> We need a better strategy
28 18:12 <batsman> anything that actually gets us closer to something that actually runs :)
for instance
28 18:12 <tobias> where is the current strategy implemented?
28 18:12 <batsman> you could review the stuff in pointgrid.rb
28 18:13 <daniel> As a start, you might try improving the score of those cars that are pointed at a better square than the one they're on
28 18:13 <batsman> it's still on the way
pointgrid.rb should find the SP
but I don't know if it's been tested at all
however it's slow
given the SP
it should be possible to create a strategy that tries to track it
gonna take a shower now, and if nobody opposes I'll work on that afterwards
28 18:14 <tobias> ok
28 18:15 <daniel> pshah. fill_grid() is a one-time thing, and it's on the order of two minutes.
Which, admittedly, makes testing a bit frustrating.
28 18:16 <batsman> whaaat?
only 2 minutes?
it's fast enough by my book :)
28 18:16 <daniel> On my 1Ghz Athlon
28 18:16 <batsman> I have K7 1.7XP+
so 1 minute something for me :)
28 18:17 <daniel> By the way, car could probably do with a unit test or two.
I'm just fixing typos here and there, but I only notice bugs in car.rb if ruby dies with a NameError or something.
28 18:20 <tobias> anyone seriously heading for a lighning entry?
28 18:20 <aleksi> hello people
28 18:20 <tobias> hi
28 18:20 <daniel> By the way, you can time the pointgrid algorithm with the "testg.rb" script I just threw into cvs. It's a piece of junk, but I just wanted some timings.
28 18:20 <aleksi> where do we stand?
28 18:20 <dave> tobias: lighting is not at the top of my mind
but I can make it that way if need be
28 18:21 <aleksi> where is the log?
28 18:22 <tobias> not on my mind, either
28 18:23 <dave> aleksi: what log?
irc?
28 18:23 <daniel> * daniel isn't certain that there really is a log. However, there are significant wiki comments.
28 18:23 <tobias> which wiki?
rubygarden?
28 18:23 <dave> I have a log, but I can't imagine you wanting to wade through it
28 18:23 <daniel> http://www.urusai.org/cgi-bin/cvs/icfp/wiki
28 18:24 <tobias> that one, ok
28 18:26 <tobias> ok i will dive into the arithmetics and resurface in 1 hour or so
28 18:29 <aleksi> ok, I've read briefly through wiki ideas
I can't comment much on those
(don't understand much without really putting mind in it)
28 18:31 <batsman> hi again
what changed during my shower?
hi aleksi
long time no see :)
28 18:32 <aleksi> had to sleep a bit :)
28 18:32 <batsman> it's been like 9 hours since we stole the code from aleksi_first_idea.rb and put in in model/
28 18:32 <aleksi> I said cvs up -d, and ruby test.rb says there's a failure at test_step for test_simulator.rb
well, I ate breakfast as well :)
28 18:33 <daniel> I may have a working runstrategy.rb
28 18:33 <batsman> it is ok if we remove aleksi_first_idea.rb now?
great!!!
28 18:33 <daniel> I'm still trying to determine whether I do
28 18:33 <batsman> thanks for testg.rb too
28 18:34 <daniel> testg.rb is a throwaway script, just to see if fill_grid is acceptable
28 18:35 <batsman> but it's nice to be able to benchmark, at last
28 18:36 <batsman> ????
my machine is fast as hell, or what? 13 seconds!!!
28 18:37 <aleksi> so you managed to fix FPN mul and div for negative numbers
28 18:37 <batsman> it's been some time...
we haven't touched FPN for a while
28 18:38 <aleksi> yes, it's great to see the infra is working :)
28 18:38 <daniel> * daniel thinks he fixed them this morning, but doesn't really remember
28 18:38 <batsman> well, actually I started adding stuff for rally mode, but then left that as I saw it wouldn't be used today
daniel, do you get two minutes/run in your machine for testg?
28 18:39 <aleksi> what's dave's scheme about?
28 18:40 <daniel> For track 8
For track 1 it's closer to 30 seconds
28 18:40 <batsman> take a look at doc/daves-scheme.ps
ok
I was testing that on Een.trk
28 18:45 <daniel> Ew. We have some kind of nasty bug.
28 18:46 <batsman> ?
28 18:46 <daniel> Does anyone mind if I add the .trk files to cvs under a "data" directory?
28 18:47 <batsman> they're now in test/data IIRC
well, one of them
Een
28 18:47 <aleksi> perfect
please adda
28 18:48 <daniel> Ok. test/data now has all the .trk files
I'm test the strategyrunner on the 0_stupid.trk file, which is the one from the problem spec (11 by 8)
Unfortunately, the best strategy is turning out to be "sit still for a few turns, brake, then sit still some more and let some bug in our FPN or simulator code carry you backwards over the finish line"
28 18:50 <daniel> Not good.
28 18:51 <batsman> nasty
28 18:51 <daniel> I mean, amusing, sort of, but...
28 18:54 <daniel> Curse my slow connection - cvs is still adding those data files.
ruby runstrategy.rb test/data/0_stupid.trk BestPointTrackStrategy
28 18:55 <daniel> That's what I'm using to test the runstrategy script.
28 18:55 <batsman> ok
28 18:55 <daniel> Once test/data/0_stupid.trk gets there...
28 18:56 <batsman> I'll test it in a while, doing something now I hope to be able to show soon
28 18:57 <daniel> Okay, cvs finally finished.
28 19:01 <daniel> Stupid nickserv
28 19:01 <batsman> better say something
28 19:01 <daniel> If someone wants the name so bad, fine.
28 19:01 <batsman> before it kicks me too
28 19:02 <daniel> It's only an issue if your name is "registered" to someone else
28 19:04 <daniel> Ah - it's a simulator bug.
28 19:04 <batsman> you got it? nice
28 19:05 <daniel> I got one of the bugs... :)
28 19:05 <batsman> we still have to validate the simulator against the one online
28 19:05 <aleksi> daniel, perfect! now make a test case for it
batsman, I thought you did it already
but then I saw the comment that it should be done
I'm already on it, half ready
28 19:06 <batsman> no, doing something different
to check another thing
28 19:07 <aleksi> how can I make the failing tests to dump the whole callpath with line numbers
or do I need to catch the error and puts caller, and reraise on my own
28 19:08 <batsman> don't they show it already?
28 19:08 <aleksi> I get messages like:
1) Failure!!!
test_simulation_equivalence(TC_Simulator) [test/test_simulator.rb:72]:
<#<FPN:0x401e9a34 @fp=0>> expected but was
<#<FPN:0x4021dd48 @fp=23265280>>
I'd like to see what called test_simulator_equivalence method
28 19:09 <daniel> aleksi: first off, do a cvs update to get a better FPN representation in your error messages
28 19:11 <batsman> test_simulator_equivalence is called automatically by test/unit
doesn't make sense to trace into testunit, does it?
28 19:13 <aleksi> batsman, right
I wasn't specific enough. The code is like: def test_simulation_equivalence; ... check_car_to_dump(car, dumped_car); ... end; def check_car_to_dump(car, dump); assert_equal(dump.x, car.x); ... end;
28 19:15 <aleksi> then the failure is on assert_equal row as it should be, but the method is stated to be test_simulation_equivalence (incorrect). And I need to know which of the multiple check_car_to_dump calls of test_simulation_equivalence's actually failed.
28 19:15 <batsman> ack. guess you need to use caller then
28 19:18 <daniel> * daniel__ gets the strategy to work, he thinks, and despairs of ever having us finish any of these tracks by 8 o'clock.
28 19:20 <batsman> I am getting nils inside the structure returned by t.fill_grid
grid = t.pointgrid
is that normal???
28 19:21 <daniel> Okay, BestPointTrackStrategy is kind of stupid. The top 100 cars all end up being cars that just speed up and up and then all crash into the first wall.
28 19:21 <batsman> :)
28 19:22 <daniel> Part of the problem is that it just takes so long to get up to a reasonable speed that at first all the cars are completely selected for speed, with no regard for direction
batsman: I see no nulls. Hrm.
28 19:23 <batsman> ¿?
ok I'll double check my code
28 19:24 <daniel> In irb, try this:
* daniel__ | require 'model/pointgrid'
* daniel__ | open ('test/data/0_stupid.trk', 'r') do |f| t=Track.new(f); t.fill_grid; t; end
28 19:24 <batsman> I'll do it
28 19:26 <batsman> when my update finishes....
28 19:29 <batsman> it takes forever
28 19:30 <aleksi> first line of dump works ok, ie. we find the starting point correctly
has lennon been around?
28 19:30 <daniel> Yeah, getting the track data makes the update long, but after that the updates will speed up again.
28 19:32 <daniel> Okay, I can clearly cause different behavior from the cars by tweaking the strategy. Now I've just got to improve the strategy.
28 19:32 <batsman> good
if haven't seen nils in the the grid of 0_stupid.trk
but I believe I found some in that of Een...
will check
28 19:33 <daniel> It could be that Een includes an unexpected character somewhere.
28 19:35 <batsman> ok, added a small script in tools/ to create a xpm with the distance information. You can use it to test gridpoint visually
I mean poingrid
s/n/nt/
28 19:38 <batsman> as far as I can tell, pointgrid works like a charm
it generates 'pretty' images :P
28 19:43 <daniel> Ok, I'm kind of stuck here. I can't get these stupid cars to do anything but accelerate and, if I play with the velocity goal a bit, coast.
For some reason they refuse to turn.
28 19:44 <dave> batsman: how do I generate the pointgrid images?
28 19:44 <batsman> something like ruby tools/dumpgrip.rb test/data/1_Simple.trk > out2.xpm
28 19:45 <dave> cool thanks
28 19:45 <batsman> if you wait for one minute, I've got a new version with higher contrast :-)
28 19:45 <daniel> What a shame that cvs doesn't make it easier to rename files.
28 19:45 <aleksi> daniel, I'm pretty sure simulator doesn't work ok
but I'm fixing it
28 19:45 <dave> so whats the word on the lightning
28 19:46 <batsman> dunno
still 4H to go
28 19:46 <aleksi> here we come to the fact that infrastructure has to be rock solid before anything useful can be accomplished
28 19:46 <batsman> we could have something
28 19:46 <dave> seeing how its just over 4hours, is there stuff I should be doing now and put my other stuff on hold?
batsman: I have run into more problems with my track section idea
28 19:47 <batsman> like?
28 19:47 <dave> my original plans for breaking the track into sections won't work well
28 19:47 <batsman> well, it seemed pretty complicated from the beginning
28 19:47 <dave> so now I am planning on trying to do some lines of best fit
yeah its not the most straight forward idea
but we need to win :-)
28 19:49 <dave> if someone suggests other ideas, I'll try something else
28 19:57 <dave> batsman: the dumpgrip.rb is producing greyscale output
28 19:57 <batsman> yes
28 19:57 <dave> and I don't know what to make of it
28 19:57 <batsman> do you want colours?
what do you want to make with that?
28 19:57 <dave> not really
I want to know what this represents?
28 19:57 <batsman> it was just meant to verify whether pointgrid works
ok
the grayscale represents the distance from the goal
white = closer
28 19:58 <dave> ok
28 19:58 <batsman> black = far away
you can get a nice pic for instance with track 7
there we see that the algo is working OK
28 19:58 <dave> k I will try it
28 19:59 <batsman> now, if we found the gradient at the point the car is in
we could drive it to the goal
the problem is: finding the gradient doesn't give you the trace right away
but it's doable and I'll try to work on that as soon as I read and understand the stuff daniel has been doing with strategy
28 20:01 <dave> k
I guess I will continue with my plans, please let me know if I am needed for any lightning needs
28 20:03 <batsman> ok
28 20:03 <tobias> hi
28 20:03 <dave> hi
28 20:03 <batsman> hi tobias
28 20:04 <tobias> m there was a bug in the fixed point multiplication -- fixed now
28 20:04 <batsman> good
that's perhaps the reason we couldn't get the simulator to work
did you add a unit test for that?
28 20:05 <tobias> yes
the spec was unbclear in this point
28 20:05 <batsman> good
28 20:05 <tobias> mthe icfp faq clarified it
28 20:05 <aleksi> oh, it was just 1.7 series debugger that was broken, 1.8 works all ok
now I'll do miracles :)
28 20:05 <batsman> :)
28 20:06 <aleksi> good tobias, very good!
28 20:06 <daniel> tobias: what was wrong?
28 20:06 <aleksi> is it already in cvs?
28 20:06 <batsman> mthe icfp faq clarified it
? don't see it mention in the FAQ
28 20:06 <tobias> ok i'll show you
28 20:06 <batsman> http://www.urusai.org/cgi-bin/cvs/icfp/chngview?cn=87
28 20:07 <tobias> see http://www.cs.chalmers.se/~rjmh/Wash/QandAs/QAs.cgi#44
28 20:07 <batsman> right there
that's new, isn't it?
I was cheching the static FAQ thing
28 20:07 <tobias> mul(40,-209) == -1
we had mul(40,-209) == 0
we were doing wrong with negative mult results
28 20:08 <batsman> I thought we had to truncate towards 0
28 20:09 <tobias> but this is not a division, but a bit-shift!
see Q4 on the same faq page
28 20:09 <batsman> ok
28 20:10 <tobias> i might implement sqrt and friends now, if no one objects
28 20:11 <batsman> we won't need them for a while
so if you can help get the simulator to work
28 20:11 <daniel> I repeate my call for a better strategy.
28 20:11 <batsman> or assist daniel...
...
28 20:12 <daniel> Maybe if I could have everyone here run the simulator and see what's going wrong right now.
28 20:12 <tobias> i am a bit out of touch there
28 20:12 <dave> daniel__: I am working on something
I tried explaining to batsman, lets see if I can explain it
28 20:12 <tobias> what should i run, daniel?
hi lennon!
28 20:13 <batsman> daniel__: you can have a look at doc/daves-scheme.ps
hi!
28 20:13 <dave> what I am working on will hopefully produce good results for the 1st 5 maps, but it will need to be modified to work on the other maps
28 20:13 <tobias> ok, explain
28 20:13 <dave> so I break up the track into sections
28 20:13 <tobias> i saw that ps drawing
whats it mean
break into sections?
28 20:14 <dave> when the car enters a new track section
it will be limited to staying within the "headlight" vision
28 20:14 <tobias> headlight?
28 20:14 <dave> which is a triangle from the cars starting point in the section, to the 2 ends of the section
28 20:15 <aleksi> Q54. Re: Q53. I'm a moron too.
28 20:15 <batsman> :)
28 20:15 <tobias> what's the purpose?
28 20:15 <batsman> was that yours, aleksi???
:-P
28 20:15 <dave> it can go outside of that triangle if needed, but when its ouside the triangle it can only turn towards thr triangle, it cant trun away from the triangle
the purpose is to try to eliminate a lot of possible moves (for example turning right when you are outside the triable) which may make doing something like A* easier
28 20:17 <tobias> ok
28 20:17 <dave> but in order to break into sections I will need to do some best fit lines
even with this A* may still have too many branches, in which case I will have to add further branch elimination
I have had a lot flaws in trying to figure this out
I still dont know for sure if I can get it to work
28 20:19 <dave> but if I can, it should produce some really good results for the first 5 maps
which are straight forward counter clockwise tracks
28 20:20 <tobias> get me up to date on this -- you want to do a full search in each section -- limited by the triangle
28 20:20 <dave> yes
think thats too large of a space?
28 20:21 <tobias> that was my thought, yes
mbut frankly, i have no clue
28 20:21 <dave> lol
well all I have to do is a few different types of joined sections
and then once I see what results are generally turning up best, I can start to do more eliminations
28 20:23 <dave> for example, a simple straight away to straight away corner will likely be best solved by going wide to do a tight turn, at least if the car physics they have set out are anything like real life
28 20:23 <tobias> how large are your sections?
28 20:23 <dave> it'll be a heuristic based thing
the section sizes will be determined by how best fit I want my best fit lines to be
the more coarse I allow the best fit lines to be, the larger the sections will be, but if I make the best fit lines be very exact, then the sections will be smaller
28 20:26 <aleksi> ok, fixed simulator
now the basic test seems to go ok
28 20:27 <lennon> so, i take it from what i'm seeing in cvs right now that we're still not there on a naive solution
28 20:27 <daniel> Nope
28 20:27 <aleksi> nope, there's still some rounding error
28 20:27 <batsman> :-(
28 20:27 <dave> lennon: no, what is the naive solution :-)(
28 20:27 <lennon> can i mention an idea that i had just before going to sleep?
28 20:27 <tobias> will the car slow down enough before the corners -- i don't see how it would slow in one section if the slow speed is only needed in the next section
28 20:27 <dave> lennon: please
28 20:28 <daniel> The problem is, it takes _for_ever_ to get the cars up to speed, and by the time that they are up to speed, they can't avoid the wall.
28 20:28 <dave> while doing the a* search, any actions that result in a crash will be discarded
28 20:28 <lennon> i was thinking about different ways to model the problem, and realized that we're missing a huge opportunity by not taking advantage of the fact that our maps are basically just bitmats that we're doing operations on
28 20:29 <tobias> will it track back to earlier sections?
28 20:29 <dave> tobias: yes
28 20:29 <batsman> lennon: like?
28 20:29 <lennon> so, i was thinking about using some sort of trivial image-processing algo like piecewise bezier curves to find a path through the course
has anyone worked with bezier curves in vector drawing?
28 20:29 <dave> not me
28 20:29 <batsman> haven't
28 20:30 <lennon> let me find a URL with some good intro material...
28 20:30 <dave> I can go to the bookstore and buy something :-)
28 20:30 <lennon> try this: http://astronomy.swin.edu.au/~pbourke/curves/bezier/
28 20:30 <tobias> a problem would be to follow these curves, not?
28 20:31 <lennon> well, that's going to be a problem no matter how we do the pathfinding, no?
but, the maximum speed you can travel is a product of the minimum curve angle, as far as i can tell
28 20:32 <tobias> yes i think so
28 20:32 <lennon> so, if we have even a good first-order approximation for the angle of the curves we generate, we can determine max speed from there
28 20:32 <tobias> sweet
28 20:33 <lennon> so, the only thing i'm not sure about right now is:
how do we find the critical points in the curves?
if we were working with regular functions, it'd be easy -- just find the inflection points
28 20:33 <tobias> approximate by hand?
28 20:33 <lennon> that's one option i thought of
esp. since you can generate these curves in a drawing program ;)
not exactly what they meant by "driving simulator", i think, but an interesting idea...
28 20:35 <tobias> yes
28 20:35 <batsman> they say it's allowed
28 20:35 <tobias> if you can get the drawing program to tell you the minimum radius,,,
28 20:35 <batsman> explicitly
28 20:36 <tobias> i don't think gimp does this
28 20:36 <lennon> no, you'd need a vector graphics package
let me check on "sketch", and a few others i've looked at...otherwise, i'll go get an adobe illustrator cd from my roommate
28 20:41 <tobias> if the simulator needs work, i'd rather go check this now
28 20:41 <aleksi> hand-made solutions are explicitly allowed, even encouraged
28 20:41 <tobias> is there a test that drives it and fails?
28 20:42 <aleksi> if you draw good curves, I'm sure you will have quite good rank on lighning
28 20:42 <batsman> 3H20 to go
28 20:42 <lennon> okay, it looks like sketch does bezier curves as a primitive drawing tool, so i'm going to see if i can get it running on my linux box
28 20:42 <batsman> I've been playing with strategies
but can't seem to make them do sensible things
I'm trying to follow the gradient
28 20:44 <tobias> so numbering cells works?
28 20:44 <batsman> ?
we have the pointgrid stuff running for quite some time now
28 20:45 <tobias> ok, i was not there most of the time
28 20:45 <batsman> right
have you seen the pics? :-)
28 20:45 <tobias> only pngs from the tracks
what pics?
28 20:46 <batsman> we can generate pics with info (grayscale) on the distance from the goal
28 20:46 <tobias> i see
28 20:46 <batsman> try ruby tools/dumpgrip.rb test/data/7_Gothenburg.trk > output.xpm
28 20:47 <tobias> running it...
ok
28 20:48 <batsman> aha
28 20:48 <tobias> looks like you propagate distance to nearest neighbours only horizontally and vertically?
28 20:48 <lennon> can anyone here read russian?
28 20:48 <batsman> in diagonal too, I think
28 20:49 <tobias> doesn't look like diagonal
28 20:49 <lennon> guess not
28 20:49 <batsman> it's because of the rouding when I make the pics, I think
however:
(-1..1).each { |dx|
if ((myv != 0) or (dx < 0))
(-1..1).each { |dy|
28 20:50 <tobias> i see
28 20:50 <batsman> aha, modified the strategy to have get_movements not return '.' if speed = 0
and then the car goes on doing nothing and then braking!!!
28 20:50 <tobias> lol
28 20:53 <aleksi> there's friction, so it will eventually stop
28 20:53 <daniel> I've been playing around with what to do with the diagonal.
I don't think I've checked anything in yet.
28 20:53 <batsman> I just got something interesting
doing
def get_movements(car)
return ["a", "al", "ar"] if car.v == FPN.new(0)
["", "a", "b", "l", "r", "al", "ar"]
end
in the strategy
I mandate having to accelerate if speed = 0
I think we should _always_ do that
then the cars
28 20:54 <daniel> Hm. Good thinking.
28 20:54 <batsman> accelerates, then brakes, accelerates, brakes
a...l...a.b.a.b.a.b.a.b.a.b.a.b.a.b.a.b.a.b.a.
hehe
moreover, I introduced this term in the score equation: 1/(0.05 + car.v)
to bias towards actually moving :)
28 20:55 <daniel> Damn. By adjust pointgrid I got it to make the first right turn but then it crashed at the bottom of 0_stupid.trk
28 20:56 <batsman> but it's nice that we finally got to actually generating traces
28 20:58 <batsman> aleksi, did you fix Simulator in the end? don't see that in the CVS logs
28 21:00 <daniel> I'm about to adjust pointgrid to consider diagonal squares to be 1.5 away.
Any objections?
28 21:01 <tobias> make it 1.4
28 21:01 <batsman> ok if you have a reason for that
sqrt(2)
:)
28 21:01 <tobias> so use 5 and seven to stay with integers
28 21:02 <daniel> Well... The reason I chose 1.5 is to bias the things ever so slightly against cutting corners, 'cause it's esy to screw that up and crash.
28 21:02 <batsman> ok
28 21:02 <daniel> Although I like 5 and 7
28 21:03 <tobias> what about looking even further than just to the nearest neighbours?
28 21:03 <batsman> that wouldn't propagate the distance
don't know what you win the way
28 21:03 <daniel> * daniel__ must now run, but:
28 21:03 <tobias> it would if you assign the distance accordingly
28 21:04 <daniel> I'd like someone with a fast, fast machine to run: ruby runstrategy.rb datao/0_stupid.trk BestPointTrackStrategy 0.01
And tell me if this can solve even the stupid circular track.
28 21:04 <batsman> ok
28 21:04 <daniel> Feel free to tweak runstrategy to say different things as it progresses
28 21:05 <batsman> think I got the fastest
28 21:05 <daniel> Or, in fact, to tweak anything in any old way
28 21:05 <batsman> I cvs update and tell you
????
28 21:07 <batsman> hope daniel gets back soon
his last strategy is giving interesting results
28 21:08 <dave> interesting, how?
28 21:08 <batsman> it could be solving 0_stupid
it's slow as hell, but it's going the right way at the moment
28 21:09 <dave> cool
28 21:09 <batsman> now, we seriously need to do something about speed
the fastest it gets is around 0.01
!!!
28 21:10 <dave> hehe
28 21:10 <batsman> gets the cars must be breaking all the time
this happened with my strategy too
my strategy at least does a better job accelerating :)
28 21:12 <batsman> bad news: all cars died
28 21:13 <aleksi> new guys joinin up all the time
28 21:13 <dave> shit
28 21:13 <batsman> in my strategy too :P
what's up with daniel?
28 21:14 <dave> dont know, he said he had to leave
28 21:14 <batsman> did he? when? didn't see it
28 21:14 <dave> daniel__ must now run, but:
28 21:15 <batsman> he just asked for CPU time and went
28 21:15 <dave> yep
28 21:15 <gus> are the strategies in CVS?
28 21:15 <batsman> right
yes
I can cvs ci mine
28 21:15 <gus> Where are they loaded from?
28 21:15 <batsman> too
let my cvs ci mine and I tell you how they work
28 21:16 <gus> I had a few ideas while doing some "home improvement" this afternoon.
I'll like to give it a shot
28 21:16 <batsman> ok
28 21:16 <dave> fire away
28 21:16 <gus> With the idea or the implementation (not done)?
28 21:16 <batsman> primer on strategies:
28 21:16 <dave> idea
28 21:17 <batsman> we have model/strategy.rb, which is the base class of all strategies
28 21:17 <gus> I was kinda pursuing this morning discussion about improving SP
I put on SP a 'trainer'
This trainer has no constraint what so ever
28 21:17 <batsman> given a car, it creates the next car (the car carries the state)
28 21:17 <gus> It can accelerate, brake, turn at will
28 21:18 <batsman> actually, it creates all possible next cars and then gives scores
28 21:18 <gus> The real guy is constrained by the car rules
But he always try to follow the trainer by taking a set of action
Turn to point its direction toward the trainer
Accelerate if the trainer is further away than a set distance
Brake otherwise
28 21:19 <batsman> do you want to implement a strategy?
28 21:19 <gus> I would love too and will try
28 21:19 <batsman> ok
28 21:19 <dave> how does the trainer now how to drive?
28 21:19 <lennon> gus: is the car sync'd with the trainer by step, or by position?
28 21:19 <gus> My kid is undoing my toilet bowl right now
28 21:19 <dave> isnt that what they are for?
28 21:19 <gus> It is a hefty situation
28 21:20 <batsman> pfff
we have people coming and going
28 21:20 <gus> Well, the strategy of the trainer has to be defined, and multiple ones may be suitable
But he is has way less constraint and it should give us more flexibility and ease
28 21:21 <batsman> now, I've been here since 05:00AM GMT, but for a 1H30 break in the afternoon and two 15 mins break for showers :-P
28 21:21 <lennon> gus: i was thinking that position would be better, since the trainer could get so far ahead that, sync'd by time, the real car would just be way off from the area of the track it's actually on
28 21:21 <gus> I was thinking on position too: compute the distance between trainer and runner.
The trainer can for example look at the curbe ahead and compute the 'courbure' (in French, don't know the English word)
If it turns a lot, slow down, don't run too far ahead
If it is flat, go ahead, make the runner accelerate
28 21:23 <gus> Any thoughts?
28 21:23 <lennon> sounds like a decent strategy
i'm still working on my bezier curve idea, though ;)
28 21:24 <dave> we got all sorts of ideas between us
hopefully some start to work
28 21:24 <gus> Bezier sounds like a good idea too.
I was thinking of it.
28 21:24 <lennon> i'm trying to work out the math for finding the control points, currently
28 21:24 <gus> But if you are already working on it...
Cool!
28 21:24 <lennon> but i'm making progress
28 21:24 <batsman> 2H30 to go...
28 21:25 <lennon> and from messing around with some sample curves, i like what it does on weird bits of track, like S-curves
i'll try to get some images up, since it's such an easy thing to visualize
btw, does anyone else think that multiple strategies could benefit from code that can follow a pre-defined path along the course, when that path doesn't dictate speed?
just as a factoring possibility...
28 21:27 <batsman> yes
28 21:27 <lennon> ok
28 21:27 <batsman> this is what I first thought of
28 21:27 <dave> couldn't hurt
28 21:27 <batsman> getting the SP
and trying to stick to it :P
28 21:27 <lennon> the code i'm imagining wouldn't calculate a path at all
it would just translate a pre-determined one into traces
basically, some sort of simple constraint solving, backwards-chaining the max speed for turns
28 21:28 <dave> oh I see
28 21:28 <batsman> but we do already have a path, kind of
we have a matrix with the distances from the origin
if you take the gradient
28 21:29 <lennon> that
that's one path
28 21:29 <batsman> it gives you the shortest path
the the shortest (not fastest)
28 21:29 <lennon> again, SP may not be optimal
that's why i want something we can plug arbitrary paths into, and run them
28 21:29 <batsman> so what? I'm happy if we get anything to work right now :-)
28 21:29 <dave> I think in most cases SP has no chance of being optimal
28 21:29 <lennon> where the path doesn't include explicit accel/deccel traces
28 21:29 <dave> true true
28 21:29 <lennon> just a set of points to cross
28 21:30 <batsman> SP will never be optimal
28 21:30 <dave> we're like babies, so crawling across the finish lines is good enough
28 21:30 <batsman> but you can for instance get the control points of your bezier from there...
28 21:30 <lennon> i agree
from the SP?
28 21:30 <dave> SP is optimal on a straight track with no turns :-)
28 21:30 <batsman> :-)
28 21:30 <lennon> i suppose that's true
28 21:31 <aleksi> ok, I added some 38 000 assertions to the code
28 21:31 <dave> in that case the strategy is pedal to the metal
28 21:31 <batsman> ????
38000????
28 21:31 <aleksi> now Een data dump is equivalent to our simulator
28 21:31 <batsman> the simulator is proven correct?
great!!!!!
28 21:32 <aleksi> as far as Een data tries to do everything in all the different FixedPoint rounding error cases, yes, our simulator seems to work just like contest people's
28 21:32 <batsman> there was nothing broken in the sim, was there?
28 21:33 <aleksi> yes, couple of really weird bugs that I managed to slash without actually doing much, or anything
28 21:33 <lennon> ok, time to go think about how to execute paths as simply as possible
28 21:33 <batsman> I don't see any real fix in http://www.urusai.org/cgi-bin/cvs/icfp/chngview?cn=93
??
- nv += A if command == "a" or command == "al" or command == "ar"
+ nv += A if command =~ /a/
??
28 21:34 <aleksi> 106 command of Een.trc caused our version to give out -22 154 whereas the dump stated that it should be -22 153
28 21:34 <batsman> could you tell me why the first line is wrong (ugly yes, but wrong?)
28 21:34 <aleksi> I just shortcutted
28 21:34 <batsman> ok
28 21:34 <aleksi> there are multitude of possible command variations where if "Accelerates" is true
28 21:34 <batsman> I just wanted to know what was broken in Simulator :)
28 21:35 <aleksi> a, al, la, ar, ra, rab, rba, bar, ...
28 21:35 <batsman> rba?
right, brake and accelerate???
don't get it
28 21:36 <aleksi> well, not yet in this non-rally case, but it was mentioned in the faq, and I thought to make the if "there's any acceleration at all" instead of "if the command happens to be one of the acceleration combination"
28 21:36 <batsman> ok
anyway, it works now so thanks :)
28 21:36 <aleksi> batsman, I guess ra is a valid combination already, not very useful however
in rally mode breaking and turning will cause skidding
28 21:37 <batsman> yes
but you cannot accelerate AND brake at the same time, can you?
28 21:37 <aleksi> so, maybe I'll can start to come up with my own version of trace generator
28 21:38 <batsman> ok
28 21:38 <aleksi> do we have already a tool that visualizes the path the cars drive?
28 21:38 <lennon> woot! i think i've figured out how to find the tightest curves on the track -- and that gives us max. safe speed!
28 21:38 <batsman> I'm still working on my strategy
sweet!
right now
28 21:39 <lennon> at least, assuming you path is calculated as a continuous formula...
28 21:39 <dave> lennon: nice nice
28 21:39 <lennon> ...which means it won't neccesarily be that useful for other strategies
28 21:39 <batsman> aleksi: I'm just running my strategies with runstrategy.rb and inspect the path
28 21:39 <lennon> wow...it's amazing how much smarter i feel after a few hours sleep ;)
ok, back to the calculus
28 21:40 <tobias> batsman: it seems you can brake and accelerate in rally mode -- see bottom of page 6 of the task spec
28 21:40 <batsman> I just realized why the strategies don't work!!!!!!
28 21:40 <aleksi> lennon, imagine all the people
sleeping night and day
imagine there's peace for everyone
28 21:40 <batsman> abr, right
28 21:40 <aleksi> completing icfp with masterpiece
28 21:41 <batsman> I got it now: in case someone is interested
28 21:41 <tobias> yes, tell
28 21:41 <aleksi> batsman, why don't they work?
28 21:41 <batsman> we try to get the score as
28 21:41 <gus> yes!
28 21:41 <batsman> current_score + score_of_cell i'm going to
like that
scorep1 = @track.grid_value(car.x + car.d.cos * car.v,
car.y + car.d.sin * car.v, 9999999)
scorehere + scorep1
however
the car goes so sloooow
that (car..x + car.d.cos * car.v, car.y + car.d.sin * car.v)
corresponds to _the same cell_
28 21:43 <batsman> so this doesn't bias towards the gradient or anything
the solution is
looking for the next cell in that direction
and using that score
gonna code it
28 21:45 <tobias> sounds good
has anyone run the simulator against the Een.dump data?
28 21:46 <aleksi> tobias, yes
equivalent
28 21:47 <tobias> nice
28 21:47 <aleksi> if you update your source and run test.rb you should see 38000 asserts. That's 9000 commands times 4 asserts for x,y,v,d of dump data.
28 21:47 <batsman> aha impressive
28 21:48 <tobias> supid me -- its there, yes, i already have it
28 21:50 <batsman> ouch my new code killed the cars again :-(
ok
I think I'm going another way
I'm coding the following
given the distance matrix
find the gradient
28 21:51 <batsman> then setup the corners of each cell within the path
as goals
the car has got to go through them one by one
one goal has been gone through
heck
gonna make a diagram
28 22:06 <dave> ice cream man
28 22:06 <batsman> ??
28 22:06 <dave> you know the guys who drive around in the little ice cream trucks
28 22:07 <batsman> yes, but what's up with him?
28 22:07 <dave> playing funny little music
28 22:07 <batsman> is he volunteering to write code or what?
:-P
28 22:07 <dave> nothing, just the first time I heard the music and seen one this summer
28 22:07 <daniel> Hey - I see we have a second strategy
28 22:07 <batsman> hi daniel
28 22:07 <dave> he didnt look like the coding type
28 22:07 <daniel> Does it work any better?
28 22:07 <batsman> well
not really
but I found the flaw in my strategy
and I believe in yours too
28 22:08 <daniel> oh?
28 22:08 <batsman> <batsman> we try to get the score as
<gus> yes!
<batsman> current_score + score_of_cell i'm going to
<batsman> like that
<batsman> scorep1 = @track.grid_value(car.x + car.d.cos * car.v,
<batsman> car.y + car.d.sin * car.v, 9999999)
<batsman> scorehere + scorep1
<batsman> however
<batsman> the car goes so sloooow
<batsman> that (car..x + car.d.cos * car.v, car.y + car.d.sin * car.v)
<batsman> corresponds to _the same cell_
<batsman> so this doesn't bias towards the gradient or anything
<batsman> the solution is
<batsman> looking for the next cell in that direction
sorry about giving you so much to parse :)
in the meantime
aleksi added 38000 tests to the test suite
yes, 38000
:)
28 22:10 <dave> have you guys seen this: http://www.cs.chalmers.se/~een/icfp/Een.gif
28 22:10 <daniel> batsman: Actually, because the car goes so slow, that's why I don't multiply by car.v in bestpointtrack.rb, unless you have a very old version.
28 22:10 <batsman> ok
then you had it right
but anyway
my strategy didn't work after the fix
but it was close
it just turned left instead of right :P
28 22:13 <batsman> man! a really nice driver!
28 22:14 <daniel> Okay, if that's what we're up against...
28 22:14 <dave> dont think so
28 22:14 <batsman> we're screwed
28 22:20 <daniel> Then again, we're screwed if we can never even drive around the 0_stupid track
28 22:20 <batsman> :|
28 22:21 <aleksi> davel, cool driving
I wonder if that trace -> anim gif converter is somewhere available?
28 22:21 <dave> that animated gif? I didnt drive that
probably not til after the contest deadline
28 22:21 <batsman> it belongs to one of the organizers
28 22:21 <aleksi> davel, I understood that, I just wondered if someone somewhere has that converter
28 22:22 <dave> yeah the contest organizers
28 22:22 <batsman> if anything, it'd be in the site
28 22:22 <dave> :-)
28 22:22 <aleksi> ok, I have my own idea of A* searching
28 22:23 <dave> sweet lets hear
28 22:23 <aleksi> I'm gonna pursue it, but feel free to interrupt me if needed for the team effort
28 22:23 <batsman> well
I don't think we'll have anything in 1H30 mins
:-(
28 22:23 <aleksi> davel, ok, if you're really interested in, I'll write it down at the wiki
28 22:23 <dave> aleksi, what is it?
i'd like to hear
28 22:23 <aleksi> mine surely won't be ready in an hour, I guess, based on how long it took to make the infrastructure work
28 22:24 <dave> batsman, nope, doubt we'll have a worth lightning entry
28 22:24 <batsman> I'm working on something that could give some results
but chances are like 10%
28 22:24 <dave> well maybe we will, hehe
probably 9.9% better than the rest of this
rest of us
28 22:25 <batsman> maybe I overestimated :)
28 22:26 <dave> aleksi: are you gonna write it up on the wiki?
if so, urusai.org ?
28 22:28 <dave> I'll be back in 10 min or so, gonna go stretch the legs and get some sun & air
maybe enlightenment will strik
28 22:28 <batsman> we need it
28 22:29 <dave> ok I will try hard
28 22:36 <batsman> daniel...
28 22:37 <daniel> yeah?
28 22:37 <batsman> one doubt on pointgrid
do goal points have value 0?
cause I'm working on something to find the SP given that
28 22:37 <daniel> Yeah, they do. We should special-case it in grid_value.
28 22:38 <batsman> and it gets block near the end
actually, in one cell that seems to be the end, but with distance == 5, although it's at most at distance 1
28 22:39 <batsman> forget it, I'm stupid
28 22:41 <batsman> aha
did it
have something that calculates the shortest path
now
I'm going to use the points in my strategy
to always aim to the next one
so I optimize direction only
right?
28 22:42 <daniel> Sounds good.
28 22:43 <batsman> I'm sure you'll be happy to know that the optimum path for 0_stupid or whatever is
[[FPN.new(6,0), FPN.new(2,0)], [FPN.new(7,0), FPN.new(3,0)], [FPN.new(7,0), FPN.new(4,0)], [FPN.new(6,0), FPN.new(5,0)], [FP
N.new(5,0), FPN.new(5,0)], [FPN.new(4,0), FPN.new(5,0)], [FPN.new(3,0), FPN.new(4,0)], [FPN.new(3,0), FPN.new(3,0)], [FPN.ne
w(4,0), FPN.new(2,0)], [FPN.new(5,0), FPN.new(2,0)]]
28 22:44 <daniel> Not surprising
28 22:44 <batsman> I hope it's right, at least :|
now, is it possible to use that?
28 22:45 <daniel> Do it for 8_ManyWays and I'll be impressed.
28 22:45 <batsman> aha
I'll try
but it should work, don't see why not
it takes quite some time
ups
I'm really tired
forgot it has to calc the grid first :)
that alone takes 2minutes
28 22:46 <batsman> I HAVE IT!!!
28 22:47 <daniel> Now if only we can figure out how to use this information.
28 22:47 <batsman> now, I'm going to write a tool to display it
I have one idea
take a look at doc/gradient_method.ps
this will make it easier for me to explain
do you have it?
28 22:48 <daniel> Oh, no. Let me do a cvs update -d
28 22:48 <batsman> ok
in the meantime, I'll write the tool to show the path
and put all somewhere
where do you think I should put it
in model/ ?
?
doesn't look right to me
please please tell me where I should put the stuff, cannot think much now
28 22:50 <batsman> I just want to ci that
28 22:50 <daniel> put tools in tools
28 22:50 <batsman> ok, I'm not braindead yet :)
I mean the SP code
isn't that something general for strategies to use?
28 22:51 <daniel> Well, you could put it in strategy
28 22:51 <batsman> ok then, you're the one who created it so...
ok
strategy/shortest_path.rb
you have a couple minutes to object while I copy the code away
28 22:54 <daniel> Ok, so I'm looking at gradient_method. And?
28 22:55 <batsman> ok
I have a list (well, array) of points
that form the SP
only dumb strategy is to follow them in order
the way:
always aim at the next point
problem
how do we know that we already "went through" one point?
my idea:
28 22:57 <batsman> take the like from the point that's still marked as next
to the one after
then take the line _perpendicular_ to that one
once you cross it,
you have to go for the next point
in the diagram
the intersections of the SP and the orthogonal lines are the points
(only some of them)
that define the SP
28 22:58 <batsman> the perpendicular line defines before and after
ok?
28 22:59 <dave> ok
28 23:01 <dave> aleksi ?
28 23:06 <batsman> 55 minutes to go
28 23:07 <dave> anything I can do?
I noticed one of the tests is failing, I haven't been running the tests, seemed like a lot of people were looking after that stuff
28 23:08 <batsman> really?
I haven't run them for a whil
28 23:08 <dave> but one is failing and I dont know if its something on my rnf
my end
28 23:08 <batsman> do you want to take a look at the shortest paths?
I have a tool that creates xpm with them now
I'm trying to add colour to the XPM
28 23:09 <dave> is it in cvs
28 23:09 <batsman> not yet
wait I sec, I want colour :)
28 23:09 <dave> what do you want me to look at with the shortest path?
28 23:10 <batsman> you can try to get the control points from that
for your bezier thing
28 23:10 <lennon> i was thinking about that
28 23:10 <batsman> or implement a strategy w/ that
28 23:10 <dave> thats lennon
28 23:10 <batsman> ok
I cannot think very clearly now
it's only 1AM localtime
but I've been working on this since 7am
28 23:10 <dave> my lack of sleep is catching up to me too
I have had 2h sleep since this started
28 23:11 <batsman> w/ less than 2 hours break in total
28 23:11 <lennon> any ballpark estimates on how many points we're going to be looking at in an SP solution?
28 23:11 <batsman> you must be really bad
28 23:11 <dave> and that last many hours have been seriously unproductful
28 23:11 <lennon> i.e., the simple one you posted the matrix for had 9; is is going to scale linearly, or something worse?
28 23:11 <batsman> no idea
28 23:11 <lennon> ok
28 23:12 <batsman> I can count it if you want
28 23:12 <lennon> i'll keep looking for n-point bezier algos, then
28 23:12 <batsman> just give me a sec, I want colour
28 23:12 <lennon> 3-4 points is trivial, then you have to start using Bernstein polynomials, and all kinds of ugly stuff
it may not scale
28 23:13 <batsman> well, all I can tell you
is that the solution for track 8
28 23:13 <lennon> at least if we're calculating one continuous curve, rather than stiching together a bunch of small ones
28 23:13 <batsman> took a couple screen pages
28 23:13 <lennon> crap
stiching it is, then :)
actually, i'll be interested to see visually what the SP points look like on the course...
28 23:14 <batsman> almost done
28 23:14 <lennon> ...since I was using a totally diff method to pick the critical points,
which didn't do well stitchin the idividual curves together
SP may be better-suited for that form
28 23:15 <batsman> how do you put colour in a xpm?
I keep touching the header and don't get anything
28 23:15 <aleksi> davel, and rest, I was writing the description of my idea that you wanted to see
now, check out http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=AleksiSearcher
28 23:15 <batsman> in the following:
static char * foo_xpm[] = {
"1024 768 92 1",
what does the '1' mean?
28 23:16 <aleksi> and let's have a brief discussion if I didn't explain well enough
28 23:19 <batsman> aha
the SP for the first track has got 2140 points
28 23:19 <aleksi> based on batsman discussion on my screen buffer, I see my idea for the heuristics wasn't all that unique, but the rest of it might still be useful
28 23:19 <batsman> but beware, it's mostly straight lines!
28 23:19 <aleksi> what is SP?
28 23:19 <batsman> shortest path
28 23:19 <lennon> oh, god...i wish i'd found this url about 24 hours ago: http://home1.stofanet.dk/breese/aaai99.html
28 23:21 <dave> da-da-da-duh
except its just overview stuff
28 23:22 <lennon> yeah, but it could have saved me at least a fair bit of blind stumbling
28 23:22 <tobias> updated fixpoint a bit
28 23:22 <dave> points ok
28 23:23 <batsman> ok
i'm trying to ci
but have conflicts
28 23:23 <tobias> with units.rb?
28 23:23 <batsman> no
with runstrategy and others
I haven't touched units.rb in ages :)
28 23:24 <tobias> ha! ages -- no more that 24 hours possibly
28 23:24 <aleksi> davel, is there any idea in there?
28 23:25 <tobias> have to go to bed -- see you tomorrow
28 23:25 <batsman> ok
cu
just ci the dumpsp.rb thing
28 23:25 <dave> aleksi: my brainis failing fast
28 23:25 <batsman> please check if I screwed anything in the process
I had conflict and I'm not sure I resolved them 100%
28 23:26 <aleksi> I think, that since lightning entry wasn't possible, I might as well sleep well and be wise tomorrow
28 23:26 <batsman> yeah
28 23:26 <dave> yeah good idea
28 23:26 <batsman> we're all going now
28 23:26 <dave> we still have 2 full days
28 23:26 <batsman> but please
just take a look at the pics
28 23:27 <aleksi> instead of rushing to implement the idea now start with it tomorrow
28 23:27 <dave> I will
28 23:27 <batsman> I'm suffered a lot to ci it
just do ruby tools/dumpsp.rb test/data/8_ManyWays.trk > path.xpm
and take a look at how "smart" the dumb algorithm is :P
28 23:27 <lennon> i'll keep plugging away on the spline algo, and see if i can't ci some additional strategies
those of you who haven't slept in the last 12 hours should go do so
28 23:28 <batsman> ok
12 hours???
28 23:28 <dave> yeah almost 12 for me
28 23:28 <lennon> or however long it's been
28 23:28 <dave> I was up at 6 my time
28 23:29 <batsman> I started at 5GMT
28 23:29 <aleksi> I woke 7 hours ago after 7 hours of sleep, but my brains would like to take another 7 now, I guess
28 23:29 <batsman> now it's about 23H30GMT
:)
7 hours of sleep is not bad
I won't get that much today
28 23:29 <dave> I had 2 hours of sleep in since things started
nap time for sure
28 23:30 <lennon> i haven't had that much sleep in several days...the contest just came at the end of a tough week
28 23:30 <batsman> wow aleksi, ran your tests for the first time, impressive
28 23:30 <lennon> go sleep, kids
28 23:30 <batsman> now, that's a man, davel!!!
28 23:30 <dave> my mind was relentless early one
but now I dont have much
28 23:30 <batsman> however be careful w/ the code
28 23:30 <dave> ?
28 23:30 <batsman> hope you can get somebody to assist you
it's otherwise gonna be hard to code alone, in the dark :)
28 23:31 <lennon> i'll be good, for sure...
if you guys are back in the next 6 hours or so, i should still be here...
28 23:32 <batsman> ummm
28 23:32 <aleksi> lennon, when shall you sleep next time?
28 23:32 <batsman> I'll probably aim for 7H sleep
28 23:32 <dave> its dinner time for me, but I will nap, I will be back within the next 6h
28 23:32 <lennon> well, it's 4:40pm my time, and i got up around 9:30am
28 23:32 <batsman> you know, spending 1H more time sleeping
can boost my productivity tomorrow
we're clones
28 23:33 <lennon> i should make it until at least 3am or so, but then i'll need to nap again
28 23:33 <batsman> but you're tougher than me
28 23:33 <aleksi> ok guys, let's have a nice night
28 23:33 <batsman> I've only been here for 19H but I'm tired :P
28 23:33 <dave> seeya
28 23:33 <aleksi> I'll go home, and hack there
28 23:33 <batsman> cu
28 23:33 <lennon> ciao
28 23:33 <aleksi> I guess I'll write the finder in C and swig, because otherwise it'll be slow as hell
sweet dreams
28 23:34 <batsman> I stay connected to get the log
don't know if I'll be kicked out after some time or what
i don't normally IRC
28 23:34 <dave> batsman: ruby ./tools/dumpsp.rb test/data/8_ManyWays.trk > 8.xpm
./strategy/shortest_path.rb:41:in `get_shortest_path': undefined method `sort_by' for #<Array:0x401ec4e8> (NameError)
from ./strategy/shortest_path.rb:34:in `loop'
from ./strategy/shortest_path.rb:34:in `get_shortest_path'
from ./tools/dumpsp.rb:52
28 23:35 <batsman> aaaaaaaah
it works for me
shit, it's ruby 1.8
sorry
28 23:35 <aleksi> me too
28 23:35 <batsman> I forgot we're targeting 1.6.8
28 23:35 <aleksi> with 1.7 series
28 23:35 <dave> I can install 1.6.8
i mean 1.8
no big deal
28 23:35 <batsman> nope, just let me change the code
28 23:36 <dave> latest preview or what?
28 23:36 <lennon> s/sort_by/sort/
28 23:36 <aleksi> could anyone prepare some hand made paths for the tracks?
just polyline from start to finish, like [(10,10), (15,100), ...]
28 23:37 <dave> paths or trace ?
28 23:38 <aleksi> paths
anyway, sweet dreams to everyone
28 23:38 <dave> bye
28 23:40 <batsman> ok, just did ci w/ s/sort_by/sort/
28 23:40 <lennon> thanks
now i just hope my poor little 800mhz chip can handle the processing... ;)
28 23:41 <batsman> it'll
it takes but a couple minutes to process track 8 in my k7
so make it 5 in your machine
well, that was my last ci of the day
I'm sleeping some 7H now
perhaps even more
28 23:42 <lennon> sweet dreams
28 23:43 <batsman> cu guys, we'll see if you can surprise us tomorrow
bye
28 23:44 <dave> bye
28 23:50 <dave> well batsman path tracing is pretty nice
28 23:52 <lennon> the xpm renderer? yes it is
28 23:53 <dave> yep
28 23:53 <lennon> weren't you going to go to sleep?
29 00:00 <dave> I am
I need it
seeya
29 07:01 <batsman> hello?
aleksi?
I'm initializing my brain, need some more minutes to be fully operational while I have breakfast
29 07:06 <batsman> uh? no commits this night??
29 07:09 <batsman> aleksi?
29 07:13 <batsman> guess it's now me and me :)
29 07:26 <batsman> hi!!!
29 07:32 <lennon> anyone still alive out there?
29 07:32 <batsman> I am
29 07:33 <lennon> how goes it?
29 07:33 <batsman> well, just initialized my brain
seems there were no commits this night
29 07:34 <lennon> i just made some
29 07:34 <batsman> and my IRC log shows no activity here
seems davel went sleep shortly after me
29 07:34 <lennon> indeed
29 07:34 <batsman> and that's the end of my logs
29 07:34 <lennon> ok
29 07:35 <batsman> mmm, I'll take some time to read
first the code you committed
then some math stuff on optimization
and bezier
29 07:35 <lennon> feel free to check the wiki for my comments on OverallStructure and PathStrategies, too
i'm holding off on the bezier curve work for right now, though
29 07:36 <batsman> ok
29 07:36 <lennon> i think we're going to have serious scaling problems there,
unless we hand-draw the control points
29 07:36 <batsman> ...
I can have a few computers running whatever we get
29 07:37 <lennon> well, we're looking at no less than O(N**2) complexity,
even for less than pretty curves
29 07:37 <batsman> and on monday, I could easily get a dozen PIII 800 Mhz or something
29 07:37 <lennon> it's certainly an option
29 07:37 <batsman> probably more
actually, it's just a matter of logging in the computers in a lab
and running my things there without the local user realizing it :)
29 07:38 <lennon> well, maybe i'll go back through some of my notes...i left off that track several hours ago
29 07:39 <batsman> what your local time now?
's
29 07:39 <lennon> 12:40am
i'l probably be up for another hour or two,
but i'm going to try to actually get no less than five hours sleep tonight,
29 07:39 <batsman> uhh, 9:40am here
29 07:40 <lennon> since the real crunch time is just coming up,
29 07:40 <batsman> that's right
spend some time
to save more
29 07:40 <lennon> and i've got a job interview on Tuesday
29 07:40 <batsman> yes, better sleep well before
29 07:40 <lennon> so i can't be completely dead to the world ;)
well, the interview isn't until 6pm
which is nice
anyway, i'll let you concentrate
29 07:41 <batsman> bags under the eys should have disappeared by then
29 07:41 <lennon> let me know if you have any questions about the code or wiki comments
29 07:41 <batsman> ok
I'll tell you
I'm still in my init phase
waiting for the first caffeine dose
29 07:42 <lennon> and you can speak?
i'm fairly non-verbal until i at least smell my morning coffee
29 07:43 <batsman> then if I understand your method I might try to develop
hehe, I've been very careful not to become too addicted to caffeine
so
29 07:43 <lennon> good plan -- the avoiding addiction, especially
29 07:43 <batsman> I cannot take much
actually
some 3 years ago
at the time I got a flat-rate internet connection
I spent one month sleeping 3-4 hours or so a day
I was having a real lot of caffeine
I prefer tea :)
29 07:45 <batsman> something like a few litres tea a day
tea @ breakfast, ice tea at lunch, tea here, tea there
then after that month
I discovered withdrawal symptoms
:)
since then
29 07:47 <batsman> I cannot take more than say ~100mg caffeine
29 07:47 <lennon> if only that were enough to get me off caffeine, or nicotine...
29 07:47 <batsman> w/o getting hooked again
29 07:47 <lennon> ...though i'm actually starting another cycle of quitting smoking this weekend, which probably hasn't helped my sleep and concentration abilities
29 07:47 <batsman> which mains headache for a couple days or more
s/mains/means/
29 07:48 <lennon> i actually do okay after about 24 hours with no caffeine
29 07:48 <batsman> dunno why
29 07:48 <lennon> but you don't want to be anywhere near me if i haven't had a cigarette in a couple of days
29 07:48 <batsman> it seems the ICFP contest...
... came at the wrong time for everybody
29 07:49 <lennon> oh, well
perhaps it will have come at the wrong time for the ocaml team, as well ;)
or the schemers
29 07:49 <batsman> well
I'd expect the French ocaml team to crush us
these guys have good very integrated teams
they share the pizzas
29 07:50 <lennon> and very good functional compilers
29 07:50 <batsman> and have quite some understanding of AI and things
you're right, ocaml is pretty fast too
even if they went the brute-force way
they'd get a better solution as they have more resources
but well
we can still have some fun :)
29 07:51 <lennon> and have been, i hope
29 07:51 <batsman> it's for me the first "real time coding"
but I almost didn't participate: I depend on my internet connection, which is down like 4 times a week
I once had no internet for 3 weeks :-(
29 07:52 <lennon> ouch
29 07:53 <batsman> OTOH when it works it's pretty fast
29 07:53 <lennon> my whole household gets withdrawl symptoms if we go 3 hours without access
29 07:53 <batsman> up to 4Mbps
29 07:53 <lennon> very nice
we've only got about 1mbit, but it's actually fairly reliable
and we have more laptops w/wireless cards than people living here
i do most of my work on my couch
29 07:54 <batsman> now, I'd trade the Mbps for reliability
nice
29 07:54 <lennon> there's always dialup, or ISDN ;)
29 07:54 <batsman> not here
I'm in a dorm near the univ.
29 07:55 <lennon> ahh
29 07:55 <batsman> actually in a Chinese ghetto
phone is expensive
the good thing is I have my computer 2 meters away from my bed
29 07:56 <lennon> most of the time, i try to keep my computer out of my bedroom
29 07:56 <batsman> so I need like 1 minute to go from sleep to "potentially coding" state
29 07:56 <lennon> otherwise, i never sleep
29 07:56 <batsman> I use ear plugs all the time
this isolates me from the Chinese too
29 07:56 <lennon> not from the noise -- from the temptation
29 07:56 <batsman> hehe
I had to overcome that some months ago
:)
29 07:59 <batsman> there's something I don't really get about your idea in PathStrategies
"anticipate the shape of turns by measuring the change in distance"
29 08:00 <lennon> basically, it can "see" the shape of a curve,
29 08:00 <batsman> does this build upon the sortest path, by refining it?
how can it see the shape of the curve if it doesn't know it's got to go that way?
29 08:00 <lennon> by measuring the distance from different angles, but the same origin position
that's the other algorithm: longest straight paths
or, maximum distance to a wall
basically, if you can tell how far away the walls are from your position and direction,
you can see the direction in which the you can travel longest before hitting one or turning
29 08:02 <batsman> ummm, that "and direction" thing is interesting
so one wall perpendicular to your current direction
is "closer" that one paralell
right?
29 08:02 <lennon> not necessarily
29 08:02 <batsman> it's a nice way to avoid running into the walls
I mean, we could add such a term
29 08:03 <lennon> the turn anticipation could work for that, as well
and the whole idea is to try to come up with several of these "little" strategies,
and combine them into a single score
29 08:03 <batsman> do you think these things could be used to refine one path
I mean, we have already the SP
29 08:03 <lennon> we do
29 08:04 <batsman> would it be possible to do some local optimization in curves?
29 08:04 <lennon> and i'd be interested to see what the combination did
i think the local optimization will come more from spline fitting
29 08:04 <batsman> possibly
29 08:04 <lennon> maybe even using a centripetal fit model
29 08:04 <batsman> but I still think the control points or something can be taken from the SP
I keep referring to the SP
because as of now
it's the only thing working
29 08:05 <lennon> except that the SP looks nothing like a good "racing line"
29 08:05 <batsman> and even though it's stupid and non-optimal
it works
29 08:05 <lennon> personally, i'd rather start with a path that just stays equidistant from the walls
and refine from there
29 08:05 <batsman> that's why I'd like to be able to optimize paths
well, take it like that:
29 08:06 <lennon> the SP *likes* tight corners, because they are shorter distances
29 08:06 <batsman> the SP gives you the overall path
29 08:06 <lennon> but our model should avoid them, because they require you to slow down far too much
29 08:06 <batsman> then you can modify it to always stay equidistant from the walls
29 08:06 <lennon> esp. if we're even going to consider the rally mode
sure
29 08:07 <batsman> it should be easier and faster
to refine one already existent path
than to find it from scratch
no?
29 08:07 <lennon> you're right, of course
29 08:07 <batsman> another thing we can do
is create a new pointgrid method
that introduces a "wall nearby" correction term
so that a path near a wall
is penalized
29 08:08 <lennon> actually, i was just about to mention an article i found about "field effect" pathfinding that does exactly that
29 08:08 <batsman> that's pretty easy
I guess I can code it in 10 minutes
and then use the standard dumpsp tool to see the difference :)
29 08:09 <lennon> you basically get a wave propagation model from the destination and around obstacles
sure
29 08:09 <batsman> I'll try it now
29 08:09 <lennon> okay
29 08:11 <batsman> mmm poingrid has changed since I last saw it
now there's a new adj term
need some time to think
29 08:14 <lennon> can i ask a favor, as long as you're poking around in the pointgrid code?
29 08:15 <batsman> yes?
29 08:15 <lennon> i'm hoping we can move some of the reusable geometric calculations out of there, and into the 'geom' module
29 08:15 <batsman> geom? have to cvs update :)
29 08:16 <lennon> since the curve-fitting, distance-finding, etc. code all do similar things as well
that was in the commit i mentioned just after we started talking
29 08:16 <batsman> strategy/avoidwalls.rb
29 08:16 <lennon> it's just some general-purpose stuff right now,
29 08:16 <batsman> interesting
29 08:17 <lennon> and the avoidwalls bit is just the start of the algorithm
29 08:17 <batsman> ok, I'll see if I can generalize it
29 08:17 <lennon> but it does help to illustrate what i mean by "seeing" the shape of upcoming obstructions
29 08:17 <batsman> nice, I might reuse #distance_to_wall
29 08:18 <lennon> there's a Point class in geom.rb, which does distance calculation, interpolation, etc.
and please do
29 08:18 <batsman> I need that to calculate the penalty associated to tight curves
29 08:18 <lennon> i basically just threw stuff there to get it into code before i forgot it
sounds good
29 08:18 <batsman> I think this could give good results
29 08:19 <lennon> also, at an architectural level, what do you think of the idea of trying to decompose the strategies into individual heuristics?
i know the neural net bit may be somewhat of a reach,
29 08:19 <batsman> we can use them as terms in the scoring process
29 08:19 <lennon> exactly
29 08:19 <batsman> and then play w/ constants
but will these things work as the shortest_path.rb ?
29 08:20 <lennon> that's exactly what i wanted the neural net to do
29 08:20 <batsman> I mean, make a distance matrix and deriving the path from there?
29 08:20 <lennon> play w/constants, not the SP
29 08:21 <batsman> but we can use these heuristics
when scoring every cell inside pointgrid
then the small plain old algo "find gradient" would find the associated path
no?
29 08:22 <lennon> that could work
29 08:22 <batsman> I mean, refining a path is easier than making from scratch
but...
... making sure the path you find is ok by several heuristics
is better
29 08:22 <lennon> esp. if the SP algo. was offset by the wall-avoidance or curve-fitting
29 08:22 <batsman> yes!!!!
wall-avoidance is what I wanted to do
now I see I have to make a new pointgrid
to generalize
as it works now
points near the goal are guaranteed to have lower distance
29 08:24 <vincenz> How are you guys doing
29 08:24 <batsman> but this would not hold if we add penalties due to walls
hi
29 08:24 <vincenz> hmm
29 08:24 <lennon> fine
29 08:24 <vincenz> by the way
I'm from another team
just so you know
29 08:24 <lennon> a spy!
29 08:24 <vincenz> just came to say hi
29 08:24 <batsman> we didn't make it within the first 24H
29 08:24 <lennon> * lennon ducks and hides
29 08:24 <batsman> a spy!!! :)
29 08:24 <vincenz> that's why I said I'm from another team
so you can pause your conversation
29 08:24 <batsman> you came here a few times!
29 08:24 <vincenz> yes
very briefly
how far are you guys?
29 08:25 <batsman> you were monitoring our activities
ok
29 08:25 <vincenz> in general
just to see how far you are
29 08:25 <lennon> which team are you from?
29 08:25 <vincenz> scheme
29 08:25 <batsman> let's make some info exchange
29 08:25 <vincenz> sure
but we're like in....4 people, 2 part time
29 08:25 <batsman> here we had more people
29 08:26 <vincenz> (4 total...of which 2 part time
our chan is pretty big
but they're just observers
29 08:26 <batsman> but we were not very productive the first day
29 08:26 <vincenz> * vincenz nods
29 08:26 <batsman> or spies :)
29 08:26 <vincenz> we were pretty productive the first 12 hours or so (i fyou take aweay sleep)
then we kinda got bogged down
29 08:26 <lennon> we have eight cvs committers,
29 08:27 <vincenz> I had calculated a certain preprocessing step would take 5000 seconds
I have 4 cvs committers
29 08:27 <batsman> wow
29 08:27 <vincenz> yeah
29 08:27 <lennon> but only six doing much
29 08:27 <vincenz> then at the end of the 24 hours
we changed tactics
now it's been sleep pause
and I just woke u
then back to it
29 08:27 <batsman> our team is quite distributed to say to least
29 08:28 <lennon> are you close to GMT as well, then?
29 08:28 <vincenz> * vincenz nodsd
I'm in belgium
29 08:28 <lennon> i'm GMT-7
west coast, USA
29 08:28 <vincenz> another guy here is in austria
29 08:28 <batsman> we have people in several time zones
29 08:28 <vincenz> then I've got two people from the east coast I think
29 08:28 <batsman> here we range from GMT+6 to GMT-7
29 08:28 <lennon> we've a couple more US folks (both east coast, IIRC)
29 08:28 <vincenz> does it go faster seeing you have 8 cvs'ers?
29 08:29 <lennon> i wouldn't say "faster", necessarily...
29 08:29 <batsman> honestly
29 08:29 <vincenz> cleaner code perhaps
29 08:29 <batsman> I don't know how much you have
29 08:29 <lennon> ...we just gave accounts to pretty much anyone who asked
29 08:29 <vincenz> you have people who can clean up
29 08:29 <batsman> but I'm a little bit disappointed w/ the amount of code we have at the moment
29 08:29 <vincenz> codewise....we don't have a lot
29 08:29 <batsman> but it's pretty clean
29 08:29 <vincenz> but that's cause scheme requires very little
:P
29 08:29 <lennon> and we have unit test for most of it
29 08:29 <vincenz> we don't
29 08:30 <batsman> yes, that's really nice
29 08:30 <vincenz> but so far our steps work
29 08:30 <batsman> now, the figure
29 08:30 <lennon> besides, shouldn't you be talking in "expressions," not "lines"?
29 08:30 <vincenz> (took some cursing and debuggin)
29 08:30 <batsman> we have >38000 unit tests :)
29 08:30 <vincenz> lennon: I'm NEW at scheme
I'm more familiar with ruby in fact
and ocaml
but I wanted to do it in ocaml
and noone was game
then someone invited me for scheme
and I offered my box as repository
29 08:30 <batsman> you could have come to Ruby
29 08:31 <vincenz> but we have some tools in java and c too
29 08:31 <batsman> this team is 100% open :)
29 08:31 <vincenz> so is ours :)
29 08:31 <lennon> we have one perl script still hiding in our cvs
29 08:31 <batsman> just whoever came by got cvs access
yes :)
29 08:31 <lennon> our dirty little secret ;)
29 08:31 <vincenz> same here
29 08:31 <batsman> if you want, I can rewrite it in Ruby
29 08:31 <lennon> not really worth the time
unless we have hours to kill before the deadline, or something
29 08:31 <vincenz> so...if you don't mind me asking
at what stage are you?
conceptually
29 08:32 <batsman> ummm
29 08:32 <lennon> esp. since it's just a track visualization tool
29 08:32 <batsman> this is sensible information :)
lennon?
29 08:32 <lennon> we're all working from a lack of AI knowledge,
29 08:32 <vincenz> I suppose you can read in the track
ah
29 08:32 <batsman> is it OK to disclose our secret weapons? :-)
29 08:32 <vincenz> at the beginning of the ai stage?
29 08:32 <lennon> but we're pretty close to a working set of heuristics
29 08:32 <batsman> umm
we have a framework
29 08:32 <lennon> yeah
29 08:32 <vincenz> ah I think we're going to use heuristics too
29 08:32 <lennon> past beginning,
but not stable yet
29 08:32 <batsman> for evaluating things
29 08:32 <vincenz> I'm giong to build a framework
but that'll take really short
our simulator was one of the first things finished
except for a few bugs
29 08:33 <lennon> here, too
29 08:33 <batsman> yes
29 08:33 <lennon> test cases helped w/the bugs
29 08:33 <batsman> but now it should be solid
29 08:33 <vincenz> skidding model?
29 08:33 <batsman> we have 38000 assertions!!!
29 08:33 <lennon> nothing yet
29 08:33 <vincenz> did you implement that at all?
29 08:33 <batsman> o no
29 08:33 <vincenz> the skidding?
us neither
I mean...tiebreaker...
29 08:33 <batsman> we were running lightning
yes, first solve all 10 tracks
29 08:34 <lennon> i'll be happy if we can get around all the tracks, personally
29 08:34 <batsman> then optimize speed
29 08:34 <vincenz> 10 tracks?
lennon: I know what you mean
1-9...10?
29 08:34 <lennon> 0-9
29 08:34 <vincenz> eum
29 08:34 <lennon> oh, wait...
29 08:34 <batsman> hehe
29 08:34 <lennon> 0 is just in our repository
oops
29 08:34 <batsman> 0 is our testing track :)
29 08:34 <vincenz> ah
self made
yeah we have this stupid 10-10 track with a circle
made all the way in the beginning to test parsing
29 08:35 <lennon> our real secret weapon is my roommate, who doesn't write code at all...
29 08:35 <vincenz> hehe
29 08:35 <lennon> ...but is a certified race driving instructor ;)
29 08:35 <vincenz> the thinktank
oh
:)
29 08:35 <batsman> hehe
29 08:35 <vincenz> well
I'm going to shower
and get some food
29 08:35 <batsman> ok
29 08:36 <vincenz> bye people
good luck!
29 08:36 <batsman> cu
29 08:36 <lennon> you too
29 08:36 <batsman> good luck to you too
well
29 08:36 <lennon> well, that was certainly personable
29 08:36 <batsman> :)
but he had been spying on us :)
hehe
29 08:37 <lennon> if he's thinking that they "might use heuristics," i think we're ok
29 08:37 <batsman> doesn't seem they're more advanced
29 08:37 <lennon> as long as he doesn't have the wiki url
;)
29 08:37 <batsman> yes :)
nor CVS access
29 08:37 <lennon> or a web browser, and access to google
29 08:37 <batsman> but google takes some days to update, doesn't it?
29 08:38 <lennon> depends on the site
29 08:38 <batsman> is there any "sensible" link in the wiki (rubygarden's)?
29 08:38 <lennon> but for rubygarden, and the link from there to my little box, probably "yes"
the link to the web server is fine
29 08:38 <batsman> I'm going to check it
29 08:38 <lennon> only my email was obfuscated
wait -- what if i want the googlejuice!
i did just remove anonymous access to the urusai.org wiki, though
29 08:39 <batsman> ok
29 08:39 <lennon> at least until the contest is over
29 08:39 <batsman> then we're safe
29 08:39 <lennon> it was read-only
but informative ;)
29 08:39 <batsman> yes
by vincenz' words
29 08:40 <lennon> so, as i was about to say before our visitor dropped in...
29 08:40 <batsman> I would say they're in worse shape that us
29 08:40 <lennon> one other thing i'd like to see in the new pointgrid:
(or the test cases, at least)
29 08:40 <batsman> yes?
29 08:40 <lennon> why not generate it once, and then just marshal it to disk?
29 08:41 <batsman> yes
29 08:41 <lennon> each run takes a couple of minutes on my machines,
29 08:41 <batsman> I had been thinking of that
it'll be nice
ok
29 08:41 <lennon> which is time i usually spend staring at the terminal window
should be just a few lines
29 08:41 <batsman> I'll make the generalized pointgrid
29 08:41 <lennon> i'm even happy to add it, once the new class is in place
sounds good
29 08:41 <batsman> which accepts a correction factor for a given point
and is able to save to disk
29 08:42 <lennon> i'm going to work some more on the rangefinding and curve fitting algos
29 08:42 <batsman> ok
cu now
29 08:45 <vincenz> just a small question
29 08:46 <batsman> ??
29 08:46 <vincenz> do you guys know of any other teams on freenode?
29 08:46 <batsman> I do not
29 08:46 <vincenz> was jsut curiousy
ok I'll leave the chan again
bye!
29 08:46 <batsman> been working on our code base for some 19H yesterday, no time to meet people
hey!
29 08:46 <vincenz> what?
29 08:47 <batsman> you can drop by to tell us
29 08:47 <vincenz> tell you?
29 08:47 <batsman> ... if you found other teams
29 08:47 <vincenz> oh
sure
29 08:47 <batsman> :-)
spying is fun
29 08:47 <vincenz> :)
heh
I'm not spying
just curious
29 08:47 <batsman> hehe
I know
29 08:47 <vincenz> * vincenz leaves the chan
29 08:47 <batsman> lennon
29 08:47 <lennon> yes?
29 08:47 <batsman> I'm a bit concerned now
what if some of the guys we had yesterday
all time time in the channel
w/o activity
were simply spying ?
29 08:48 <lennon> one of the risks of using an open channel on a public server, i suppose
29 08:48 <batsman> for instance... ¿jtra?
did I miss something
29 08:49 <lennon> i really don't think that we have that much for someone to steal
29 08:49 <batsman> or has he never actually showed up?
glups
don't let them hear that
we'd better lure them in here
so they keep reading the IRC logs
instead of coding :)
29 08:49 <lennon> oh, good...we'll get lots done that way
29 08:49 <batsman> we should spread the news
we have a super-optimizing path finder algo
it runs in 2 seconds
29 08:50 <lennon> i can make one that runs in 2 seconds...
29 08:50 <batsman> and test 3.10^11 combinations
:)
29 08:50 <lennon> ...it just won't be very pretty
29 08:50 <batsman> can you?
29 08:50 <lennon> maybe not 2 seconds, but fast
29 08:50 <batsman> my problem is
that I think I'm lacking some background
29 08:51 <lennon> as am i
29 08:51 <batsman> so I keep referring to the SP
and pointgrid
cause I see how it works and how it can be tweaked
29 08:51 <lennon> that's fine
29 08:51 <batsman> but this "intelligent things"
that cut the track in segments
and then do magic w/ them
I see how they could work
but I don't see how to code that :)
29 08:52 <lennon> well, it took me about 8 hours to write the code that i checked in today
29 08:52 <batsman> poingrid is tangible
????
29 08:52 <lennon> i spent a lot of time drawing splines, and reading algorithm descriptions, etc.
29 08:52 <batsman> that much??
wow!!
you've read quite a lot!
29 08:53 <lennon> i mean, it all poured out in about an hour and a half, once i had it figured out
but i count the thinking time
29 08:53 <batsman> ok
29 08:53 <lennon> 'cause it certainly counts for the contest
29 08:53 <batsman> yes :)
in the long run
29 08:53 <lennon> so, don't worry about not coming up with some amazing algorithm
29 08:54 <batsman> thinking should be an optimal strategy :)
I have ideas too
but I want to have something _now_
to rely on
29 08:54 <lennon> and that's a good view
29 08:54 <batsman> even if it's dumb
29 08:54 <lennon> that's why i wanted to use floats instead of FPNs
29 08:54 <batsman> it's good if it makes all tracks
why floats?
speed?
29 08:54 <lennon> i don't want to know how many man-hours have gone into the FPN code
and yes, speed too
29 08:55 <batsman> yes, FPN took quite some time
but now it seems quite solid
after tobias' work
BTW
I'm checking http://www.rubygarden.org/ruby?ICFP03/TheRubyTeam
and see that people didn't do what they said
Dave is here, ok
Neumann was here shortly yesterday
29 08:56 <batsman> Dmitry ???? no AFAIK
Idan?
you are here, OK
aleksi and me
29 08:57 <lennon> not too surprising -- it's very, very easy to write a line in a wiki page that says you'll slave over a keyboard for 72 hours
not so easy to do, or to even remember to do
29 08:57 <batsman> then Daniel became de facto one "core member"
he's responsible for having the strategy framework
which still doesn't run
but could some time give results
29 08:58 <lennon> maybe i should see if i can't clean that up some before i go to sleep tonight
i think i'm all "clevered" out, but some good old-fashioned maintenance coding should be fine
29 08:58 <batsman> the problem is...
we don't know if the problem lies in the strategy
or in the framework
perhaps the framework is ok
29 08:59 <lennon> the strategy is fine
but right now, as far as i can tell, the strategy *is* the framework
and that's the bigger problem
29 08:59 <batsman> and just strategy/bestpointtrack.rb needs work
well
yes
when I saw "framework" I mean runstrategy and model/strategy
but they're pretty clean and seem ok
29 09:00 <lennon> basically, what i'm imagining is a hybrid static/dynamic planner:
pointgrid, with the correction factor, becomes the static, "offline" stage
29 09:00 <batsman> yes! exactly
29 09:01 <lennon> which is then fed into a "dynamic" strategy-based evaluator,
29 09:01 <batsman> first get that path, then have some strategy trying to follow it, but taking into account more things such as speed
the problem is...
we can get up to the path part ok
but strategy just doesn't work :-(
and we need that to generate the traces from the path
29 09:02 <lennon> that's why i'm thinking i should spend some time working on it
29 09:02 <batsman> but it requires essentially thinking a lot
not coding
29 09:02 <lennon> even just getting the basic driver and trace output working, with a strategy that just follows the SP
29 09:02 <batsman> that could be nice
29 09:02 <lennon> and *then* starting to add heuristics
29 09:02 <batsman> that's what I've always wanted to do
get the path
and try to follow it
then add heuristics
later
first make it work
then make it fast
29 09:03 <lennon> absolutely
29 09:03 <batsman> as in fastest track
I think
we finally got the whole picture in place
29 09:03 <lennon> but can we explain it to anyone else?
or do we have to get it all in code before we forget?
29 09:03 <batsman> read track -> process with generalized pointgrid -> derive path -> feed to strategy evaluator -> make traces
I won't forget
29 09:04 <lennon> ok
29 09:04 <batsman> I've been up for only 2 H
29 09:04 <lennon> good point
29 09:04 <batsman> I will pass the knowledge to whoever comes here in the next 17H or so
hi tobias!
29 09:04 <tobias> hi
29 09:04 <batsman> there hasn't been much activity this night
29 09:04 <tobias> this night?
29 09:05 <batsman> but a couple things happened now
I mean in the last 9H or so
29 09:05 <tobias> m i thought y'all went to sleep at 0:00 gmt
29 09:05 <batsman> mostly, yes
29 09:05 <tobias> i see
29 09:05 <lennon> that'd be pretty early for me
29 09:05 <batsman> :)
29 09:05 <lennon> considering it's 5pm local
29 09:05 <batsman> he
but the ones in the east coast...
anyway
tobias: we had a visit from a spy
vincenz
from the scheme team
29 09:06 <tobias> yes irc is public
29 09:06 <batsman> seems they're not more advanced than us
29 09:06 <lennon> he announced himself, and everything...not a very good spy, if you ask me ;)
29 09:07 <batsman> we might have one spy incorporated now: jtra, he's been here since yesterday :)
29 09:07 <tobias> he did tell you what they are doing?
29 09:07 <batsman> right
ohh, not really a lot
29 09:07 <lennon> he said he "thought they were going to use heuristics"
29 09:07 <batsman> but the impression I got
is that they're not much further away
I think they're reading the tracks a pre-processing somehow
perhaps doing essentially the same thing as pointgrid
but he said
29 09:08 <tobias> any progress in following these nicely generated paths?
29 09:08 <batsman> they had one preproc step that took 5000 seconds to run
not yet
but we had a couple ideas on the path side
29 09:08 <tobias> >1hour
29 09:08 <lennon> i've been working on rangefinding and prediction code
29 09:08 <batsman> I'm writing a generalized pointgrid
to take into account walls
and bias against tight curves
and we finally got the whole picture in place, IMHO
read track -> process with generalized pointgrid -> derive path -> feed to strategy evaluator -> make traces
I'm working in step "derive path"
then sometime today we should have the dynamic strategy eval working
29 09:10 <lennon> where strategy evaluator also expands out to applying multiple weighted heuristics
29 09:10 <tobias> nice
29 09:10 <lennon> instead of a single monolithic method
29 09:10 <batsman> that is, fixing whatever is broken in runstrategy, strategy/* and things
yes, we can use the different heuristics
as scores in the strategy evaluation process
and then tweak the constants
we could just try diff. constants by hand
or have something optimize that automatically, too
29 09:12 <tobias> too little time for that, maybe -- humans doing "educated guesses" should be more efficient
29 09:12 <batsman> ok
29 09:12 <lennon> depends on the number of heuristics, really
29 09:12 <batsman> yes
we shouldn't get many more than 10 or so
and that's a max
29 09:13 <lennon> but certainly not a priority
29 09:13 <batsman> I cannot think of that many
ok
29 09:13 <lennon> the automatic tuning, not the limit
29 09:13 <batsman> then I'm writing something on the overall picture
in the wiki
29 09:14 <lennon> go ahead
29 09:14 <batsman> and then work in step (2) to bias against tight curves and paths close to walls
29 09:14 <tobias> i will read it
29 09:14 <lennon> my comments were a bit rambly, i know
29 09:14 <batsman> we're all hit by lack of caffeine, it's ok :)
29 09:15 <lennon> so, i think that tonight, i may go for a modest task, and then try to get some sleep
29 09:15 <batsman> ok
just don't push it too far
it's better if you sleep the time you need
29 09:15 <lennon> i'm thinking i'll benchmark the basic rangefinding algorithm with its current implementation (which cheats, and uses the standard Complex class to hold points)
vs. using FPNs
29 09:16 <batsman> and come back again in 8H, much more productive
29 09:16 <lennon> it should be pretty quick
29 09:16 <tobias> i will leave again soon (family) and be there again tonight -- 19:00 gmt
29 09:16 <batsman> ok
29 09:16 <lennon> i just want to know if I'm going to have to reimplement rect/polar conversions, etc., in terms of FPNs
29 09:16 <batsman> dunno
29 09:17 <lennon> it's all just basic trig, but it's verbose, and needs a lot of testing
29 09:17 <tobias> could you recommend some sources I could print out and look into over the course of the day
29 09:17 <batsman> mmmm
it'd be nice if we got the strategy part to work
29 09:18 <lennon> i've mostly been working from a couple of "computing geometry" course syllabi, and a few game development site articles on pathfinding and optimization
29 09:18 <batsman> that's runstrategy.rb model/strategy.rb and strategy/*rb
29 09:18 <tobias> will look into them
29 09:19 <batsman> but if you want to review anything else, it's ok, too
29 09:19 <lennon> oh, you meant source code, not references...
29 09:19 <tobias> lennon: if the calculations you do only have to be approximately accurate, i'd say use normal floats
29 09:19 <batsman> but as I see it, we're going to have some work on
29 09:19 <lennon> maybe i am a little tired ;)
29 09:19 <batsman> 1) strategy
2) heuristics
29 09:19 <lennon> tobias: that's what i want to do, anyway
29 09:20 <batsman> 3) perhaps refining the generalized pointgrid (when I finish it)
29 09:20 <lennon> tobias: in fact, that's what i would have done all along, given my first choice
29 09:20 <tobias> ok
29 09:21 <batsman> btw, tobias, thanks for fixing FPN
I know it's a PITA
29 09:21 <lennon> indeed
29 09:21 <batsman> it took me like 1H just to add a few test cases
29 09:22 <lennon> it takes a special kind of dedication to write your own math primitives library
29 09:22 <tobias> yes it's that time frame
29 09:22 <lennon> like we have
29 09:22 <batsman> I know it's quite exhaustive
29 09:22 <tobias> but it's a nice limited area that i can work in even if i am away much of the time, without loosing overview
29 09:23 <batsman> we appreciate :) if it were not for you, we could have had bugs in FPN on the final release...
now that I think it
29 09:23 <tobias> thanks.
29 09:24 <batsman> FPN should be *really* solid now
29 09:24 <lennon> in that case, would you perhaps prefer to look at 'geom.rb', and see if we can't improve/clean up any of the trig and general geometry methds in there
29 09:24 <batsman> as it's used by the simulator
and it passes the 38000 test cases
29 09:24 <lennon> tobias: i mean, instead of the strategy framework
29 09:24 <batsman> well, I switching to coding mode
29 09:24 <tobias> ok, will print that out, too
batsman:
29 09:24 <batsman> want to write the generalized pointgrid I've been talking all this time
?
29 09:24 <lennon> and actually, the simulator has been failing a testcase for me since the last set of checkins
29 09:25 <tobias> i thought about what if we do kind of raytracing in the pointgrid code?
29 09:25 <batsman> raycasting ?
lennon: 21 tests, 38152 assertions, 0 failures, 0 errors
just right now
29 09:25 <lennon> weird
29 09:25 <batsman> do I have to update?
29 09:26 <tobias> following longest unblocked straight lines and distribute distance values accordingly
29 09:26 <lennon> not unless you're running something really old
see! longest straight distances!
29 09:26 <batsman> I updated after your commit
29 09:26 <lennon> i've been talking
talking about that all evening
29 09:26 <batsman> :-)
29 09:26 <lennon> mostly to myself, unfortunately ;)
29 09:26 <batsman> we do all have
something to hold to
for instance, I'm the pointgrid + SP guy: I like tangible code
29 09:27 <tobias> ok i just wanted to mention that thought of mine
29 09:27 <batsman> you've been into heuristics and longest straights forever, lennon :)
now daniel was the "strategy/" guy
29 09:28 <lennon> i'll take that as a compliment
29 09:28 <batsman> aleksi -> simulator
29 09:28 <tobias> lennon: you mean for the pointgrid code, or for the car to actually follow these longest lines?
29 09:28 <batsman> davel -> super A* on the way
29 09:28 <lennon> tobias: i was actually thinking of it more in the path generation, so i guess the latter
tobias: but if it fits into the pointgrid, that's fine
29 09:29 <batsman> that's not very difficult in the strategy
29 09:29 <tobias> it would just yield more accurate distance values there
29 09:29 <batsman> bias towards '.' and 'a' instead of turns
29 09:29 <tobias> mbut it's maybe not worth the effort
(often typing m at the start because i'm used to xpilot)
29 09:30 <lennon> tobias: the main reason i was going to put it in the path/strategy side was complexity management
the naive algorithm i've got right now relies on the fact that there's a fairly small data set to work with,
29 09:31 <tobias> ok
29 09:31 <lennon> because you're just basically doing a rangefinding op on a handful of angles centered around your current facing direction
can both of you take a quick look at a picture on the web for me, though?
http://www.gamedev.net/reference/programming/features/motionplanning/page6.asp
they call if "field effect" pathfinding
29 09:33 <lennon> the picture is down the page a bit, but i think it visualizes the algorithm pretty well
29 09:33 <batsman> yes
I think that's what I'm trying to do now
by introducing a penalty for being close to the walls
29 09:34 <lennon> oops -- i actually wanted you to see the previous page:
http://www.gamedev.net/reference/programming/features/motionplanning/page5.asp
which includes the overall gradient towards a single goal, as well
29 09:34 <batsman> emm
that's what we're doing *right now*
29 09:35 <lennon> okay
29 09:35 <batsman> with point_grid and shortest_path.rb
29 09:35 <lennon> that's what i thought
29 09:35 <batsman> pointgrid
29 09:35 <lennon> just wanted to make sure that i was imagining the same algorithm as you were, since i haven't spent much time poking around in pointgrid
29 09:35 <batsman> ok
I think I'll put these links in the wiki, they're really nice
29 09:36 <lennon> cool
29 09:36 <tobias> i will now leave and print some files out. See you around 19:00 gmt
29 09:36 <lennon> ok
29 09:37 <batsman> cu
29 09:45 <batsman> aha, refactoring is sure cool
I factored my new generalized pointgrid to one line
adj += yield( p[0] + dx, p[1] + dy ) if block_passed?
:-)
29 09:46 <lennon> very nice, indeed
29 09:46 <batsman> hehe
ok, now I'll try it
where was your 'distance to walls' method?
29 09:47 <lennon> strategy/avoidwall.rb
29 09:47 <batsman> ok
29 09:47 <lennon> avoidwalls.rb -- sorry
29 09:47 <batsman> it's quite general
29 09:47 <lennon> indeed
29 09:47 <batsman> perhaps it belongs into track?
Track#distance_to_walls(x,y)
29 09:48 <lennon> except its direction-specific
29 09:48 <batsman> I think it makes a worthy addition to Track
29 09:48 <lennon> i had originally put it in Car, but Track would work, too
29 09:49 <batsman> I just don't see how it works ¿?
29 09:50 <lennon> it might not -- it's basically a direct translation from pseudocode
you're right
29 09:50 <batsman> if I understand it...
29 09:50 <lennon> the 'inc' variable is all fsck'd up
29 09:50 <batsman> it only scans in one direction, (1,1)
29 09:51 <lennon> right
29 09:51 <batsman> ok
29 09:51 <lennon> i originally had a mutiplier for 'pos', instead of an increment, which worked...
29 09:51 <batsman> can I rewrite that and put it in Track?
29 09:51 <lennon> ...but got less accurate the further you were
29 09:51 <batsman> yes
29 09:51 <lennon> sure
29 09:51 <batsman> this needs to use more angle steps
as you get further away
29 09:52 <lennon> 'distances_after_turns', you mean?
29 09:52 <batsman> yes
29 09:52 <lennon> yeah, the steps were just a WAG
29 09:52 <batsman> actually
29 09:52 <lennon> and a parameter
29 09:52 <batsman> I would rename distance_after_turns
29 09:52 <aleksi> you guys, you just run
29 09:52 <batsman> to distance_from_wall
hi aleksi
29 09:53 <aleksi> morning people
29 09:53 <lennon> hello
29 09:53 <aleksi> I never was a marathon type anyway :)
29 09:53 <batsman> some news in the "big picture" side
29 09:53 <lennon> i need to remove the &handler block param from that method, too...
...another byproduct of a previous version
29 09:53 <batsman> http://www.urusai.org/cgi-bin/cvs/icfp/wiki
ok, don't worry, I'll work it out, should be quite ok by now, only awake for 4 hours :)
29 09:54 <lennon> alright
i suppose it's not the world's most obscure algorithm ;)
29 09:54 <batsman> :)
if you have been up for >2X hours, all algos become obscure
:-)
29 09:55 <lennon> but i've only been up for 19 or so :)
29 09:55 <batsman> aha
then you need a few more minutes to deserve sleep :-P
29 09:56 <lennon> 24 on, 5 off -- that's been my pattern for like three days now
i'm going to wimp out tonight
maybe even go wild, and have a beer before i go to bed
so unless someone needs something urgently, i'll be off
29 09:57 <lennon> good luck, and godspeed
29 09:57 <aleksi> god night
29 09:58 <batsman> rest...
cu later
29 10:03 <aleksi> do we already have a crash according to the last requirement on page 4
29 10:03 <batsman> yes
in car.rb:
def crash?()
@track.crash?(@x,@y) || (@track.finish?(@x,@y) && @prev_x > @x)
end
29 10:04 <aleksi> indeed, great
29 10:04 <batsman> I'm still trying to bias pointgrid not to get close to walls
29 10:08 <tobias> lennon left?
29 10:08 <batsman> yes
is that you, tobias?
29 10:08 <tobias> i'm tobias, someone uses my nick
29 10:08 <batsman> ok
uni-oldenburg.de :)
yes, he needed some sleep
29 10:09 <tobias> i looked over geom.rb. will send him email
29 10:09 <batsman> found bugs?
29 10:09 <tobias> or maybi check a fixed version in
yes
29 10:09 <batsman> better ci
29 10:09 <tobias> ok
29 10:09 <batsman> thanks
29 10:09 <tobias> bye
29 10:09 <batsman> as he's gonna sleep now...
cu
29 10:30 <batsman> aleksi???
29 10:30 <aleksi> yes
29 10:30 <batsman> what are you doing :)
29 10:31 <aleksi> I would not dare to tell you :)
29 10:31 <batsman> just did the generalized pointgrid but its really slow
????
29 10:31 <aleksi> surprising :)
29 10:31 <batsman> ok, just be sure you do surprise me in the end...
... with some working code :)
I think I'm going to rewrite pointgrid in C
29 10:32 <aleksi> well, I grabbed gifsicle (creates anim gifs from bunch of gifs), took GD lib and ruby-GD, and now those are installed
29 10:32 <batsman> and make an extension
hehe
we don't have the traces yet
29 10:32 <aleksi> next I'll write a program that will do anim gif of the trace, just like the anim gif we already saw
29 10:32 <batsman> cannot show the car moving
until it moves
:)
but it sure is pretty
29 10:33 <aleksi> well I can make a trace by hand if that's the only way forward :)
29 10:33 <batsman> do you think it's ok to introduce C code via extensions?
I don't know if everybody has a C compiler handy
perhaps somebody is running on windows...
29 10:34 <aleksi> I reckon I can't make any trace generator without being able to evaluate it's performance visually
and since I don't have any widget library installed on this machine, I thought to make it anim gif
batsman, it's alright to use C, I actually even encourage you to do so
29 10:35 <batsman> but I don't want to lock people out
29 10:35 <aleksi> those finders won't find anything useful if they're written in ruby during this time period
29 10:35 <batsman> if somebody has no compiler :|
29 10:35 <aleksi> but do drive the C code from ruby, and you'll have plenty of room for fast changes
batsman, it's his problem, not yours
at least not right now
29 10:35 <batsman> ok
I might write it then
first want to check if the algo. is right in Ruby
then port
but this is just too slow
looking for the path in Een.trk for over 10 minutes now!!!
it's a one-time only thing
but still
29 10:37 <batsman> I'm looking forward to seeing your animations :)
29 10:42 <aleksi> it'
29 10:42 <batsman> yes?
working already?
?
29 10:43 <aleksi> it's too slow, if the path ends up being highly not optimal, and you have to tweak your algo, and rerun multiple times
no, I'm just starting
29 10:43 <batsman> ok
you're right on the generalized pointgrid
that's why I'm switching to C
I could easily get 10x more speed in the main loop
29 10:45 <batsman> I'm doing another thing in the meantime
just make a bigger stupid circuit
but not too big, so that I can test the alg. on it
29 10:53 <aleksi> couple of test tracs would be great indeed
29 10:53 <batsman> yes
29 10:53 <aleksi> I mean, even very small ones as well
29 10:53 <batsman> but I'm getting stuck
29 10:53 <aleksi> kind of 10x10, 50x50, 100x100, 200x200
29 10:53 <batsman> the very small one is no good for me
100x100 would be better
it's because I cannot test my alg. on the current one
as the road is ony like 3 pixels wide!
29 10:54 <aleksi> easy round, oval, square with dividing line, those would be easy to draw
29 10:54 <batsman> I cannot see the behaviour
yes
the problem is that I don't know how the tool the org. gave works
29 10:54 <aleksi> oh, small road is a great idea
29 10:55 <batsman> and first thing I tried to resize 0_stupid
29 10:55 <aleksi> btw. I changed my idea of guided heuristics during night
29 10:55 <batsman> but my stupid programs keep blurring everything
yes?
what's your new position?
29 10:56 <aleksi> I guess it's better to have "living" target instead of static one. Ie. pick target on a target path through interpolation (or bezier curves) and keep it ahead of current position all the time
29 10:56 <batsman> that's what I wanted to do
using the SP as a guide
but that being only one of the several heuristics
in the scoring process
have you read the wiki?
I left some stuff there
on the big picture
29 10:57 <aleksi> the most problematic portion for heuristics is to guide when to brake to prepare for curve
29 10:57 <batsman> yes
it has to foresee the curve
29 10:57 <aleksi> so we're all finally on same page :)
29 10:57 <batsman> but I think it's doable if you have the SP
29 10:58 <aleksi> meaning, even I start to get to the point of having enough insight to the problem to see what you've seen long time
29 10:58 <batsman> do you think?
I've been pretty lost for some time
yesterday in the afternoon I didn't see what we were going to do
but daniel made a great work with his strategy framework
and I fnally saw how to connect it with the lower level pointgrid thing
29 11:01 <aleksi> that's great
29 11:01 <batsman> http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=WholePicture
and then take a look at doc/
ooww shit, my path discovery algo is still running, over 35 mins now
29 11:03 <aleksi> yes, that kind of big picture might work
at least produce some results
29 11:03 <batsman> yes
29 11:03 <aleksi> producing near optimal is hard :)
29 11:04 <batsman> it's tangible
yeah
29 11:07 <batsman> shit, just when I had one png with the track
the tool to make the trk segfaults
I'm gonna have to write my own tool
29 11:17 <aleksi> batsman, which tool?
you want to convert track to png?
29 11:17 <batsman> no
29 11:17 <aleksi> ok
29 11:17 <batsman> png 2 trk
or xpm to trk
there's png2trk by the orgs
but it segfaults :(
29 11:18 <aleksi> it could be easier to use imagemagick or something else to convert png to ppm, and then write a simple ruby on that text file (ppm is _very_ easy format)
29 11:18 <batsman> yes
I have one xpm (it's the same as ppm, isn't it)
I'm just going to convert it now
w/ one script
BTW, is it allowed to have several start points?
29 11:19 <aleksi> Here is an example of a small pixmap in this format:
P3
# feep.ppm
4 4
15
0 0 0 0 0 0 0 0 0 15 0 15
0 0 0 0 15 7 0 0 0 0 0 0
0 0 0 0 0 0 0 15 7 0 0 0
15 0 15 0 0 0 0 0 0 0 0 0
29 11:19 <batsman> ok
I have the xpm now which is easy too
will convert it now
29 11:20 <aleksi> ie. a magic number, filename as a comment, x, y size, maximum color and then the pic in RGB triplets
29 11:21 <batsman> ok
almost got a new track
29 11:21 <aleksi> no it isn't
29 11:21 <batsman> ok
I'll take one and put the others to black
29 11:25 <batsman> ok
you have a new bigger stupid track
in test/data/0_stupid_big.trk
it's nice to check the pointgrid code
as it only takes 4 secs to run
29 11:28 <aleksi> great
29 11:29 <batsman> it'll allow me to test the 'avoid walls' bias in pointgrid
29 11:35 <batsman> hey?
the unit tests don't work!
somebody broke them
29 11:49 <batsman> where is Pi defined? not in Math::Pi ???
29 11:49 <aleksi> our Pi for FPN is at constants.rb
29 11:50 <batsman> ok, I have to use float pi, it's Math::PI
anybody care to convert Track to C?
I have to calculate the distance from each point to the nearest wall
and it takes forever
it needs lots of array accesses
29 11:51 <batsman> plus sin and cos (I've made a lookup table, but still slow)
29 11:57 <batsman> this is pitiful
it only evaluates 4000 points per minute in my machine
at this rate it would take more than 90minutes to calculate a path on a big track
29 11:58 <batsman> I'll try to speed it up
29 11:59 <aleksi> C is the way to go
29 11:59 <batsman> yes
I think it'd be best
to port Track to C
this would speed everything up
29 12:03 <batsman> ummm
did one cheap approximation and now it's 5 times faster
29 12:04 <aleksi> C isn't cheap, but yes, it could be easily that 5 times faster :)
29 12:05 <batsman> well
actually I can do it as fast as I want
if I lose precision
it's in the code that calculates the distance from one point to the nearest wall
29 12:05 <aleksi> I guess I'm going to move to 1.8 from this lousy 1.7, as it's the only way I could debug at all
29 12:05 <batsman> good
I check all points around circles of increasing radius
I used to increase the radius by 1 pixel each time
now I increase by 10 everytime
cheap
29 12:06 <aleksi> but the wall could be 1 pixel wide
29 12:06 <batsman> this means that the algo won't bias ok if the track is too small
29 12:07 <aleksi> it's not in most of the tracks, but could be
29 12:07 <batsman> the wall?
it's no problem
29 12:07 <aleksi> how about not going in circles, but instead scan 10x10, 50x50, 100x100 areas
29 12:07 <batsman> yes
could make it
but again, losing precision
and actually, worst in this case, as it's sqrt(2)*radius
the uncertainty is high
but only if the wall is far away
might take this
good idea...
29 12:09 <aleksi> how about precalcing the coordinates in an array "coords_to_check" which is always in order of first closest, then farthest
29 12:09 <batsman> ?
29 12:10 <aleksi> split up coordinate generation and make the searching loop like:
coords_to_check.find {|coord| track[coord].wall? }
29 12:11 <batsman> but that's essentially what I am doing now
29 12:12 <aleksi> coords_to_check could be like = [ [0,-1], [-1, -1], [-1, 0], [-1, 1], [0, 1], [1, 1], [1, 0], [-2, 0], ...]
29 12:12 <batsman> ok
29 12:12 <aleksi> essentially probably yes, because I try to refactor it for speed, but do you do other things in the searching loop?
29 12:12 <batsman> and then I get the index
not much
but I was using Math.cos and Math.sin
now using table-lookup
29 12:13 <aleksi> ok, nevermind then
29 12:13 <batsman> I think I might go another way
try to propagate penalties from the walls
ie, each point in the wall creates a "field" around it
then add the penalty to the distance matrix
29 12:14 <aleksi> that's good, since you can do the propagation precalc before starting to use it
29 12:14 <batsman> yes!
29 12:15 <aleksi> so runtime checks are just O(1)
29 12:21 <gus> Hi, is anybody here?
29 12:21 <batsman> hi
29 12:21 <gus> Batsman, still here! Have had any sleep in 2 days?
29 12:21 <batsman> yes, yesterday
but I've been a lot here
some 25H now :-)
29 12:22 <gus> What is going on? Can you give me a quick run down?
29 12:22 <batsman> ok
29 12:22 <gus> Or are you busy at the moment?
29 12:23 <batsman> no problem
29 12:23 <gus> Great!
29 12:23 <batsman> I need some rest :)
ok
29 12:23 <aleksi> I'm doing a trace simulation visualization
29 12:23 <gus> That's great
29 12:23 <batsman> we got to see the big picture this morning
there's some new info in the wiki: http://www.urusai.org/cgi-bin/cvs/icfp/wiki
well
the idea
is
(cut & paste)
Steps:
* read track data
* run (generalized) pointgrid on that: the standard pointgrid can be changed to bias against positions close to walls. OUTPUT: array with points defining a path
* strategy planner: responsible for actual creation of trace sequences. It could be based on different heuristics that give each one score, with diff. constants. One of these heuristics could try to follow the path found in the previous stage. OUTPUT: actual trace commands plus scores
* local optimizer: try to modify the traces and see if things are better, possibly with feedback to the previous stage.
I'm working on the generalized pointgrid
29 12:25 <batsman> to bias against tight curves
and avoid coming close to walls
this is actually quite easy conceptually
29 12:25 <gus> I was thinking of an optional step , somewhere between pointgrid and strategy.
29 12:25 <batsman> I implemented the generalized pointgrid
but it's dead slow
even w/ the new test track I created, 124x109, it takes forever
29 12:26 <gus> But maybe it fits into your generalized pointgrid
29 12:26 <batsman> what is it?
29 12:26 <gus> The idea would be to reduce a difficult and non conventional circuit, like # 8 and 9
29 12:27 <batsman> 8 is not so difficult :P SP finds a path :)
29 12:27 <gus> To a more conventional road type circuit
29 12:27 <batsman> how?
??
got one idea!!! could save us :)
29 12:37 <batsman> ok, just did it
in order to create the "wall penalty field"
I can actually use gimp
:-)
just be sure to have all the walls the same colour
then blur the pic with a big radius (say 50 pixels)
and that's it
29 12:39 <batsman> I've got a distorsion field
an array whose values correspond to the distance from the point to the nearest wall
and if there's lots of walls in one place, it avoid them
I think that's really neat!
29 12:57 <aleksi> great workaround indeed
29 12:57 <batsman> yes there's more
we can edit the files by hadn
and put some black in the regions we don't like!!!
just using "darken"
we can do so hand optimizations
*with an image manipulation program*
we could have the instructor making that :)
29 13:06 <aleksi> with what common unix program can I convert png to gif at commandline?
29 13:06 <batsman> convert
convert bla.png bla.gif
29 13:16 <aleksi> it's prohibitingly slow
29 13:16 <batsman> the conversion?
what?
29 13:16 <aleksi> yes
29 13:17 <batsman> of course, if you have to generate 1000 images...
you should take one every 10 steps or so
29 13:19 <dave> i like the looks of geom.rb - whats it for?
29 13:19 <batsman> hi dave
29 13:19 <dave> hi
29 13:19 <batsman> it's lennon work
29 13:19 <dave> I am certainly well rested
29 13:19 <batsman> he plans to use it sometime in the future
great
we need help
29 13:19 <dave> good for hours
29 13:19 <batsman> ok
summary
29 13:20 <dave> help with what
k
29 13:20 <aleksi> hello davel
29 13:20 <batsman> this morning
29 13:20 <dave> aleksi: hi
29 13:20 <batsman> I saw THE BIG PICTURE
29 13:20 <dave> lol
29 13:20 <batsman> no, really
29 13:20 <aleksi> it was ugly
and tried to fight with us
29 13:20 <dave> uh ok
29 13:21 <aleksi> but we slashed it with JPEG2002 compression routine
29 13:21 <batsman> http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=WholePicture
29 13:21 <aleksi> and it became the tiny picture
29 13:21 <batsman> now
29 13:21 <aleksi> that was easy to tackle, and we won
29 13:21 <batsman> it turns out we can get useful stuff from the shortest path thing using pointgrid
because
we can bias it
to avoid tight curves
and get far from walls
which is good
29 13:22 <dave> yes
29 13:22 <batsman> but now
I have had a better idea
I am using a "penalty field"
basically a greyscale image
that indicates
with dark areas
the zones we don't want to go to
walls = black
road = white
BUT
we can edit that w/ gimp
for instance do a gaussian blur
and then have a kind of field
29 13:23 <batsman> this way
we can hand edit
we could darken areas in the curves
by hand
29 13:24 <dave> k, still sorta following
29 13:24 <batsman> and lighten the ones with the "good" path
see this pic: http://www.gamedev.net/reference/programming/features/motionplanning/page6.asp
we can get a lot only from the field algo.
(pointgrid)
because it can be tuned by hand if needed, just by painting
I am about the check-in the code for that
now I have to test it and adjust some coefficients
but it should be mostly ok
29 13:26 <batsman> I did one test run
and it found a different path for the first track
an interesting one
29 13:26 <dave> k
so you manually gimp'd the first track?
29 13:27 <batsman> yes
just select black
invert selection
fill with white
invert colours
blur
29 13:27 <dave> k, what'd you save it as
29 13:27 <batsman> save as pnm
29 13:27 <dave> ok cool
k
29 13:27 <batsman> and hand edit one line in the pnm cause I'm too lazy to parse that right :)
and that's it
you can hand-tune the paths
the thing still lacking in the picture
is the dynamic strategy evaluator
29 13:28 <dave> but does this just get us different paths?
29 13:28 <batsman> that tries to follow the path
29 13:28 <dave> yeah
29 13:28 <batsman> it gets paths
we still need the strategy
29 13:28 <dave> thats still tough, making the driving decisions
29 13:28 <batsman> that tries to follow the path
I have one idea for that
quite easy
nothing fancy
just target the points in the path one after the other
I know how to see when you're already past one
_but_
given the hand-tuning possibilities
we can get easy to follow paths
29 13:30 <batsman> we could even create a new field
that represents the maximum speed at some point
and penalize the solutions that go faster than that in that position
whatever
29 13:30 <dave> k
29 13:30 <batsman> possibilities are endless :P
29 13:31 <dave> no shit
:-)
29 13:31 <batsman> ok, I'll commit
29 13:31 <dave> k
29 13:31 <batsman> can I add the field file I've been using?
in /test/data/ ?
ugh
rather not
it's 7MB
29 13:31 <dave> ooh
29 13:31 <batsman> no problem
I save it as gif
29 13:32 <dave> is it pnm?
29 13:32 <aleksi> http://www.cs.helsinki.fi/u/kaniemel/Een.gif
29 13:32 <batsman> and then you convert to pnm
29 13:32 <dave> gzip it
or bzip2
29 13:32 <batsman> and have to remove the comments from the pnm
that's ok, too
aarrgh aleksi, where did you find that?
it drives too good
29 13:33 <aleksi> it's Een.trc on Een.trk
29 13:33 <batsman> ok
ufff
anyway
29 13:34 <dave> so the paths that get created are coarse paths right? they are at the 1024x768 resolution, not the 1024*2^16x768*2^16 level
29 13:34 <aleksi> the other arrow is there for comparison, it's forged Een.trc. I added some a.a. and la.la in the beginning to make it behave differently
29 13:34 <batsman> yes
29 13:34 <aleksi> and yes, I think it drives pretty well
29 13:34 <batsman> wait a sec
that image is yours??
29 13:35 <aleksi> a visualization takes couple of minutes for two cars and 9400 commands
29 13:35 <dave> yeah, whos image is that?
29 13:35 <aleksi> most of the time is spent to convert pngs to gifs to make gisicle to bunch them into anim gif
29 13:35 <batsman> aleksi has been working on that, but did you already get it to work???
aleksi, is that yours ????
29 13:35 <aleksi> yes, it's ok
there's no logic to visualize crash however
and if needed I plan to leave "skid marks" show the driven path shows
29 13:36 <dave> what do the 2 lines represent, car and shadow?
29 13:36 <batsman> can you ci this beauty?
29 13:36 <aleksi> and another one on wish list is to write some information about the status of a car
29 13:37 <batsman> hehe
this is great!
ok, I ci my field stuff
29 13:37 <aleksi> especially print "#1600" and a cross on a path to "meter" where the cars are for comparison
davel, there are two cars "competing". Other one is Een.trc, and other one is the save with hand-added "a.a.a.la.la.a.a." to the beginning to make them different.
29 13:38 <dave> oh
29 13:38 <batsman> I'm more than impressed
:-O
29 13:38 <aleksi> The visualizer could take as many traces in as wanted.
29 13:38 <dave> nice
29 13:40 <batsman> ok
just did ci
I realized I have one constant wrong somewhere, so the car is behaving the other way around, but it's a minus sign
only
hopefully :)
29 13:43 <batsman> ups, forgot to add one file, up now
29 13:45 <aleksi> davel, do you know about any faster png 2 gif converter than program convert?
29 13:45 <dave> no, sorry
29 14:01 <batsman> dave? still there?
29 14:03 <dave> yes
29 14:03 <batsman> just wanted to know what you're doing
:)
29 14:04 <dave> woke up and jumped on irc, so I just finished doing the morning stuff, breakfast email, etc
29 14:04 <batsman> and if you had some time to play with the new code
field perturbation :)
29 14:04 <dave> nice name
29 14:04 <batsman> actually, making a pnm and testing if things behave they way they should :)
now it can handle raw pnms too
the script is tools/dumpsp2.rb
29 14:06 <batsman> I see you're cleaning/reading code, adding emacs stuff, etc
29 14:06 <dave> k I will look at dumpsp2
29 14:06 <batsman> thanks
it seems slightly broken now
BTW
you might want to use /test/data/0_stupid_big.trk
which is a zoomed version (124x109) of the stupid track
this should be faster
29 14:07 <dave> right
29 14:07 <batsman> right now dumpsp2 takes some 4 minutes for me (track 1)
29 14:08 <dave> whoa
29 14:08 <batsman> yes
another thing in my todo
is coding Track in C
that would probably make everything 10x faster at least
29 14:09 <dave> yeah maybe
29 14:09 <batsman> another thing that would benefit terribly from porting to C
would be pointgrid
it's essentially a big loop over the whole image plus some calcs
29 14:10 <dave> yep
29 14:14 <dave> batsman: so I need to open up 0_stupid_big in gimp, to produce the field.pnm I need?
29 14:14 <batsman> the field.pnm you need is in test/data/
29 14:14 <dave> oh
29 14:14 <batsman> IIRC
sorry
in test/data there's the one for track 1
I'm now making the field for 0
just wait one minute, almost there
29 14:15 <dave> k
29 14:17 <batsman> I think I know why it didn't behave the way it should, I made the images wrong :)
29 14:20 <batsman> it's up now
that one is processed in some 4 seconds, which is much nicer
the field thing already got it to modify a bit the path
just have to change to pic to bias more strongly against going near the walls
and/or multiply by some constant
29 14:22 <dave> yeah I see that the SP is a bit off the walls now
29 14:22 <batsman> yes
now have to play w/ coeffs
so that this bias is stronger
and perhaps adjust the image, I think it might be wrong
gimp...
29 14:34 <aleksi> if sin(alpha) = x how do I calculate alpha if I know x
29 14:35 <batsman> asin?
let me check the name
29 14:35 <aleksi> sin^-1, asin something else?
29 14:36 <batsman> too bad, it seems it's not in ruby
:-(
spoke too early
it's asin
but for some reason it's not in ri
Math.asin
I am getting interesting results with new images
29 14:37 <aleksi> should I use atan2?
29 14:37 <batsman> Math.asin works
and multiplying the bias by a constant
now the car prefers the middle of the track
29 14:38 <aleksi> atan2(sin(0.6), cos(0.6))
=> 0.6
ie. I guess I can use atan2
29 14:38 <batsman> irb(main):002:0> Math.asin(Math.sin(1))
=> 1.0
hey, you updated the animation! it's pretty, traces are great
29 14:47 <dave> yep looks good
29 14:48 <aleksi> well, it's in the works still, so I didn't say anything
but yes, there's now trace marks and crash marks
29 14:48 <batsman> looks great!
and you fixed the issue with the colours of the cars
29 14:51 <batsman> I have some results w/ the field perturbation
now curves are nicer
no peaks
29 14:51 <dave> k
29 14:52 <batsman> might be about time to thing of the dynamic strategy
29 14:52 <aleksi> where's the PI defined? under math or?
29 14:52 <batsman> Math::PI
29 14:52 <aleksi> what's the way to address it, Math.PI?
great
29 14:54 <batsman> ok, here's my take on the strategy
have some sort of "gravity"
that accelerates the car in the direction the next point of the path is
playing w/ coefficients
we can make speed quite important too, so that the path is not followed exactly
29 14:56 <dave> it might help to include the heading of the following point (the 3rd one) so that hopefully the car gets to the second point with a direction leading straight to the 3rd point
if that makes sense the way I wrote it
29 14:56 <batsman> yes
nice
we can have a second order term for the point after the next one
I'm going to play with strategies for a while
later I'll rest a bit, I've been here for 8H now
29 14:59 <dave> ok
29 15:12 <aleksi> how do I check if my var points to NaN?
29 15:12 <batsman> nan?
I mean, Float#nan?
29 15:13 <aleksi> ie a = 0 / 0.0; if a == NaN
29 15:13 <batsman> I was not very clear :)
29 15:13 <aleksi> perfect
29 15:18 <aleksi> now, if somebody capable of graphical doings could prepare me a sprite for the car
29 15:18 <batsman> you can take the one in Een's animation
I mean the organizer
29 15:19 <dave> that won't be me
29 15:19 <batsman> I suffered enough just w/ the bitmaps for the field perturbation, thanks
29 15:21 <aleksi> drawing a car wasn't too easy as GD library didn't have bitmap rotation
so I had to write my own
anyway, now it looks good enough that I could go for a lunch
29 15:21 <batsman> you've done it? wow
aha
29 15:22 <dave> nice work aleksi
29 15:22 <batsman> really nice
29 15:22 <dave> curious, is it supposed to be inverse colors?
29 15:23 <batsman> i think there's a problem with the palette
29 15:23 <dave> oh
29 15:23 <aleksi> the palette is took randomized
29 15:24 <batsman> where did you take the car sprite from?
or is it yours?
29 15:25 <aleksi> quick draw 20x20 in gimp
29 15:25 <batsman> ok
we should soon get more people here...
I hope
29 15:26 <dave> almost noon eastern time
29 15:26 <batsman> I'm checking my IRC logs
to see when people said they'd be coming
29 15:27 <dave> ok
29 15:32 <batsman> we've had
aleksi, tobias & gus here
and lennon, who's sleeping now
hope we can get daniel so he fixes the strategy runner :)
29 15:37 <dave> that would be good
29 15:37 <batsman> wolrking on anything right now?
29 15:38 <aleksi> now the visualizer has everything I planned to incorporate
it takes some minutes to get latest to the web, so hold on
29 15:38 <batsman> good
but I thought you were having lunch, aleksi, you need some rest too :)
29 15:38 <dave> batsman: no code, no, but I am not getting very far with ideas either
29 15:38 <aleksi> now I'll go to eat something, then I'll bump into my version of planner
29 15:39 <batsman> planner?
29 15:39 <dave> I am trying to think through things, see if anything useful comes up
29 15:39 <batsman> ok
I'm reading on A*
29 15:39 <dave> ok
planner as in moves required to follow a path?
29 15:39 <batsman> later I'll turns my eyes off the CRT
29 15:40 <aleksi> planner, as in finding a trace to complete the task with minimum steps, if possible
29 15:40 <batsman> well, it's a lot, isn't it?
29 15:40 <aleksi> batsman, yes, reading and ircing, or coding and ircing shouldn't be done simultaneously
like, now we scroll your crt all the time
and you can't resist, you just have to look over here
and here
:)
29 15:41 <batsman> it's ok, I'm used to handling interrupts
29 15:41 <aleksi> happy reading
29 15:41 <batsman> can quickly save context
used to watching tv, reading my mail, chatting at the same time
29 15:41 <aleksi> I'm sure you can be even better at it, but I think you shouldn't be good at it at all
since switching context takes out the flow you have
it's like having things to do in cache, but then interrupt changes context to another prosess and you most probably lose all the nice things you had in cache ready for execution
29 15:42 <batsman> u're right, switching contexts always has a cost
but some times
multitasking gets more output in the short term :P
29 15:46 <dave> I am wonder how far lennon is on the bezier idea
29 15:46 <batsman> he said he hadn't advanced much on that
29 15:46 <dave> oh
29 15:46 <batsman> let me check the logs
Jun 29 09:36:07 <lennon> i'm holding off on the bezier curve work for right now, though
29 15:47 <dave> k
29 15:47 <batsman> it's been over 8 hours since then, though
29 15:48 <dave> you hoping things have changed while he slept :-)
29 15:48 <batsman> yes :)
29 15:48 <dave> the subconscious hard at work
29 15:48 <batsman> perhaps his roommate (the driver instructor) left a nice set of heuristics for him...
29 15:49 <dave> batsman: yer reading up on A*?
29 15:49 <batsman> yes, a bit
29 15:49 <dave> have plans for it?
29 15:50 <batsman> actually I am discovering what it is
and find that
it's our strategy.rb thing :-)
29 15:50 <dave> I was thinking that it could be used to follow a path
29 15:50 <batsman> that *is* what we're doing :)
we should normally just have to code the heuristics in strategy/*
29 15:51 <dave> really, oh
29 15:51 <batsman> so now I'm looking for optimizations of A*
quite a surprise, isn't it?
turns out we had A* all the time :)
I've read http://www.geocities.com/SiliconValley/Lakes/4929/astar.html
pretty basic, actually just scanned it
29 15:52 <dave> yeo
yep
29 15:54 <batsman> there's a couple interesting things though
Any graph search algorithm is said to be admissible if it always returns an optimal soution, that is the one with the lowest cost, if a solution exists at all.
However, A* is only admissible if the heuristic you use h' never over-estimates the distance to the goal.
For this reason when choosing a heuristic you should always try to ensure that it does not over-estimate the distance the goal.
One final note about admissibility; there is a corollary to this theory called the Graceful Decay of Admissibility which states that if your heuristic rarely over-estimates the real distance to goal by more than a certain value (lets call it E) then the algorithm will rarely find a solution which costs more than E over the cost of the optimal solution.
29 15:55 <aleksi> ok guys, now's there the info text also
I'm heading to lunch (6.55PM)
29 15:56 <batsman> it's about time :)
thanks for everything
29 15:57 <dave> lunner
or is it dunch
29 15:57 <batsman> the first number is the time slice, right?
29 15:58 <dave> ?
29 15:59 <aleksi> yes, time step: car number x: xpos y: ypos
29 15:59 <batsman> aleksi's animation http://www.cs.helsinki.fi/u/kaniemel/Een.gif
now w/ text info
29 15:59 <aleksi> I could add speed and direction as well, if felt needed
29 15:59 <dave> thats crazy good
29 16:00 <batsman> we could get the judges prize for that :-)
29 16:01 <dave> if we can get a trace for at least one of the tracks ...
29 16:01 <aleksi> please note the green especially on last N curves, there the other car (the one I tweaked a bit) crashes
29 16:01 <batsman> :)
yes, saw that
29 16:01 <aleksi> ok, it should be useful, and now I'm really out
29 16:01 <batsman> ok
will you come back today?
29 16:02 <dave> bye]
29 16:02 <aleksi> yep
29 16:02 <batsman> cu later then
29 16:19 <dave> apperently 19 teams submitted for lightning
660 people on the contest ML
29 16:19 <batsman> where did you get that info?
if only we had been able to submit for lightning :-P
19 is nothing :)
I've been thinking about curve detection given the SP (or any general path)
I know how to do it, it's easy
29 16:21 <dave> yeah, wonder if the low number will translate to low number of teams for the final deadline
29 16:21 <batsman> well
at the moment we wouldn't be able to submit any trace :-(
I'm writing a bit on curve detection and then keep reading on optimization theory
29 16:22 <gus> How many people are left working on this project?
29 16:22 <dave> k, I am listening
gus: just you :-)
hurry up
lol
29 16:22 <batsman> yes, good that you came
you only have to make the A* thing work
piece of cake
29 16:23 <gus> Yeah.... Scared |-)
I did it in my dream in less than 5 minutes
Then I woke up!
29 16:23 <batsman> ok then, just cut and paste from your dream
you'll probably appreciate this:
http://www.cs.helsinki.fi/u/kaniemel/Een.gif
29 16:24 <gus> It's an highly non deterministic alg
29 16:24 <dave> determinism is overrated
29 16:26 <gus> Wow, who did the Eeen.gif?
29 16:27 <batsman> aleksi
it's in CVS now :-)
we can do gifs for any number of cars
to compare performances
29 16:27 <gus> Great!
What about the trace?
Who did it?
A strategy of his?
29 16:28 <batsman> it's Een.trc
the example one
29 16:28 <gus> Duh!
29 16:28 <batsman> we still have no trace generator
well
the ones we have
fail miserably
...
29 16:29 <gus> I was thinking that we could preprocess the track
29 16:29 <batsman> how?
29 16:29 <gus> And enlarge the wall by a couple of pixel
29 16:29 <batsman> aha
I'm kind of doing that
29 16:29 <gus> So it would pinch the small corridor
And make the SP friendly
29 16:29 <batsman> with the perturbation field
29 16:29 <gus> OK
29 16:29 <batsman> works like that:
in the distance matrix used to determine the SP
I can introduce a penalty
associated to the closeness of a point to a wall
now, what I did
was taking this penalty from a .pnm file :-)
basically processing the tracks with gimp
enlarging walls w/ gaussian blur
and such
but at any rate
we do allready have paths
29 16:31 <batsman> with that field perturbation thing
we can disallow some
by putting black lines in the field file
but
we still lack something able to create traces that match a path
29 16:32 <gus> I still haven't implemented my strategies
But one thing is
if the circuit is full of bumps
it is likely that the car will die
Like you said
So I was working on manipulating the circuit
29 16:33 <batsman> good
29 16:33 <gus> to make it more friendly
Pinching the small corridors is probably important
Both I think for feasibility and speed of trace
Can I send you a png?
29 16:34 <batsman> we can do many things just by manipulating the file used in path finding
how big?
29 16:34 <gus> 16k
29 16:34 <batsman> ok
then batsman DOT geo AT yahoo DOT com
I ask
because some of our graphics
are over 8MB :-P
and I'm almost out of disk quota in the machine I have my mail in
29 16:35 <gus> Hold on one minute, gimp failed to generate a png that it can reread!
29 16:35 <batsman> ?? wow
29 16:36 <gus> OK, my mistake
Here it comes
29 16:36 <batsman> ok, I'll check it
29 16:38 <gus> Well, it has a hard time to leave my machine
29 16:41 <gus> The image is the superposition of the track 8
With the modification I made to it
29 16:41 <batsman> I'm just seeing it now
29 16:42 <gus> I.e., I generate the SP with pointgrid and make a circuit around it
29 16:42 <batsman> are you using the strategy/shortest_path.rb code?
29 16:42 <gus> Now, the Strategy can work on a conventional circuit, no risk to get lost
etc.
No
29 16:43 <batsman> your own code?
29 16:43 <gus> Yes
I don't have a strategy folder
Is it in CVS?
29 16:43 <batsman> strategy/shortest_path.rb is the stuff we've been using since yesterday to generate the paths
yes!!
cvs update -d
-d means get subdirectories
29 16:44 <gus> OK
29 16:44 <batsman> so you couldn't run tools/dumpsp.rb, could you?
29 16:44 <gus> No
29 16:45 <batsman> that's a nice idea
to create a wide "virtual track" along the path
and only allows solutions that stay inside
29 16:46 <gus> That's what I kind of did then
29 16:46 <batsman> could you ci some code? I'd like to see that part
29 16:46 <gus> I could, but what I have is fairly ugly
29 16:46 <batsman> I wrote yesterday something that make the path, would like to see how you do it too
29 16:46 <gus> I'd like to improve it
29 16:46 <batsman> ok
please compare with strategy/shortest_path.rb
29 16:47 <dave> gus: you should setup a ~/.cvsrc file
with contents like
up -d
diff -ub
then if you run cvs up it will automatically do -d
29 16:47 <gus> I'd like to grow in circle instead of square
5 minutes, I need to take care of my crying baby
29 16:48 <batsman> ok
29 17:11 <gus> I am back
29 17:25 <batsman> sorry gus, didn't hear you
29 17:25 <dave> I am still here
29 17:25 <batsman> ok
29 17:25 <dave> but I am about to take a shower and walk break
29 17:26 <batsman> ok, you'll have to stay around later :) once we go to bed in this timezone
we have had no ci in hours now
29 17:27 <dave> I'll be around all day
29 17:27 <batsman> ok
29 17:28 <gus> I'll be around late tonight
29 17:28 <batsman> it's 19h30 in my timezone
29 17:28 <dave> 11:30am here
29 17:28 <gus> But I'll have a break after 6pm
It is 13:28 in mine
Tomorrow is wasted for me
Because of the time zone, by the time I am off from work
the contest is over :(
29 17:29 <batsman> :-(
otoh when it started it was still 8pm in your time zone
29 17:29 <dave> well thanks for being involved
29 17:33 <gus> Yes, but I didn't realize it and I checked the web site at midnight
29 17:33 <batsman> dave, just saw your strategy/mod_track.rb
29 17:34 <gus> Actually, it's mine
29 17:34 <batsman> ok
you're still using his login :)
29 17:34 <gus> No pretty code by any mean
29 17:35 <batsman> just reading it now
mine, which does the same for the SP part, is in strategy/shortest_path.rb
29 17:35 <gus> Am i?
I though I changed that a while ago!
Yes, I read it
For create_road, I'd like to grow in circle
29 17:36 <batsman> beware, even if you cvs login again, the files under CVS/ in each directory still reflect your old login
29 17:36 <gus> To avoid the bottlenecks I created
29 17:36 <batsman> ok
29 17:36 <gus> That is what happend for CVS
29 17:37 <batsman> I had to co again in another dir to get my login to work
you might be able to fix that by changing CVS/root by hand
for each dir
29 17:38 <gus> It's painful
29 17:38 <batsman> yes
that's why I just did co again :)
29 17:39 <gus> I'll do that
29 17:40 <dave> yeah you will need to up date the CVS files
ruby could do it
29 17:40 <batsman> yes
but it's better if he focuses his coding in the ICFP :)
29 17:42 <gus> Well, I am co-ing right now
29 17:42 <dave> yep
29 17:42 <gus> Done deal
29 17:42 <batsman> ok
I think it'a about time we plan the future (tm)
29 17:44 <batsman> we've had the shortest path code working for ~19H now
and now we have a new (faster?) implementation
19H is a lot in ICFP
but we haven't been able to move forward in the trace creation side
that has been blocked since yesterday, when daniel left
29 17:46 <gus> True, but
29 17:46 <batsman> ...
29 17:46 <gus> If we managed to get the SP to stay away from the walls
29 17:46 <batsman> I was happy when we got some paths created yesterday
today I would be happy if we had some real non-optimal traces
the problem is the following:
sometimes the optimum path is near the walls
take a look at the gif file for Een.trc
29 17:47 <gus> We might be able to get traces more easily
29 17:48 <aleksi> batsman, your observation is correct
29 17:48 <batsman> aleksi, back again!
29 17:49 <aleksi> only way to go fast enough is to be close to the wall when you start to turn, in the middle of the turn and at the end of the turn. Ie. make turns as straight as possible.
29 17:49 <batsman> welcome back :) hope you got some caffeine in the meantime, & foostuff to sustain high-level thoughts :P
yes
29 17:49 <aleksi> no coffee, I don't drink it. Nor tee. Nor cokes or anything.
29 17:50 <batsman> not even tea????
29 17:50 <dave> yeah coffee sucks
29 17:50 <batsman> as for the curves... I thought my field perturbation thing would help there
29 17:50 <dave> I dont drink it, but I do like pop a whole lot
29 17:50 <aleksi> But during these kind of sessions I take little coffeine in pills or light cokes, and you can imagine how much it has boost for me when I don't use any other times.
29 17:51 <dave> what about writing up a manual driving tool, where we use the keypad to manually drive the car :-)
we'll at least get some traces
29 17:51 <aleksi> that really is an option
29 17:51 <batsman> yes
but we need display capabilities then
29 17:51 <aleksi> and there could be two different parts here. The path generator and optimizer.
29 17:51 <dave> we could save states too, so if we do crash, only have to back up a bit
29 17:52 <batsman> not sure we could get this in time
29 17:52 <aleksi> The first one could be automatic or manual, and optimizer just brutal horsepower.
29 17:52 <batsman> and it'll mean all the effort done today would be obsolete
even your gif generator, aleksi :P
29 17:52 <aleksi> that kind of UI would not take loads of time
29 17:52 <batsman> the problem is the display
29 17:52 <dave> someone wrote a java viewer, we could maybe use that as a basis for a driving tool
29 17:52 <aleksi> I'd have done it already but I just don't have any toolkits on this box
29 17:53 <batsman> that's it, what could we use
is there ruby/sdl or something like that?
29 17:53 <aleksi> so I'm going to concentrate on my take
29 17:53 <batsman> the one exposed in http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=AleksiSearcher?
that is *very* similar to the "strategy framework" daniel set up yesterday
29 17:54 <dave> my graphics experience is very limited, but I dont think this would require a whole lot
29 17:54 <aleksi> yes
29 17:54 <batsman> ok, I'll check to raa to see the options
29 17:55 <aleksi> batsman the bulk of it might be identical to the strategy framework, but I haven't read through it, so can't say if I use it instead of writing new one
you should take either GTK or FXRuby
29 17:55 <dave> if needed I could try to do something in java
29 17:55 <aleksi> TK if you're familiar with it
29 17:55 <batsman> but I have no experience with any of these :-(
29 17:55 <dave> I did some stuff with gtk+ a while back, tho I remember nothing
29 17:55 <batsman> I programmed GTK way back, in C :)
29 17:56 <dave> I did gtkmm, so c++
29 17:56 <aleksi> you can come up with much of the GTK stuff with cut & paste from the testgtk.rb which comes with the package
29 17:56 <batsman> why not tk?
29 17:56 <gus> I did some tk
29 17:56 <batsman> can it handle everything we need?
it's standard in ruby
so we can all use it easily
29 17:57 <aleksi> here you just need a canvas to draw the simulation into, and some controls to arrange time steps (get back and forth in the timeline) and controls to make a command
29 17:57 <gus> No ruby/tk though
29 17:57 <batsman> mmmm
wouldn't we want to drive the car
29 17:57 <dave> ncurses, could zoom in on sections of the map, and allow show the movements at the 1024x768 unit resolution
29 17:57 <batsman> like a videogame?
29 17:57 <aleksi> probably you could use tk as well, it would be even portable to windows
29 17:57 <gus> What a gain! :)
29 17:58 <aleksi> ncurses would be fastest, and it allows you to make it a game
29 17:58 <batsman> ok, I'm checking the pertinent chapter in the pickaxe book
29 17:58 <dave> I miss my pickaxe book
29 17:58 <aleksi> ie. it reads keys without requiring mouse movement or enter or anything
29 17:58 <batsman> yes, but it could be messy
you could get lost in the track
29 17:58 <dave> I donated it to a comp sci student group with a bunch of others, I should have kept that one
29 17:59 <batsman> :)
29 17:59 <aleksi> just have the map on the other window, graphical window
29 17:59 <batsman> ok
otoh
29 17:59 <dave> well the code would tell you if you actually crashed or not
29 17:59 <aleksi> in X you can get pretty decent resolution for ncurses window
29 17:59 <batsman> ncurses means no window
I mean windows
29 18:00 <aleksi> in windows it's in cmd.exe's window, isn't it? And there the font is alterable too.
29 18:00 <batsman> but do ncurses work in windows??
29 18:00 <aleksi> doesn't matter, unless some of us, who's going to use it, stays on windows
29 18:00 <batsman> hey, wait a min
just saw something:
Category: Library/TUI
Project name: ncurses-ruby
Short description: Wraps ncurses and PDCurses libs.
Version: 0.7.1
Status: candidate for stable
Last update: 2003-03-23 14:31:36 GMT
Owner: Tobias Peters
29 18:01 <dave> hehe
29 18:01 <aleksi> I know that guy :)
candidate for game developer
29 18:01 <gus> What about a java applet that we post on the web site
29 18:01 <batsman> yes, we should be fairly proficient
29 18:02 <gus> Then we call our 15 years old cousin that play nintendo all day long
29 18:02 <batsman> :-)
29 18:02 <gus> And get him to get the best path!
29 18:02 <dave> yeah yeah
29 18:02 <batsman> that'd mean direct win!!!
I'm however concerned about one thing...
we could have done this from the beginning
29 18:02 <aleksi> first you have to persuade his parents to let him keep up one night
29 18:02 <dave> yes, it says it on the first page
29 18:02 <batsman> well, actually for the last 20H
29 18:03 <dave> I think at least one of the lightning entries used this method
29 18:03 <batsman> yes
sure
29 18:03 <aleksi> batsman, are we successful with other options? ie. a*-variations, bezier thingie (something I can't recall?)
29 18:03 <batsman> but it won't do much good for the final thing, will it?
at the moment the last stage working is the SP
29 18:04 <dave> they only want traces and code
but humans can direct the tracing
29 18:04 <batsman> we have a kind of A* in daniel's strategy framework
actually I read about A* a couple hours ago
and was surprised to see that it was the framework I was playing with :-)
as for bezier, it's lennon's work, but he's out now
and last thing he said was that he had no real plans
29 18:06 <dave> they bezier would just give us paths I think, still not traces
29 18:06 <batsman> yes, it's still paths
better paths, but paths
29 18:06 <dave> yep
29 18:06 <batsman> want I've been asking for
since yesterday night
is something that would take my SP
and make the traces :)
I tried to implement that
but the car keeps doing stupid things
29 18:07 <dave> we need F(P) = T :-)
29 18:07 <batsman> yes!
please everybody work of F(P) = T! :)
this is a critical moment
29 18:07 <dave> I have had bits of thoughts about it, but nothing great
29 18:07 <batsman> we have to overcome temptations to work on 100 things
and focus of F(P)=T IMHO
s/of/on/
so the "game" thing sounds nice
29 18:08 <dave> true
29 18:08 <batsman> but I think we had better stick to F(P)=T
I've been thinking about quite some things now
29 18:09 <dave> the game would at least give us something to submit tho
29 18:09 <batsman> yes, but I still hope some stupid strategy tracking the SP should be able to
29 18:09 <dave> k
29 18:10 <batsman> these are some of the things that crossed my mind:
Track in C
pointgrid in C
FPN in C
curve detection in the SP (I know how to do it)
29 18:10 <dave> s/rubyicfp/c-icfp/
29 18:10 <batsman> well, the problem is that I'm needing 3minutes/run with the path finder
waiting in front of the CRT that much sucks
29 18:11 <dave> yeah, iterative
29 18:11 <batsman> morphological transforms in the track (opening)
"tunneling" using the SP to restrict valid paths
etc
and some of them very appealing
because I *know* how to do them
but I know it's better if I work on F(P)=T
29 18:13 <batsman> cause we *have* to get that to work
it's essential
without that, no traces
29 18:14 <aleksi> is it def f(path); ... ; trace end ?
29 18:14 <dave> yes
29 18:14 <batsman> ummm
but in the middle
you have A* search
using as an heuristic
the closeness to the path
29 18:14 <aleksi> davel, I'm sure I need to use C for my A* implementation
ruby just won't cut it
29 18:15 <batsman> as exposed in your wiki node, aleksi
you might be right
daniel's code right now
29 18:15 <aleksi> I'll drive the C primitives with ruby, but it's impossible to make ruby run fast enough
29 18:15 <batsman> always keeps the top 500 cars or so
29 18:16 <aleksi> mul(a,b) in FixedPoints take forever with ruby, it's about three assembly lines
29 18:16 <batsman> and it only enlarges the trace by 10 commands/s or so
do you want me to do FixedPoints in C?
a plugin replacement?
now that we have unit tests I'd feel confident
29 18:17 <aleksi> ie. you can do something like 400 million fixed point multiplications per second on my machine
29 18:18 <dave> with fpn in C?
29 18:18 <batsman> I'll follow anybody towards the F(P)=T vision :)
29 18:18 <aleksi> batsman, a ruby call is very slow compared to C call, so there's not even any reason to inline them in C through macros
but implementing FPN in C won't speed up almost at all
29 18:18 <batsman> ok, you don't want the method call overhead
29 18:18 <aleksi> implementing the thing that uses FPN in C will make it fly
29 18:18 <batsman> you're right, of course
I want to make F(P)=T happen
what can I do to help reach that goal
29 18:19 <aleksi> ok, so let's divide the work force
29 18:19 <batsman> I postpone everything else
29 18:19 <aleksi> batsman F(P)=T
29 18:19 <batsman> F(P)=T is #1 for me now
29 18:19 <aleksi> aleksi F(magic)->T
29 18:19 <batsman> ???
magic?
29 18:19 <aleksi> davel&gus & rest: the game
29 18:20 <batsman> is the magic this? http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=AleksiSearcher
29 18:20 <aleksi> lennon: bezier thingie
is this something along the lines you thought?
29 18:20 <batsman> sure!
29 18:20 <aleksi> batsman, yes, but the magic part is missing there :)
29 18:20 <gus> Is lennon still around?
29 18:20 <batsman> with heuristic_evaluation using the SP
to evaluate how good the move is
29 18:20 <dave> its 11:20am lennons time
29 18:21 <batsman> 11:20 am? he should be here then
29 18:21 <dave> I guess
29 18:21 <batsman> aleksi: what magic do you plan to use?
29 18:21 <aleksi> in case someone wants to visualize a trace
1) chechout the tool, supply yourself with GD, convert and gifsicle, and do the thing
2) or call me up to tracegraph it for you
29 18:22 <batsman> ha, it'll take some time before we have traces
29 18:22 <aleksi> batsman, actually I have couple of modifications for the thingie in my mind, but I guess I'll start more or less with the idea I outlined
29 18:23 <batsman> that idea is essentially the one in strategy.rb, but you're doing it in C
29 18:23 <aleksi> in case someone gets frustrated with his own efforts whatever they might be,
I surely could use some help with C and wrapping it
29 18:24 <dave> alright guys, I am going now for about 20-30 min, at that point I will work on a game with whoever, or I will contribute to whatever is most important
29 18:24 <batsman> ok cu later
aleksi: I'll be happy to assist you
29 18:24 <aleksi> batsman, yes, maybe strategy.rb implements the A*-part of it, but the features I like are listed down there
29 18:25 <batsman> ok, A* + genetic part
kinda
29 18:25 <aleksi> ie. not only one trace is found, those are optimized along, so the thingie, when it's ready, could be run for the rest of the remaining time period and get better and better solutions
kinda, yes
29 18:26 <batsman> evolving is nice, sure
29 18:26 <aleksi> still, I expect to find the first path pretty fast, but not fast enough to start with ruby
29 18:26 <batsman> esp. since we could have one path close to the SP easily
and then optimize it
29 18:26 <aleksi> nevertheless my idea is nothing very unique or special, hopefully it just works
29 18:26 <batsman> ok
tell me what I can do to help you
is this paralellizable at all?
(I mean the development)
29 18:27 <aleksi> and let me be specific on one thing. I can't say if you're doing something similar or not because I don't understand what you're doing, but I'm not generating path and hope to transform it to command list.
I generate command list from the very beginning.
29 18:27 <batsman> ok
29 18:27 <aleksi> batsman, you feel you're hitting wall with your own idea?
29 18:27 <batsman> my idea was using the SP in the heuristic_evaluation func
I'm not very confident
I wouldn't like everybody to try his idea
29 18:28 <aleksi> ok, if you're willing to jump on with this one, then let's go :)
29 18:28 <batsman> and then have all failing
then, what can I do??
29 18:28 <aleksi> I like it a lot, because I feel we've pursued many possible routes instead of get stuck 10 people on one that might end up dead end
29 18:28 <batsman> F(P)=T is not essential for me, actually what I want is T!!!
29 18:29 <aleksi> ok, first let's write and wrap track in C
29 18:29 <batsman> ok I can handle that
29 18:30 <aleksi> then let's create some decent Car and wrap it as well
29 18:30 <batsman> do you want track to be C accessible from Ruby, or just C?
29 18:30 <aleksi> almost everything accessible from Ruby
I propose hand-written C with SWIG for wrapping
29 18:30 <batsman> an extension then, so this is just reimplementing Track in C, compatible w/ existing code base, right?
29 18:31 <aleksi> yes, the tests should work ok
29 18:31 <batsman> shit have no exp. with swig, but can do it by hand, it's easy and fast
I've been writing some extensions lately
29 18:31 <aleksi> if you see the interface has to be changed for a good reason on C side, we can do it, so no hard rules
29 18:31 <batsman> ok
here I go
29 18:32 <aleksi> hand made is ok as well, usually SWIG just does a lot of good for automating the type casting or conversion in the wrapper
29 18:32 <batsman> what dir should everything live in?
ext/track, say?
29 18:33 <aleksi> how about name generActive :)
29 18:33 <batsman> do you want your own namespace for the project?
29 18:33 <aleksi> generAstarter?
at this point I think we might be better to not mixup ourselves with Strategy
29 18:34 <batsman> I ask because perhaps those working on Strategy could leverage CTrack
29 18:34 <aleksi> howabout just raster?
good name is basis for everything else :)
yup, I'm sure we don't have to decide it know, and can move ctrack somewhere else later on
29 18:34 <batsman> as you wish
just tell me where, then, you're the boss
:)
as I told you, I just want somebody with a vision to follow :)
29 18:35 <aleksi> maybe ctrack should be placed in model as well, if we change the name of the class to CTrack?
29 18:35 <batsman> the problem is
29 18:35 <aleksi> yeah, I'm the boss, hehe :)
29 18:35 <batsman> that each extension has to be in its own dir
29 18:36 <aleksi> no, actually I will do only team work
why?
29 18:36 <batsman> because of how extconf.rb works
it's creating a Makefile
that links in all the *.c it sees
29 18:36 <aleksi> ah, ok
29 18:36 <batsman> and creates the extension
so model/ctrack, right?
29 18:37 <aleksi> but I guess all the classes we do in C can end up in a same .so
29 18:37 <batsman> each of them go to its own .so
so you can require them as needed
require 'model/ctrack/ctrack'
etc
we cannot use the install target of the Makefiles
cause it'd attempt to place the files in /usr/local or somewhere else
ok, I'm going for model/ctrack/
I'll surface in a while
29 18:39 <aleksi> you can probably say ruby extconf.rb --prefix=/home/foo
but I don't know I haven't done much of those things
29 18:39 <batsman> I think it's safer to just do make
and then require inside the dirs
29 18:40 <aleksi> anyway, let's call the part of the project we're doing now _bastard_
29 18:40 <batsman> or specify ruby -Imodel/ctrack
etc
29 18:40 <aleksi> which is acronym for Brilliant A* Development
:D
29 18:40 <batsman> bastard is cool
kinda :-P
29 18:41 <aleksi> do you have any fixed point math for C?
29 18:42 <batsman> no
I'd have to write it from scratch
or look for it somewhere
29 18:43 <dave> haha
29 18:49 <aleksi> could we use this library? http://www.gameprogrammer.com/4-fixed.html
29 18:49 <batsman> is it compatible with the specs?
29 18:49 <aleksi> the code uses assembler in C but I managed to compile it
29 18:49 <batsman> we've gone through quite some pain to make FPN work...
with gcc?
if it's something else I'm screwed
question:
in CImpl::Track.new
29 18:50 <aleksi> surely add and sub works, mul seems easily changed to be same, as does div
29 18:50 <batsman> do I get ruby's file handle, or a file name, or what?
29 18:50 <aleksi> sin and cos have to be written by hand
29 18:51 <batsman> think twice
it took almost 20 hours to get FPN to work
29 18:51 <aleksi> these things are easier in C :)
29 18:51 <batsman> and it's in ruby...
hope you can finish what you start
:)
ok, I'm assuming Ruby file handle for now
not to break compatibility
29 18:52 <dave> beware of needing more than 32bits to impl mul()
so maybe use long long ?
29 18:52 <aleksi> well, I prefer to send file names instead of file handles. I send handles only if the caller is going to mess around with the file as well.
29 18:52 <batsman> ok
then file name
29 18:52 <aleksi> but in this case, it's really up to you, as calling fh.gets isn't hard from C side either
29 18:53 <batsman> that's why I ask :)
29 18:53 <aleksi> otoh, you can reduce the size of C code if you take handles and not bother opening them up etc. in C
29 18:53 <batsman> ok
handles then
29 18:53 <aleksi> so I prefer development-time-wise that you take handle as a parameter
you could even write the loading portion in ruby, as we need the C only for the repetitive tasks, and reading tracks isn't prohibitingly slow
29 18:54 <batsman> I want to store the data in a malloced area
better do it in C
29 18:55 <aleksi> so when I say require 'new_track', it's new_track.rb calling require 'c_impl_track', and adding some ruby routines in it
29 18:55 <batsman> I want to speed up access to the track data
using a malloced buffer instead of Array of arrays
29 18:55 <aleksi> since we need to read those areas from ruby through some getter API, it shouldn't be too hard to make setter API as well
29 18:55 <batsman> that's the point of doing it in C
29 18:56 <aleksi> then load could be ruby which just calls C setters to alter malloced structures
29 18:56 <batsman> ok then getters and setters
I'll do it this way:
CImpl::Track.new is done in C
and calls "init(handle)"
which will be done in Ruby
that's it
Ruby can then use the getter/setter
29 18:58 <aleksi> yes, sounds fine
originally track.new didn't do automatically track.load (like trace is even still)
daniel or someone changed that behavior when merged my code
29 18:59 <batsman> I think it was me, not sure :)
29 18:59 <aleksi> then if track.load is separate track.new is plain C with no Ruby call back. And load is plain Ruby with calls to C setters of underlying datastructure.
29 19:00 <batsman> yes
29 19:00 <aleksi> to make an track instance the code will be track = Track.new.load("foo")
29 19:00 <batsman> BUT
you cannot forget to tell the C part the size of the track
so I can malloc it
I'll make it
now just wait a bit
you know, the stuff about switching context...
29 19:03 <aleksi> C setter called from load named setTrackDimensions(width, height) or something might be enough, (I'm waiting a bit in case I would interrupt you by pressing enter here too soon :)
29 19:07 <dave> back
29 19:07 <aleksi> hello
29 19:07 <gus> davel: want to work on the game?
29 19:07 <aleksi> skip the discussion on log, nothing important
29 19:07 <dave> I'm choked about the weather, such nice weather out
29 19:07 <aleksi> could you deal with gus instead
29 19:08 <dave> aleksi: don't worry I wasn't gonna ask
29 19:08 <gus> Are you using an assembly library in C for math?
29 19:08 <aleksi> roll yourself into curtains and focus in your crt
29 19:08 <gus> I might be in trouble with my G4...
29 19:08 <dave> gus: sure what are your thoughts on the game
29 19:08 <aleksi> gus, oh, yes, this version has those
29 19:08 <dave> I have an athlon and a G3
29 19:08 <aleksi> but I'm sure it won't be a problem to roll it in plain C for with G* -directive
29 19:08 <dave> I need to ++ ++ my G3 ibook into a G5 :-)
29 19:09 <batsman> almost done with CImpl::Track
29 19:09 <aleksi> let us just get this running
29 19:09 <dave> I have done a bit of ppc asm
but thats prob not a great use of time
29 19:09 <aleksi> gosh, this C is awful, this is my first C program in 3 years...
29 19:09 <dave> c sucks :-)
29 19:09 <aleksi> what's wrong here: extern void
transform1(point3 &newpt, point3 &oldpt, matrix4x3 &trans);
claims "parse error before '&'
29 19:10 <batsman> point3 is not defined?
check the headers
29 19:10 <aleksi> point3 and matrix4x3 are just typedeffed about 10 rows before
29 19:10 <batsman> wait a sec
do you have a C++ compiler or C?
that's valid C++
with references
29 19:11 <aleksi> I say gcc -c it works
29 19:11 <batsman> dunno then
29 19:11 <gus> Arg...
davel: how much ruby/tk do you know?
29 19:11 <aleksi> I'll put this to cvs so you can see
29 19:11 <dave> gus: 0 (but I don't think that would cause me much friction)
29 19:12 <aleksi> are any of you using ircII? could you say how can I use two channels and swap between them?
29 19:12 <dave> I've seen tk stuff in the past, with perl
and even a bit with ruby I think
aleksi: no I don't know how with ircII
I am using xchat
29 19:14 <aleksi> I can see that on same window as #rubyicfp
well I'll forget that
29 19:14 <dave> sorry
29 19:14 <aleksi> hello tobias, guys might be interested in your ncurses
and your expertise with it
29 19:14 <dave> yes
29 19:15 <tobias> hi
29 19:15 <batsman> hi tobias
29 19:15 <gus> I have done some tk from tcl
None from ruby
29 19:15 <tobias> for this project?
29 19:15 <batsman> to write a sort of game
29 19:15 <dave> tobias: we wanna do a manually driven "game"
29 19:15 <batsman> so we can generate traces by hadn
29 19:15 <dave> where we show a portion of the map, someone drives the car with the arrows
the traces will be output
then we just use the best scores we can get
29 19:16 <tobias> and ncurses for the ui?
does not seem to fit
29 19:17 <dave> gus: there is a ruby/tk chapter in the pickaxe book, which is available online http://www.rubycentral.com/book/ext_tk.html
tobias: what problems do you see with it?
we would zoom in on the map
29 19:17 <tobias> first, drawing the car so that you can see the direction it faces
29 19:18 <dave> showing as much as the terminal will allow
we would have to use | - / and \ :-)
29 19:19 <tobias> but otherwise, it might be ok
29 19:19 <dave> we hope not to spend too much time on it
29 19:19 <tobias> hmm you know the clock example?
29 19:19 <dave> vaguely
29 19:20 <tobias> the arms of the clock are just written with o's #'s and .'s, if i recal correctly
ok maybe just filling a few charcells within that direction would be enough
29 19:21 <aleksi> the direction could be pointed with an speed vector, like my cars do have in front of them in the anim gif
29 19:21 <tobias> next we would need a terminal + font combination that allows for a really tiny, but absolutely sqare font
29 19:21 <aleksi> that could be drawn with \ marks and with lenght of 0-5 chars about
tobias did you see the anim gif already?
29 19:22 <tobias> no
where?
29 19:22 <aleksi> http://www.cs.helsinki.fi/u/kaniemel/Een.gif
29 19:25 <tobias> nice
how was that path generated?
29 19:26 <aleksi> it's the example
29 19:26 <dave> its the sample provided
29 19:26 <tobias> i see
29 19:26 <aleksi> Een.trc on Een.trk
the other car there's just a hand made alteration at the beginning of the Een.trc, I added "a.a.la.la.a.a.la.a." kind of string to make the traces different
anyway, if you look closely you see two lines (dark violet, hard to see, and light blue) in front of cars indicating the speed vector
29 19:27 <tobias> yes
would you want the text font big enough to be able to read some sort of display (say current speed)
29 19:28 <aleksi> I don't think it's necessary
but if it really is, you could always write in character made 5x7 raster to make text
29 19:29 <tobias> or we could have ncurses connect to two terminals to display instruments in a larger font
this is possible (but never tries it)
mor we could have the simulation send info over a socket to another process
29 19:30 <aleksi> at least you could have two terminals showing different things and move the information in druby
29 19:30 <tobias> yes
29 19:33 <tobias> what about breaking and steering. since it's impossible to do them at the same time, i thought we would probably have to generate sequences like l.b.l.b.l.b in front of curves
maybe we would need more than just the arrow keys to map these patterns
29 19:34 <dave> yes
numpad?
29 19:34 <tobias> that's where i looked just now :)
29 19:36 <dave> gus, tobias, are we gonna go for this game idea, if so, how should we break things up?
29 19:36 <tobias> i am undecided
29 19:37 <dave> tobias, you're likely the best one for doing much of the curses, but I have done a bit of curses in the past, not too difficult for most things
ok
how long do you think it would take to put it together, if we were to delay it?
29 19:37 <tobias> i am not an expert, either. just did the wrapping and a few small apps
29 19:37 <dave> ie if nothing else works, last resort
29 19:38 <tobias> i think we would have to start *now*
29 19:38 <dave> thats prob more than me and gus combined, but I have no problem jumping in on the curses code
ok, what are your hesitations, do you have other plans you would rather work on
29 19:39 <tobias> we will have to learn to play the game
29 19:39 <dave> cause I have an idea floating in my head, also, I could try to attack the game part myself
29 19:39 <aleksi> tobias just stated that GO! :)
29 19:39 <tobias> hesitations: a cannot offer more than a few hours each evening
hesitations: I cannot offer more than a few hours each evening
29 19:40 <dave> aleksi: tobias just stated what?
29 19:40 <aleksi> <tobias> i think we would have to start *now*
29 19:40 <gus> I haven't been following the conversation
Are you starting the game in ncurses?
I was doing tests in tk
Not very far along
I'll be leaving in 2 hours
Be back in 6 or so
29 19:41 <aleksi> I think you should just choose tk or ncurses and give it a go
29 19:41 <dave> yes, thats what we are trying to do :-)
29 19:41 <aleksi> you'll see pretty soon if it will be dead end, not much time wasted
29 19:41 <tobias> i think we would have to start *now* if we want to complete the code and get used to playing the game
29 19:41 <aleksi> ok, let's make a vote, if nothing else works ok
all those pro ncurses, hands up now!
29 19:42 <dave> * davel hands up
29 19:42 <aleksi> (I'll ask soon pro tk, but let's take this one first)
29 19:43 <tobias> undecided
29 19:43 <gus> Never done any ncurses
29 19:43 <dave> I am sorta undecided too, I was gonna put my hands up for tk as well, since I can't say which is best
29 19:43 <aleksi> ok, then tk!
29 19:43 <gus> I'd vote tk cause I know some
29 19:43 <aleksi> tk wins!
no go for it!
29 19:44 <dave> whksh whksh
(sound of a whip cracking :-)
29 19:44 <aleksi> :)
29 19:44 <batsman> hi guys, just came back from coding CImpl::Track
29 19:44 <dave> hi
29 19:45 <aleksi> I'd like to see one guy creating the view part, ie. painting track and car, it's trace marks, crash marks, position and speed info on a canvas
29 19:45 <dave> tobias: what do you think of doing it in tk?
29 19:45 <gus> Wow
That was close!
Who is working on it?
Head count
29 19:45 <dave> working on game?
29 19:45 <tobias> never done any tk
29 19:45 <dave> me, I guess
29 19:45 <tobias> but go for it
29 19:46 <dave> yer not in then?
29 19:46 <batsman> ok, aleksi just asked me to state my view on ncurses vs tk
29 19:46 <tobias> i will certainly watch
29 19:46 <batsman> it is: up to you :-)
29 19:46 <aleksi> then another one to write controls for simulation: track selection, trace selection, time stepper (slide or box) and command list, controls to choose next command or alter current one
29 19:46 <batsman> I have no experience with either
I'm going back to my ctrack.c whing
29 19:47 <dave> gus: I think its me and you
29 19:47 <aleksi> then third one to implement the binding of these two together with simulator and car status
29 19:47 <batsman> thing
29 19:47 <dave> with tobias free to roam
29 19:47 <gus> All C or assembly too?
How do you want to display the tk?
the canvas?
Create a big canvas the size of the track
And scroll it as necessary to display a zoom of the area we are interested in?
davel: OK, that's good with me
29 19:47 <aleksi> ie. getting control responses and forcing a repaint after model (ie. car status) has been updated according to current status and command
do I make any sense?
29 19:48 <dave> yes, mostly
29 19:49 <aleksi> I don't mean to tell you what to do, just give some common ground
I forgot my whip home :)
29 19:49 <dave> understood
29 19:51 <dave> gus, should we each read up on tk and then come back and discuss
oh you have done tk already, right?
just not ruby/tk
29 19:51 <gus> Yes, but I forgot a lot
I got so much in love with ruby :)
I never used the canvas before
I am reading on it at this very moment
29 19:52 <dave> at the link I sent, or somewhere else
29 19:55 <gus> Actually, man n canvas
The tk doc
29 19:55 <dave> k
29 19:56 <gus> I am trying for now to get a simple display of a circuit and then scroll it freely
29 19:56 <dave> great
29 20:02 <lennon> greetings. all
29 20:02 <dave> hi lennon
guess what, we've got it solved ...
kidding
well, gus and I are about to try making a tk based game, that will allow us to drive the car, and produce traces
29 20:03 <lennon> really?
29 20:03 <dave> yep
we only just decided to go forth
29 20:03 <lennon> forth as in forward, not stacks, right?
;)
29 20:03 <dave> stacks?
29 20:04 <lennon> "Forth", the language?
29 20:04 <dave> forth as in forward, did I mispell?
29 20:04 <lennon> stack-based, postfix lang.?
29 20:04 <dave> I get it
29 20:04 <lennon> sorry
29 20:04 <dave> I dont really know forth
its funny, dont be sorry
29 20:05 <lennon> well, this whole project is looking more and more like a compiler to me the longer we work on it,
so why not add a nice stack-based VM to it?
* lennon grins
29 20:05 <dave> you mean java or clr ?
29 20:06 <lennon> well, forth is low-level enough to almost be bytecode
but really, if we're going to use an existing VM, it should be Parrot
29 20:06 <dave> I dont know forth
29 20:06 <lennon> just to trumpt any potential Perl teams out there
and I'm still kidding
so don't worry
29 20:06 <dave> parrot isn't all stack based, plus its not ready for consumption
hows bezier doing?
29 20:07 <lennon> and I'm *not* dealing with translating FPN to Parrot assembly code
29 20:07 <dave> isn't there a ruby compiler for parrot yet?
(btw, I know the answer)
29 20:07 <lennon> re: bezier: well, depending on what's been done to geom since i went to sleep,
i can get a local curve-fitting optimizer coded up in about an hour
i've got all the right algorithms bookmarked ;)
and some non-working code i started yesterday
but it's going to have to be local optimizations,
not whole-path smoothing, as i had originally hoped
29 20:09 <lennon> the cost of bezier curve generation scales exponentially with the number of control points
29 20:10 <aleksi> hello lennon
29 20:10 <vincenz> How's it going?
29 20:10 <lennon> uh, oh the schemer!
29 20:10 <vincenz> How far are you guys?
29 20:10 <dave> how far are you?
lennon: I didnt touch geom, tho I like it and have an idea that may use it
the idea is simmering right now
29 20:11 <lennon> davel: i think tobais did some cleanup work earlier
at least, i saw some checkins in the cvs log
vincenz: i just rejoined the group after some much-needed sleep, so i can't really say
29 20:12 <aleksi> vincenz, we got a nice show
http://www.cs.helsinki.fi/u/kaniemel/Een.gif
how it's going for you?
29 20:12 <dave> ok, I ci'd some emacs support comments to geom.rb thats all
29 20:12 <aleksi> is jimm, jim menard?
all the guys up and working now :)
29 20:12 <jimm> Yes, indeed.
29 20:13 <vincenz> aleksi: not quite there yet
29 20:13 <lennon> btw, would it hurt anyone's feelings if i renamed "tools/dumpgrip.rb" to "tools/dumpgrid.rb"?
29 20:13 <vincenz> * vincenz departs
29 20:13 <lennon> since that's what it reports in its own usage method?
as a filename, i mean
29 20:13 <aleksi> lennon, jimm, you should check the above url, so you see what you can test with when you get some traces produced
29 20:13 <jimm> Sorry that I've been completely worthless to the team. I have thoroughly enjoyed lurking, though.
I just did. It looks fantastic!
29 20:14 <dave> anybody know who vincenz is?
29 20:14 <aleksi> it's in CVS, but it could be easier if I do it for you
29 20:14 <dave> you guys sounded like you know him/her
29 20:14 <lennon> he's a member of the scheme team
29 20:14 <dave> ok
29 20:14 <lennon> and he dropped in last night to say hello
29 20:14 <dave> sceme, cool
scheme
29 20:14 <aleksi> I'm really not so interested about spies in open environment
29 20:14 <lennon> nor am i
esp. when they announce themselves
29 20:15 <aleksi> good if they can pick up some ideas to pursue
29 20:15 <lennon> not a very good way to snoop
29 20:15 <dave> yeah I asked how he was doing, gave no answer...
29 20:15 <aleksi> I mean, if we would like to hide a bit, we should do it properly :)
29 20:15 <dave> for my info, how does one do that :-)
29 20:15 <aleksi> <vincenz> aleksi: not quite there yet
29 20:15 <dave> just choose a name that doesnt say who you really are?
29 20:16 <jimm> Maybe we could use a Super Sekrit Kode like rot13!
29 20:16 <aleksi> davel, I mean, we would set up own irc server over ssh secured lines
secret would be written siikret in my language, maybe that's enough for encryption :)
29 20:17 <jimm> :-)
What are the two different outputs (yellow and red) in the Een gif at the URL you posted above?
29 20:17 <aleksi> sjuupo siikret koud tat is
29 20:17 <dave> two different cars
one that starts off with a few extra "a" calls
it also ends up crashing more than once
gus: hows it going
29 20:18 <jimm> OK. And are the bright green bars where the car went "through" a wall in a single move (which is legal) or are they crashes?
29 20:18 <gus> Slow
29 20:18 <dave> jimm: crashes
29 20:18 <gus> The scrolling of canvas is still a mistory
29 20:18 <dave> gus: lets div up
29 20:18 <lennon> is that our trace, or the one the organizers provided?
in the animated GIF, i mean
29 20:19 <dave> lennon: the car that doesnt crash is the organizers trace
29 20:19 <gus> what do you want to do?
29 20:19 <aleksi> Een.trc against Een.trk, and other car is modified Een.trc with extra "a.a.la.la.a." added to it
29 20:19 <dave> doesnt matter I havent done a "game" before
29 20:19 <jimm> Notice that in the organizers' Q&A page, they specifically do not answer the question about how their trace was created or if it is optimal.
29 20:19 <lennon> indeed
29 20:19 <dave> so if you know more enough to direct me, please do
29 20:20 <aleksi> I'd say it isn't very far from optimal
29 20:20 <dave> I agree, its prob close to optimal
29 20:20 <aleksi> I mean, order-of-magnitude-wise
29 20:20 <lennon> right
29 20:20 <jimm> Agreed
29 20:20 <lennon> so, just to check before i start diving back in to coding up some bezier ops and the like:
29 20:20 <aleksi> but one might be able to chomp off some hundreds or even thousand commands
29 20:20 <lennon> where are we at on the third stage of the new grand unified theory of car driving?
29 20:21 <aleksi> I feel it's not optimal in the beginning of last N, and during it
29 20:21 <dave> third stage being what, generating traces?
29 20:21 <aleksi> you might actually even want to try it
29 20:21 <lennon> indeed
the whole strategy-application-to-path phase
29 20:21 <dave> I dont think anyone has anything that is close to generating traces
29 20:21 <lennon> okay, looks like i should focus there, first
29 20:22 <dave> we were calling it F(P)=T
29 20:22 <aleksi> modify around 4500-6000 and 6750-7250 and 8000-
and see if you can make it even better by hand
29 20:22 <dave> something that takes a path and returns a trace, is something that we need :-)
29 20:22 <aleksi> then we have something that's better than organizer provided version, to submit
29 20:22 <lennon> davel: i kind of figured that would be the case...good thing i started work on that geom module
29 20:23 <dave> but isn't that track is a sample, isn't it?
29 20:23 <gus> Well, I am not sure how to divide up.
29 20:23 <jimm> I'm confused by terms. "trace" is the path the car takes, right? What is "path" then?
29 20:23 <dave> trace is the "actions" taken to follow a path
29 20:23 <lennon> jimm: a "trace" is the exact commands the car executes
29 20:23 <aleksi> path is a concept of a good route (curve of pixels) to the finish line
29 20:24 <jimm> Thanks, everyone.
29 20:24 <dave> +/- accel, left/right, etc
29 20:24 <lennon> the path is something we've introduced as an intermediate structure,
29 20:24 <aleksi> nice line of commands follows some path, not necessarily good one
29 20:24 <lennon> which is easier to work with and optimize than individual commands
29 20:24 <jimm> So you have already figured out how to find the path but have not yet found you how to get a trace from the path?
29 20:24 <lennon> as i said, it's all getting pretty compiler-ish at this point
jimm: that's right
i'm about to jump back into that, though
29 20:25 <aleksi> F(P)->T means, we should write a function to take in path and spit out trace that follows that path (as closely as possible, but inside same pixels there's room for differences which minimizes amount of commands needed to follow that path)
29 20:25 <dave> lennon: what compiling a trace from a path?
29 20:25 <lennon> after doing some infrastructure work yesterday (mostly trig and positioning code)
davel: yes
29 20:25 <jimm> I'm thinking that it may not be possible to do so without additional information. For example, if car is heading to wall you want to slow down. Does the path info include "a wall is straight ahead"?
29 20:25 <lennon> the path info doesn't,
29 20:25 <dave> whats your ideas lennon
29 20:26 <lennon> but i wrote a 'distance_to_wall' method yesterday
29 20:26 <jimm> lennon: cool
29 20:26 <lennon> which i can also use to determine the "shape" of upcoming curves, obstacles, etc.
29 20:26 <dave> lennon: is your compiler ideas related to the bez curvers?
29 20:26 <aleksi> jimm, you cannot follow a path if car is in high speed and path turns. You have to look forward the path and slow down to make the turn in speed you can afford.
29 20:26 <lennon> basically doing a "sonar scan" of the relative distances to walls at different angles, from the same position
29 20:27 <jimm> I figured as much. (I'm trying to catch up, but I also do not want to slow any of you down. Feel free to ignore/postpone answers to me.)
29 20:27 <lennon> davel: the bezier curves may be an optimiation method, but they don't give us individual trace instructions
29 20:27 <dave> gus: which would you rather work on, the display related code (showing the map, the car, trace, etc) or the event related work (user input, events to the display)
29 20:27 <aleksi> jimm, so there's no need for wall information, as long as you're all the time in same pixels as the path, and jump from pixel to another without visiting other pixels.
29 20:28 <dave> lennon: ok so how do you plan to compile a path into a trace?
29 20:28 <lennon> davel: basically, i'm going to do a few simple lookaheads
davel: one, what's the next point on the path?
29 20:28 <jimm> aleksi: Understood. I'm thinking about the car as it's trying to follow the path, but it's travelling too fast to follow a curve in the path. (Lennon alluded to this problem above. I know all of you are way beyond me at this point.)
29 20:29 <lennon> davel: two, can i safely accelerate
29 20:29 <dave> lennon: sounds interesting, let me know if you need help
29 20:29 <lennon> davel: sure
aleksi: perfectly following a path may not be feasible, or even desireable
29 20:30 <aleksi> jimm, that means you shouldn't accelerate it too much, ie. if you get away from path you know you have already too much speed
29 20:30 <jimm> lennon: how far ahead in the path (and at the obstructions near the path) do you need to look ahead to determine safe acceleration?
29 20:30 <aleksi> actually that's interesting concept, making A* search to find trace for path
29 20:30 <lennon> jimm: that's something i'm going to experiment with
29 20:30 <jimm> aleksi: but you can be right on the path and still going too fast to take a curve or avoid an obstacle.
29 20:30 <batsman> guys: I know how to estimate position of curves
based on the SP
29 20:31 <gus> I have started working on the display
29 20:31 <batsman> it's feasible
29 20:31 <aleksi> jimm, lennon, the upper bound is quite far away
29 20:31 <lennon> aleksi: yep, i think much of the "strategy" code is going to get used in the trace generation
29 20:31 <gus> I guess I should continue
I made steps forward
I think I understood the scrolling
29 20:31 <aleksi> imagine a sequence of "la.la.la.la."... where the car makes spiral increasing it's speed
29 20:31 <batsman> there's been lots of activity while I was coding CTrack
29 20:31 <gus> Just backward of my first intuition
29 20:31 <lennon> batsman: based purely on the SP? do tell...
29 20:31 <batsman> ok, here's the idea
29 20:31 <aleksi> then suddenly there's 90 degree turn back to origo
29 20:32 <gus> I am ready to start displaying the track in the canvas
29 20:32 <batsman> given two points of the track
the line joining them represents the local direction of the path
29 20:32 <gus> Go ahead and start the event stuff
29 20:32 <aleksi> so you can't accelerate all the time even though the slow down is only couple of hundred of commands before finish line
29 20:32 <batsman> now, you can average that in say 10 points
and you have the "overall direction" of that segment
then
29 20:32 <lennon> batsman: that's exactly what my intention was,
29 20:32 <dave> gus: are you using the png's of the map?
29 20:32 <batsman> you compare the "overall direction" of different segments
looking for changes in the direction vector
29 20:33 <lennon> batsman: only i was going to do it relative to the car's position
batsman: using the array of distances to walls ahead
29 20:33 <batsman> the distance finding code is slow
I implemented it this morning
fixing your code
29 20:33 <lennon> batsman: how bad is it?
29 20:33 <batsman> it's sloooow
29 20:34 <lennon> hmm...
29 20:34 <batsman> it needs lots of sins
and cos
so I made a lookup table
but even that way, slow
29 20:34 <dave> we all have our sins :-)
29 20:34 <lennon> which are all going through FPN right now...
damn
the sins, i mean
29 20:34 <batsman> no, I used Math.sin
29 20:34 <lennon> really?
nevermind
29 20:34 <gus> I didn't think of that!
It sure would be more beautiful
29 20:34 <batsman> not FPN!!! that would be slower
29 20:35 <dave> gus: what are you using?
29 20:35 <jimm> batsman: naive question: any way to avoid sin/cos by working in other units like radians or something?
29 20:35 <batsman> emmm
29 20:35 <dave> are you converting the textual maps to some sort of bitmap?
29 20:35 <lennon> jimm: we *are* working in radians
29 20:35 <jimm> *blush* sorry
29 20:35 <lennon> jimm: *and* x, y coords
29 20:35 <batsman> jimm: the angle is in radians, we transform it to coordinates with cos
jimm: and sin
however
one cheap trick is testing square boxes
but even that is slow
because Track IS slow
Array of Arrays
29 20:36 <lennon> batsman: did you implement your own rect/polar conversion routines, or keep using Complex
29 20:36 <batsman> well, take a look
29 20:36 <gus> Let me try with the png
I was just going to paint somehow the part off track
29 20:36 <batsman> def distance_from_wall(x, y, precision = 10)
xpos, ypos = x.to_f, y.to_f
maxrad = [@x_dim, @y_dim].max
radius = 1
while radius < maxrad
dtheta = 90.0 / radius / Math::PI
angle = 0
while angle < 360
if crash?(xpos + radius * @@cos_table[angle.to_i],
ypos + radius * @@sin_table[angle.to_i] )
return radius
end
angle += dtheta
end
radius += precision
end
end
29 20:36 <dave> k
29 20:36 <batsman> one cheap trick to make it faster
is increase the radius by 10 each time
but we miss small walls (one pixel wide)
29 20:37 <aleksi> batsman, don't flood too much, instead point to the code and here show only relevant part if line numbers are not good enough
thanks
29 20:37 <batsman> ok, sorry
29 20:37 <gus> davel: does tk even support png?
I am not sure reading the doc
29 20:37 <dave> gus: don't know
the png is generate from xpm, so what does tk support
and maybe we can get xpm to something it supports
29 20:38 <jimm> batsman: you are right, distance_from_wall would speed up if you checked inside a square instead of a circle. Make the square big enough, then check the circle only if you have a (possibly false) hit.
29 20:38 <gus> gif and ppm/gpm
29 20:38 <dave> we could use xpmtoppm
29 20:39 <lennon> batsman: would using one of the numeric libraries from RAA help Track?
batsman: for example: http://www.ir.isas.ac.jp/~masa/ruby/index-e.html
29 20:40 <gus> It doesn't seem to be present in MacOS X by default
Can you do the conversion?
I am talking about xpmtoppm
29 20:40 <lennon> batsman: actually, that would give us a pgplot interface, too...which might be very nice
29 20:40 <dave> gus: yes
I am adding a game dir to cvs
29 20:41 <batsman> ummm
29 20:41 <dave> and I just converted 1_Simple.ppm
29 20:41 <gus> Thanks
29 20:41 <batsman> lennon: if you wait for a while, I have CTrack
29 20:41 <lennon> batsman: really?
decided to "roll your own", eh?
29 20:41 <batsman> lennon: actually it's in CVS already, I'm testing
lennon: nope, I'm working with aleksi on "his vision", codename 'bastard'
lennon: we started a couple hours ago, at that time there was no activity and I felt we just had to do something so I jumped in the wagon
29 20:42 <lennon> damn...looks like i'm either going to have to move back to my Linux box, or install a different version of Ruby
the OS X included version doesn't have 'mkmk'
29 20:43 <dave> gus, it should be there, cvs up
lennon: yeah os x ruby is definitely incomplete
29 20:43 <batsman> lennon: I can ci the makefile too
29 20:43 <aleksi> davel, gus, PPM is _very_ easy format to write a reader on your own
29 20:43 <lennon> batsman: that might help
29 20:43 <batsman> ok, doing it
29 20:44 <aleksi> I guess batsman already wrote one today
29 20:44 <batsman> davel, gus: did a ppm reader
29 20:44 <dave> aleksi: tk supposedly already supports ppm
29 20:44 <batsman> see model/field.rb
29 20:45 <dave> batsman: ok, but I dont think we need one, I think tk already supports ppm, thats why we converted the xpm generated to ppm
gus: did it come through for you
29 20:46 <gus> TK supports ppm
I am using it
29 20:47 <dave> good
29 20:47 <batsman> sorry, broken ci of ctrack, fixing
29 20:48 <dave> gus, gonna go eat with a friend, I'll be back asap
29 20:48 <jimm> I've rewritten distance_from_wall to search using squares first, avoiding sin/cos, and then to use radius when wall is found within a square. Now I need to write a test. That's gonna be a bit tougher.
29 20:48 <lennon> batsman: well, looks like i'm going to have to install another version anyway
29 20:48 <dave> gus, I am still with ya on the game, and I will go hard when I get back
29 20:48 <lennon> batsman: no libruby or headers on OS X, apparently
batsman: btw, w.r.t. model/field.rb -- is the new pointgrid dump format actually XPM?
29 20:49 <jimm> lennon: that's true, unless you've compiled and installed your own.
29 20:49 <lennon> jimm: that's so pointless...
29 20:50 <jimm> OK. Never mind.
29 20:50 <dave> lennon: http://www,opensource.apple.com/darwinsource/tarballs/10.2.6/other/ruby.tar.gz
lennon: that will at least get you headers, but you would still have to compile stuff to get the libruby
29 20:50 <batsman> lennon: what do you mean? I'm not dumping, just loading from PNM
29 20:50 <lennon> batsman: nevermind
29 20:51 <gus> I am leaving in an hour
29 20:51 <aleksi> jimm, I think you could do it also other way round: precalc a map where walls which are in contact with road propagate their distance by flooding unless the distance in cell is already smaller than the one in flooding.
29 20:51 <gus> and for a couple of hours
Hopefully I'll have something usefull
29 20:51 <batsman> guys: you might be doing something similar in spirit to my "field perturbation" thing
it was a way to introduce an arbitrary bias in the path finding
29 20:52 <jimm> aleksi: sounds good
29 20:52 <batsman> essentially by just painting one file :)
29 20:52 <lennon> davel: thanks
29 20:52 <batsman> that one, you could for instance apply a gaussian blut to the image and avoid getting close to walls,etcv
29 20:53 <jimm> aleksi: the current track data only keeps the character ('.', etc.) and not any more information, right? Your suggestion implies that the track needs to keep more information in each cell. I like that a lot.
29 20:54 <lennon> jimm: the track only stores the character, but we have a seperate pointgrid that stores a "score" for each x, y position
29 20:54 <batsman> pointgrid calculates the distance from each point to the goal
by a "flooding" algo.
29 20:55 <jimm> lennon, batsman: understood. thanks.
gotta go for a while. thank you for letting me chime in and ask questions. good luck, everyone.
29 20:55 <batsman> cu
29 20:59 <lennon> batsman: any benchmarks or estimates on how much the move to C is going to help?
for track, i mean
29 20:59 <batsman> not yet
I'm fixing bugs :-(
making the unit test
etc
29 21:00 <lennon> ok
29 21:00 <batsman> at least it doesn't segfault anymore :-)
29 21:00 <lennon> i was thinking, though: maybe we should try switching track to use the same single-array storage as ctrack
although, that might not really help, since so much of our basic arithmetic is written in Ruby at this point
due to FPN
nevermind
29 21:01 <aleksi> would someone dare to help me out
checkout, or update bastard directory and it's contents
run compile.sh, and tell me why mult: prints are 0.0 -> 0.0
lennon, I'm writing FP in pure C
we'll then wrap it for Ruby
29 21:03 <lennon> aleksi: ok
all: i'm going to log out for a couple of minutes, while i switch to my linux box
brb
29 21:13 <batsman> would anybody care to check that test/test_ctrack.rb does really test CTrack and that it passes all tests? :-)
29 21:14 <lennon> batsman: btw, you should probably get that Makefile out of CVS...or at least rename it to something else
otherwise, it's going to be a huge pain for everyone
sorry
29 21:15 <batsman> I put it there because somebody couldn't run extconf.rb
29 21:15 <lennon> i didn't think about it being auto-generated when i asked for the file
my bad, i'm sorry
29 21:15 <batsman> ok
I'm removing it then?
29 21:15 <lennon> cool
29 21:17 <lennon> * lennon smack forehead
i just figured out why my os x machine couldn't build anything...
...it's got the 10.1 dev tools, and is running 10.2
29 21:18 <batsman> no compiler? :)
29 21:18 <lennon> linker won't run under the newer os
29 21:18 <batsman> ouch
can you upgrade easily?
29 21:18 <lennon> now to go find those new dev tools...
if i could remember my apple developer connection login
it's ok -- i should be able to grab it from another box in the house
29 21:19 <aleksi> me could tells that the porper from of /mes commando ist /me <verbs on the 3th persons format> <issuer to tell>
29 21:21 <lennon> gotcha
29 21:21 <aleksi> :)
my perfect english
29 21:24 <lennon> ok, downloading the new dev tools now...
only 300 -- wait, make that 299 -- to go ;)
29 21:25 <dave> gus: back
any info, or should I just dive right in to high level game control
29 21:26 <lennon> ooh...they have gcc 3.3 available for OS X!
29 21:26 <batsman> ooo
29 21:26 <aleksi> that's the sound of nerd satisfaction
29 21:27 <lennon> indeed
29 21:27 <dave> lennon: but 3.3 has an incompatible c++ abi from 3.1
29 21:27 <lennon> but i mean really, who wouldn't be satisfied with the newest GNU C complier? ;)
davel: they shipped 10.2 with gcc 3.2
davel: that's why the 10.1 linker doesn't work
29 21:28 <dave> nope, 3.1 `gcc --version`
and its a 3.1 pre-release too
29 21:29 <lennon> davel: well, regardless, the 10.1 tools include gcc 2.95.2
davel: which is just too damn old
29 21:29 <dave> yeah, I am just saying the c++ produced with 3.3 (if you use it) won't link with c++ produced by 3.1
29 21:29 <lennon> davel: sure
davel: i once updated my gentoo machine to gcc 3.2, without worry about it...baaaaad idea
29 21:30 <dave> lennon: are you using irb much? http://cherryville.org/files/readline.bundle
29 21:31 <lennon> davel: thanks, that'll help
29 21:31 <dave> put that in /usr/lib/ruby/1.6/powerpc-darwin6.0 and irb will then have readline support
29 21:32 <lennon> ok, switching back to the os x machine -- it's almost halfway through the d/l, and a good bit faster than this machine
29 21:35 <aleksi> and correct answer to my earlier question was: please make sure you have right function declarations in your header file
29 21:36 <batsman> I may add "and always compile with -Wall"
29 21:42 <gus> Help!!!
I never found tk particularly fun
but tk through ruby is very painfull
29 21:42 <batsman> sorry, busy rewriting FPN in C...
29 21:42 <gus> very
29 21:42 <dave> how so?
slow?
29 21:42 <gus> The binding between the tk call and the ruby ones is not straight forward
29 21:43 <dave> oh
29 21:43 <gus> And I spent one hour to display an image in a canvas
to figure out that you cannot draw on top of an image in a canvas
Any other object we put on the canvas will be underneath the image
So invisible!
:(
X(
29 21:44 <dave> you can't put it over the image? thats seriously dumb
is that a ruby problem, or a tk restriction?
29 21:44 <gus> tk!!!!
backgroundw = TkcWindow.new(canvas, 0, 0, "window" => background.path, "anchor" => "nw")
Ooops!
Didn't mean to do that
29 21:46 <dave> gus: so either we need to drop tk, or find another way to display a car and its trace on top of the map
29 21:47 <gus> Correct
But now I got to leave
I have a commitment
29 21:48 <dave> ok, what do you suggest I do, try ruby/gtk ?
29 21:48 <gus> I won't be back for a good 4 hours
I am pissed of!
29 21:48 <dave> pissed of what :-)
gus well thanks for the initial work, I guess I will try ruby/gtk ...
29 21:51 <gus> OK, go for it
I never played with ruby/gtk, but I'll catch up
See later.
29 21:51 <dave> me neither
seeya
29 21:56 <batsman> we're dead, aren't we?
29 21:56 <dave> ssshhhhh
don't say that
:-)
29 21:57 <batsman> didn't want to say it
29 21:57 <dave> the game might work :-)
29 21:57 <batsman> but it's definitely the feeling
the game seems gone
tk is gone
29 21:57 <dave> I am trying gtk
29 21:57 <batsman> we have to build from scratch ...
as for aleksi's idea
don't know if we're going anyway :-( sorry aleksi
s/anyway/anywhere/
plus he has disappeared
29 21:58 <lennon> i've done some ruby/gtk work, but i'd prefer not to focus on the game when we still don't have a trace generator
29 21:58 <dave> well I will be here to the hopefull non-bitter end
lennon: thats fine
29 21:58 <batsman> yes
29 21:58 <dave> I will plug away at it, see if I can do anything useful (dont hope)
29 21:59 <batsman> I abandonned F(P)=T
when I realized how slow our Strategy framework ws
it would have taken an hour for a track
and that once it works
before, we'd need several test runs...
aleksi????
29 22:00 <lennon> davel: can you send me the readline bundle url again?
29 22:01 <dave> http://cherryville.org/files/readline.bundle
put it in /usr/lib/ruby/1.6/powerpc-darwin6.0
29 22:01 <lennon> thanks
29 22:18 <batsman> hi tobias
29 22:18 <tobias> hi
29 22:18 <batsman> things are getting hard
29 22:18 <tobias> i suspect
29 22:19 <batsman> aleksi & me are working on a C implementation
we have already CTrack, which passes Track's unit tests
29 22:19 <tobias> i saw that on cvs
29 22:19 <batsman> now we're w/ cfixed
we hope to be able to reuse you test cases
29 22:19 <tobias> 32bits enough for fpn?
29 22:19 <dave> no!
29 22:19 <batsman> we're doing long long int
64 bits
29 22:20 <dave> ok
29 22:20 <batsman> gcc extension
29 22:20 <tobias> ok
29 22:21 <batsman> do you know what happened to the "game" idea?
29 22:22 <dave> * davel is working on it
29 22:22 <tobias> gus, davel and aleksi wanted to implement it in tk, thats what i know
29 22:22 <dave> * davel is trying, anyways
29 22:22 <batsman> right now? good
29 22:22 <dave> yes, learning ruby/gtk
29 22:23 <batsman> gus bot pissed w/ tk
29 22:23 <tobias> gtk?? i though tk
29 22:23 <dave> we started with tk
29 22:23 <tobias> have you checked anything in?
29 22:23 <dave> apperently loading an image (the track) and then drawing on top of it is not possible with tk
tobias: nothing
just a ppm map for track 1 cuz tk likes gif or ppm but not png
gtk likes png tho
29 22:25 <tobias> sorry i'm not much of a help
29 22:25 <dave> we're all doing our best I think :-)
I am enjoying working with a bunch of people I don't know, seeing the ideas and all
its fun in many ways
29 22:25 <tobias> i think so
29 22:25 <batsman> yes
now I'm not very confident on actually submitting anything
but it's been fun
tobias:
29 22:26 <tobias> i'm looking forward to see solutions of other teams
29 22:26 <batsman> could you take a look at bastard/cfixed/ ?
29 22:26 <aleksi> I'm still confident on submitting something
29 22:26 <tobias> yes
29 22:27 <dave> aleksi: me too!!!
29 22:27 <aleksi> after all, there's more than lightning entry time to do things
29 22:27 <dave> yep
29 22:27 <batsman> you'r right!!!
29 22:27 <aleksi> and I'm much wiser than at friday, thanks to you guys
29 22:27 <batsman> morale high again!
you're absolutely right
after all, we've got 38000+ test cases now :-)
tobias: do you have any idea about how to integrate cfixed in Ruby and reuse unit tests?
29 22:28 <tobias> likely -- will look into it
29 22:28 <batsman> ok thanks
29 22:29 <tobias> files fixed.c, fixed_2.h, yes?
29 22:29 <batsman> update
they have changed a lot...
29 22:30 <tobias> i see, new dir cfixed
29 22:30 <batsman> yes
this is my take:
just to have a Fixnum inside a class
as an attribute
this is ok to hold a 25bits number
then, inside the extension
implement operations on that class using the fp routines
and set the attribute back
29 22:32 <tobias> ok
29 22:32 <batsman> if I call the attribute 'fp'
!!! the class is compatible with FPN!!!!
29 22:35 <tobias> my idea fp and fp= will become methods. makes no difference in usage, is more conveniant in wrapping
give me 25 minutes
29 22:35 <batsman> you're doing it???
29 22:35 <tobias> now
29 22:35 <batsman> nice thanks
I was about to do it
but you're more knowledgeable on FPN
thank you!
the extension should be in bastard/cfixed/
we will pass the appropriate -I parameters to ruby
29 22:43 <aleksi> so much hassle to remember to put parentheses around if comparison statement, and braces to the code, not to mention semicolon...
29 22:44 <batsman> yes :)
you know
29 22:44 <dave> useless decoration
29 22:44 <batsman> when writing CTrack
I kept doing
def ctrack_new(VALUE bla)
etc
and then, oh no, it's C
29 22:48 <dave> on thing thats interesting is there have been no japanese people involved
29 22:48 <aleksi> might be the language barrier
29 22:48 <batsman> yes
29 22:48 <dave> I am trying to read some docs on ruby/gtk and imlib and its japanese
29 22:48 <batsman> :)
29 22:48 <aleksi> we should have advertised at ruby-lang besides ruby-talk
29 23:16 <batsman> hi lennon
29 23:17 <lennon> sorry about the sudden disappearance
i got called in for emergency kitchen-cleaning duty
29 23:17 <batsman> :)
29 23:17 <aleksi> there are electrical problems often somewhere at california, isn't there :)
29 23:18 <lennon> thankfully, i'm no longer in the great state of california...
29 23:18 <aleksi> ah, now those problems emerge mechanically as well
29 23:18 <dave> lennon: which state are you in?
I am in the state of Alberta
29 23:18 <lennon> ...i've returned to my ancestral home of Portland, Oregon
29 23:18 <dave> or maybe I should say the state of Canada?
don't hate me cause my gov didn't help in the war :-)
29 23:19 <lennon> i'm the proud resident of the state with the highest unemployment in the country, and the city with the highest unemployment in the state
davel: try not to hate me because mine *did*
:)
29 23:19 <dave> lol, agreed
does that mean portland has the highest unemployment?
does that mean you are unemployed?
29 23:20 <batsman> how much unemployment?
29 23:20 <dave> if so, I can relate :-)
29 23:20 <lennon> no, i'm "self employed"
which means i'm unemployed, but don't get the benefits
29 23:20 <dave> me too, I pay myself far too little
29 23:21 <aleksi> lennon, shouldn't you be proud president of the state with the highest unemployment?
instead :)
29 23:22 <lennon> i'd rather just be employed
29 23:26 <aleksi> ok, no presidency for you then, just residency
29 23:29 <dave> lennon: did you say you have done ruby/gtk ?
29 23:29 <lennon> indeed
i did about 3000 lines of it last year
29 23:29 <dave> standard widget apps, or any graphical stuff (gdk, gdkpixbug, gdkimlib)?
29 23:29 <lennon> mostly standard widgets
29 23:29 <dave> ok
29 23:30 <lennon> never got into gdkpixbuf
29 23:30 <dave> what was the app (curious)
29 23:30 <lennon> point-of-sale software
touchscreen interface
29 23:30 <dave> cool!
with ruby, thats nice
29 23:30 <lennon> indeed
it was the first non-trivial code i wrote in ruby, actually
29 23:31 <tobias> basically wrapped cfixed. will look into tests and convenience funtions now
hi?
29 23:32 <batsman> hi
thank you!
29 23:32 <lennon> great
29 23:32 <aleksi> tobias, great
29 23:32 <tobias> ah, needed to scroll down
did not see my own message
29 23:33 <lennon> just out of curiosity:
is CTrack using CFixed directly, or through Ruby?
29 23:33 <batsman> emmm
29 23:33 <lennon> or neither?
29 23:33 <batsman> let me remembe
r
29 23:34 <lennon> btw, is anyone else still having problems with test_simulator failing?
29 23:34 <batsman> yes, now I remember
CTrack has got 2 parts
the core written in C
and something in Ruby for convenience
29 23:35 <lennon> it almost looks like an endianness issue, since the expected is 317, and the actual is -4294966978
29 23:35 <batsman> the code to load a file, etc
29 23:35 <dave> lennon: I think thats because of ruby 1.6.7 (on the mac right?)
29 23:35 <lennon> davel: is that the problem?
29 23:35 <dave> lennon: I have that problem with 1.6.7 on osx, but not w/ 1.6.8 on linux
29 23:35 <batsman> I only need FPN to return the starting position
29 23:35 <lennon> looks like it's time to update to 1.6.8, then
29 23:35 <batsman> that's done on the ruby side
so right now
it returns
29 23:35 <lennon> batsman: okay, that works
29 23:36 <batsman> an array of FPN
but in the future
I'll do s/FPN/CFixed
and done
another thing I do
is use #to_i to get the values of the coordinates
but that works regardless of the fpn implementation
29 23:37 <lennon> batsman: or just do 'FPN = CFixed'
batsman: instead of replacing the text
29 23:38 <batsman> yes
don't know
29 23:38 <dave> or even alias FPN CFixed
29 23:38 <batsman> as CTrack is right now in model/
should possibly be in bastard/
dunno
29 23:38 <lennon> or 'ext/'
29 23:38 <batsman> yes
but we didn't follow that convention, so...
29 23:43 <aleksi> not far away from two day mark
29 23:44 <batsman> yes
29 23:44 <aleksi> tobias, does this fixed_wrap pass the FixedPoint tests?
29 23:45 <lennon> batsman: are you actively working on CTrack right now?
29 23:46 <batsman> not
I'm doing CCar
29 23:47 <aleksi> lennon, feel free to go on
29 23:47 <lennon> batsman: CCar?
29 23:47 <batsman> yes
29 23:47 <lennon> mind if i ask why?
29 23:47 <batsman> it's aleksi's request
basically
29 23:47 <lennon> okay
29 23:47 <batsman> he wants to have the definition of all data types
in C
so he can manipulate them easily
within the simulator
simulator.c
29 23:48 <dave> I'll head to #-icfp now :-)
29 23:48 <batsman> without having to go through Ruby
29 23:48 <dave> oops, I meant #c-icfp
29 23:48 <lennon> it seems as thought we're approaching the state of having most of the simulator in C, rather than Ruby...interesting
29 23:48 <batsman> what??
he
yes
we're using Ruby to unit test
and do all the non time -critical stuff
but it turns out that the simulator
is really critical :)
29 23:48 <dave> I'm still using ruby for the game, tho I am getting nowhere fast
29 23:48 <batsman> and it needs direct access to things
such as car
doing car->x
is so much faster than
rb_iv_get(object, "@x")
etc
29 23:49 <lennon> well, in that case, i'll start looking at ctrack_impl.c, and check if there aren't some other convenience methods that could be added there...distance checks, etc.
29 23:49 <batsman> yes
distance could be a good win
much faster than the current one
however, beware
we might perhaps not need it...
don't do stuff we won't need
:)
29 23:50 <lennon> sure
29 23:50 <batsman> stupid quote of the day
I'm coming close to non-functional
29 23:51 <lennon> i'm just working on the path evaluator, and trying to see where it's like to get bogged down
like --> likely
29 23:51 <batsman> BTW, I just ci CCar
in bastard/CCar
it compiles cleanly
it's all I can guarantee
no unit tests
no code review
I'm tired, sorry
29 23:52 <aleksi> it's all ok
29 23:52 <batsman> I'm just gonna check tobias' work
29 23:52 <dave> I forget module variable semantics
29 23:52 <aleksi> just go to rest if you feel so
29 23:52 <batsman> and then sleep
29 23:52 <dave> can a module have @var
29 23:52 <batsman> yes!!!!
29 23:52 <dave> or should it be @@var
29 23:52 <lennon> it can have it,
29 23:52 <batsman> that's a module class variable
sorry
29 23:52 <lennon> right
29 23:52 <batsman> module instance variable
of course
29 23:52 <dave> thats what I thouhgt
29 23:53 <batsman> class instance variables are something I'm very fond of
the iv. belong to the object that represents the module
perfectly doable and fine
29 23:53 <dave> but if the module is a top level container for other classes, and not one that gets include'd, will it have instance variables?
29 23:53 <batsman> beware
the instance variable is that of the object that represents the module
29 23:54 <dave> ok, so if it aint included, it won't be there for me
29 23:54 <batsman> it doesn't belong to objects that include it or anything like that
it will be!!!
29 23:54 <dave> what I want is some state for a module method
29 23:54 <batsman> can I paste some core?
code
29 23:54 <dave> sure
29 23:55 <aleksi> does someone have any free time?
29 23:55 <batsman> >> module A
>> @foo = "1"
>> class << self
>> attr_reader :foo
>> end
>> end
=> nil
>> A.foo
=> "1"
29 23:55 <aleksi> I'd like to see one hand made polyline path for each of the tracks
29 23:55 <batsman> what's wrong w/ the SP?
just let dumpsp.rb generate it for you
29 23:56 <aleksi> doesn't have to contain thousands of points, but enough to "curve" a bit in turns
batsman, great we have utility for that already!
29 23:56 <batsman> sure
I coded that 24H ago
:-)
ruby tools/dumpsp.rb <track> > output.xpm
it's creating an xpm with a red line representing the SP
then you have dumpsp2.rb
29 23:57 <aleksi> and SP is?
29 23:57 <batsman> that uses one complicated idea I call "field perturbation"
shortest path
29 23:58 <aleksi> shortest path in this context means?
29 23:58 <batsman> (in distance, not time)
length == min
oh, btw
path = array of cell coors we have to go through
s/coors/coords/
29 23:59 <lennon> batsman: quick question about ctrack_impl.c
29 23:59 <batsman> yes?
30 00:00 <lennon> i'm not that experienced with ruby's extension api, but it looks like line 103 is going to always set the '@finish' array to a single-element instance, containing the most recently-found point
30 00:00 <aleksi> have you shortest path == array of cell coords adjacent to each other, where adjacent means -1..+1 relative to current point
30 00:00 <lennon> 'rb_iv_set(self, "@finish", rb_ary_new3(2, a, b));"
30 00:01 <batsman> let me see
30 00:01 <lennon> shouldn't it be initializing '@finish' in the constructor,
30 00:01 <dave> I love deja-vu
30 00:01 <batsman> you're right
30 00:01 <lennon> then just appending points found in 'track_set'?
davel: deja-vu about what?
30 00:01 <aleksi> I'm having hard time understanding why for example at sepang, the path goes back and forth on a straight road. I feel it would be shorter to be all the time on the inner side of the road.
30 00:01 <batsman> yes
30 00:01 <dave> nothing said on irc
30 00:02 <lennon> davel: okay
30 00:02 <batsman> do you want me to fix it?
I have the API fresh in my head
30 00:02 <dave> just coding away, when the code I was typing, the sounds out my window, etc, all fealt like it had happened before
30 00:02 <lennon> davel: i thought maybe you were referring to the same bug showing up in ctrack as i originally put in track.rb
batsman: if you like
30 00:02 <batsman> ok
30 00:02 <aleksi> ie. (x+1, y+1) is farther than (x+1, y). That is first one's distance is around 1.4, where latter is only 1.0.
30 00:02 <batsman> last thing I do today
30 00:02 <lennon> batsman: it should be like 2 lines
30 00:02 <dave> oh, did that happen to?
hehe
30 00:02 <batsman> yes :)
30 00:03 <aleksi> batsman, would you clear out this issue? There's probably good reason why it's like this.
30 00:04 <tobias> hi folks. i implemented the convenience functions for CFixed and added tests from FPN
5 tests fail
30 00:04 <aleksi> tobias, are those in cvs?
what to run?
30 00:04 <tobias> will shortly look at them
yes, in cvs
30 00:05 <batsman> ok, fixed CTrack
30 00:05 <tobias> switch to cfixed dir
30 00:05 <batsman> now somebody should check the fix :-)
30 00:05 <tobias> run ruby test_cfixed.rb
30 00:05 <batsman> I'm almost non-functional now
there's no test_cfixed.rb in my tree, just updated
did you forget to cvs add?
30 00:07 <tobias> yes
it's there ...
now
30 00:07 <lennon> batsman: the fix looks goot
30 00:07 <batsman> good
thanks
30 00:07 <tobias> i think i am too tired to look into the failures now
will do tomorrow
30 00:08 <batsman> ok, thanks a lot tobias
30 00:08 <aleksi> thanks everybody
30 00:08 <batsman> I think I'll soon go zzZZ too
30 00:08 <lennon> tobias: the 'sin' and 'cos' errors just look like rounding probs
30 00:08 <tobias> bye, g'night everyone
30 00:08 <aleksi> tobias, just add the test
30 00:09 <lennon> they're very close
30 00:09 <aleksi> thanks
30 00:09 <lennon> aleksi: the test is there, it's just in the wrong directory
30 00:09 <batsman> where?
of
bastard/cfixed/
30 00:09 <lennon> 'bastard/cfixed/test_cfixed.rb'
30 00:10 <tobias> feel free to move it
30 00:10 <batsman> is there an extconf.rb in the CVS, or is it only mine?
30 00:11 <lennon> it's in CVS, too, i think
30 00:11 <batsman> cvs update: move away ./extconf.rb; it is in the way
yes
ok, at least there's tests
30 00:17 <batsman> we'll have to clean some of the mess we left
for instance, library paths
right now we'd need lots of -I options
30 00:18 <lennon> i can take care of that, if you want to go get some sleep
30 00:18 <batsman> perhaps one small script that sets RUBYOPT and calls ruby with the given args, etc
and then
30 00:18 <dave> batsman: you been up for a long time
is it midnight there yet?
30 00:18 <batsman> consider moving model/ctrack to bastard
it's 2:20am here
GMT+2
30 00:18 <lennon> batsman: what about moving both to 'ext/'
30 00:19 <batsman> that would be quite a big move
moving almost everything from bastard to ext
and then mode/ctrack too
quite a lot
and each extension needs to be in a different dir
otherwise the Makefiles and extconf.rb would conflict
not to mention the problem with linkage
etc
30 00:20 <lennon> that's fine
30 00:20 <batsman> well, today I've only been here for ~18H
30 00:20 <lennon> i can just move model/ctrack
30 00:20 <batsman> will try to make it better tomorrow :)
30 00:21 <lennon> we've still got 23 hours and 40 minutes, so take your time sleeping
30 00:21 <batsman> yes
it seems we could be getting something
simulator.c is almost working
and we can reuse the test cases
so things should move fast
30 00:21 <lennon> if i can just get a path evaluator that runs in reasonable amounts of time
or someone else beats me to it ;)
30 00:22 <batsman> yes, that's why we got to C
I hope we can get somebody from GMT+6
to come here and work on this
in a couple hours
before u guys sleep
so you can pass the knowledge
30 00:23 <lennon> i'll be here for another 6-8 hours, at least
30 00:23 <batsman> of where we're going
good!
30 00:23 <lennon> the knowledge shall not die!
:)
30 00:23 <batsman> then I might see you in the morning
actually
I will
I have to be somewhere else by 10
so I'll check the IRC by 9:xx localtime
which is in some 7H
30 00:24 <lennon> alright
sleep well
30 00:24 <batsman> ok
good luck :)
cu
I leave IRC open for the logs
30 00:25 <dave> seeya buddy
I've got logs going too
30 00:25 <batsman> cu later zzZZZ
30 00:33 <aleksi> tobias still here?
or others?
30 00:33 <dave> he left
30 00:33 <aleksi> you are, at least
30 00:34 <dave> yep
I think lennon is still around as well
30 00:34 <lennon> as am i
working on ctrack
30 00:34 <aleksi> now, it seems tobias has found a test to break my fixed point algos written in C
case is -192:19843 ^2 which should give out 36767:54008
30 00:34 <lennon> aleksi: i'm refactoring ctrack to give you a native C api
30 00:35 <aleksi> but gives -28788:-11528
30 00:35 <lennon> aleksi: since batsman said you'd want it for the simulator
30 00:35 <aleksi> ctrack is almost like crack
beware
30 00:35 <lennon> crack like addictive?
but i'm almost done
30 00:35 <aleksi> so you think
30 00:35 <lennon> it's just seperating the C code from the Ruby API manipulations
30 00:36 <aleksi> then you find out that you need a bit more before bed
now, I think the test case might be broken
30 00:36 <lennon> well, i'm just doing it short-term to implement a few additional methods i need for the path evaluator
30 00:36 <aleksi> as interger part is stated to be at most 10 bits on page 2
that means 9 bits + sign or 10 bits + sign (dunno which one, but doesn't matter)
the result 36767 uses full 16 bits, therefore my calc ends up to the negative side (since the highest bit is set for number 36767)
30 00:37 <dave> know how to get the String of a class's name? Class.name gives the name with the modules prepended, like Foo::Bar
I just want "Bar"
30 00:38 <aleksi> but I think it's a calculation that we don't need, per 10-bit integer restriction on page 2
30 00:38 <dave> I know I can chop it with string utils, but I just wondered if there was a simple method
30 00:38 <lennon> brb -- quick bite to eat
30 00:38 <dave> as I want to call it witin #{}
30 00:38 <aleksi> and we don't need it per calculations on page 3 (no mul is called for arguments bigger than 1.0)
and no calculations on page 2 use mul for arguments bigger than TWOPI, ie under 7.0
thus, calcing -192^2 is not needed, and it's result is undefinable by the rules on page 2
I'm writing this for tobias to catch up from the logs
might cut &paste on the wiki as well
30 00:40 <dave> k
30 00:43 <aleksi> now you can point him to wiki
30 00:43 <dave> ok
you leaving soon?
so the wiki has catch up stuff for tobias?
30 00:44 <aleksi> yes
I guess you just have to split the string and take only the name
30 00:44 <dave> k
30 00:49 <dave> yeah thats what I did
I did sub! /.*::/, ''
30 00:50 <aleksi> split(/::/).last would be easier, would it ?)
30 00:51 <dave> I guess
I did it that way to save creating new strings
30 00:52 <aleksi> clever
30 00:53 <dave> your way is more readable, so I should prob do it that way instead
30 00:54 <aleksi> lennon ctrack#crash doesn't take last requirement on page 4 into account
a test case to validate it would be nice
or does it take?
30 00:54 <dave> which is that, passing the finish line from the right?
30 00:54 <aleksi> davel, keep your mind, it was better just in a way you said. It's even faster, and saving all GCing possible is worth it.
davel, yes
30 00:57 <lennon> /list
oops
trying to check if my connection was still active
aleksi: i'll take a look
30 01:00 <lennon> quick ruby/c api question:
does my 'free' method have to take a void?
wait, nevermind; it does
30 01:03 <aleksi> priority queue, ie. heap is good to store things with priority (O(log n)) and fetch them (O(1))
what datastructure to select if I also have to take Nth best?
30 01:05 <lennon> wish i still had my copy of "Data Structures and Algorithms in Perl"...
30 01:05 <dave> my guess is a regular bst
I have a copy of that book here
30 01:05 <aleksi> or regard the priority to be probability, and take one out with probability equivalent to it's priority / sum(all priorities)
30 01:05 <lennon> fibonacci heap?
30 01:05 <dave> I'll see if it has anything
30 01:06 <aleksi> I need the latter especially
30 01:06 <lennon> insert, create, decrement, find min., all O(1)
delete is O(log N)
30 01:07 <aleksi> true
30 01:07 <dave> oh, I was wrong, I have Mastering Algorithms with Perl
30 01:07 <aleksi> but the last requirement takes ages
30 01:07 <lennon> sum?
30 01:07 <aleksi> I guess we have to maintain the sum with inserts and deletes
30 01:07 <lennon> that would work
30 01:07 <dave> yep
30 01:09 <aleksi> and take a = rand() (ie. 0.0 .. 1.0() and count entries one by one decreasing a until we go negative, there's then the lucky one to get out
but going entries one by one means O(n/2)->O(n)
30 01:10 <aleksi> if the entries are sorted in an array based on their priority, we take most probable ones out first, so if the distribution is very skewed this approaches something like O(n/skewness)
30 01:11 <dave> maybe I am not following, but if its a sorted array, why would distribution be skewed?
30 01:11 <aleksi> like [0.9, 0.05, 0.04, 0.005, ...] we find 90% of cases the first to pick to be first element, only 1% of time we go deeper than 4 elements
ok, let's give some background
I plan to do A* in multiple branches simultaneously, so not only take the best candidate, but every now and then take some worse
30 01:15 <aleksi> moving into right direction increases score for a trace which lead to the new point. These traces should be stored in some data structure. Plain A* needs quick access to the trace with best score. My algo needs also quick access to the 2nd best 5% of
time, 3rd best 4% of time, 4th 0.5% of time in the above example.
30 01:16 <dave> ah
and how are you doing the heap?
what structure?
30 01:17 <aleksi> if the priority queue would be in array, inserting would be push (amortized O(1) & sort O(n*log(n)
deleting first would be O(1), some other O(N/skewness)
davel, I'm just pondering what would be the most efficient structure for the "heap"
30 01:19 <aleksi> maybe skip list would be fast here
30 01:24 <dave> May's dr dobbs journal had an article on the "SquareList", which has min and max both O(1) but insert and delete are O(sqrt(n))
too bad the insert is so bad
oh yeah, find is O(sqrt(n)) too
which is better than O(n/2)
for large structures of course
30 01:38 <aleksi> skiplist has average insert and delete O(log n)
I found a very simple implementation for skip lists
now I wonder if I may use this
30 01:50 <dave> lennon: whats the widget I need for gtk dropdown boxes?
30 01:53 <dave> GtkCombo, found it
30 01:56 <aleksi> davel, entry.rb on sample/testgtk
ah, you found it
30 01:56 <dave> yep I just found it
30 02:15 <dave> aleksi: know how to make the combo box uneditable?
nevermind
30 02:19 <aleksi> are you doing the game?
30 02:22 <aleksi> I'm going to sleep now
see ya tomorrow
30 02:25 <dave> seeya
I am *sloooooooowly* trying the game
I will try to stay up from now til contest end :-)
30 02:30 <dave> anybody here but me?
30 04:13 <dave> hello, just me
30 04:14 <lennon> any chance you want to do a little peer review of my modified version of ctrack?
30 04:14 <dave> uh ok
30 04:14 <lennon> i've got a segfault showing up in the unit tests,
30 04:14 <dave> ooh, ok
30 04:14 <lennon> but nothing when i do interactive testing in irb
30 04:14 <dave> is it ci'd ?
30 04:14 <lennon> yep -- 'bastard/ctrack'
30 04:14 <dave> are you compiling with debugging ?
30 04:14 <lennon> should be
30 04:15 <dave> ok, is there a core ?
30 04:15 <lennon> nope
30 04:16 <dave> k, I will try
you using osx still?
30 04:16 <lennon> at the moment
though i tried it out on my linux machine,
and it segfaulted there
30 04:16 <dave> k
30 04:16 <lennon> on os x, i actually get a "bus error"
30 04:16 <dave> oh
k, compiled, how to test?
753 lines of C :-)
30 04:18 <lennon> i've modified 'test/test_ctrack' to use my lib,
so just run test.rb as usual
30 04:18 <dave> k
require': No such file to load -- bastard/ctrack/ctrack_wrap (LoadError)
otherwise, everything passes
30 04:19 <lennon> what directory are you in?
30 04:19 <dave> base directory
icfp
30 04:19 <lennon> are you on os x, as well?
or linux?
30 04:20 <dave> no linux now
30 04:20 <lennon> look for the 'bastard/ctrack/ctrack.so' file
30 04:20 <dave> I could try on osx
nope doesn't exist
30 04:20 <lennon> sorry, 'ctrack_wrap.so'
after compilation?
that should be the target that extconf.rb puts into the Makefile
30 04:20 <dave> had to run extconf.rb
30 04:21 <lennon> sorry, yeah
how's it looking now?
any luck with building the lib?
30 04:22 <dave> yep
it failed
the tests that is
30 04:22 <lennon> right
now you're where i've been for the last hour
:)
30 04:22 <dave> k
30 04:24 <dave> well I got a core
30 04:25 <lennon> can you tell where the segfault is happening?
30 04:25 <dave> I don't know how to debug a shared lib
30 04:25 <lennon> hmm...
30 04:25 <dave> normally when I debug I have the runnable executable, and the core
30 04:26 <lennon> what version of ruby are you running on that box?
30 04:26 <dave> 1.6.8
30 04:26 <lennon> damn...my linux machine is running 1.8
30 04:26 <dave> I don't think it would be ruby, or would it be ...
what would that change?
30 04:26 <lennon> so the core itself wouldn't do me much good
30 04:26 <dave> oh
you can get core by doing 'ulimit -c unlimited'
30 04:27 <lennon> on the os-x box?
30 04:27 <dave> should be with zsh, bash, and even tcsh I think
nope, its 'ulimit -s unlimited' on tcsh ...
no, wait it is -c :-)
30 04:28 <lennon> on os x, actuall, i think it's unlimit stack
but still no core
30 04:28 <dave> but thats stack, not core
30 04:28 <lennon> hmm...over to the linux box
right...
...so 'unlimit core'
aha!
30 04:29 <dave> yeah or 'coredumpsize'
but how do you plan to debug the core?
30 04:30 <lennon> okay, so the the box claims it dumped core...
...but there's no corefile
wait, found it
30 04:30 <dave> really, strange
ok
30 04:30 <lennon> in /cores
weird
30 04:31 <dave> whoa!
30 04:31 <lennon> what?
30 04:31 <dave> that it was in /cores :-)
weird, whoa, y'know
30 04:32 <lennon> those wacky apple folks
30 04:32 <dave> yeah, but I still like them
I love my ibook
30 04:32 <lennon> ok, so there was no stack in the core
so i'm trying 'gdb ruby test.rb'
30 04:32 <dave> good ideqa
30 04:33 <lennon> ...which has now hung
30 04:33 <dave> oh
you need to do gdb ruby
then run test.rb
ta-da
rb_num2long
is the culp
30 04:33 <lennon> right
num2long?
30 04:34 <dave> I am getting rb_num2long
oh, thats in ruby is it?
did we find a bug?
30 04:35 <lennon> i doubt it...
...but it is possible
30 04:35 <dave> yeah
30 04:35 <lennon> i'm not seeing any of my lib on the stack right now
which is weird
30 04:35 <dave> I see track_rb_crash_p
as the second on the stack
30 04:35 <lennon> really?
ok
there it is -- i must be going blind
too much time in front of the computer this weekend ;)
30 04:37 <lennon> okay, but there's nothing inside the main C module
which is where i assumed the problem would be
30 04:37 <dave> what do you mean?
30 04:37 <lennon> anything with 'track_rb_' in the name is just the ruby wrapper
well, ruby-c wrapper
30 04:38 <dave> oh
30 04:38 <lennon> i split it into two modules,
30 04:38 <dave> well something in there is calling rb_num2long
is that where its failing for you?
30 04:38 <lennon> so that aleksi or whoever is working on the C simulator can use it seperately
yep
funny that the calling func has "crash" in the name :)
30 04:38 <dave> ctrack_wrap.c:85
yep it is funny
line 85
nx = NUM2INT(x);
30 04:40 <lennon> or 'ny = NUM2INT(x);'
or 'return INT2NUM(nval);'
30 04:40 <dave> no, its the one I said
line 85
30 04:40 <lennon> really?
30 04:40 <dave> thats what the backtrace tells me
30 04:40 <lennon> damn, you're right
wait --
30 04:41 <dave> its being called from nval = track_rb_crash_p(td, nx, ny);
30 04:41 <lennon> go up another frame, and you've got line 90
30 04:41 <dave> line 90
30 04:41 <lennon> i got it
it should be calling 'nval = track_crash_p'!
30 04:42 <dave> k
30 04:42 <lennon> thanks
30 04:42 <dave> it was fun
30 04:42 <lennon> let me test it again after a recompile
30 04:42 <dave> :-)
30 04:42 <lennon> it also probably saved me another hour or more of banging my head against it
oh, here we go again...
30 04:43 <dave> programming is so much fun
'nother bug?
30 04:43 <lennon> yeah
30 04:43 <dave> where?
30 04:43 <lennon> just a sec
this whole process i why i try to avoid c, usually
30 04:44 <dave> yeah I dont like c much
30 04:44 <lennon> now it's getting a 'EXC_BAD_ACCESS' signal
nul ptr deref?
30 04:44 <dave> sigsegv here
track_rb_finish_p is calling itself
30 04:45 <lennon> well, you're still running the old code, right?
30 04:45 <dave> should that be track_rb_finish_p calling track_finish_p ?
no I fixed the code on my end and recompiled
30 04:45 <lennon> ok
30 04:45 <dave> line 126
30 04:45 <lennon> oh, now i get it...
i copied and pasted
and renamed
and got 3 bugs for the price of 1
30 04:46 <dave> nice
30 04:46 <lennon> cool
looks like it runs without a segfault now
just other test_case failures ;)
30 04:47 <dave> yep, but some tests fail
first 2 are 0,1 true,false probs
30 04:47 <lennon> yeah
which knew were going to happen
the others are funky, though
30 04:48 <dave> yep
have fun, I am going back to the game ...
which is slooow going
30 04:48 <lennon> well, good luck to you
let me know if i can return the favor
30 04:48 <dave> yeah you too,
well I might have gtk questions for you
30 04:49 <lennon> hopefully i'll still remember enough from last year... ;)
30 04:49 <dave> like how do I zoom and crop a loaded pixbuf, and then pan :-)
30 04:49 <lennon> umm...opengl?
or libart?
30 04:50 <dave> k
30 05:01 <dave> hey I am doing a commit of some new files, my ctrack_wrap.c will also be ci'd ...
30 05:04 <dave> you a basketball fan ?
30 05:37 <lennon> dave, did you check in more changes to 'ctrack_wrap.c'?
30 05:37 <dave> I just checked in fixes
those three
30 05:37 <lennon> okay
30 05:37 <dave> the cut&paste problems
30 05:38 <lennon> right
i think i checked them in, too
30 05:38 <dave> I had another commit, so I did em all
30 05:38 <lennon> and then did other work on the file
30 05:38 <dave> they shouldn't have conflicted
30 05:38 <lennon> or maybe i forgot to commit
well, cvs complained that my version wasn't up-to-date
it's alright
i'm just doing one more set of tests
but i've fixed the other bugs
30 05:39 <dave> cool
30 05:39 <lennon> i was passing a ruby object instead of a char to one of the low-level c functions
stupid typo
30 05:39 <dave> is there any bench code to see how things have improved
30 05:39 <lennon> speed-wise?
not yet
until the simulator is recoded in C, it'd just be micro-benmarks
but my 'driver' code could be an interesting test
30 05:40 <dave> k
30 05:40 <lennon> which i can *finally* get back to now
stupid C
30 05:41 <dave> i agree
c sucks
in so many ways
30 05:48 <lennon> except speed and memory consumption
it's real fast when it segfaults right out of the gate ;)
30 05:49 <dave> yeah, but speed and memory aren't part of the language, its just an implementation detail
30 05:49 <lennon> true enough
30 06:15 <dave> back in 10
30 06:30 <dave> you still working on the path->trace compiler?
30 06:36 <lennon> stupid irc client keeps timing out
30 06:36 <dave> I've noticed
which client?
you need to be more talkative :-)
30 06:37 <lennon> "JediKnight"
just a random freeware client i found
i should really probably switch to ircle
unless you have a recommendation
30 06:37 <dave> linux?
30 06:38 <lennon> os-x
30 06:38 <dave> I like xchat
30 06:38 <lennon> under linux, it's xchat all the way
but my linux box can't go outside with me,
30 06:38 <dave> jimm was using Fire I think, which is an IM app that can do IRC too
30 06:38 <lennon> and that's the only way i've gotten any fresh air this weekend
30 06:38 <dave> you're outside right now?
30 06:38 <lennon> i'm headed there in a minute
30 06:38 <dave> isn't it dark?
30 06:38 <lennon> powerbook + linksys ap + cable modem == happy
i have a porch light
30 06:39 <dave> oh so not straying far, cool
mmmm, wireless
30 06:39 <lennon> i'm completely spoiled now
i was house-sitting for a while last week,
and i only had dialup
30 06:39 <dave> I need some wireless, once I geta job
dialup so horrible
some of this gtk/gdk stuff is not doc'd well, some of the code is being called rather blindly
30 06:42 <lennon> it wasn't so bad when i was just using standard gtk widgets,
but i can see how it would be tough going otherwise
30 06:43 <dave> yeah, that part seems alright
know anythinga about graphics contexts?
30 06:43 <lennon> you mean drawable areas, right?
30 06:43 <dave> are you working on the "compiler" still?
30 06:43 <lennon> yup
30 06:43 <dave> ok, drawble areas, I don't think they are the same
30 06:43 <lennon> i keep getting pulled back into the 'bastard/' tree now...
i get some sick satisfaction from working on the c extensions, i guess
sorry
so, what's the deal with the "graphics contexts"?
30 06:44 <dave> lol, it is sick, I wonder why
I don't know, I will read up a bit I guess
30 06:45 <lennon> probably the same reason you're still pluggin away at gdkpixbuf ;)
(the sickness, i mean)
30 06:45 <dave> I am using it to render a pixbuf into a drawble
true!
rubyfan: hello
30 06:46 <lennon> looks like its just basically a number of drawing attributes (fillstyle, linestyle, etc.), background image, etc.
so not a drawable, but a style
30 06:46 <dave> yep
but the widget class has a whole bunch of them
arrays of them
like fg_gc[5] and bg_gc[5]
30 06:47 <lennon> are you using gtk 1.2, or 2.X?
30 06:47 <dave> I don't know wht it needs 5 of each
I think 1.2x
30 06:47 <lennon> are the fonts antialiased? if not, it's 1.2
30 06:48 <dave> I haven't looked at fonts
they don't look aa
30 06:48 <lennon> probably 1.2
30 06:49 <dave> libgtk-1.2.so.0
know of any ruby/gtk apps I could use to look at the source?
30 06:51 <lennon> you want pixbuf-specific stuff, right?
30 06:51 <dave> yeah more on the gdk side of things
or even gtk with image related stuff
30 06:52 <lennon> are there not useful examples in the ruby-gtk or ruby-gdkpixbuf source tarballs?
30 06:52 <dave> theres a few samples, but I have got what I can from them
the gtk has lots of examples, but mostly widget related
maybe I should try gtk2
30 06:53 <lennon> http://raa.ruby-lang.org/list.rhtml?name=rubysamegame
the "same game" written w/ruby-gtk
30 06:53 <dave> cool
thx
30 06:53 <lennon> no prob
30 06:58 <lennon> ugh...FPN.new...fpn.to_f...FPN.new...
30 06:58 <dave> nice
30 06:58 <lennon> find something useful?
30 07:00 <dave> no
just saying that the sequence of commands for FPN were nice (sarcasm)
I assumed those commands go full circle, Float=>FPN=>Float=>FPN
the same game is a bit interesting
30 07:02 <dave> but looking on the ruby-gnome2 site there seems to be a whole lot more in the way of samples
30 07:02 <lennon> well, that could work...though the dependencies are a good bit larger
30 07:02 <dave> yeah
30 07:09 <tobias> hi
30 07:09 <lennon> welcome back
30 07:09 <dave> hi
30 07:09 <tobias> checked in updated versions of cfixed tests, and updated implementation
tests work now
30 07:10 <lennon> great
hmm...may need to update my version of ruby
30 07:11 <tobias> there was a bug in Sin, but apart from that the test failures were because the tests assumed >25bits precision
30 07:11 <lennon> on my box, the cfixed tests fail
well, two of them anyway
30 07:11 <tobias> did you remake the extension?
30 07:11 <lennon> oops
silly me ;)
30 07:11 <tobias> there was a bug in the c code
30 07:11 <lennon> i should know better, esp. given the time i spent on ctrack this evening
30 07:11 <tobias> that'sw why
30 07:12 <lennon> yep, they're all golden, now
30 07:13 <tobias> ruby test.rb -> No such file to load -- bastard/ctrack/ctrack_wrap (LoadError)
30 07:13 <lennon> tobias: you have to build the extension
30 07:13 <tobias> oops
:-)
30 07:13 <lennon> i can sympathize :)
30 07:14 <rubyfan> Hello, so what's the status of the project? Will there be a Ruby entry?
30 07:14 <dave> who wants to know :-)
30 07:14 <lennon> oh, i am fairly certain there will be an entry...
30 07:14 <rubyfan> This is PhilTomson
30 07:14 <lennon> ...of what quality, we don't know yet
:)
30 07:14 <rubyfan> Kind of a strange competition this year.
30 07:14 <lennon> how's it going, Phil?
30 07:14 <dave> how so?
30 07:15 <rubyfan> I mean, they're not really looking for a program, per se.
30 07:15 <dave> yeah,
30 07:15 <lennon> nope -- they just want the output
30 07:15 <tobias> ok have to go to work now. maybe see you later
30 07:15 <dave> they want code, but not to run it
30 07:15 <lennon> thanks, tobias
30 07:15 <dave> seeya
30 07:15 <tobias> bye
30 07:16 <rubyfan> So if I understand it correctly, they post some tracks and we have to find the fasted route
30 07:16 <lennon> exactly
but you have to output the route as a series of instructions controlling the car
not just a path
30 07:17 <rubyfan> I guess that picture of a race car on a track on their web page was a clue...
30 07:18 <lennon> indeed
30 07:18 <rubyfan> so have you come up with any routes?
30 07:18 <lennon> we have a shortest-path engine
which finds at least a legal path
30 07:19 <batsman> morning...
30 07:19 <lennon> i'm working on the "driver" which will execute it
30 07:19 <batsman> it's been 7H since I left
30 07:19 <lennon> morning, batsman
that long?
so it has...
30 07:19 <batsman> well, a bit less
30 07:20 <dave> hey you two live in the same city?
30 07:20 <lennon> who?
30 07:20 <dave> you and phil
30 07:20 <lennon> phil and i almost do
yeah
30 07:20 <rubyfan> Yeah, lennon and I are probably about 15 miles apart.
30 07:21 <dave> cozy :-)
30 07:21 <lennon> actually the first person i've talked to on this channel who i'd ever met before
prior to this weekend
30 07:21 <batsman> have to go in 15 minutes, but will be back in ~ 1H or so, I hope
30 07:21 <dave> k
30 07:21 <lennon> batsman: ok
30 07:21 <batsman> ok, I'm checking CVS & IRC logs
30 07:21 <lennon> batsman: i refactored ctrack, to give it a simple pure C api, in addition to the Ruby one
30 07:22 <batsman> ok
30 07:22 <lennon> and i'm still working on the driver class
30 07:22 <batsman> nice, aleksi will need that
30 07:22 <lennon> slow going, since i can't test most of it until it's all working
30 07:22 <batsman> :(
30 07:23 <lennon> i probably need to switch gears, and start working on a framework (i.e., script) to drive it
no pun intended ;)
30 07:23 <batsman> :)
30 07:23 <dave> just to let you guys know, I will prob be up for another 1.5-2h
30 07:23 <batsman> it must be about time for u to sleep, I guess
30 07:23 <lennon> rubyfan: would you like an account to access cvs and our wiki?
rubyfan: or just dropping in to say hi?
30 07:24 <dave> (which will be 3am my time) and then I will be sleeping for 3 or so, and which will have me up at 6am, which is -12h left til contest end
30 07:24 <rubyfan> lennon: mostly just dropping in to say hi and cheer you on.
30 07:24 <lennon> rubyfan: that works
30 07:24 <dave> thanks rubyfan
30 07:25 <rubyfan> unfortunately I was out most of the weekend
One of my advising profs only shows up in town once every six months or so and this weekend was it
30 07:26 <batsman> bad timing...
30 07:26 <lennon> that seems to be the theme this weekend for several people
myself included
30 07:26 <rubyfan> So how far along do you think you are?
30 07:27 <batsman> we were quite far with a 100% Ruby implementation
what we call "Strategy"
(actually an A* search)
but it was slow
30 07:28 <rubyfan> Why are you doing some parts in C - is runtime really that big of an issue?
30 07:28 <batsman> as it was using a fixed point class written in Ruby
yes, runtime is a bit of a problem
so we're reimplementing the simulator from scratch
in C
wrapping everything in Ruby objects
so we can reuse the 38000+ test cases we had
love that figure
30 07:29 <rubyfan> Wow, that's a lot of test cases...
30 07:29 <batsman> impressive, isn't it? :-)
we got our simulator "certified"
30 07:30 <rubyfan> certified against their simulator?
30 07:30 <batsman> same results on the test track as the organizers'
now we have the simulator in C
30 07:31 <lennon> batsman: well, we have most of the simulator in C
30 07:31 <batsman> most?
30 07:31 <rubyfan> So you need the simulator for testing purposes, right?
30 07:31 <batsman> I thought aleksi would have ended this :|
30 07:32 <lennon> rubyfan: it also is used in generating paths
rubyfan: as we need to have a model for what effect actions would have, anyway
batsman: he may have done more, but there's only a 'simulator.c' in CVS, which doesn't actually use ccar, ctrack, etc.
30 07:33 <batsman> well, have to quit now, should be back in 90minutes or so, 2 hours at most, then I'll stay here till the end :)
30 07:33 <lennon> batsman: see you then
30 07:33 <dave> seeya
30 07:33 <rubyfan> Yeah, I gotta go too. Good luck!
30 07:33 <lennon> thanks
30 07:34 <dave> bye
30 07:44 <lennon> can i rack your brain for a minute, dave?
whenever you're at a stopping point
30 07:44 <dave> yep
go for it
30 07:45 <lennon> so, in working on both the Driver class, and some initial curve-smoothing algorithms,
I've noticed that it would actually be easier to follow an incomplete path
i.e., one that just defined target points,
30 07:45 <dave> k
30 07:45 <lennon> instead of every pixel you were to cross
wall avoidance is easy enough,
but i guess i just need to balance the recommended path with the heuristics in the driver
30 07:47 <dave> sounds correct
30 07:48 <lennon> ok
just wanted to see if i was way off base
30 07:48 <dave> no no
30 07:49 <lennon> the thing is,
wait, nevermind
i was just about to say something really dumb
brain cramp
30 07:49 <dave> hehe
oh yeah I am getting to brain cramp too
30 07:50 <lennon> well, i'm probably going to be up for a while, yet
i just may need to stop staring at code for a little while
30 07:50 <dave> k, I wont be up longer than an hour
but I will be back with a short sleep
I can sleep after its over
30 07:51 <lennon> indeed
i have 12 hours between the contest end and a job interview
plenty of time to sleep, shower, shave, and figure out what the company does, exactly
30 07:51 <dave> really, do you have an early morning interview? 7am or something ?
30 07:51 <lennon> well, the contest ends at 4:59pm local time,
and my interview is at 6pm the next day
30 07:52 <dave> thats 24h
30 07:52 <lennon> me being GMT-7 and all
30 07:52 <dave> but I guess you will sleep a bunch
30 07:52 <lennon> oh, you're right
definitely into brain cramp territory
30 07:52 <dave> yep
30 07:53 <lennon> it was the C debugging, it tell you...
...and the fact that I'm just about to the 12 hour mark, with about one 20 minute break today
30 07:53 <dave> yeah a few of us have been at it like that
I have had more than 20minutes of break tho
30 07:54 <lennon> probably not the most productive way to go about it, but damn interesting
30 07:54 <dave> yeah its definitely fun/interesting
funteresting
I gues you know you're tired when you make up really dumb words
30 07:56 <lennon> or read them, and immediately know exactly what they mean :)
30 07:56 <dave> :-)
30 08:00 <lennon> hmm...i just thought of one thing i may try as a simpler way to balance path-following vs. other heuristics:
i could just skip across, say, 9 out of 10 points in the path
and use each point i keep as a 'target', towards which the car always does its best to move
30 08:01 <dave> yeah
isn't that pretty much what you were suggesting earlier?
30 08:01 <lennon> sort of
but i didn't have a clear idea of how to relax the path
30 08:02 <dave> oh
cool
30 08:06 <lennon> and i think i've even got a decent set of heuristics mapped out...
...just need to finish coding them
no problem, right?
maybe i'll do them in C, just for kicks ;)
30 08:06 <dave> no prob
oh yeah theres a great idea :-)
what was it you said, sick?
30 08:07 <lennon> masochistic, even
30 08:07 <dave> sadistic
30 08:08 <lennon> it's only sadistic if you do it to someone else
30 08:08 <dave> really, oh
30 08:08 <lennon> maybe we should just settle for "twisted"
30 08:09 <dave> I just looked up sadistic, and only one of the def's say it has to be on others
twisted is good
30 08:14 <lennon> brb
30 08:34 <lennon> hmm
checking what the output of the dumpsp2.rb looks like with various skip rates on the path
30 08:35 <dave> and
30 08:35 <lennon> trying to figure out what the deal is with the 'pnm' files
30 08:36 <dave> you mean how to view them?
pnmto[tab]
30 08:36 <lennon> no, just why i can't create a simple visual trace any more
30 08:36 <dave> ph
oh
30 08:36 <lennon> like the xpms i made last night
30 08:37 <dave> sorry dont know
30 08:38 <lennon> ok, figured it out
30 08:39 <dave> ok good
I didnt wanna look at any pnm stuff right now ...
30 08:52 <lennon> okay, i think i'm going to write some of this up on the wiki, while i can still almost think clearly about it
30 08:56 <dave> ok, I am heading so bed soon, how long do you think it will take you to write?
30 08:56 <batsman> hi again
any activity in the last hour?
:P
30 08:57 <lennon> lots of activity,
but not lots of code
30 08:57 <batsman> ok
30 08:57 <lennon> i do think i finally know how to do the path evaluation
another eureka moment
30 08:57 <batsman> I had this interview for some crappy thing at the university, and I realized I do really need caffeine :-P
30 08:58 <lennon> at times, we all do
30 08:58 <batsman> I'll take some ~130mg now
30 08:59 <lennon> should i wait to throw this at you until you can do that?
30 08:59 <dave> you know your drug dosages dont you
30 08:59 <batsman> I control that since I got this caffeine addiction
:P
30 09:00 <dave> ah
30 09:00 <batsman> addiction in physical sense
I don't take too much
but have withdrawal symptoms if I quit it
if the dose exceeds some threshold
30 09:02 <dave> oh
too bad
30 09:05 <batsman> ok
here's my plan
I'm staying here for one hour, reading code
seeing what u have done while I was sleeping
then I go have lunch
30 09:06 <lennon> sounds good
30 09:06 <batsman> I come back some 30mins later, to stay till the end
BTW, http://www.thekode.net/plan.gif
30 09:07 <lennon> in a couple of minutes, i'm going to have a new page on the wiki explaining my latest brainstorm
30 09:07 <batsman> ok
30 09:07 <dave> I am going to sleep asap
30 09:07 <batsman> how long?
30 09:07 <lennon> davel: go for it, man
30 09:07 <vincenz> you guys finished?
30 09:07 <dave> 15 min topsa
30 09:07 <batsman> hi vincenz
30 09:07 <lennon> of course -- we're writing games at this point ;)
30 09:07 <vincenz> amazing
30 09:07 <batsman> how is it going?
30 09:07 <vincenz> so and so
we've really only been 2 developers
30 09:08 <batsman> yes, writing doom3+ now :P
30 09:08 <vincenz> with a third for little utils
30 09:08 <batsman> now seriously
30 09:08 <lennon> we got a bit bogged down today with hand-tooling some C
30 09:08 <batsman> I guess some real info exchange won't hurt, anyone objects?
ok vincenz
here goes some sensible info
30 09:09 <vincenz> ?
30 09:09 <batsman> we had a framework to evaluate paths
and create them
30 09:09 <vincenz> hmm
yup
30 09:09 <batsman> emm sorry, I mean traces
30 09:09 <vincenz> like us
30 09:09 <batsman> using heuristics
30 09:09 <vincenz> oh
30 09:09 <batsman> and leveraging the paths
created by another module
30 09:09 <vincenz> genetic algorithm
30 09:09 <batsman> we actually got the shortest path and evolved from that
interesting
we had the genetic algo. as a last stage, for optimization
but our core was essentially A*
30 09:10 <vincenz> a*
we started with that
but...
I first used voronoi to create points
but that generated WAY too many
150k nodes to be parsed by voronoi
which would've taken about 5000 seconds
no 4000
30 09:11 <batsman> ummm
we wanted to use info on the shortest path (which we have)
to trim down the tree
30 09:12 <vincenz> I think most groups did that
30 09:12 <batsman> however
the A* trace evaluator
30 09:12 <vincenz> so it all works well?
30 09:13 <batsman> whose code whe checked in more than 25 hours ago
didn't work :)
and moreover, was too slow :-(
30 09:13 <vincenz> ouch
that sux
30 09:13 <batsman> the cars kept doing stupid stuff
30 09:13 <vincenz> I just made a nice little gui
30 09:13 <batsman> brake, accell, brake, accel
30 09:13 <vincenz> worked through the night for a new version for it
cause the old one was WAY too slow
30 09:13 <batsman> do you plan to drive by hand?
we considered that, too, to get some paths to optimize later
and got 2 people working on that
but I don't know how far they went
30 09:14 <vincenz> nah
driving by hand is impossible
and I'm out of cigs
:/
30 09:15 <batsman> is your simulator engine certified?
30 09:16 <vincenz> yes
30 09:16 <batsman> good
30 09:16 <vincenz> that's the part we got first
30 09:16 <batsman> ours too, the famous 38000 tests
but now we're rewriting in C, for speed
reusing the test cases
30 09:16 <vincenz> 38000 tests?
30 09:16 <batsman> yes!
30 09:16 <vincenz> euhm
I wrote it all by hand
no test
and it works
30 09:17 <batsman> one for every state
then it's not certified :-)
30 09:17 <vincenz> it is foolproof
30 09:17 <batsman> but just "seems to work for me" :)
ok
30 09:17 <vincenz> I ran the trace file they sent me
and I got the EXACT same readings
30 09:17 <batsman> did you use your own fixed point
30 09:17 <vincenz> after 10000 steps
yes
30 09:17 <batsman> ok, then it's certified after all, same as ours :)
30 09:17 <vincenz> implemented all as in the specs
30 09:17 <batsman> in scheme?
30 09:17 <vincenz> yup
30 09:17 <batsman> we have our own in Ruby
30 09:18 <vincenz> I don't consider overflow
30 09:18 <batsman> but it's not really fast, is it?
30 09:18 <vincenz> *shrugs*
sure it is
I just use ints
30 09:18 <batsman> ugh
30 09:18 <vincenz> shift left 16
shift right 16
and for directions
30 09:18 <batsman> we were using Fixnums too and Bignum
30 09:19 <vincenz> (* real-pi (direction theirpiconstant))
30 09:19 <batsman> but were not satisfied by the speed
30 09:19 <lennon> i thought the spec said that 32 bits were insufficient for the FP math?
30 09:19 <vincenz> euhm
30 09:19 <batsman> scheme must have Bignum too
30 09:19 <vincenz> scheme integers are infiny
I thinkg
30 09:19 <lennon> gotcha
30 09:19 <batsman> as ours
30 09:19 <vincenz> either aewy
30 09:19 <lennon> to me, integer != int
30 09:19 <vincenz> speed is not of any relevance for us
30 09:19 <lennon> but then again, i wrote a bunch of C today
30 09:19 <batsman> ummm, I guess you compile your scheme code, don't you?
30 09:19 <vincenz> nope
30 09:20 <batsman> interpreted??? and it's fast??
30 09:20 <vincenz> I don't need speed
the simulator is fast enough
I don't brute force
30 09:20 <batsman> you're using genetic alg.
30 09:20 <vincenz> nope
I doubt that'd even get any results
30 09:21 <batsman> no? you stated that above, didn't you?
30 09:21 <lennon> batsman: the algorithms make far more of a diff. than the execution model
30 09:21 <vincenz> no
I thought you guys did
30 09:21 <batsman> we told you we're using A* now
and cutting down possibilites using info from shortest path
30 09:22 <vincenz> I use my gui to click relevant points
and then use dijkstra
30 09:22 <lennon> vincenz: we're considered using an adaptive algorithm to control heuristic weighting, but that's about it
30 09:22 <vincenz> takes one screen-refresh-rate
30 09:22 <batsman> ok!
30 09:22 <vincenz> to calculate all possible connection lines between the points
30 09:22 <batsman> but this gives the path
30 09:22 <vincenz> yup
30 09:22 <batsman> not the traces!
30 09:22 <vincenz> oh
hehe
30 09:22 <batsman> path != traces
we had the path forever here
30 09:23 <vincenz> it's not even good enough
I know that
30 09:23 <batsman> the shortest one
but we cannot transform that into traces
30 09:23 <vincenz> I still have to fix it so I relax dijkstra a bit
shortest path is not good
30 09:23 <batsman> we know
30 09:23 <vincenz> batsman: that's what I was stuck on too
30 09:23 <batsman> that's why we introduced biases
30 09:23 <vincenz> batsman: then I realized
you shouldn't see this as a transformation
30 09:23 <lennon> batsman: you should go check the wiki -- i've put some notes on that subject there
30 09:23 <batsman> against walls and tight curves
we wanted to use the info on the SP in the A* evaluator
as just another heuristic
30 09:24 <vincenz> well
30 09:24 <batsman> "getting too far away from SP is bad"
30 09:24 <vincenz> you shouldn't see path->trace as a transformation
30 09:24 <batsman> but weighted
30 09:24 <vincenz> heh
30 09:24 <batsman> lennon: OK, I read it
30 09:25 <lennon> vincenz: how are you approaching the, umm, transition?
30 09:25 <vincenz> yup
I have a little robot
30 09:25 <batsman> this is the critical thing :)
30 09:25 <vincenz> driving aruond
and as side effect
I output it's decisions
30 09:25 <lennon> so you're generating the traces and path-decision time?
that makes sense
30 09:26 <batsman> and how do you use the path info from dijkstra?
30 09:26 <vincenz> as waypoitns
directed
30 09:26 <lennon> hehe
sounds familiar
30 09:26 <batsman> but I still don't see the transition path -> traces
30 09:26 <vincenz> batsman: the little robot drives around
it executes one step at a time
side -effect
print out it's decisions
I dont' see what's so harda bout that
trying to do it in a one-pass algo
that's impossible
30 09:27 <batsman> yes, but what is the path good for?
30 09:27 <vincenz> for way points
that's a pretty big world for such a lonely littel robot
30 09:27 <batsman> ummm
so you restrict the possible actual path
30 09:27 <vincenz> euhm....how else does it know where to heaed?
30 09:28 <batsman> to something around the one obtained with dijkstra, right?
30 09:28 <vincenz> I have a module that given a set of points
gives me back all the lines that don't cross walls
and I run dijkstra on that
that gives me a path
and now I have my robot try his best at following it
30 09:28 <batsman> that's it
30 09:28 <vincenz> but he keeps missing the first curve
30 09:28 <batsman> that's what we wanted to do
follow the path
30 09:28 <vincenz> now you share some info
30 09:28 <batsman> but it didn't work for us
that's what I told you before
trying to leverage path info
30 09:28 <vincenz> why not?
30 09:29 <batsman> in the A* thing
30 09:29 <vincenz> euhm
30 09:29 <batsman> the car did stupid stuff
30 09:29 <vincenz> I don't use a*
that's overkill
performance wise
30 09:29 <batsman> ok
30 09:29 <vincenz> I use a much simpler system
30 09:29 <batsman> actually, we've reduced our framework quite a bit now
30 09:29 <lennon> vincenz: about an hour before you got here, i basically stumbled onto a similar idea to what you described
30 09:29 <batsman> so I don't know if we could call it a* anymore
30 09:30 <lennon> generate the SP,
30 09:30 <batsman> lennon: reading the wiki now
30 09:30 <lennon> then take 1 in N points along it,
as your first-order checkpoints
balance the SP's affinity for tight turns
30 09:30 <vincenz> the key is to have a good robot to follow waypoints
where's the wiki?
30 09:30 <batsman> yes!
he, secret
30 09:30 <vincenz> heh
30 09:30 <batsman> :-)
30 09:31 <vincenz> I doubt it matters much at this stage, except for little formulas
30 09:31 <lennon> with a simple algo that looks for the longest route before it hits a wall
30 09:31 <batsman> well
it's pw protected too
ask lennon about that
he's the one that runs it
30 09:31 <lennon> i can loosen that, if you like
allow anon access
30 09:31 <vincenz> hmm
30 09:31 <lennon> it's mostly just ramblings
and slightly out-of-date api descs and pseudocode
30 09:31 <vincenz> what ai model did you use for driving?
30 09:32 <lennon> all the fun stuff's in cvs
30 09:32 <vincenz> or wanted to use?
yeah
we have a really neat gui
:)
30 09:32 <batsman> the gui is just for creating the path, right?
or can it display the simulation run?
30 09:32 <vincenz> both
I can flip back and forth
reset my robot
30 09:33 <batsman> good
30 09:33 <lennon> very nice indeed
30 09:33 <vincenz> and it's quite smooth
I can show the netlist
I can show the dijkstra list
30 09:33 <lennon> are you guys using drscheme, then?
30 09:33 <batsman> this is what we have now: http://www.cs.helsinki.fi/u/kaniemel/Een.gif
30 09:33 <vincenz> we were using mzscheme
30 09:33 <lennon> or some C-based gui toolkit?
30 09:33 <vincenz> then someone made a gui in mred
but it was slow
and I changed it
considering I'm new to scheme
and NEVER touched a line of mred code
4 hours for writing a gui...
after not much sleep at all
30 09:34 <batsman> it's really impressive
30 09:34 <vincenz> scheme is nicer than I thought
30 09:34 <lennon> says good things about the toolkit, as well
30 09:34 <vincenz> originally I had planned to do it inocaml
30 09:35 <batsman> as the French team that always wins or does 2nd :)
30 09:35 <vincenz> that's from Een.trc right?
30 09:35 <batsman> "Caml's 'r us" or something
30 09:35 <vincenz> first time I saw that pic
,,,
30 09:35 <batsman> right
30 09:35 <vincenz> I freaked
30 09:35 <batsman> hehe
30 09:35 <vincenz> I wonder how they got to the trc file
30 09:36 <batsman> we don't generate traces yet, I told you, we're screwed
if they had weeks instead of day
they can make nice things
even us now
were the contest to start tonight, we'd have a lot more ready within only 5 or 6 hours
30 09:38 <vincenz> I thikn we have a pretty neat conecpt for our ai
30 09:39 <batsman> nice
30 09:39 <vincenz> euhm...I didn't mention it
30 09:39 <batsman> I wish ours had worked at the time we wrote it
some 25 hours ago
30 09:39 <vincenz> hehe
* vincenz pats you on the back
we started pretty late
ew got bogged down with more lowlevel stuff
gui etc
so we're in the middle of ai now
30 09:39 <batsman> but you said the car crashed in the last curve, didn't you?
30 09:40 <vincenz> first curve
I took it JUST too wide
but like I said
we JUST got started
30 09:40 <batsman> ok
30 09:40 <vincenz> the framework is there
it just has to be used properly
30 09:40 <batsman> beware
ours has been here for >1day
and still doesn't give results :-(
30 09:40 <lennon> batsman: we've also been writing C
which cuts our productivity by about 75%
at least
30 09:41 <vincenz> hehe
30 09:41 <batsman> right, actually there was almost no work on the Strategy framework :(
30 09:41 <vincenz> we actually have some stuff in 4 langs
30 09:41 <batsman> we jumped in aleksi's wagon
for C
30 09:41 <vincenz> java : early picker gui
c: to create png's
from trks
sisc: to be used in the javapicker
and mzscheme
:
30 09:42 <batsman> umm
here perl to make xpms from tracks
ruby for everything else
until we started making extensions in C
and now the core is C
wrapped for use in Ruby
so we reuse the unit tests
good thing: I would expect the simulator to be FAST within the next few hours
bad: we have lost the last ~12 hours rewriting in C
30 09:43 <vincenz> what do you mean by fast?
30 09:43 <lennon> which means we can stumble around on the AI much more quickly ;)
30 09:43 <vincenz> our slowest part is reading in the .trk flie
30 09:44 <batsman> yes!
30 09:44 <vincenz> 5-10 seconds
:/
30 09:44 <batsman> lennon, cannot find your new stuff in the wiki
30 09:44 <vincenz> annoying when you start a gui
30 09:44 <batsman> um, ours is faster, I think
30 09:45 <lennon> batsman: damn -- changed the index, linked to it, then the index changed back
30 09:46 <lennon> batsman: ok, now it's the last item in the index list
30 09:47 <batsman> WebResources ?
30 09:47 <lennon> refresh
30 09:47 <batsman> ok, now I see it
hey
this idea
is the one I've had since yesterday morning
the checkpoints thing
30 09:48 <lennon> that's great
30 09:48 <batsman> that's why I wanted to take the checkpoints from the SP or any other path
30 09:48 <lennon> then i can sleep for a while pretty soon
30 09:49 <batsman> not great, cause it means that I didn't see how to make it happen in one day
and might not see it within the next 14 hours
30 09:49 <lennon> but i think i do
30 09:49 <batsman> :-(
actually
I know how to make it
30 09:49 <lennon> let me post an image for you to look at...
30 09:49 <batsman> but as we're stuck writing the new engine ...
there's an image to describe my idea in docs/
I mean doc/gradient_method.ps
the file name is poorly chosen
it's got nothing to do with gradient :-(
30 09:50 <lennon> ok
i'll check it out when i'm back on my linux box
30 09:51 <batsman> you see the lines orthogonal to the path?
ok
30 09:51 <lennon> ps files are tough to view in os x
30 09:51 <batsman> I can do a gif and add it if you want
easy stuff
doing it right now
30 09:51 <lennon> that would be nice -- but it doesn't have to go in cvs
it can go on the wiki
look for the 'attach' link at the top of the page
30 09:51 <batsman> ok
30 09:52 <lennon> that's where i just put the image i wanted you to see
on the newest page, at the very bottom, there's a link to it
30 09:52 <batsman> ok
yes! I see the checkpoints
we're thinking the same
I have one algo
30 09:53 <lennon> that's just the SP, with 1 in 10 points drawn
30 09:53 <batsman> to get the next checkpoint
and see if we got already past the last goal
that's what I'm trying to get a pic from
30 09:53 <lennon> ok
couldn't we just get that info from the pointgrid?
the ordering of checkpoints, i mean
30 09:54 <dave> night guys
30 09:54 <batsman> yes
30 09:54 <lennon> davel: good night
30 09:54 <batsman> you have the order
good night
but you need to know
30 09:54 <dave> seeya in 2-3h
30 09:54 <batsman> when you went through a checkpoint
even if you didn't exactly run through it
and you were a little bit off
30 09:55 <dave> in case anyone is wonder, the game stuff is slow moving
30 09:55 <batsman> know what I mean?
ok, don't worry dave
30 09:55 <lennon> batsman: yes
30 09:55 <dave> but there is some code in game/ if anyone wants to look
30 09:55 <batsman> good
ok, attaching the pic
30 09:56 <lennon> batsman: i think i know how to do what you're asking
30 09:56 <batsman> yes
I know too, I think
30 09:56 <lennon> ok
30 09:56 <batsman> let's see if we have the same idea
30 09:56 <lennon> btw, the pic is showing up as <7k
and blank :/
30 09:56 <batsman> scroll down
30 09:57 <lennon> oh -- just really good compression
30 09:57 <batsman> yes
the idea
is taking the line from the current checkpoint
to the next
then take the line orthogonal to that one
that passes through the current checkpoint
when you crossed it, go for the next chekpoint and repeat
this makes you go forth
30 09:58 <vincenz> heh
that's exagerrated
30 09:58 <batsman> even if you didn't match a point
30 09:58 <vincenz> there's a better way
30 09:58 <batsman> yes?
30 09:58 <vincenz> take three points
A B C
you're between A and B
if you're at 80% of the distance
start shooting for C
30 09:58 <batsman> ummm
30 09:58 <vincenz> or thereabouts
30 09:58 <batsman> good
thanks
thanks a lot vincenz!
30 09:59 <lennon> i had also thought about widening the points a bit further, even
and always shooting for the furthest "visible" one
30 09:59 <batsman> I think vincenz saved us
:)
30 09:59 <lennon> meaning no walls are between you and it
30 09:59 <vincenz> lennon: at 80% dist
you should already be in lov of next point
or you've picked bad points
30 10:00 <lennon> sure
30 10:00 <batsman> yes
nice
now we need to get our C core certified
30 10:00 <lennon> my idea was to potentially jump more than one point at a time
30 10:00 <vincenz> 80% is just some number
30 10:00 <batsman> and implement this
30 10:00 <vincenz> I'm of course not sure of the correct value
(if there is any)
30 10:00 <batsman> it's because our points are very close
30 10:00 <lennon> to avoid the localized problems of the SP path
vincenz: sounds like an excellent application of an adaptive algorithm
30 10:01 <vincenz> oh
30 10:01 <lennon> finding the right value, i mean
30 10:01 <batsman> have to quit for 10mins, will be back
30 10:01 <vincenz> nah
I just use a thumb-factor
that's why I'm an engineer
30 10:01 <lennon> that works, too
30 10:01 <vincenz> :P
my points are quite far awy
30 10:02 <lennon> i'm just a would-be linguist who never finished school
30 10:02 <vincenz> and It drives pretty smoothly
at 80% and above
it starts to go too local
for my points at least
meaning that if C is right
and B is a bit left
it'll atually go left
mileage may vary
30 10:02 <lennon> how to you do your speed control, if you don't mind me asking?
30 10:02 <vincenz> we're still thinking that
any ideas you'd like to share?
30 10:03 <lennon> us, too
nothing except a general distance-finding algo
that tells us how far we've got until we crash
30 10:03 <vincenz> heh
that's one of the first things we had
30 10:03 <lennon> nothing global, yet...
30 10:03 <vincenz> we actually made that algorithm initialy
to connect points that can see each other
back WAY in the begininng
little did we know we'd use it like this
:)
what framework do you use to combine all the algo's?
30 10:04 <lennon> hand-tooled scripts, mostly
30 10:04 <vincenz> I mean
the ai framework
30 10:04 <lennon> we're starting to factor it better
oh
simple weighted scoring of each heuristic
i don't even know what you'd call it
"ad-hoc", maybe?
;)
30 10:05 <vincenz> behaviour based you mean
I have something like that but a bit more expansive
30 10:07 <lennon> at this point, i'm not really sure that our larger numbers have helped as much as they should...
...esp. since none of us had ever worked together previously,
30 10:07 <vincenz> neither have we
30 10:07 <lennon> we've ended up with any number of parallel efforts going on that don't necessarily connect very well
30 10:08 <vincenz> I tried my best to keep control over teh situation
although we were with 3
over irc
and ssh
in different timezones
now it's just two of us
the other guy split about halfway
30 10:08 <lennon> we've actually been more succesful overall when fewer people were working, i think
less noise, and less chance to second-guess your ideas
30 10:09 <vincenz> yes
but you need a minimum
I think we're under that
2 people...
one goes the other is left on his own
30 10:09 <lennon> having someone else to bounce ideas and bugs off of is definitely nice
i spent about an hour trying to debug two fscking C routines this afternoon when no one else was available
as soon as i got someone else to look over it and ask me a couple of simple questions,
i had the bug fixed in about 5 minutes
30 10:11 <batsman> back
30 10:11 <lennon> i think a group of four, with two pairs each in similar timezones (or sleep schedules) might be close to optimal
30 10:11 <vincenz> yeah
30 10:11 <batsman> but now I'd need lunch
30 10:11 <vincenz> grr
30 10:11 <batsman> we have 3 time zones here:
30 10:11 <vincenz> distance-to-wall won't work
30 10:11 <batsman> GMT+6 (7)?
30 10:12 <vincenz> I have bugs
30 10:12 <batsman> GMT+2 and + 3
GMT-6
perhaps even four
30 10:12 <lennon> vincenz: how won't it work?
30 10:12 <batsman> ?
in our case, it was slow
30 10:12 <lennon> but usable
30 10:13 <batsman> perhaps doing it in C...
30 10:13 <vincenz> well
it works for checking collision with walls
but we just get wrong readings
30 10:13 <lennon> batsman: that's on my list for the new ctrack module
30 10:13 <batsman> ok, good
then we should cache that info
as it's run once per track
30 10:13 <lennon> batsman: but i need geometric functions in C, too
30 10:13 <batsman> we can afford to be slow
sin and cos are standard
what more do you need?
should be enough
just take the code in track/track.rb and port to C
should be easy, only problem is integrating with cfixed
30 10:15 <batsman> how long are you staying here, lennon?
30 10:15 <lennon> prob. another hour, tops
if i'm going to be around much tomorrow
30 10:15 <vincenz> heh
30 10:15 <lennon> i need to get some sleep fairly soon
30 10:16 <vincenz> I already pulled an allinght
30 10:16 <batsman> ok
30 10:16 <lennon> vincenz: i've just lost track of when "night" is
30 10:16 <batsman> I'll have lunch now
should be back in 25minutes or so
then I guess when you go sleep
it'll be me and me
30 10:16 <lennon> vincenz: i did like 24 on, 5 off, 20 on...
30 10:16 <batsman> perhaps I'll get aleksi back
30 10:16 <lennon> batsman: others should return pretty soon
30 10:16 <batsman> good
I'll try to wrap simulate.c
in Ruby
and test conformance
30 10:17 <lennon> batsman: is it complete yet?
30 10:17 <batsman> well, simulate is only one function :)
complete, yes
given one state, gets the next
that's all there is
just have to check compliance
30 10:17 <lennon> batsman: btw, i'm probably going to modify the algo. you used in track.rb for wall distance
30 10:17 <batsman> ok
make it as you wish
just make sure
30 10:18 <lennon> batsman: there's not really any need to scan behind the current position
30 10:18 <batsman> you decrease the angle step
as you increase the radius
30 10:18 <lennon> batsman: sure
30 10:18 <batsman> we can compute this once
per track and store it in a file
so speed is not really the top concern
30 10:19 <lennon> batsman: per track? don't you mean per checkpoint?
30 10:19 <batsman> but the Ruby version was unbearable
umm, if it's fast enough
you can compute the distance to walls for all points
and save it
in Ruby
it was too slow even for that
30 10:19 <lennon> okay, now i see what you're getting at
cache it like the pointgrid
30 10:19 <batsman> the distance_to_wall is just a lookup O(1)
30 10:20 <vincenz> ?
30 10:20 <lennon> i really need to refactor the ctrack code again...make it into a general matrix class
30 10:20 <batsman> perhaps
30 10:20 <lennon> then build track, pointgrid, and walldist on that
30 10:20 <batsman> but ctrack does a couple more things
such as realizing where the start was, etc
30 10:20 <lennon> well, ctrack could still be in C
30 10:20 <batsman> that's right!
30 10:20 <lennon> and just use the matrix lib
30 10:21 <batsman> we don't want to have to go through Ruby
30 10:21 <lennon> as could pointgrid and walldist
30 10:21 <batsman> in the C part
I mean, we wrap everything for Ruby
but ctrack should be usable in C
w/o using rb_*
30 10:21 <lennon> that's why i rewrote it this evening
30 10:21 <batsman> having direct access to the data structs, etc
30 10:21 <lennon> there are two apis -- the ruby one uses the native c one
30 10:21 <batsman> ok
30 10:22 <lennon> anyway, go eat
i'll be here when you get back
30 10:22 <batsman> yes, following my plan
http://www.thekode.net/plan.gif
30 10:34 <tobias> checked in a change to test.rb that automatically compiles all extensions before running the tests
30 10:45 <vincenz> extreme programming?
30 10:50 <batsman> hi again
30 10:50 <tobias> hi
30 10:50 <batsman> said I'd be back in 25 minutes, took me 28 :-P
actually my first real lunch since the beginning of ICFP
30 10:51 <tobias> batsman, just saw your limited-bits-explanation for me on the wiki
30 10:51 <batsman> before, I only had Müsli and fruits
it's not mine???
aleksi's
30 10:52 <tobias> found that bug (bug in the test code) this morning, too
30 10:52 <batsman> anyway
I hope I'll be more productive after some real food
but OTOH, my brain is quite fscked by now
even with caffeine
well, 11hours to go
30 10:53 <tobias> I will mostly lurk
mbeing at work at the moment
30 10:53 <batsman> :)
30 11:00 <batsman> I'm very impressed by your work with cfixed, tobias, really nice
esp. the testing side
it's great to know that that works OK
ok, now I'm going to try to wrap simulator
any objections to moving simulator.c to bastard/csimulator/ ?
no?
ok, doing it
30 11:04 <lennon> i'm just stopping in to let people know that i'm going to sleep for 3-4 hours
30 11:04 <batsman> ok
thanks for everything
now I'll package simulator.c
I mean, wrap it
30 11:04 <lennon> hopefully, i should be around for the last 9+ hours of the contest
30 11:05 <batsman> then try to run the 38000 test cases on it
by then, I hope more people is back
and aleksi too, as we're mainly following his vision
sweet dreams lennon, cu later
30 11:05 <lennon> thanks
30 11:20 <batsman> for the record:
lennon's modification to ccar is buggy
quite a mess: we have to see whether the prev ptr is pointing to the same state as the main object or not
everything for just 5 words
we won't have millions of cars there
so I'm undoing that
30 11:24 <batsman> I claim ownership of ccar/ and csimulator/
30 11:25 <aleksi> great!
30 11:25 <batsman> have to fix this stuff, will do as lennon did in ctrack, which is neat
30 11:25 <aleksi> hello again
30 11:25 <batsman> hi
I'm wrapping csimulator
and fixing ccar
30 11:25 <aleksi> I'm going to be away for two hours still, gotta eat and there's one work meeting
30 11:25 <batsman> ok
nice
30 11:25 <aleksi> sounds great, as those are the one's I'll need most
30 11:25 <batsman> that should give me time to fix csimulator
30 11:25 <aleksi> and ctrack of course
30 11:25 <batsman> then we can run the unit tests again
ctrack is in good shape now
lennon cleaned it nicely
30 11:25 <aleksi> for ctrack I asked yesterday if crash takes last requirement on page 4 in account
30 11:26 <batsman> ctrack doesn't yet, I guess
It's doable though, will fix it after csimulator and ccar
should be ready by the time you come back
THEN we need your MAGIC!!!
remember... F(magic)=T
you promised that
30 11:27 <aleksi> yes, thanks for reminding me :)
I guess, based on the logs, lennon and you started to see that c*-versions might be very useful even without my magic
30 11:28 <batsman> ummm, personally, I am hoping your magic saves us
it seems now
it's your vision or nothing :-)
don't think the game will give results
plus dave is sleeping now
30 11:29 <aleksi> well, we still have good framework, couple of tries, bunch of useful algorithms, visualizer, lot of good knowledge and have had loads of fun!
30 11:29 <batsman> yes
30 11:29 <aleksi> still, I took the day off from work, just to be able to put couple of more hours on this, especially during nights
30 11:29 <batsman> but hope we have results too :)
:-)
30 11:30 <aleksi> yes :)
ok, I'll go for lunch now
30 11:43 <batsman> good, cu later
30 12:27 <batsman> for the record: starting to work on testing csimulator
and ccar, etc
30 12:34 <batsman> broke one unit test when implementing extension standards, will solve it now
30 12:41 <batsman> IMPORTANT NOTE FOR ALL MANKIND
READ bastard/README.standards BEFORE WRITING AN EXTENSION!
30 13:28 <dave> k
30 13:29 <batsman> hi again
I'm working hard now to get all the extensions right
30 13:29 <dave> hi
30 13:29 <batsman> I claim ownership of most things in /bastard/
:-)
30 13:30 <dave> ownership???
30 13:30 <batsman> well
I "own" the files
in the sense that you shouldn't touch them now
as I'm fixing everything
there's lots of issues
unresolved symbols add link time
when running them
name clashes
etc
please read README.stardards
we should stick to that for now
otherwise it's a chaos to get things to work
30 13:33 <dave> ok, I dont have any immediate needs to edit them
30 13:33 <batsman> good
30 13:33 <dave> when I last compiled and used them, things worked fine, no link errs etc
30 13:33 <batsman> just got test/test_ccar.rb to start working
nope
30 13:33 <dave> when did all that change
30 13:34 <batsman> when you compile it's ok
the problem comes
when you actually load them
cause LD is trying to resolve symbols at runtime
30 13:34 <dave> I loaded and used ctrack a few hours ago
30 13:34 <batsman> AFAIK nobody had used CCar until now
30 13:34 <dave> ld.so
k
30 13:34 <batsman> CTrack has been fine for quite some time
yes ld.so
but nonetheless, I cleaned everything
and made these standards
you can change them if you wish
30 13:35 <dave> k
30 13:35 <batsman> but then you have to modify all extensions to satisfy it :)
I'm slowly progressing towards a working test/test_csimulator.rb
first testing CCar
CTrack is already tested and fine
CFixed is solid too
now have to make sure the APIs match
the ones we used to have
and/or change whatever's needed
30 14:06 <batsman> ok, got test_csimulator to work
now, the simulation fails on the first step :-(
have to fix simulator.c
30 14:06 <dave> k
just me and you here?
30 14:06 <batsman> yes
we should have aleksi back RSN
30 14:07 <dave> k
30 14:08 <batsman> he said we'd be out 2H
it's been 3 now
as for lennon
he said he'd sleep some 4H
30 14:09 <batsman> that was 3H ago
30 14:09 <dave> k
30 14:10 <batsman> shit! segmentation fault in ccar
crap!
I must have introduced the problem in the last ci
30 14:15 <batsman> fixed
30 14:25 <batsman> ok, finally got real tests that work
test_ccar should be good by now
the others too
30 14:25 <dave> cool
30 14:25 <batsman> only test_csimulator fails
when we get it to pass...
... we'll have some 76000 test cases :)
now I just have to recode it in C++
CPPSimulator
and have >114000 test cases
hi gus
30 14:27 <gus> Hi
30 14:27 <dave> hi gus
30 14:27 <batsman> ready for some serious hacking?
30 14:27 <gus> I am a little frutrated
I couldn't log in tonight around 1 am
I am at work right now
I wanted to check on the status of things
I need to do something for work before I can jump back to icfp
30 14:28 <dave> k
30 14:28 <batsman> ok
30 14:28 <gus> How are things doing?
30 14:28 <batsman> will you come here later?
well
I've been cleaning the extensions
bastard/*
ccar
ctrack
30 14:29 <gus> I'll do my best to come back later
30 14:29 <batsman> csimulator
cfixed
now we have unit tests for all of them
30 14:29 <dave> I am sloooooooooowly try to work on the ruby/gtk game
30 14:29 <batsman> the only one not passing is csimulator
but it will
it's only one function after all, some 25 LOCs
30 14:30 <gus> OK, I get to work
30 14:30 <batsman> ok cu
30 14:30 <gus> Try to do what I am supposed to do today
And switch back to icfp ASAP
Which is probably going to be a few hours...
See you.
30 14:31 <batsman> cu
30 14:31 <dave> bye
30 14:50 <batsman> got some test cases to work in test_csimulator.rb
forgot to do car.t = car.d at end of step
30 14:50 <dave> k
oh you're working on the rally stuff
30 14:51 <batsman> not rally
the bug was there
30 14:51 <dave> isn't t part of the rally ?
30 14:51 <batsman> because our car carries t too
right now
t == d
30 14:51 <dave> yep
30 14:51 <batsman> and should keep being like that
that's why I have to do n.t = n.d;
in simulator.c
and I have the suspicion that the test case is broken
and csimulator actually is working
I'm checking
30 14:55 <batsman> ok, done
Loaded suite test
Started
.........................................................
Finished in 20.898723 seconds.
57 tests, 76357 assertions, 0 failures, 0 errors
fixed
it was the test case
and one small bug in csimulator
now we have the infrastructure in C working well AFAIK
30 15:02 <dave> nice
30 15:02 <batsman> I'm benchmarking now
test_simulator.rb takes 12 seconds
test_csimulator.rb takes 5
HOWEVER
most time is spent in CTrack#load
so the difference in speed is actually higher
and remember test_csimulator.rb is done in Ruby
30 15:03 <dave> cool
30 15:03 <batsman> mmmm
yes, here's the real number
w/o considering (C)?Track
Loaded suite test/test_simulator
Started
Needed 11.745264 seconds.
Loaded suite test/test_csimulator
Started
Needed 3.389536 seconds.
30 15:04 <dave> cool
30 15:04 <batsman> that's nearly 4 times faster
but remember we're still using it from Ruby
which is slow
plus I'm doing much more than simply getting the next car, I'm checking things too, etc
so in reality
11.744 = overhead + time for simulator
3.38 = overhead + time for simulator
now, imagine that overhead = 3 seconds
30 15:06 <dave> yep
30 15:06 <batsman> then the speedup is 23
I'm going to try to see the actual speed
just by giving stupid commands
such as always "al" or such
30 16:01 <dave> hi
30 16:01 <batsman> hi tobias
30 16:01 <tobias> hi
how are things?
30 16:02 <batsman> well
30 16:02 <tobias> nice
30 16:02 <batsman> dave's working on the game
I've been cleaning bastard/
30 16:02 <tobias> something playable?
30 16:02 <dave> haha, no!
30 16:03 <batsman> another interesting thing is
30 16:03 <dave> gtk sucks, the docs at least
30 16:03 <batsman> Finished in 20.2745 seconds.
61 tests, 76366 assertions, 0 failures, 0 errors
30 16:03 <dave> I am slow slow moving
30 16:03 <batsman> I fixed CSimulator and passed the tests
now it's certified
I've tested CCar and CTrack
fixed several bugs
now it should be ok
so the whole infrastructure in C is working
as expected, CSimulator is quite faster than Simulator
30 16:05 <tobias> does that buy us better solutions?
30 16:05 <batsman> it should
30 16:05 <tobias> nice
30 16:05 <batsman> if we ever get aleksi's evaluator to work
but he's not here
and right now I need a rest
I've been hacking like crazy in the last 5 hours
modified almost every file in bastard/ and several things in test/
over 26 commits :)
30 16:07 <tobias> i sounds like work
my family is coming back -- till later
30 16:07 <batsman> cu
30 16:31 <dave> perl to the resuce ... maybe
30 16:33 <batsman> perl?
switching to perl/gtk?
30 16:33 <dave> the perl gtk docs seem more useful
no not switching
yet, anyways
I dont think I would have time
30 16:33 <batsman> ok
I have one strategy
30 16:34 <dave> whats that?
30 16:34 <batsman> do you think you could finish this in time, really?
30 16:34 <dave> maybe, but it wouldn't leave a lot of time for playing the game to get good results
30 16:34 <batsman> aha
have you read vincenz's comments here?
30 16:35 <dave> no, I skipped most of them
whats the low down?
30 16:35 <batsman> ok, have you heard about his GUI?
he's got a GUI that represents the simulation
30 16:36 <dave> I just know he has one
ok
30 16:36 <batsman> he can also select some control points
to have the car aiming at them
while it advances
do you think you can reconvert your code to do that?
30 16:37 <dave> um
30 16:37 <batsman> even the realtime display only is good
just show the map
and a point :)
should be easy, no?
30 16:37 <dave> so you're asking me to show the map, with the current x,y of the car as it runs through a trace?
30 16:37 <batsman> yes
I don't think we can evaluate the performance if we have to to a gif each time
using aleksi's work from yesterday
that was nice yesterday
30 16:38 <dave> is this to help evaluate heuristics
30 16:38 <batsman> well
it is for us
to see what's going on
to help debug things
etc
as I see it,
you need 3 things:
map
one point moving over it
and indication of speed
30 16:39 <dave> ok
30 16:39 <batsman> we can pass you the coordinates of the car and its speed say from stdin
would this take you a long time?
I don't know how far you got with the game
30 16:40 <dave> map I got, point I think I can do, and speed would be trivail (just use the simulator, right?)
30 16:40 <batsman> I can pass you the speed
for instance in stdin
we pass something like
NUM1 NUM2 NUM3
x y v
and that's it
you have a counter w/ the number of steps so far
and accept a command like SETCOUNTER x
to put it to x
30 16:41 <dave> where I am at now is displaying the track, zoomed in, centered on the starting point, and now I was trying to figure out how to get the track to accept key press events
30 16:41 <batsman> that way we can backtrack
zoomed! nice
30 16:41 <dave> why is it all through stdin, its all ruby
30 16:42 <batsman> ummm
cause perhaps it won't be
if we use csimulator
we can bypass ruby completely if needed
30 16:42 <dave> but it has a ruby wrapper right?
30 16:42 <batsman> yes
it's usable from ruby
30 16:42 <dave> then I will just create the necessary objects from within ruby
30 16:42 <batsman> but I think it's better if the GUI is not tied to an implementation
30 16:43 <dave> ok, I will try to whip up the viewer
30 16:43 <batsman> there's no object :)
just a module
you do
new_car = CSimulator.step(car, ".")
etc
30 16:43 <dave> ok, stdin then
30 16:43 <batsman> but always creating cars could be costly
stdin is easy, isn't it?
30 16:44 <dave> yep
just didnt see the reason at first
30 16:44 <batsman> as I'm asking you a favour
I don't want to make it difficult
shouldn't take you much time
30 16:44 <dave> gonna grab a bowl of cereal, then I will start
30 16:44 <batsman> just show the map w/o zooming and one point (or square), that's it
ok
what time is it there?
30 16:45 <dave> all I need to do is figure out how to draw a point on a "DrawableArea" :-)
10:45am
30 16:45 <batsman> here 18H45 (6:45pm)
30 16:45 <dave> you don't want zooming?
30 16:45 <batsman> ummm
if it costs you nothing, then yes :)
30 16:45 <dave> k
I will try to get something done for t-6h
30 16:46 <batsman> ummm
what time is it now?
30 16:46 <dave> could be faster
30 16:46 <batsman> t-7H?
30 16:46 <dave> t-7.25h
30 16:46 <batsman> ok
I'm starting to think of how to actually output traces
now that CSimulator is nice and fast
30 16:46 <dave> cool
30 16:46 <batsman> I start to work
as if nobody were to come back here
cause aleksi should have returned some 4 hours ago
and lennon too IIRC
so... it's up to us now :)
I've got confident
I was just too impressed when aleksi got the 38000 test cases
but today I did the same _in C_ :)
so if he could do it, I can do it :-P
30 16:52 <dave> k
I'm on the job, cereal consumed
30 16:52 <batsman> ok
I'm taking cereals too
today I had my first real lunch since the beginning of ICFP
I realized I could have been much more productive if only I had eaten more the days before
caffeine is good, but food really made the day for me
30 16:55 <dave> yeah
30 16:56 <batsman> it's funny
that I've seen
a convergence of ideas
now it seems we have all had the same one all the time
just that we didn't know
or expressed it in different ways
reading aleksi's node in the wiki
I see he's trying to track one path, too
by having checkpoints
and trying to follow them in order
30 16:57 <batsman> that's what I've been wanting to do for the last 30 hours or so :)
30 16:57 <dave> yeah I know
30 16:58 <batsman> but I thought that the checkpoints would be taken from the shortest path, with some heuristics
30 16:58 <dave> its been a really interesting time seeing how people interact etc
30 16:58 <batsman> and, from the talk w/ vincenz this morning
it seems they're doing the same
I've learned a great deal
next time I participate in ICFP
I'll make it so much better
first thing: mandate some "quick ci" policy on CVS
second: cvstrack is cool
30 16:59 <dave> I tried getting an entry in for last years icfp contest
I was soooo close
30 17:00 <batsman> :)
not your first time?
30 17:00 <dave> but it was just me, and a friend who didnt know ruby, so I think he slowed things down a bit :-)
30 17:00 <batsman> :-)
I think we should have planned more
in the next few hours, we code like crazy
30 17:00 <dave> well I *really* wanted to get something done this year
yep
30 17:00 <batsman> instead of getting the whole picture
I think
yesterday we lost some opportunities
30 17:01 <dave> yes
30 17:01 <batsman> aleksi was working on this gif generator for some 6 hours or so
instead of saying "hey guys, I'm going to throw away Strategy, so let's start writing extensions"
had I known I'd be writing C code
I would have done it before
I've become proficient w/ extensions
30 17:03 <batsman> last week, I wrote some >7KLOCs to use Java objects and things from Ruby through JNI
now I can write extensions quite fast
BTW, I'm no professional programmer or anything
30 17:04 <dave> oh?
30 17:04 <batsman> eletrical engineering
30 17:04 <dave> ok
30 17:04 <batsman> if I know CS, it's because I've read a lot
but 99%+ of the code I've written in my life
30 17:05 <dave> learning is fun
30 17:05 <batsman> has been for fun or to learn :)
so
I think I have to get to the trace generator :)
30 17:06 <dave> yep
30 17:26 <vincenz> batsman: :)
30 17:26 <batsman> yes?
30 17:26 <vincenz> just :)
30 17:26 <batsman> you got it?
hi lennon
vincenz: ??
30 17:27 <lennon> greetings, all
30 17:27 <vincenz> never mind me
I'm a wreck
30 17:28 <batsman> <vincenz> just :) ???
30 17:28 <lennon> * lennon is still doing an integrity check on his brain
vincenz: are you still awake? that's hard-core...
30 17:29 <batsman> guys
Finished in 19.898357 seconds.
61 tests, 76366 assertions, 0 failures, 0 errors
30 17:29 <vincenz> no
I went to sleep for 6 hours
30 17:29 <lennon> vincenz: that's good
30 17:29 <batsman> final phase
30 17:29 <vincenz> it's 87:30 pm
I mean 7:30
hmm
I still don't get which 38000 assertions
30 17:29 <batsman> vincenz: you got it to work?
but you do have them
it's just the Een thing
twice, one for the Ruby core, one for the C core
30 17:30 <lennon> batsman: what's our status?
30 17:30 <batsman> status:
CSimulator running and certified
writing AI stuff
30 17:30 <vincenz> ohhhhhhhhhhhh
heh
30 17:31 <batsman> ?
30 17:31 <vincenz> I did it with my eyes
checked the last line :P
30 17:31 <batsman> ??
30 17:31 <lennon> batsman: who's working on what part of the driving ai?
30 17:31 <batsman> you mean you completed a track, or what?
ahem
right now, there's only dave, working on the GUI
and me
thinking of what to do next
after hacking the C extensions for >5hours
30 17:32 <lennon> ok
30 17:32 <batsman> BTW, vincenz
I realized something interesting
30 17:33 <vincenz> what?
30 17:33 <lennon> let me get some coffee, and maybe you should take a ~10 minute mental rest, to clear your head of some of the C nasties
30 17:33 <batsman> we had all the same idea :-P
30 17:33 <vincenz> hehe
30 17:33 <batsman> we expressed it differently
but everybody is using checkpoints
30 17:33 <vincenz> so what's the framework?
30 17:33 <batsman> and trying to follow
30 17:33 <vincenz> find next point?
and then?
30 17:33 <batsman> I've seen the idea replicated in our wiki
like 5 times :)
30 17:33 <lennon> vincenz: to follow the current point,
30 17:33 <batsman> everybody has put his own node
but it was all the same
vincenz, I think you're probably ahead
more advanced that us
:)
30 17:34 <lennon> vincenz: check the distance, delta in angle from the car's current, and distance to wall
30 17:34 <batsman> how is it going for you, vincenz? near finished now?
you see we've lost like 15 hours recoding in C
and now, I don't really know why we did it
30 17:35 <vincenz> heh
30 17:35 <batsman> the guy who wanted A*
is gone :P
and it turns out
he wasn't taking really A*
but the 'follow points' thing :)
30 17:35 <vincenz> hehe
30 17:36 <batsman> now, really, how advanced are you, vincenz?
got traces already?
30 17:37 <vincenz> euhm no
30 17:37 <batsman> mmm are you getting them in the near future with your current codebase
in our case, we HAVE to write quite some more code to make traces :(
it's not that we have to make it work
but rather that we still have to make it :-(
so essentially
the same situation we were 24H ago
only difference, we can simulate much faster
30 17:39 <vincenz> I think that writing a trace will be trivial
30 17:39 <batsman> you think?
what are you having problems now with, then?
I assume something's wrong :)
perhaps that doesn't hold
and everything's as planned for you :)
but not really what happens here
30 17:43 <vincenz> math stuff
30 17:43 <batsman> math stuff? where?
30 17:43 <vincenz> euhm
30 17:44 <dave> whats euhm?
30 17:44 <vincenz> in calculations for the car
30 17:44 <batsman> you French? or French-speaking?
30 17:45 <dave> me?
I learned some french about 10 years ago, in jr high school
30 17:45 <vincenz> me?
30 17:45 <dave> is euhm french?
30 17:46 <vincenz> I'm belgian, main language is dutch, though I speak better english, and yes I speak a bit of french
30 17:46 <batsman> je le crois bien
30 17:46 <vincenz> euhm is not a work
word
30 17:46 <batsman> no, just that
30 17:46 <vincenz> euhm is when you're thinking and you go uhm
30 17:46 <batsman> yes
Frenchmen
30 17:46 <vincenz> buti with a longer vowel
30 17:46 <batsman> go eeeueuuuu
with the "schwa"
30 17:46 <vincenz> dutch it's euhm
30 17:46 <batsman> @
so I thought you could be French :)
it's like in one Simpsons episode
you have Lisa going to Springfield school -- west side
or something like that
and it turns out
people are learning french there
Lisa says "I my... I got to the wrong school"
so all kids start laughing
30 17:48 <batsman> then, the teachers goes "en français"
and the students laugh "eu eu eu eueeue euuu"
in a completely different way
w/ the schwa sound
:-)
30 17:48 <lennon> batsman: i figured out why we can't cache distance to walls once per track:
30 17:48 <batsman> why?
30 17:49 <lennon> batsman: because the whole point was to only check for walls *in front* of the vehicle
we don'ty care if there's a wall behind us,
or to the left or right,
30 17:49 <batsman> ummm right
30 17:49 <lennon> well, that's dependent on direction
not just position
30 17:50 <batsman> I guess we should add something like distance(direction, x, y) to CTrack
30 17:50 <lennon> the whole point is to find the direction to travel which has the clearest path
30 17:50 <batsman> but...
before coding
we have to think "long term"
that is, about what is happening in the next 6 hours
:)
30 17:50 <lennon> i coded it in ruby last night
30 17:50 <batsman> good
30 17:50 <lennon> i'm going to use that, until it proves too slow
30 17:50 <batsman> however, we still need something to create traces
30 17:51 <lennon> that's the "driver" class, which i kept banging my head against,
until i figured out the checkpoint scheme
30 17:51 <batsman> yes
I now have a checkpoint thing too
actually,
30 17:51 <lennon> now the driver just needs to pull the next checkpoint from its list,
30 17:51 <batsman> I wrote it sometime yesterday
when I first told here about trying to track the SP
I meant
taking points and try to reach them
30 17:52 <lennon> compare it to a longest-path algorithm,
30 17:52 <batsman> I though they could be extracted from the SP
30 17:52 <lennon> split the difference in preferred direction by some weight,
and go
30 17:52 <batsman> ok
sounds nice
cause not sophisticated
30 17:53 <lennon> speed control will have to come later
30 17:53 <batsman> no time for complicate schemes
dave is working on something I asked him
one tool to display a simulation in real time
reusing his code from game/
just take coords and info from stdin
and display it
30 17:53 <lennon> ok
30 17:53 <batsman> we can use this to evaluate traces
and debug
30 17:54 <lennon> sure
30 17:54 <batsman> plus getting control points
but vincenz' GUI would be nice here :)
he's able to go back to some point, set control points, etc
really nice
30 17:54 <lennon> well, we could always undertake another rewrite, this time in Scheme
;)
30 17:54 <batsman> :)
this is gonna be the multi-language team
half-implements the framework in one language
before switching to the next
ummm
we're the driver class
checkpoints are languages
when we get over 60% done with one
30 17:55 <vincenz> want a screenshot?
30 17:55 <batsman> we aim at the next
30 17:55 <vincenz> how do I make a screenshot in kde?
30 17:55 <lennon> lol
30 17:55 <batsman> that'd be nice :)
30 17:56 <vincenz> JNO WA
MY CAR is giong to the finish!!!
30 17:56 <batsman> !!!!
did it!
which track? 1?
you can use gimp
and "acquire"
30 17:57 <vincenz> yup
track 1
30 17:57 <batsman> good for you
30 17:59 <lennon> batsman: wait a minute!
30 18:00 <batsman> ?
30 18:00 <lennon> batsman: why not just have simulate.c generate traces as it executes?
30 18:00 <vincenz> hmm
where can I put the pick?
30 18:00 <batsman> generate traces???
30 18:00 <vincenz> pic?
30 18:00 <batsman> lennon, is our wiki open?
30 18:00 <vincenz> lennon: finally figured that out?
30 18:00 <lennon> * lennon was too damn tired last night
the wiki will be open in about 30 seconds...
30 18:01 <batsman> right now, we are passing the commands to simulate.c
something has to generate them
30 18:01 <lennon> ...and it's done
30 18:01 <batsman> nice
30 18:01 <lennon> vincenz: http://www.urusai.org/cgi-bin/cvs/icfp
30 18:01 <batsman> ok vincenz, don't laugh too much :)
at our puny attempts to do something
30 18:02 <lennon> batsman: right, so assuming something is generating them...
30 18:02 <batsman> it would save them as well, and?
30 18:02 <lennon> batsman: just let the simulator save them
right
30 18:02 <batsman> ok
30 18:02 <lennon> batsman: then, as soon as we have a strategy that works,
30 18:02 <batsman> yes
30 18:02 <lennon> batsman: we have our trace, as well
30 18:02 <batsman> "as soon as"
of course
30 18:02 <lennon> :)
30 18:03 <batsman> now, didn't we already know that before???
30 18:03 <vincenz> hmm
30 18:03 <batsman> we are still in the "as soon as ..."
30 18:03 <vincenz> attach doesn't work
30 18:03 <lennon> vincenz: is it > 100K?
30 18:03 <batsman> are u using mozilla 1.3?
the wiki is broken for mozilla 1.3
30 18:03 <lennon> vincenz: the wiki has a hard limit of 100K for attachments
batsman: and only login is broken
30 18:04 <batsman> ok
guys less than 6 H
30 18:05 <vincenz> lennon: nothing hapens when I press attach
30 18:05 <batsman> ouch, want to see your pic
30 18:05 <vincenz> just says...page loaded
30 18:05 <batsman> if we don't make it, at least *you* have to :)
30 18:05 <lennon> vincenz: are you using moz, or konq?
30 18:06 <vincenz> kong
let me open mzo
30 18:06 <batsman> vincenz: just send it to me: batsman DOT geo AT yahoo DOT com
30 18:06 <lennon> 'cause anonymous attachments are working fine for me until Safari, which is KHTML-based
30 18:06 <batsman> then I'll attach it
30 18:06 <vincenz> must be cause I'm firewalled
30 18:07 <batsman> don't spam me, though }:->
30 18:08 <vincenz> heh
I don't spam
30 18:08 <batsman> }:-)
mmm
cannot get it w/ dcc
no route to host
you're firewalled, I guess
can you send email?
30 18:10 <vincenz> wait up
kinda busy
30 18:10 <batsman> ok
30 18:14 <batsman> I wonder what happened to aleksi
he said he'b be back in 2H
some 6H ago
30 18:16 <lennon> he may well have decided to cut his losses
30 18:16 <batsman> mmmm
30 18:16 <dave> losses?
;-/
30 18:16 <batsman> but now it's 21H in his timezone
30 18:16 <lennon> of time
30 18:17 <batsman> it shouldn't be too bad to spend some 4-5 more
30 18:17 <lennon> or he had somewhere pressing to be
30 18:17 <batsman> after being here for most of the previous days
30 18:18 <lennon> indeed
30 18:18 <batsman> when we discussed F(P)=T
he said he had
F(magic)=T
and this morning he said his magic would work
shortly after quitting
dunno, perhaps he comes back with working code ???
30 18:35 <lennon> i hate it when my client idles out
30 18:39 <dave> batsman, you here?
30 18:39 <batsman> yes
30 18:40 <lennon> brb
30 18:40 <dave> I am kinda stuck with the stdin idea
because ...
30 18:40 <batsman> ?
30 18:40 <dave> when the gui app is created, the gtk event loop takes over
30 18:40 <batsman> I see, you don't want blocking things
30 18:41 <dave> so I can't sit there and listen on stdin
30 18:41 <batsman> can you have a thread
?
reading and updating x, y?
30 18:55 <batsman> guys?
30 18:55 <lennon> yes?
30 18:55 <batsman> lost my internet connection
I thought I was out
couldn't even ping my router
30 18:55 <lennon> perfect timing
30 18:56 <batsman> he
30 18:56 <lennon> okay, i'm on the last bit of a first Driver implementation
30 18:56 <batsman> ok
30 18:56 <lennon> i need an uber-simple algo to determine whether we should accelerate, coast, or brake
30 18:56 <batsman> I've written braindead.rb it's in bastard/
it just tracks the points in the SP
if you give it good points, it should get to the end
the problem is getting the points :)
30 18:57 <lennon> how does it do speed control?
30 18:57 <batsman> he
30 18:57 <lennon> and we already have the points from the SP
30 18:57 <batsman> "braindead"
speed < .1 by def
I mean
if speed > .1, brake unconditionnaly
that's why it is braindead
30 18:58 <lennon> so it uses the "old granny driver" heuristic
30 18:58 <batsman> :)
but even that way
it crashes with 0_stupid.trk
after 160 steps
30 18:58 <vincenz> you guys have any tracks you'd like th share for test?
30 18:59 <batsman> but it's fast
it crashes in .04 secs or so
30 18:59 <lennon> have you checked it in yet?
30 18:59 <batsman> yes
it's in
btw
in case my connection dies
...
30 18:59 <lennon> i don't see it
30 19:00 <batsman> should be in bastard/
no?
30 19:00 <lennon> now it showed up
30 19:00 <batsman> aim_at_point.rb and braindead.rb
no time for anything fancy
now... dave? any results w/ the gui?
we begin to have simulations to feed it
did you overcome the pb with stdin?
otherwise you can use non-blocking sockets
but it could difficult
30 19:02 <batsman> cause I always see so many postings about that in ruby-talk :)
30 19:02 <dave> I am sorta there
30 19:02 <batsman> great
30 19:02 <dave> I now get stdin being read
30 19:02 <batsman> good
30 19:02 <dave> but when I try to update the image, its blanking out entire rect regions
30 19:03 <batsman> mmm
but can we actually see anything?
30 19:03 <dave> the gui code isn't getting control to update I guess
the map displays
30 19:03 <batsman> even if it's ugly, it's good enough
just want to see how the car crashes
30 19:03 <dave> but once it reads in a position its is basically useless
30 19:04 <batsman> ok
30 19:04 <dave> no it wont get that far
30 19:06 <vincenz> WOO
smooth gui
I made a change
now it smoothly goes start-> finish
5 seconds
30 19:06 <batsman> good!
30 19:06 <vincenz> drawing is the slow part :)
30 19:07 <batsman> we still didn't get your pic
30 19:10 <batsman> ok,
fixed some shameful bugs in braindead
now it follows the sp
and doesn't crash nearly as fast
30 19:12 <lennon> i'll take a look, and see if i can't copy it for my driver class
30 19:12 <batsman> well, it's really stupid
30 19:12 <lennon> which should be a good bit more intelligent about direction-finding and speed
30 19:13 <batsman> don't think you'll see anything in my code
just wrote it for the morale
I needed something
30 19:13 <lennon> batsman: one quick question:
are you using the regular Ruby track in the driver, and the ctrack in the simulator?
30 19:14 <batsman> hehe, it crashes after over 20000 cycles "crossed the bad way"
mmm
the simulator doesn't need the track
30 19:14 <lennon> couldn't we just do it as two stages: read track, generate pointgrid, dump
30 19:14 <batsman> CSimulator only takes car and command
yes
it makes sense to dump the pointgrid, of course
30 19:15 <lennon> have you tried using ctrack in place of track as the base class for pointgrid?
30 19:15 <batsman> there was some problem with the API being different :P
30 19:15 <lennon> how so?
30 19:16 <batsman> yes
pointgrid uses @data[y][x]
30 19:16 <lennon> ah
30 19:16 <batsman> CTrack would be self[x,y]
that's all
just a matter of s/@data[y][x]/self[x,y]/g
30 19:16 <lennon> perhaps i'll change that...just so i can feel better about the time spent working on CTrack
30 19:17 <batsman> ok
30 19:18 <lennon> that was a quick change: all of 1 line
30 19:18 <batsman> ok
30 19:20 <batsman> there's something seriously broken in my code
the angle starts to oscillate from + to - PI
as it becomes too big
actually, the difference between the current orientation and the desired angle to get to the next point
30 19:23 <lennon> oops -- had to change refs to '@x_dim' and '@y_dim' to method calls
30 19:24 <batsman> ok, more shameful bugs in braindead, just don't look at it for now :P
oooo blizzard here
hope my PC doesn't die in the storm
30 19:26 <batsman> my connection could die at any time
30 19:26 <lennon> bingo!
batsman: which code?
30 19:27 <dave> k
30 19:27 <lennon> okay, well them I'm checking in my current Driver code, just so you can get it
30 19:27 <dave> I am getting nowhere, argh!
30 19:28 <lennon> okay, check out 'model/driver.rb'
i'm still filling in convenience methods, and checking apis
but i think i copied your angle-finding code, so if it's broken, it'll need to be fixed in my code, as well
ctrack is working fine in pointgrid, though
30 19:29 <batsman> ok
aha
in my angle-finding code
all references to car.whatever
have to be changed to 1.0 * car.whatever / 65536
30 19:30 <lennon> aren't converting from FPN?
30 19:30 <batsman> it's a CCar
30 19:30 <lennon> ah
30 19:30 <batsman> does no magic, just returns Fixnums
30 19:30 <lennon> right
30 19:30 <batsman> you can get CCar#state_f, though
30 19:34 <batsman> ok
got it till point #3 now :)
only some 10 more to go or so
30 19:35 <lennon> any chance i could convince you to help me with 'driver.rb', in the hopes that it could be a slightly more intelligent controller?
not that having *something* isn't a good goal, but i think my class can get there pretty quickly
30 19:36 <batsman> ok
where is it?
30 19:36 <lennon> model/driver.rb
30 19:36 <batsman> good
can I correct obvious bugs?
30 19:37 <lennon> please do
i'm writing a script to instantiate and run it right now
30 19:38 <batsman> but it's no good if we're both editing...
ok then
are you using CCar or Car
?
30 19:38 <lennon> CCar, preferably
30 19:38 <batsman> ok
30 19:40 <batsman> you use CSimulator, don't you?
30 19:40 <lennon> yep
need to populate that instance variable, too, don't i?
30 19:41 <batsman> no
CSimulator is a module
no need to instantiate
30 19:41 <lennon> ok
30 19:41 <batsman> just CSimulator.step
I'll s//// it
30 19:41 <lennon> sounds good
30 19:44 <lennon> batsman: can you change the constructor to accept the list of checkpoints as the second arg?
30 19:44 <batsman> yes
30 19:45 <lennon> oh, and we should probably put in a check for crashing somewhere in the 'drive' method loop...
:)
maybe even throw an exception if it happens
30 19:45 <batsman> actually, there's no initialize as of now, is there?
30 19:45 <lennon> so many details...
30 19:45 <batsman> what's the first arg??
the track?
30 19:45 <lennon> first arg should be track, yes
second should be checkpoints
30 19:46 <batsman> ok
ok
done
30 19:46 <lennon> cool
checked in?
30 19:46 <batsman> wait
ok
now, the logic for @should_accelerate, etc is still to be done
30 19:47 <lennon> oh, crap
did i not check that in?
30 19:48 <batsman> ...
30 19:48 <lennon> well, checkin your stuff, and i'll merge them by hand
30 19:48 <batsman> I ci already
30 19:48 <lennon> ok
30 19:49 <batsman> ooops, forgot about the check for crash in drive
sorry
30 19:49 <lennon> no problem
done now?
or should i do it?
tell you what..i'll just take care of it
30 19:51 <batsman> ok, sorry, didn't hear you
30 19:52 <lennon> actually, it looks like my somewhat naive algo for speed control did indeed get checked in before you looked at the file
30 19:52 <batsman> hi tobias
30 19:52 <tobias> hi
30 19:53 <batsman> lennon: u're right, it's small so I missed it :)
things are pretty desperate now :)
30 19:53 <tobias> supposedly
i like these moments
30 19:54 <batsman> well, we all knew it would be like that, didn't we? :)
30 19:54 <lennon> ok, fixing parse errors in 'driver.rb'
30 19:54 <tobias> when you can here time ticking out
30 19:54 <batsman> first time I realized that was perhaps 35H ago or so
30 19:54 <lennon> when the C coding began?
30 19:55 <batsman> before
when I saw that we had no clear track for F(P)=T
but I didn't know how to express that at that time
now, C killed us completely :)
30 19:56 <lennon> we're not dead yet
30 19:56 <batsman> and aleksi, who should have used his magic, disappeared
30 19:56 <lennon> just limping badly
30 19:57 <batsman> worst than that
30 19:57 <tobias> do we have a maybe bad solution by now?
30 19:57 <batsman> just take a look at vincenz
well
if bad means "which makes the car crash", yes :)
30 19:57 <tobias> :)
30 19:58 <batsman> my braindead.rb code can crash the car
before it gets to the 3 point of the track
now, that's fast
30 19:58 <tobias> anyone interested in continuing this project after the deadline?
30 19:58 <batsman> I would be
it's fun
30 19:59 <tobias> i would also be
30 19:59 <batsman> plus
I'm looking forward to the next ICFP
I'll be much better at it
30 19:59 <tobias> maybe i can even get to the level to understand the current code :)
30 19:59 <batsman> learned a great deal
tobias: the code is not impressive at all
actually
the highest level *actually working* thing we have is pointgrid
or, well, shortest_path
that's it
30 20:00 <dave> we don't have to use our code
30 20:00 <batsman> and we coded that almost 48H ago :)
30 20:00 <dave> we could learn from the other entry's and map the concepts to ruby
30 20:00 <batsman> mmmm
right
would anybody be interested in the next ICFP??
if we prepare a little before
chances would boost
30 20:01 <dave> I think most of us will be looking at the other entries that are made available, so why don't we go the next step and try to implement
30 20:01 <batsman> yes
but do you think this should be made in teamwork?
30 20:02 <dave> I plan to do the next icfp
30 20:02 <batsman> I certainly will
30 20:02 <tobias> it i would be interested to be a part time member of the next icfp team :-)
30 20:02 <dave> sure, maybe (re: teamwork)
30 20:03 <batsman> ok, but at a slower pace :)
30 20:03 <lennon> ok...almost there getting my driver class to run and generate traces
30 20:03 <vincenz> our car drives on track 1
30 20:03 <batsman> good
30 20:04 <vincenz> but the rest of the tracks actually give bugs
:/
trying to fix gui
30 20:04 <batsman> bugs?
30 20:04 <dave> hehe
30 20:04 <tobias> it drives through the whole track 1? really?
30 20:04 <batsman> yes, they did it
30 20:04 <tobias> we can participate!
30 20:05 <vincenz> ?
30 20:05 <tobias> that's a valid solution, then
30 20:05 <batsman> hey
30 20:05 <vincenz> I'm not on the ruby team
30 20:05 <batsman> tobias
he's from the scheme team
:-P
30 20:05 <tobias> oh
30 20:05 <vincenz> lol
30 20:05 <batsman> what did u think, man
:-)))))
we told u we were almost dead....
30 20:06 <tobias> :)
30 20:06 <batsman> now, only 2 things could save us
lennon's driver
or aleksi suddenly appearing with a working A* :)
30 20:07 <dave> an extention could save us too :-)
30 20:07 <batsman> he
30 20:07 <dave> or a time machine
30 20:07 <batsman> I'm no longer able to make the hard stuff
30 20:07 <dave> all of which have similar probabilities of happening
30 20:08 <batsman> I wasted my hacking power on the extensions
30 20:08 <vincenz> I need cigarettes :(
30 20:08 <batsman> I had a really productive time after lunch
30 20:08 <vincenz> ugh
30 20:08 <batsman> my first real lunch since ICFP began
30 20:08 <vincenz> i went through the night
slept betwee 1pm and 8pm my time
30 20:08 <batsman> ouch
30 20:08 <vincenz> and didn't eat yesterday and the day before (I forgot about it as I was so involved)
30 20:09 <batsman> that's *bad*
I got another lesson fron ICFP this year
sleep as much as possible
really
:)
30 20:09 <dave> vincenz: I know what thats like
30 20:10 <batsman> caffeine = good, food = better
30 20:10 <tobias> are you all 1st time icfp participants (i am, batsman just said so) ?
30 20:10 <batsman> I am
dave isn't
he participated last year
almost submitted :)
30 20:11 <tobias> wow
30 20:11 <lennon> i am
30 20:11 <dave> last year was so much easier,
similar problems too
30 20:11 <batsman> wasn't last year's in september or so?
30 20:11 <dave> we for sure would have had an entry in with all these people
auguest I think
august
30 20:12 <batsman> ok
30 20:12 <dave> this year is earlier for some reason
30 20:12 <vincenz> hI'm a 1st timer
30 20:12 <batsman> I hoped they'd start doing it every 6 months
30 20:12 <vincenz> so is the other ppll on my team
30 20:12 <tobias> the conference is earlier this year, thus the contest also
30 20:12 <vincenz> batsman_: yeah me too, except I have a job...
30 20:12 <batsman> yyes
30 20:12 <dave> I was hacking away til the end last year (by myself pretty much) and I had a working entry about an hour after the deadline
30 20:12 <vincenz> I ahd to ask for vacation today
30 20:13 <batsman> :|
and then, tomorrow you productivity will be near 0 at work
30 20:13 <vincenz> ehe
who cares
it's not a contest
just work
30 20:14 <batsman> right
well vincenz, any chances you're getting more tracks to work?
30 20:14 <vincenz> yes
the big problem is my gui
it's having problems
30 20:14 <dave> batsman_, lennon, you guys still working on things?
30 20:15 <batsman> I'm mostly seeing lennon's efforts
he's trying really hard
30 20:15 <dave> ok
30 20:15 <batsman> I'll try to help
but don't know how at the moment
30 20:16 <dave> cuz I think I am stuck with the viewer
30 20:16 <tobias> vincenz: does your solution involve humans giving hints?
30 20:16 <batsman> definitely
he's using a gui to set checkpoints
30 20:16 <dave> I don't know gdk/gtk and I am stuck
30 20:16 <vincenz> tobias: the solution involves being able to see if our things works
and for that I need a wellworking gui
30 20:17 <dave> what gui binding or you using for scheme?
30 20:17 <vincenz> mred
it's gui made in scheme
mzscheme (drscheme)
aha :)
30 20:19 <lennon> shit!
now i get a segfault!
30 20:19 <batsman> ??
segfault, where?
30 20:20 <tobias> davel: what version of gtk binding were you using?
30 20:20 <batsman> it might be my fault... extensions :-(
30 20:20 <lennon> or mine, since it looks like it's in ctrack
30 20:20 <batsman> which ones are you using?
30 20:20 <lennon> ctrack, ccar
30 20:20 <batsman> ummm
ccar should be safe
as for ctrack
30 20:20 <dave> tobias: 1.2
30 20:20 <batsman> you did a nice work w/ it, too
30 20:21 <vincenz> extensions?
30 20:21 <batsman> extensions in C for Ruby
30 20:21 <lennon> vincenz: C code
30 20:21 <vincenz> yick
30 20:21 <dave> eactly
exactly
30 20:21 <vincenz> gotta love scheme
since 72 hours
scheme is my new fave language
30 20:21 <lennon> batsman: found the segfault
30 20:21 <vincenz> winning over ocaml
30 20:21 <batsman> really?
where?
30 20:22 <vincenz> segfaults...
I feel sorry for you :/
30 20:22 <lennon> passing a float to a ctrack function that used 'FIX2INT'
30 20:22 <dave> vincenz: tried common lisp?
30 20:22 <batsman> segfaults are our fault (no pun...)
because we introduced extensions
30 20:22 <vincenz> davel: nah
30 20:23 <dave> I like lisp a lot
30 20:23 <batsman> even though they were not needed, seemingly
dave, why didn't you ci anything in list then?
our team has only used 3 languages til now
we need more
:P
30 20:24 <dave> hehe
30 20:24 <batsman> I'm still considering using my bindings to use Java from Ruby
and then write some crap in Java :P
30 20:24 <vincenz> heh
java is a bitch too
so much code for something simple
30 20:25 <batsman> yes
30 20:25 <vincenz> this other guy in uor group
had made an early version of a picker
with java
but with sisc (another scheme variant that runs inside java)
that way he could read in directly the pointlists
and write to a scheme-easy-to-read-format
30 20:26 <tobias> scheme is nice
because it does not need these #' quotes like common lisp does
and has continuations :)
30 20:27 <vincenz> yup
and you can do (varname varname)
if varname 1 points to a func
30 20:28 <batsman> what? common lisp has no continuations???
30 20:28 <tobias> yes
no
batsman: no
30 20:28 <batsman> crap, then I don't want to learn it anymore
30 20:28 <tobias> graham simulates them in onlisp
30 20:28 <vincenz> by transforming EVERYTHING to cps?
30 20:28 <tobias> so you can say you can implement them in comon lisp
30 20:29 <batsman> well, anyway, I had already chosen scheme as my lisp dialect of choice
30 20:29 <vincenz> why not just use scheme?
30 20:29 <batsman> to use some time in the future
30 20:29 <vincenz> what's commonlips got that a decent implementation of scheme doesn'?
30 20:29 <batsman> :)
30 20:29 <vincenz> lisp, not lips (that's not a freudian slip)
30 20:29 <tobias> a HUGE library
30 20:29 <vincenz> get mzscheme
30 20:29 <tobias> non-hygienic macros
30 20:29 <vincenz> besides
if the library is TOO huge, you cant' get an overview
you can do non-hygienic with scheme
I've read
though I have no idea what it means
non-hygienic sounds negative
not like something you'd want
30 20:30 <batsman> yes
30 20:30 <vincenz> what are they?
30 20:30 <batsman> introduce crap in the language :)
30 20:30 <tobias> no, it's actually more powerful than hygienic
30 20:30 <batsman> like somebody not collecting the garbage or so
I guess :)
30 20:31 <vincenz> garbage always get collected
tobias: give me an example
30 20:31 <tobias> wait...
30 20:31 <lennon> can someone look at 'geom.rb' and tell me why 'line.interpolate' would be creating points with x: -Infinity, y: Infinity
30 20:31 <vincenz> hmm
30 20:31 <lennon> i have to go smoke before i break something, like my laptop
30 20:31 <batsman> ok, I'll check
30 20:32 <tobias> (aif (some_costly_funcall returning important value)
(send it)
)
the it being defined by the aif macro
the "it" being defined by the aif macro
as the value returned by the condition arg
30 20:33 <dave> variable capture
30 20:33 <tobias> yes!
aif means ...
30 20:34 <batsman> lennon: don't know if this is the reason
lennon: but the following must be wrong:
lennon yeild traverse(t)
line 69
30 20:35 <vincenz> hmm
gui works sweet
car-algo's not
this sux
there's this one guy who works pretty well
30 20:35 <tobias> ... "anamorphic if"
30 20:35 <vincenz> but he's gone for the moment
but the thir member
who started
he's mostly idle
30 20:36 <dave> tobias, "anaphoric"
30 20:36 <vincenz> tobias: how is that different from (let ((value (slow func))) (if.....value send it
30 20:36 <tobias> yes, thats it
lesser typing
30 20:37 <vincenz> heh
30 20:37 <dave> more clear
30 20:37 <tobias> all macros are about are lesser typing
30 20:37 <dave> expressive, no clutter
30 20:37 <tobias> you could do completely without
30 20:37 <dave> and expression
no, macros can do computation at "compile-time" that you couldn't do otherwise
well you could do it at run time, but needlessly
30 20:38 <tobias> they can do at compile-time, but you always coud do it at runtime, not?
30 20:39 <dave> yeah, I meant that certain compile-time calculations could only be done with macros
30 20:40 <tobias> common lisp is my language of the year (tm)
30 20:40 <dave> this year I take it?
30 20:40 <tobias> yes of this year
30 20:40 <dave> and you're learning with graham's on lisp?
30 20:40 <batsman> is it? hey finished with haskell already?
30 20:41 <tobias> (shy) no
30 20:41 <dave> any other sources for learning lisp
30 20:41 <batsman> ah, ok, *your* language of the year
30 20:41 <dave> jim its all up to you at this point, don
don't fail us :-)
30 20:41 <batsman> jim, we're counting on you
30 20:42 <vincenz> LOL
30 20:42 <batsman> we wrote the C core as you told us to
30 20:42 <jimm_> OK. I'll finish coding everything. Just give me five minutes :-)
30 20:42 <tobias> davel: i read through touretzky's "gentle introduction"
davel: but can not recommend it.
30 20:42 <batsman> ok, we'll give you 10, but make it pretty
30 20:42 <tobias> rather, i recommend not to read it
30 20:43 <batsman> :)
30 20:43 <dave> ok, I haven't heard of it
is it that bad?
30 20:43 <tobias> it's so boring a book, probably the most boring book i've ever forced myself to finish without need
30 20:44 <dave> oh
thats bad
30 20:44 <lennon> ok, batsman, tobias, and jimm: can you look at 'geom.rb', in the 'Point#translate' method?
30 20:44 <batsman> Point#translate?
30 20:44 <lennon> Point class, translate instance method
30 20:44 <batsman> yes, I know
30 20:44 <lennon> alright
30 20:44 <batsman> I mean, wasn't the problem related to Line?
30 20:44 <lennon> for some reason,
30 20:45 <batsman> did you fix "yeild traverse(t)"?
30 20:45 <lennon> oh, that: yes
30 20:45 <batsman> ok
30 20:45 <lennon> the problem is in the Infitity coords
which Point#translate is generating
30 20:45 <tobias> yes
30 20:46 <lennon> now the question is, why, with reasonable inputs, would that happen?
for example:
30 20:46 <dave> what inputs?
30 20:47 <batsman> what are your storing in @», CFixed?
30 20:47 <lennon> right now, it's crashing on Point<2.0, 6.0>.translate(94.0, -2.0)
30 20:47 <batsman> @x
30 20:47 <lennon> should all be floats
30 20:47 <jimm_> I loaded 'geom.rb' into irb, and did "Point.new(2.0, 6.0).translate(94.0, -2.0)". No crash.
30 20:48 <lennon> damn
30 20:48 <tobias> works fine for me too
30 20:48 <lennon> okay, so there's probably a fixed, or something, creeping in there
30 20:48 <tobias> irb(main):003:0> Point.new(2.0, 6.0).translate(94.0, -2.0)
=> #<Point:0x402a2358 @x=96.0, @y=4.0>
30 20:48 <lennon> try running 'ruby tools/drive_course.rb'
after an update
30 20:48 <jimm_> Are you passing a fixed into Point.new or translate?
30 20:48 <batsman> works for me too
30 20:48 <lennon> you'll get debugging output on the console
30 20:48 <vincenz> woo
I almost got through track 7
30 20:48 <batsman> wow
30 20:48 <lennon> jimm: I'm passing floats
30 20:49 <jimm_> lennon: ~/src/icfp> ruby tools/drive_course.rb Syntax: ruby tools/drive_course.rb <track>
lennon: never mind
30 20:49 <lennon> jimm: sorry, you have to give it a track filename
30 20:49 <batsman> for me it's worse
batsman@tux-chan:~/src/icfp/icfp$ ruby tools/drive_course.rb
./model/driver.rb:110: warning: crash? (...) interpreted as method call
tools/drive_course.rb:5:in `require': ./model/driver.rb:122: syntax error (SyntaxError)
<<<<<<< driver.rb
^
./model/driver.rb:124: syntax error
=======
^
just did an update right now
30 20:50 <lennon> batsman: you must have had a conflict -- the <<<<<< stuff is CVS's fault
30 20:50 <jimm_> lennon: it's chugging away for me (I'm trying 5_Car.trk)
30 20:50 <batsman> you're right, stupid of mine
30 20:50 <jimm_> lennon: ... still chugging away ...
30 20:51 <lennon> jimm: it'll probably do that for a while...
30 20:51 <jimm_> OK
30 20:51 <lennon> ...or maybe forever, if i've really screwed it all up
30 20:51 <batsman> it fails for me with 0_stupid.trk
30 20:51 <lennon> at least the memory consumption seems reasonably stable
0_stupid.trk is the one that caused the crash for me
30 20:51 <batsman> it's because it's small
30 20:51 <jimm_> I'll start up a second run on 0_stupid.trk
30 20:52 <batsman> pointgrid ends fast
and then processing begins and the thing crashes
30 20:52 <lennon> batsman: but i rean pointgrid on several of the non-trivial maps,
30 20:52 <batsman> now it died for 5 too
30 20:52 <jimm_> lennon: 0_stupid.trk fails with "./model/driver.rb:41:in `to_i': Infinity (FloatDomainError)"
30 20:52 <lennon> batsman: and it finished much more quickly than this
30 20:52 <tobias> ./model/driver.rb:41:in `to_i': -Infinity (FloatDomainError)
30 20:53 <lennon> all: so, now you see where the bug is happening
30 20:53 <tobias> ok
30 20:54 <jimm_> lennon: same failure wity track 5_Car.trk
30 20:54 <lennon> both times, it's in Line#interpolate, which calls Point#interpolate repeatedly,
i just got the failure on 1_Simple.trk, too
30 20:54 <tobias> do you use Vector#apply_to? thers a bug in that method
ah yes, you use it
30 20:55 <lennon> tobias: yes, I do, in Vector#line_to
30 20:55 <tobias> the orig parameter is unused
30 20:55 <lennon> right
i'll fix it
30 20:56 <tobias> x=orig+... i suppose
30 20:56 <vincenz> heh
*crosses his fingers*
let's hope we can fix our algo to clear the other tracks
30 20:58 <batsman> I got it!
30 20:58 <lennon> batsman: do tell
30 20:58 <batsman> this is broken:
steps.times do |i|
t = 1.0 / i
it divides by 0
30 20:58 <lennon> * lennon feel dumb
30 20:59 <batsman> guess it should be 1.0 * i / steps
sorry I didn't see it before
yeild caught my attention and I didn't read the code around :P
lennon: I've been quite useless for the last couple hours
30 21:01 <batsman> lennon: but I have decided I will die coding
lennon: anything I can do to help you?
30 21:02 <lennon> batsman: just continuing to debug -- i'll re-checkin in a moment
30 21:04 <lennon> batsman: i'm thinking we may have performance issues with this code...
30 21:04 <batsman> really...
30 21:04 <lennon> ...running it over 0_simple.trk is taking *waaaay* too long
30 21:05 <batsman> cannot believe it
0_simple is around 10x10
30 21:05 <dave> 655350x655350
30 21:06 <lennon> alright, time to start looking for quick optimizations
30 21:06 <batsman> ok
30 21:06 <lennon> just checked in the latest versions
which run without errors, but for too long
30 21:07 <aleksi> hello
how are we doing?
30 21:07 <batsman> hi aleksi
what happened?
we wanted your magic :)
30 21:07 <tobias> A* finished?
30 21:07 <batsman> ......
30 21:07 <aleksi> I've done naive solution and watched why it didn't work
30 21:08 <batsman> yes, did you bring in the code... ? :)
30 21:08 <aleksi> now I have the magic ready, but there's no hope I can do it to the deadline by myself
30 21:08 <batsman> there's 3 hours
30 21:08 <dave> oh so its a final lap push?
30 21:08 <batsman> you have the C core working
30 21:08 <aleksi> so if you guys are out of hope on your own solution, maybe we shold collaborative try this
30 21:08 <tobias> t-peters@Aldi:~/icfp03/icfp$ ruby tools/drive_course.rb test/data/1_Simple.trk
./model/driver.rb:86:in `check_safe_speed': undefined method `>' for nil (NameError)
from ./model/driver.rb:113:in `drive'
from tools/drive_course.rb:35
30 21:08 <aleksi> http://www.cs.helsinki.fi/u/kaniemel/heuristics_explanation.html
while you're reading it, I commit the naive to the cvs
30 21:09 <batsman> well a