All times are UTC. 28 04:11 For the 2*PI point, good notice! 28 04:11 I just started the logging 28 04:11 i can also just leave my irc client running, and save the log again when i get back 28 04:12 well unless my machine crashed, I got everything under control 28 04:12 cool i'll be back in 2-3 hours, fed and watered and ready to go 28 04:13 ok, I should be here 28 04:13 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 ok seeya 28 04:16 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 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 Good. Well I'll be ... my ruby didn't include Test::Unit. 28 04:22 I know, I guess its in 1.8 by default 28 04:25 * daniel__ peers at ruby1.8 in Debian unstable and wonders if he should grab it 28 04:25 modules are gone 28 04:45 rudimentary checks pass now for my fixed point class 28 04:51 yer still up? 28 04:52 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 I won't mind just check what you're dropping that it's ok and really working 28 04:53 of course 28 04:53 if this class fails we're tracking bugs for the rest of the weekend 28 04:57 who all is using emacs? ruby-mode ? 28 04:57 me 28 04:57 I am, sometimes. 28 04:59 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 you speak like a guru :) 28 05:00 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 good question, probably just -() ?? 28 05:02 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 Ok. I'm also cleaning up the way you treat Float's and FixNum's differently. 28 05:10 well, you have the tests to back you up, so go for it 28 05:13 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 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 Isn't it just ==? Rather, == 28 05:24 yes == 28 05:25 should we really indent up to 4? I've always seen ruby code with 2 indentation 28 05:25 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 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 daniel_, which files are you editing? 28 05:30 damn, after I checked in the indent changes I thought that might happen 28 05:31 constants.rb and units.rb 28 05:31 should I rollback the changes so you can check your code in, how big are you changes? are you using emacs? 28 05:31 So what do I do here - how do I merge changes together? 28 05:31 anyway, you take copy of your editings (cp foobar.rb foobar_daniel_before_merge.rb) then say cvs update 28 05:31 hello, how are things doing? 28 05:31 Oh how awful. That's really what you do? Ok. 28 05:31 wait have you tried checking them in yet? 28 05:32 then open up merged foo.rb, go manually through the code and merge by hand all <<< ... --- ... >>> dot areas 28 05:32 wait :-) 28 05:32 then ci in your newly manually merged version 28 05:32 you dont have to do it that waty 28 05:32 if everything went well you can then delete the backup 28 05:32 daniel__: what changes 28 05:33 ncheels: never mind. I've got a way to do it. 28 05:33 ok .. 28 05:34 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 yes read the contest 28 05:35 ok, so get in speed, take the code and start whereever you want 28 05:35 and just sent an email to get access to CVS 28 05:35 daniel__: you did the png's right? 28 05:35 for example lots of FixedPoint tests should and could be made 28 05:35 batsman: that guy is away for a bit 28 05:35 I did. 28 05:36 sorry for being soo late, but I thought sleep deprivation wouldn't help in the long run 28 05:36 daniel__: ok, how can I find the starting point? batsman: where are you (geographically)? 28 05:36 Stuttgart 28 05:36 Ah. That. Well, it's a single gray dot... 28 05:36 uh, what country is that in :-) daniel__: can you make the dot bigger? 28 05:37 Not easily. I think.... hrm. Maybe... 28 05:37 maybe make it white or yellow or some other colour that might stick out more not easy, dont worry 28 05:37 Germany 28 05:38 batsman: ok cool 28 05:38 Okay, done. We now have a passable FPN implementation in units.rb 28 05:38 I am in calgary canada, I have never left the continent 28 05:39 Wieviel Uhr ist es jetzt bei Ihr? 28 05:39 hehe 7:39 in my localtime. BTW my language of choice for communicating here is still English :-P 28 05:39 Though someone could still add comparison functions... 'kay. My German is a bit rusty anyway. 28 05:40 mine too :-) 28 05:40 mine too, which is quite shameful :) being here at the moment... 28 05:41 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 I'm a little stuck at the moment, w/o CVS access 28 05:42 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 I'll just give my password 28 05:43 thanks 28 05:43 I can change it when lennon gets back, anybody oppose? 28 05:43 batsman DOT get AT yahoo DOT com 28 05:43 ok 28 05:43 ncheels, even better idea! this phase is pretty hectic as we're setting up infrastructure 28 05:44 so whats with the -@ method 28 05:44 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 I haven't seen that before 28 05:44 do it 28 05:44 is it for unary - ? I have been off and on working on a simple first run path finder 28 05:45 ok, just def @-(); FixedPoint.new(-@fp); end; 28 05:46 batsman: mail was sent 28 05:46 is there any change we might make it into the lightning division? 28 05:46 ok aleksi_ I see it now in the Numeric class batsman: maybe ! 28 05:47 thanks 28 05:47 umm, t c=just bounced oops, the mail bounced I meant to say batsman.get (AT) yahoo (DOT) com ? 28 05:48 s/get/geo/ 28 05:48 oh 28 05:48 I'm stupid sorry 28 05:48 no prob check - your mail 28 05:49 gonna take some caffeine, this is no good. Making typos so early :-P ok got it thanks 28 05:49 k 28 05:49 will check out and review the code for a while 28 05:50 dont let it take a while, its not that stable its just forming 28 05:50 ok 28 05:50 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 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 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 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 I'm used to 4 28 05:54 batsman: do you use emacs 28 05:54 vim 28 05:54 its only emacs specific indentation we're figuring out 28 05:54 ok, let's keep it that way 28 05:54 tabstop=4 shiftwidth=4 28 05:54 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 batsman: correct 28 05:55 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 uh ok 28 05:56 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 I haven't looked at lennon's code at all 28 05:56 * daniel__ wanders away towards bed 28 05:56 Daniel, I have that almost ready already, but it hasnt' been tested yet. 28 05:56 I think he's gone Trace looks straight forward 28 06:00 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 yeah, I noticed, but its good to comment 28 06:02 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 what are you wondering about? 28 06:03 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 you can't do alraabl. 28 06:05 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 thats too many I dont get you hang on 28 06:06 "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 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 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 k 28 06:08 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 So I naturally established that you can combine the commands as you wish. 28 06:11 Een.trc is for the rally racing, which you can do more types of movement 28 06:11 the code on page 3 is then If("accelerate") -> if(command =~ /a/) in ruby, isn't it 28 06:11 xa is for rally traces 28 06:11 ncheels, ah, ok, thanks for that too 28 06:13 yeah x signifies the start of a rally race 28 06:22 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 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 ok. switching to xchat, back in a minute 28 06:28 back w/ xchat ok, I've read through the code. Anything you want me to work on? 28 06:29 anything you want to do? that you see needs doing? 28 06:30 well 28 06:30 I'd like to see more and more thorough tests 28 06:30 I think I'll just add more tests for the moment 28 06:30 especially for fixnum 28 06:31 gut :) 28 06:31 :) 28 06:33 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 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 well the initialize could be sped up 28 06:40 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 uh, debugger won't stop to a row I state 28 06:41 you mean a line? which debugger? 28 06:41 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 what does it do? strange 28 07:21 is there a ruby linked list implementation? 28 07:24 nope, but where would you need it? 28 07:26 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 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 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 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 i am too tired to parse all that :-) 28 07:34 well, I believe it is rounding incorrectly negative numbers 28 07:34 it's a feature :) 28 07:34 ok, fix it :-) 28 07:34 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 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 I noticed something strange in irb 28 07:37 what? 28 07:37 irb(main):019:0* -8 / 3 => -3 irb(main):020:0> - ( 8 / 3) => -2 28 07:37 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 yeah programming languages seem to diverge on it 28 07:38 -8/3 -> -2.66, which to_i or floor presses to -3 28 07:38 the second one is the right one for the contest 28 07:38 -(8/3) -> -(2.66.to_i) -> -(2) -> -2 28 07:38 I believe that's the source of the bug 28 07:38 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 anyway I can cvs ci some unit tests, right? 28 07:41 I hope you don't mess up aleksi*.rb or associated test, but you're free to mess up model/* 28 07:41 A?? A?? I've just added a few lines in fixed_point_test.rb 28 07:41 it's all ok, I just have to merge 28 07:42 thought that eventually we'd just do s/FixedPoint/FPN/g and take it 28 07:42 and I secretly wish I can delegate the merging for someone else :) batsman, yes we will, and dash my code simultaneously :) 28 07:43 is the merging messy? is it cause of my indent changes? 28 07:43 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 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 I just did ci it's just adding some lines shouldn't conflict (I hope) 28 07:49 ok, no conflict, easy piece ok, checked in now we swap with tobias 28 07:50 hi folks sorry could not make it on midnight gmt 28 07:50 good, I'm updating hi 28 07:50 he's well slept and I'll go to bed so next steps include something like: 28 07:51 perhaps it's a good time to sum up 28 07:51 i have read the task now 28 07:51 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 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 what infrastructure? Do you have an irc log somewhere? 28 07:53 I am working on a Navigator, (path solver) very basic 28 07:53 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 tobias: no log AFAIK maybe we can reuse last year's path finder? the one used for the robot thing 28 07:54 the goal should be to have viable entry for the lightning portion GMT-0 today 28 07:55 there is one log for earlier, that lennon was gonna put online, dont know if he did 28 07:55 instead of writing from scratch... 28 07:55 I have a log since that initial point batsman: where is it? 28 07:55 have to look up the links 28 07:55 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 tobias, now your questions: with infrastructure I mean fixedpoint calculation, and basic class for the simulation (track, trace and Simulator 28 07:57 yes, we need the arithmetics 28 07:58 all that is ready in a primitive form, accompanied with tests ncheels is pursuing on simple planner 28 07:58 found the following in last's year ICFP wiki node: http://www.gameai.com/software.html 28 07:58 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 i see a file fixed-points-test.rb. The arithmetics itself is in aleksi_first_idea.rb? 28 07:59 right now some part we have two branches of FPN 28 08:00 other one could do more advanced planner, or help ncheels direcly 28 08:00 i have only little time right now -- one kid sleeps, the other is away with mom 28 08:00 the one in aleksi_first_idea.rb, called FixedPoint the other if FPN in units.rb 28 08:00 Hi guys. 28 08:00 tobias, batsman has it right. The real sources are ending up under model directory 28 08:00 How can I have acces to CVS? 28 08:01 normally, the unit tests for FixedPoint should work w/ FPN, by doing s/FixedPoint/FPN/g well 28 08:01 root/aleksi_first_idea and fixed_point_test.rb are my initial versions to be migrated. hello gus 28 08:01 Hi aleksi_ 28 08:01 you can have access as soon as lennon gets back (couple of hours he said) 28 08:01 gus: you've got to send an email to ['lennon', ['com', 'day-reynolds'].reverse.join('.')].join('@') in the mean time 28 08:02 gus: its all on the wiki page 28 08:02 I did send an email, about 4 hours ago 28 08:02 but even before we can loan you access, I guess ncheels would fill you in 28 08:02 somebody gave me his passwd 28 08:02 I personaly just woke up (4:02 am) 28 08:02 thanks guys for the first night, I'm sure you'll go forward during my absence 28 08:03 thanks aleksi for your work! 28 08:03 see ya in 6-11 hours 28 08:03 see ya 28 08:03 i will be there in 11 hours 28 08:03 thanks aleksi_ 28 08:04 Okay, what do people think of +http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=PathStrategies 28 08:04 2:04am here :-) 28 08:04 i can also just leave my irc client running, and save the log again +when i get back 28 08:05 I have logs since lennon lefty 28 08:05 cu aleksi_, thanks for everything 28 08:06 gus: want my password? I already gave it to batsman, why stop now :-) 28 08:07 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 ncheels: yes I do 28 08:08 we may even look further than just to the nearest neighbours 28 08:08 Somebody said everything is on the wiki Where? 28 08:08 not my password I will email it, whats your email? 28 08:09 guillaume.marcais@free.fr 28 08:09 i said this. i wa in error. i thought you had not mailed lennon. 28 08:09 wiki is at http://www.urusai.org/cgi-bin/cvs/icfp/wiki email is sent 28 08:11 ok, I'd like to plan things we have aleksi_ sleeping for 6-11 hours, tobias out for 11H 28 08:12 begin yes 28 08:12 Thanks 28 08:12 so right now that's GnuVince, gus, ncheels and me we will soon have lennon back 28 08:13 I guess 28 08:13 ncheels is working on the path strategy, ncheels in the "official" structure GnuVince: what are you doing? 28 08:14 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 we need to know who's working _now_ to organize efforts 28 08:15 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 ncheels: are you planning to sleep? 28 08:17 planning on it, yeah but not within the next little bit 28 08:17 jtra: hallo?? 28 08:17 I like the idea of discussion, looking where we are at, deciding where to go next 28 08:18 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 dont worry, I am not going away 28 08:18 no thats it. 28 08:18 lol I think gus is prob getting initialize'd I just sent my user/pass for him to get cvs access 28 08:19 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 I guess its me an you yer in the eastern tz ? no, yer in germany :-) 28 08:20 Yeah, trying to catch up 28 08:20 some place I never heard of 28 08:20 I got CVS 28 08:20 ncheels: lol 28 08:20 I am looking at it and the path strategy 28 08:20 ok I can merge aleksi_'s work in the main branch 28 08:21 batsman: how do you have aleksi_'s work? 28 08:21 modify some things so that tests run out of the box 28 08:21 gus: png versions of the maps can be found at http://snowplow.org/martin/trkpngs/ kl k 28 08:22 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 yes its in there 28 08:23 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 my kid wakes up anytime, i have to leave then 28 08:24 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 ok so if I got it right 28 08:24 what about the walls 28 08:24 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 tobias: the A* won't go over the walls, they are impassible 28 08:25 it's better to have a longer path _if_ it allows greater speed 28 08:26 yes, but do we have to change the cell values to avoid wall crashes 28 08:26 no it doesnt take into account speed, we will figure out how to attain top possible speed at every given step 28 08:26 but then this complicates the thing a lot as the shortest path in distance is not the sortest in time... 28 08:26 true 28 08:26 correct 28 08:26 but it should be the next easiest milestone 28 08:27 however, the winning criteria are 1) number of tracks solved 2) time 3) solving rally circuit 4) time for rally 28 08:27 3) is a completely different problem, 28 08:27 in 1 and 3, "solve" means complete the track w/o running on the walls 28 08:27 mor, rather, a superset 28 08:28 yep 28 08:28 so we have to be *absolutely* sure we won't hit them 28 08:28 yes 28 08:28 even some lame path will be better than a bad one 28 08:29 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 so ncheels' navigator.rb is a good fall-back if the "optimum" thing doesn't work 28 08:29 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 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 ok 28 08:32 in case anyone is wonder, ncheels == NC Tar Heels :-) brb gotta try to get a thrid IP from my ISP 28 08:32 what about doing some lame paths by hand? 28 08:33 perhaps some human-aided path search 28 08:40 I am getting a bit tired ... 28 08:41 well well then I'll be the only one active (w/ gus perhaps) for a while 28 08:41 Does anybody have a tool to generate png or else from tracks 28 08:41 yes!! 28 08:41 Beside the website 28 08:41 its in cvs 28 08:41 Oops 28 08:41 it generates xpm 28 08:41 Haven't look in great details yet 28 08:42 whats wrong with the website? 28 08:42 in the website is does tracks FROM png in the cvs we do XPM FROM tracks 28 08:42 Cool 28 08:43 we can use our tool to take a look at the tracks then make paths by hand 28 08:43 nice tracks, really 28 08:43 I am not convinced following the shortest path will be any fast solution 28 08:43 http://snowplow.org/martin/trkpngs/ 28 08:43 and submit those if needed 28 08:43 gus: I agree but its prob an easy milestone to get to 28 08:44 yes. maybe try to find paths with long straights 28 08:44 gus: we all agree, but this is a good fall-back alg. 28 08:44 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 wish you a good time folks, have to disconnect now. will be back approx. 19:00 GMT 28 08:45 I choose the best paths found out of the bunch we looked at 28 08:46 http://snowplow.org/martin/trkpngs/7_Gothenburg.png is a nightmare!!! 28 08:46 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 tracks 7, 8 and 9 are crazy! 28 08:47 Any thoughts? 28 08:47 well ony many of the tracks you have to go the other way batsman: yes crazy tracks 28 08:48 if we solve them, by hand or otherwise, we have chances :) 28 08:49 I have a question: 28 08:49 Well, if you take the shortest path as a reference path Give it a direction 28 08:49 is the "time" taken to finish a ttack, the number of steps you take 28 08:50 I believe so what else??? certainly not computation time 28 08:50 The projection of your position on this line must always increase Otherwise, weed 28 08:51 ummm, so projecting into that line and taking only positive increments seems nice 28 08:52 what do you mean by projection? vector projection? 28 08:52 kinda what about the following: make the shortest path each point on that line 28 08:53 Yes, vector projection 28 08:53 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 has got a coordinate in that curvilinear ref. system then from a given car pos. 28 08:53 That is why you have to weed your tree in a "smart" way 28 08:53 so what you have to do is use heuristiscs to trim the branches, 28 08:53 we find the point the the highest coordinate 28 08:54 I guess thats what we're all talking about 28 08:54 that can be reached from the current position going straight and aim for it 28 08:54 what do you mean highest? 28 08:54 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 path == shortest path 28 08:55 select the one with the highest coordinate and aim for it 28 08:55 Or the path we follow at this time 28 08:56 repeat path = shortest path what do you think? 28 08:56 I think these ideas need to be expressed on a non-irc medium ... 28 08:56 That means you stick to the shortest path 28 08:56 where? in the wiki? 28 08:56 ok :-) 28 08:57 You might not even be able to follow the shortest path 28 08:57 sure, the shortest path can be followed 28 08:57 gus: mostly 28 08:57 it wouldn't be a path if you couldn't follow it SP belongs to the set of all possible paths 28 08:57 No, because you have inertia 28 08:57 but it indicates what to do if your actual path is not the shortest path 28 08:58 If the SP makes a sharp angle 28 08:58 I am talking driving paths, not physical coordinate paths 28 08:58 You cannot follow that with your car 28 08:58 you're of course right 28 08:58 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 I think you can the simulator does 28 08:59 you can "l" which is roll and turn left or "r" for right 28 08:59 OK 28 08:59 but you will still go forward some 28 08:59 if("turn left") d -= div(T, v*v + L) yes you move _but_ you can turn without moving, too 28 09:00 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 ? 28 09:01 you have to have v>0 in order to turn, I think ? 28 09:01 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 yes yes d can change but very fractionally 28 09:02 you can do l. and r., and the model will update d even if v = 0 28 09:02 64/20000 28 09:03 True, you can turn without moving 28 09:03 emmm 28 09:03 which is a huge time waster, we shouldn't be going so fast uncontrllably in the first place 28 09:03 But I doubt an optimal solution would 28 09:03 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 Yes, I believe so 28 09:04 haha, yep 28 09:05 Do you already have an alg to get the SP In drawable sens ? 28 09:06 in drawable sense? 28 09:06 Or implementation? 28 09:06 A* ? 28 09:06 does navigator.rb do that? 28 09:06 What is A* 28 09:06 the code seems too neat and nice :-) 28 09:06 ? 28 09:06 navigator.rb find the first possible path, could be anything :-) 28 09:06 ok 28 09:06 http://www.ccg.leeds.ac.uk/james/aStar if you can do applets, that will be your visual 28 09:08 it's like dynamic programming, isn't it?? 28 09:08 yes 28 09:09 Do we have a ruby implementation of A*? 28 09:10 someone was saying there was one from last years icfp contest 28 09:10 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 Yep! But we don't even need it in ruby But it would be nice :) 28 09:13 if we have to hack it, it's better if lang == ruby 28 09:13 Agreed But if we can steal it It can be anything 28 09:13 http://www.gameai.com/software.html 28 09:13 As long as we can interface with it nicely 28 09:14 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 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 yes, that's quite more complicated because of the state (velocity = speed + direction) 28 09:18 I am going back to my brut force solution 28 09:19 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 We use the A* track a general direction 28 09:19 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 format == trace the same trace we need to submit 28 09:20 then we can run them all and take the fastest 28 09:20 Sounds great! 28 09:20 you're right, we feed that to the simulator and check everything 28 09:21 Who is tackling A* implementation? 28 09:21 ncheels 28 09:21 I guess ... 28 09:21 You got volonteered :) 28 09:22 yep 28 09:23 I'm back in 10 minutes 28 09:23 k 28 09:24 I look at my solution, given that we already have the SP. 28 09:24 k 28 09:30 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 hi again tobias: summary of activity we've been discussing on the path finding algo 28 09:33 ok 28 09:33 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 ok 28 09:34 I'm now going to take a shower, I'm back in 10 minutes ready for deep hack mode 28 09:34 but we need the arithmetics fixed 28 09:34 I'll try to clean the code base and unify aleksi_'s work yes!!! 28 09:34 very good 28 09:34 we have to merge FixedPoint into FPN 28 09:34 I am gonna have to sleep RSN 28 09:35 change some more things etc ok 28 09:35 i'll try implement unit tests against FPN 28 09:35 ummm tobias, you can reuse most of the tests for FixedPoint 28 09:35 yes 28 09:35 just s/FixedPoint/FPN/g 28 09:35 i'll add some to show the current bugs 28 09:35 great you can put that in test/ say, test/test_fpn.rb 28 09:36 ok, i'll add it there 28 09:36 good 28 09:36 have a nice shower 28 09:36 in 10mins, I'm going to merge aleksi's code w/ the main branch cu have a nice sleep, ncheels 28 09:37 thanks 28 09:37 (back in 10 mins) 28 09:37 Has anybody worked on car.rb implementation? 28 09:37 no 28 09:38 I'll work on it Baby is crying !! I'll be back 28 09:45 ok, I'm back 28 09:46 I am working on car.rb 28 09:47 I am still going, still thinking ;-) its a tough problem 28 09:49 crap, its almost 10h 28 09:51 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 I knwo, little code 28 10:01 nap time 28 10:01 have a good sleep 28 10:01 I will put the recent irc logs at ... someone wanna start recording? 28 10:01 me can't 28 10:02 ummm, if you tell me how to do that in Xchat :-P 28 10:02 batsman is showering? 28 10:02 I'm no IRCer 28 10:02 settings > preferences 28 10:02 batsman: I've checked in test/test_fpn.rb 28 10:02 chatting > logging 28 10:02 good ok, done 28 10:03 the first three tests show the current bugs 28 10:03 batsman: yer logging now? 28 10:03 actually I enable logging some time ago, I forgot :P where do the logs go? $HOME? 28 10:03 .xchat/xchatlogs 28 10:03 ok I've been logging since Jun 28 08:28:07 (local time zone) 28 10:04 the rest are converted from fixed_point_test.rb 28 10:04 that's GMT 06:28 ok 28 10:05 some of these fail on the "units.rb" implementation -- have not looked further till evening, then 28 10:06 ok ncheels, have a nice sleep 28 10:07 batsman: thanks, my logs are at http://cherryville.org/rubyicfp-jun27-04:11:11-10:04:43.log 28 10:08 till later 28 10:08 I'll prob sleep for 3-4h we'll see 28 10:38 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 I am still here I'll update your change 28 10:41 ok 28 10:41 I wrote on my side car.rb But there is not much beside getting the next pos given a command 28 10:42 wait a sec that's what model/simulator.rb does, isn't it??? model/simulator.rb is just aleksi's code 28 10:42 Dunno 28 10:43 simulator takes the current pos & speed, and simulates one time step using the eqs. in page 3 28 10:43 I don't have model/simulator.rb!!! Is it in CVS? 28 10:44 yes right now I just moved the code from aleksi's to model/ as I told you :P 28 10:46 OK, does what I did What's the purppose of car.rb then? 28 10:46 dunno I didn't create it in the first place :-P 28 10:46 I think it doesn't belong in here any more then 28 10:47 is your implementation very different from aleksi's? perhaps we could run both 28 10:47 No, very simular 28 10:47 and compare results 28 10:48 Maybe it makes sens to take the step part out of the simulator and put it in car.rb 28 10:48 do you think so? 28 10:48 We should have two cars: a non-slidding one and a sliding one 28 10:48 simulator uses the track as I see it that'd be two different simulators class RallySimulator < Simulator and modify RallySimulator#step 28 10:49 Well, it is the same track for both standard and rally Simulator get a track and a car 28 10:50 yes, and??? 28 10:50 And runs each step until a crash or finish line class Car; end; class RalltyCar < Car; end No? 28 10:51 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 I see your point 28 10:53 umm, news from the ICFP organizers Correction published to rally model hi lennon 28 10:53 Hi lennon 28 10:53 hello don't let me interrupt 28 10:53 Good sleep? 28 10:53 no sleep night from hell 28 10:53 :-? 28 10:54 i was one of two designated drivers for a group of 15 people celebrating someone's 21st birthday 28 10:54 !!!! 28 10:54 Ouch! 28 10:54 and the other one went home at 12:15am 28 10:54 Is your brain functional? 28 10:54 sure i'm putting some coffee on 28 10:55 Or bathing in untold liquids? 28 10:55 really? mine wouldn't be :P 28 10:55 it's the one perk of not drinking for the whole night 28 10:55 what time is it in your timezone? 28 10:55 ~4am GMT-7 28 10:55 ouch 28 10:56 i tend to be up for 24 hours or so at a stretch, though... 28 10:56 I woke up at 3:20 am 28 10:56 it's 12:55 here, GMT+2 in Germany 28 10:56 :) 28 10:56 ...the fireman's rotation, as i like to think of it 28 10:56 we'll have people coming in around 5 hours aleksi & ncheels are sleeping now tobias should join by 18H GMT 28 10:57 Batsman: so the Car is the "brain" class for you? 28 10:57 maybe I expected somebody to give me an idea of the bigger picture 28 10:58 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 but as I've been for quite some time here I guess I have to decide on my own :) 28 10:58 but then again, i probably don't have much of an idea of the "big picture" any more 28 10:58 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 i'm browsing it right now looks like the cvstrac install is going to do me some good after all ;) 28 11:00 it's a nice thing, thanks 28 11:00 I don't have the big picture either 28 11:00 BTW 28 11:00 well, i still need to post the IRC logs from the first few hours of discussion 28 11:00 we're all using ncheels login/pw with CVS :-) 28 11:00 i was just about to ask about that 28 11:01 I sent an email to you earlier today 28 11:01 you have some logs at http://cherryville.org/rubyicfp-jun27-04:11:11-10:04:43.log 28 11:01 12:00am GMT-4 28 11:01 hmm... that's not from me 28 11:01 I sent mine at 7am GMT+2 (05::05 GMT) 28 11:01 i've got the first four hours 28 11:01 I know, it's ncheels' 28 11:02 which should have some of the "big picture", if anyone's still missing pieces 28 11:02 IRC logs are painful to parse 28 11:02 i was going to do raw text for now 28 11:02 as I see it the architects of the "big picture" are mostly gone now (all of them but you, lennon) 28 11:03 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 and I don't know how precise their idea was... 28 11:03 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 we shouldn't then worry too much about looking for things in the IRC logs 28 11:04 and spent a lot of time doing fixed point math implementation 28 11:04 ok 28 11:04 Entirely too much time. *sigh* 28 11:04 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 Are you finishing the clean up of FPN? 28 11:05 gus: may i presume you're guillaume? 28 11:05 Yes 28 11:05 who emailed earlier? ok 28 11:05 gus: actually, it was essentially the same as aleksi's 28 11:05 i'm setting up your cvs account now 28 11:05 could you set up mine, too? :-) 28 11:05 you're next 28 11:05 thanks 28 11:05 did you email me, too? 28 11:06 yes, I'm batsman DOT geo AT yahoo DOT com 28 11:06 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 ok doing it 28 11:08 So who's fixing FPN? I'm just saying that I'll start doing it if no one else is. 28 11:08 of 28 11:08 is that a critical issue right now? 28 11:08 ok by me 28 11:08 That's your EMail, right? ['lennon', ['com', 'day-reynolds'].reverse.join('.')].join('@') 28 11:08 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 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 by "functional", do you mean complete interface coverage? or just an initial useful bit of code? 28 11:11 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 I am going to start a brute force approach I'll create a new directory in CVS 28 11:12 daniel: there's quite a few cases that fail name? 28 11:13 batsman: your account is active 28 11:13 thanks 28 11:13 gus: i just got your email, so it'll be about 60 seconds 28 11:13 I am, and I've gotten the cases down to 4 fails. 28 11:13 good be sure to ci ASAP :) 28 11:13 force? I'll rely an A*, that ncheels is suppose to right 28 11:14 mmmm, have you read navigate.rb? s/navigate/navigator/ 28 11:14 Actually, no! 28 11:14 gus: your account is up, too 28 11:14 Thanks 28 11:15 what's this i see: linked lists? has someone been reading "Teach Yourself Scheme in Fixnum Days" lately? 28 11:16 that's ncheels algo 28 11:16 * daniel has. 28 11:16 cause??? does it have a working A*? 28 11:17 However, I'm not responsible for ncheels's stuff. 28 11:17 does anyone know if he had a reason for using cons cells, instead of arrays? 28 11:17 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 I'll check it 28 11:18 I thought we still didn't have a A* implementation yet I am not sure of what navigate.rb does yet 28 11:19 it looks like basically a path-finding package with support classes 28 11:19 it's not A*, just something that creates one valid path 28 11:19 right now, it's just doing a naive pass 28 11:19 not the optimum, or anything, if I got it right 28 11:19 not even close to optimum it might find solutions to some of the courses in bounded time 28 11:22 if i'm reading it correctly, of course and the coffee's still brewing, so no promises ;) 28 11:22 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 :) 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 If we all the tools, we can share the load 28 11:24 my main machine is a K7 at 1.7GHz, 512MB RAM 28 11:24 i've got an 800mhz g4, and a 500mhz PIII -- nothing too speedy 28 11:24 G4 533 128Mb If I cheat, I can get a double Xeon 2Ghz Just don't tell my boss! 28 11:25 do you mean at the end, when it's all finished? 28 11:25 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 hell, i'll go scrounge up CPU cycles at my gf's college iMac lab, if we need 'em 28 11:26 they accept several entries if they're different enough and the final algo. should differ quite a lot from brute force 28 11:26 anyone know off the top of their head if A* parellelizes well? 28 11:26 no idea but anyway, Ruby has green threads 28 11:27 No clue 28 11:27 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 :-) but the bandwidth requirements would be pretty high and drb isn't the fastest thing on earth... 28 11:28 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 Ok, FPN is fixed and passes all tests except for throwing the wrong kind of exception with FPN.new(5) / nil 28 11:34 ? I've just cvs update'd and FPN passes for me 28 11:35 has anyone done a rough benchmark to compare the FPN code to Float? 28 11:35 batsman: it may be an issue with my version of ruby then. 28 11:35 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 Oh. Probably. 28 11:36 but it's not FPN.new(5) / nil it's FPN.new(1,1) - nil 28 11:36 Right. 28 11:36 :P ok then I ci it 28 11:37 I'd originally implemented that because I thought that's how ruby might call unary negation. 28 11:38 I see, it turns out it's -@, but I didn't know that before reading units.rb :) 28 11:38 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 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 i think i can fix the test cases at least 28 11:39 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 alright thanks for the updates 28 11:40 wish I could have done more but I'm definitely gonna be more helpful after lunch 28 11:40 Who owns the simulator code? I just want to go ahead and add a "set_state" function 28 11:41 it's aleksi's 28 11:41 Well, since he's not here... ;) 28 11:41 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 but dave did the last two commits 28 11:41 hehe dave is me 28 11:41 not that you shouldn't do anything 28 11:41 before I had the account :-) 28 11:41 right okay, i'll just stop trying to trace who did what and concentrate on what happened overall 28 11:42 hehe, I think dave's entries in the CVS log after 3:00 are mine 28 11:42 gotcha 28 11:42 so you can safely work on these things, he's sleeping now 28 11:43 or, i should work on them quickly, before he wakes up? * lennon winks 28 11:44 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 hi 28 11:45 hi 28 11:46 hello 28 11:47 are there any tasks? 28 11:47 at the moment we're facing the thoughest question what to do next :-) 28 11:48 i'm poking around in the track and trace code, looking for testcase cleanups and quick optimizations 28 11:48 mneumann: is it your first time here, or did you log in before 7H GMT+2 28 11:48 I have started my brute force search 28 11:49 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 ok I'll read it while I have lunch 28 11:49 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 and try to write stuff in a while 28 11:49 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 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 then we have navigator.rb which finds one path and gus working on a brute-force approach 28 11:52 Hey! FPN _is_ working now. 28 11:53 nice :) daniel: I'm still thinking on PathStrategies 28 11:53 isn't brute force too slow? 28 11:54 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 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 :-) 28 11:56 in fact SP will *not* be the fastest path for many cases 28 11:56 agree, especially in rally mode!! 28 11:57 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 AFAIK no 28 11:58 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 IMHO yes 28 11:59 Right. This makes judging the "best" possible tracks tricky 28 11:59 so the curves the car follows *should* be more like the ones race drivers use which are weird, non-symmetrical curves 28 12:00 yes, but how do you program that?? :) 28 12:00 * daniel would settle at this point for /any/ solution to each of the tracks. 28 12:01 a naive solution should be pretty easy: just look one curve ahead at a time, 28 12:01 i've not invested many thoughts into the problem, but might some kind of optimization technique, 28 12:01 and make sure your speed isn't higher than the maximum to make it exactly centered in the course 28 12:01 I thought of some kind of dynamic programming 28 12:01 random, treshold or something similar, help to find the way (similar to solve TSP). 28 12:01 I am working on a solution that follow SP from afa afar 28 12:01 mneumann: yes. 28 12:01 It does brute force as it looks at all the possible next step 28 12:02 That is, that's pretty much what I had in http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=PathStrategies 28 12:02 SP is certainly one approximation to start from 28 12:02 But it keeps only the on that progress along the SP 28 12:02 daniel: is there an implementation for this already 28 12:03 afaik no 28 12:03 Well, no. That's the problem. 28 12:03 is there cvsweb anywhere 28 12:04 I'm working on getting the grid I wanted up. 28 12:04 there's cvs, isn't it good enough? 28 12:04 http://www.urusai.org/cgi-bin/cvs/icfp/index 28 12:04 hmm, only windows here, but should work 28 12:04 you beat me to it, daniel 28 12:05 my eyes are hurting now, been stuck for 7H+ in front of my CRT 28 12:05 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 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 on second thought, don't think ;) 28 12:06 oooh, thinking should be ok, the problem's my eyes 28 12:07 lennon: uu9r@stud.uni-karlsruhe.de, login: mneumann (can you create simple password and send me?) 28 12:07 mneumann: just a sec 28 12:08 btw, do we have problems with performance? 28 12:08 we'd have to be able to run something, first ;) 28 12:09 ok :-) should have a look at the sources, first 28 12:09 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 great, looking forward to hack something up ;-) 28 12:11 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 ok, quick: 103.chr => 'g' 'g'.??? => 103 anyone? 28 12:16 [0] 'g' is a String, not a character 28 12:17 duh 28 12:17 :-) 28 12:17 * lennon smacks forehead that's what i get for thinking in C while writing Ruby 28 12:18 Is anybody working on FPN? 28 12:18 nope i'm not sure that it's a critical thing to worry about right now 28 12:18 man on man 28 12:18 then again, i was all for just using floats for the first 24 hours 28 12:19 Just need extra functionality floor A*ceil 28 12:19 2h sleep, sorta 28 12:19 Hi 28 12:19 ncheels: better than me 28 12:19 Feel better? 28 12:20 * daniel notes that floor with fpn can be done as: def floor { @fp >> 16 } 28 12:20 gus: probably worse :-) 28 12:20 lennon: CVS "mneumann: no such user" 28 12:20 my history doesn't scroll back far enough, anybody wanna give an over view 28 12:20 Work is good for you :) 28 12:21 lennon: I gave 2 people my user/pass since you weren't around' 28 12:21 ncheels: i heard... ncheels: they have accounts now mneumann: sorry, forgot to submit the account creation form should work now 28 12:22 yes it does 28 12:22 daniel, what does def floor { @fp >> 16 } mean? 28 12:23 I get some food, will be back in 1h 28 12:24 * daniel was saying that's how to add floor to the class FPN 28 12:24 whats the current state, anybody have any questions, suggestions, directions for me? 28 12:24 ncheels: i was actually wondering about a couple of things in 'navigator.rb' 28 12:25 dont waste the mental energy on it :-) 28 12:25 ok 28 12:25 but fire away if you want 28 12:25 i was kind of worried when i saw the 'LinkedList' class 28 12:25 looking back in the logs 28 12:25 Hold on, this is not proper ruby syntax! Did some crapy html creeped in? 28 12:25 sorry, brb...gotta go nicotinate my brain 28 12:26 gus: just do a cvs update of units.rb - I added floor 28 12:26 I'm gonna visit a friend of mine 28 12:26 Thanks What about ceil? Or am I too demanding? 28 12:27 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 leaves it as an exercise for the reader 28 12:28 but that navigator should be gabage anyway 28 12:28 ... 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 batsman: ok 28 12:28 i should call up my old employers...some of them did real slick scheduling and resource allocation work 28 12:28 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 so who all is active, and active on what? 28 12:30 * 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 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 hehe 28 12:32 so "foo"[0] == "f" works 28 12:32 oh 28 12:33 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 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 shoot 28 12:34 SP ? 28 12:34 shortest path 28 12:34 ok, I am gonna shot for the tradition tracks (1-5 at least) 28 12:35 Hey - how do you get irb to re-read a file? 28 12:35 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 d'oh. right 28 12:36 okay, i'm picturing... 28 12:36 no for each step, picture that this person chooses the action that allows them to keep there fingers touching both walls 28 12:37 that's kind of what i was thinking earlier 28 12:37 kinda of a line normal to the walls if I remember my terminology 28 12:37 safest course is smack dab in the middle also terribly inefficient, but at least it's a solution 28 12:37 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 sorry continue 28 12:38 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 i'm unclear on how we calculate the delta unless you just mean the rotation 28 12:39 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 or, the change in direction of the course, assuming we can plot a smooth curve through it? 28 12:41 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 lennon: It seems that in Track#[] you should switch x and y 28 12:42 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 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 daniel: okay...do you want to make the swap, or should i? 28 12:44 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 just did. 28 12:44 ncheels: now you're talking optimization, though 28 12:45 true but if you want lightning, it could be simplified into stay in the middle like you said 28 12:47 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 Oh, right. I missed that one. 28 12:49 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 I'd prefer if you didn't revert 28 12:50 the former is probably more correct, but the latter only requires changing one line revert? 28 12:50 Please don't. 28 12:50 was that change already made once? 28 12:51 * daniel thinks that the state should come back as FPNs. Add a "state_f" method to return floating point states 28 12:51 in the test case, or in the simulator code? 28 12:51 If state comes back as FPN's, then we can easily save and restore state. 28 12:51 so, in the simulator, not the test case, right? is anyone else sitting on uncommited changes in that file? 28 12:52 Oh, wait... I might be. * daniel will add state_f for you 28 12:52 sounds good sorry, ncheels anyway, back to path finding (that is what the code is actually supposed to do, right? ;) 28 12:53 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 much nicer, thanks 28 12:55 just an fyi 28 12:57 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 it's not anything like an x, y swap, but maybe it's just a scaling issue in the simulator algorithms? 28 13:03 lennon: I missed that last bit - my client up and died at a bad moment. 28 13:03 daniel: i think i found the problem in the simulator 28 13:03 Oh? 28 13:03 it's using its own constants, which are ints 28 13:03 back gain 28 13:04 Right; so it is. 28 13:04 or at least, that's my naive guess 28 13:04 Silly aleksi 28 13:04 shall i just update it to use the constants module? and see if that helps? 28 13:05 Yeah. The easiest would probably be to change things like the "A = 24" at the top to be "A = Acceleration" 28 13:05 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 hmm...maybe we should start using 'cvs edit'? 28 13:07 Nah. 28 13:07 alright 28 13:07 Just change stuff at will. If people need to merge stuff later, then they need to merg stuff later. 28 13:07 anyway, i'll go make those changes real quick-like 28 13:10 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 that's fine how about we start moving this discussion onto the cvstrac wiki? 28 13:11 uh ok, 28 13:11 the IRC channel can stay open for just-in-time stuff that way 28 13:11 like editing the pathfinder page or whatever it is? 28 13:11 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 Good morning (USA Eastern, at least). Is the URl for the Wiki http://www.urusai.org/wiki/ ? 28 13:12 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 Thank you. 28 13:15 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 so it looks like we're actually getting some working infrastructure 28 13:19 who is working on the path finder? 28 13:19 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 lennon: did you change my password for cvstrac? 28 13:28 morning jim 28 13:28 ncheels: i don't think so 28 13:29 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 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 lennon: yep moz 1.4 28 13:30 that's why i'm using my roommate's powerbook w/safari for my browsing pleasure this weekend 28 13:30 s/1.4/1.3/ I have by ibook here, I was using it before I will use it again 28 13:31 any chance you could stomach grabbing an opera freebie for the weekend? 28 13:31 which powerbook? 28 13:31 g4 12" :) 28 13:31 cool 28 13:32 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 hehe I need a friend like that 28 13:33 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 I need a dual-g5 powerbook with 10.3 on it, I'll go buy it now :-) 28 13:34 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 OK 28 13:36 hi again back from my friend's he's having exams so he cannot help me 28 13:36 that's too bad 28 13:36 _but_ I got some info one Taschenbuch der Mathematik (maths handbook) w/ info on optimization theory 28 13:37 great 28 13:37 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 we're all se set 28 13:39 batsman: we had optimization theory some years ago, are you looking for something special? 28 13:39 just a quick read I want to see if I can apply anything 28 13:42 I guess combining shortest path with optimizing a configuration would give quite good results 28 13:42 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 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 ok I've had some time to think on your method 28 13:46 I have some thoughts going through my head about path solving, trying to understand them 28 13:46 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 it seems to me it's gonna be like O(n^4) 28 13:46 expect me back in three or four hours 28 13:46 cu 28 13:46 lennon: I still don't understand your objection to my structure 28 13:47 which objection? 28 13:47 lennon: but I suppose that can wait. Sleep. 28 13:47 sorry 28 13:47 night (actually morning) 28 13:47 daniel: I think there's one flaw in the method (if I understood it) 28 13:47 daniel: feel free to write up some more on it in the wiki, or email me 28 13:47 okay 28 13:47 or just ignore my rantings for now, and see what you can get into code 28 13:48 and I believe I have the fix :-) 28 13:48 i'll probably understand it better that way, anyway 28 13:48 batsman: there are a few problems with what I said in PathStrategies 28 13:48 as I see it you need to do several passes 28 13:48 I've put the structural bits into OverallStructure, and I think those make sense 28 13:48 to propagate the "low distance" values 28 13:49 Yeah, that's the current problem with pointgrid 28 13:49 I believe it makes it around O(n^3) 28 13:49 It's dog, /dog/ slow 28 13:49 but I think I have one fix 28 13:49 almost forgot one thing: 28 13:49 that makes it O(n^2)!!! just consider one region and grow it in the border 28 13:50 does someone else want admin privs on cvstrac, so that new accounts can still happen while i'm out? 28 13:50 propagating the values 28 13:50 * daniel hrms at batsman. I'm not quite sure how to do that. 28 13:51 I have thought of that you basically need to have 3 sets of points 28 13:51 lennon: I will 28 13:51 okay, just a sec 28 13:51 those that are inside your already scanned area 28 13:51 since I was giving out my account before 28 13:51 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 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 as the region is growing from the goal 28 13:53 batsman: right. 28 13:53 the points closer to the goal are scanned before the ones which are far away 28 13:53 dave: ok? 28 13:53 lennon: ok thanks 28 13:53 daniel: do you see a flaw in my logic? 28 13:53 okay, i'm leaving for real this time 28 13:54 bye 28 13:54 ok, cu later 28 13:54 batsman: no, I'm just thinking of how to implement it. 28 13:54 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 Actually, I'm not certain we do. I think instead we use hashes. batsman: are you logged in? 28 13:56 I login w/ the CVS log and pw and then have no "edit" link or anything ?? 28 13:56 batsman: which browser? 28 13:56 galeon mozilla core 28 13:56 lennon says moz 1.3 has problems 28 13:56 I can switch to, say, konqueror ok, switching now 28 13:56 I couldn't log in with moz 1.3 28 13:56 Does the top-left corner say "logged in as batsman"? 28 13:57 no nothing not logged in even after logging 28 13:57 even with konq ? 28 13:57 I have cookies enabled let me check qith konq 28 13:57 Then you aren't really logged in. Is your browser automatically rejecting all cookies? 28 13:57 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 Are you accessing the site as www.urusai.org and not as urusai.org ? 28 14:00 www.urusai.org 28 14:00 batsman: lennon suggest opera ... 28 14:01 urusai.org doesn't revolve for me aarg, have no opera. I guess I can put it in Rubygargen's wiki 28 14:01 And I assume that the simple trick of reloading pages after logging in also does not help, right? 28 14:01 or you could maybe grab the latest mozilla binary (1.4beta-something) see if it works 28 14:01 just wanted to write a little bit on my idea to find the shortest path 28 14:01 * daniel thinks it's something else - he's using a 1.2.1 mozilla just fine. 28 14:02 daniel: lennon says moz 1.3 has problems a fresh copy of moz 1.4 should just work, I would guess 28 14:03 I'm trying with phoenix, I think it's based on mozilla 1.2 28 14:03 k 28 14:04 worked!!!! 28 14:04 nice 28 14:04 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 ok, I'm soon adding a desc. of my idea to the wiki 28 14:07 Or make simulator compute this type of stuff based on the 4-tuple (x, y, v, d)? 28 14:18 batsman: And I think I've implemented your idea :) 28 14:18 nice just when I had explained it in the Wiki :-P guess I should have kept it for myself }:-) 28 14:19 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 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 Ah... No, that's not quite what I did. Check model/pointgrid.rb 28 14:20 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 Hrm - actually, after a second look at your idea, that is very close to what I did. 28 14:22 :) yes, it's the same thing 28 14:23 Except that I keep track only of the borderset, not both the borderset and the centerset 28 14:24 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 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 ok, makes sense I see: if ((hisv == nil) or (hisv > myv + 1)) 28 14:27 starting growing on the negative x direction at first is really clever 28 14:28 Well, "clever" in so far as necessary according to the rules. 28 14:28 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 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 batsman: a-star? 28 14:30 umm the problem is I'd have to read on that as I know very little :| 28 14:30 Same here 28 14:31 a* is very complicated for this problem I am trying to work on a solution right now 28 14:31 is there anybody knowledgeable on this that could work on A* and leave other work to us? 28 14:31 Pointgrid gives a path 28 14:31 if a* is just blindly applied, there are too many possible interior states batsman: I am trying to right now 28 14:31 Maybe we can work on improving that path after we have it 28 14:31 ok, then, what do I do?? I have one idea 28 14:32 I am not really knowledgable on A* but I think I get it enough to try 28 14:32 Is the OverallStructure being implemented? 28 14:32 my solution will only work for the first 5 maps, the rest will need alternate algorithms 28 14:32 why? too much time? 28 14:33 but I hope it would give really optimal results 28 14:33 it gets the shortest path but there's still a long way to having the car drive along it 28 14:33 because the first 5 are all normal tracks with no possible loop backs 28 14:33 that needs some work 28 14:33 what gets the shortest path? 28 14:34 well, what I used to call my idea :-P 28 14:34 the A* I am trying gets the quickest driving instructions, hopefully, so its dealling with steps not locations 28 14:34 it's the shortest path distance-wise 28 14:34 Can we chop up the "loopy" maps and solve sub-sections? 28 14:34 How do you use your pointgrid? 28 14:35 anyway loops are not problem are they? 28 14:35 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 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 pointgrid could be used to find a shortest path, yes 28 14:36 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 Hrm... Anyone have opinions on whether I should bias pointgrid away from diagonal jumps? 28 14:37 are you still working on pointgrid.rb, or can I fix some obvious things? 28 14:37 I've checked in my changes So, go ahed 28 14:37 for instance grid_value(p[0] + dx, p[1] + dy) without checking dimensions, etc ok 28 14:38 batsman: Actually, it does do a chack (implicitly) check, rather 28 14:38 oooo, right, inside grid_value, sorry about the noise 28 14:38 grid_value does the check, and border points come back as -1, so... 28 14:39 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 Implement a Strategy class as described in OverallStructure. 28 14:40 then, later, we can evaluate the cost of that 28 14:40 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 daniel: are you implementing the OverallStructure? 28 14:41 and then score based on the distance to the optimum path? 28 14:41 I am working on a strategy 28 14:41 perhaps taking into account direction? 28 14:41 Not yet. 28 14:42 ok 28 14:42 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 I'm doing model/strategy, then ok? 28 14:42 is proper step handling supported? there was something in Simulate before 28 14:43 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 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 Could we pass around something better than [x, y, v, d]? 28 14:43 daniel: ok, is there tests for it? 28 14:43 gus: maybe. Is there really reason to? 28 14:44 right, working on model/strategy.rb now 28 14:44 davel: test/test_simulator exists, but I don't know what's in it 28 14:44 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 daniel: I like abstraction, CarState (or something) is nicer than a quad-tuple 28 14:45 gus: That's what simulator's state and state= functions are for. 28 14:45 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 I tend to agree with davel Oops! 28 14:46 Car.step("al.") or something like that it can count the steps taken Car.x Car.y Car.v Car.d 28 14:47 I want to know what the state is 28 14:47 is much nicer than tuple[0] tuple[1] tuple[2] tuple[3] 28 14:47 need it to actually write any code in model/strategy.rb 28 14:47 batsman: the state is x,y,v,d 28 14:47 Fine by me. Who wants to move stuff from simulator to car? 28 14:47 yes, but do I take it as [x,y,v,d] or attributes of car? 28 14:47 batsman: I think it should be car 28 14:48 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 Okay, then we need to change the signature of strategy - next() should receive a car, and return a list of cars. 28 14:48 yes can I do all this? 28 14:48 * daniel and batsman are clearly sharing the same brain 28 14:48 strategy.rb, put state in car, etc? 28 14:48 Go for it. 28 14:48 thanks 28 14:49 batsman: a suggestion: make Car.step() return a new car. batsman: Car.step! can then update the current one. 28 14:49 yes, using the given Simulator 28 14:49 daniel: I am not sure I understood the entire discussion with pointgrid 28 14:49 right 28 14:50 What do you get as a result of running fill_grid? 28 14:50 Actually, car.step() is probably most easily implemented by having a way to clone a car followed by car.step!... 28 14:53 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 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 for "neighboring grid" read "neighboring cell" batsman: do it only if you want to. 28 14:53 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 batsman: that is, only fix the unit tests if you feel you have to. 28 14:54 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 Please, go on We support you :) daniel: OK, good with me. But it takes an awfull long time to process! 28 14:55 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 Maybe I need to get some unused cycles somewhere else! OK, I see. 28 14:58 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 The "Changed" message is enough for now. Would an extract method, returning an array of Point be nice 28 15:00 gus: Oh, you're back on version 1.2 or 1.3 28 15:00 Oh! Let me update quickly! An array representing the SP 28 15:01 who is working on the car? 28 15:01 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 I updated. I'll see how long it takes What is your box? Mine is G4/533 128mb 28 15:03 AMD 1Ghz Athlon. 256mb I'm now trying track 9... 28 15:04 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 jimm: right 28 15:04 Yeah, but we have to be able to get the result before monday night!!! 28 15:04 Well, we do have to have the tracks computed in under 9 hours from now for the lightning round. 28 15:04 gus: exactly 28 15:05 good points 28 15:05 I exagerate, but if we want to do some testing, the faster the better 28 15:10 Oh, drat. I just need to vanish for approx. an hour 28 15:14 I saddly need to go. I should return sometime tonight (10pm Eastern). 28 15:15 who's staying here? 28 15:15 me 28 15:15 I'm fixing the unit tests right now 28 15:15 Bye 28 15:15 are/were you working on car? 28 15:15 yes car now holds the state 28 15:15 I'm still lurking. 28 15:15 I moved everything from Simulator there 28 15:16 batsman: ok does car hold state? more specifically, does it know which x,y it just came from? 28 15:17 it only knows the x and y it is in 28 15:17 if possible, can you make it know its prev_x and prev_y 28 15:17 so it's got essentially [x,y,v,d] mmmm you told me to instantiate a new car... 28 15:17 and then move the crash? method (and related aliases) from Track to Car 28 15:18 I moved the crash?, finish? and valid? methods from simulator to car 28 15:18 and have the crash method not only look to see if a position is a wall ok 28 15:18 ok, just give me some time have to fix some things 28 15:18 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 what's the default state of a car when initialized? 28 15:19 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 x, y = the starting point given by the track speed = 0 d = ? 0? 28 15:19 yep, v = 0 and d = 0 28 15:20 ok 28 15:20 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 I'm feeling a great pressure to ci but I still have one error in the unit tests 28 15:26 lol 28 15:26 TypeError: FPN can't be coerced into Float :-) I'm fixing it well 28 15:28 I'd better ci now so you don't have to wait forever I'm fixing the thing right after 28 15:31 ok, just did ci now I'm going to make the unit tests work again :) 28 15:32 k 28 15:32 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 whats the new err 28 15:37 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 k 28 15:38 got one big one right now I was screwing the states badly forgot to clone some things 28 15:39 hehe 28 15:39 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 yeo yep 28 15:42 but I keep finding bugs mine, and others ;-) it seems moving the code around helps taking the garbage out yeah! passes 28 15:44 please do cvs update 28 15:44 k 28 15:44 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 good question 28 15:47 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 good 28 15:50 oops, forgot to cvs add strategy.rb it's there now 28 16:00 davel? still here? am I alone now??? 28 16:01 I am here 28 16:01 ok 28 16:01 just focusing on my code 28 16:01 seems we're the only ones now 28 16:01 yeo tep 28 16:02 still working on A* ? 28 16:02 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 for example if one section of the track starts to narrow or widen, its still a section 28 16:04 can I help you in any way? 28 16:04 but when one wall goes N for example, and the other goes W batsman: dont know ... I'll finish the overview 28 16:05 it's because I ended moving the stuff 28 16:05 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 ? 28 16:07 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 this means the car goes straight till the end of the section? 28 16:08 ---- / no it doesnt go straight it tired every possible move, . a. b. l. r. al. ar. 28 16:09 within the triangle, right? 28 16:10 and if any move takes it out of the headlight triangle, then it discounts all the moves up to that point 28 16:10 so it's like -----------E----------- wait a sec, I'm gonna draw it 28 16:10 draw it on what? ----------- 28 16:10 you'll see 28 16:10 / / / / / / / / / * \ \ \ \ \ \ \ \ \ \ ----------- 28 16:12 ====================== line showing end of section \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / car well, kinda 28 16:12 yeah 28 16:12 with the walls on the left and the right hand side, right? 28 16:12 yeah, but after each move, the headlights readjust 28 16:13 ok thanks for taking the time to explain it 28 16:13 so for example if the car starts moving left, then angle will change 28 16:13 yes, interesting 28 16:13 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 .... can I help?? seems complicated 28 16:15 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 ummm should I use gridpoint now 28 16:17 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 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 gridpoint? I haven't been following it at all 28 16:18 mmm, depends on what info the Tracksection has 28 16:18 start_line and finish_line 28 16:18 gridpoint was daniel's work, right? 28 16:19 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 daniel logged out at 17:11:15 (GMT+2) 28 16:19 I think I was wrong, the headlights don't adjust after ever move 28 16:19 17:11:12 I just need to vanish for approx. an hour 28 16:19 whatever they are heading into a certain section is how they stay for the whole section 28 16:20 ummm I don't know if this makes it less powerful 28 16:20 what having the headlights stay the same? 28 16:20 yes OTOH 28 16:20 more powerful correct I think 28 16:20 if it were changing the car would tend to zigzag in the end 28 16:21 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 consider what happens when it's close to the end line ummm 28 16:21 yeah the headlights definitely need to stay the way they are at the beginning of a section 28 16:21 I believe the triangle is guaranteed to be inside the first one 28 16:21 otherwise they are useless 28 16:21 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 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 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 lets say the car comes into that section with d angled sharply towards the wall 28 16:23 then the car could possibly start oscillating from one edge to the other 28 16:23 well with A* it will try everything 28 16:24 as it overreacts 28 16:24 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 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 uh ok 28 16:25 ci ASAP and I'll help you in the meantime 28 16:25 well my code isn't run worthy 28 16:25 I'm taking a look at gridpoint 28 16:25 prob not even compile worthy 28 16:25 to see if i can really make it work easily so we have something at least 28 16:25 compile/parse same thing 28 16:25 because even if the SP is found 28 16:26 this isn't SP, its Fastest Path 28 16:26 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 ok 28 16:26 so I let you work on the better solution 28 16:26 the driving commands will be generated with the A* 28 16:26 while I get the worse one to work 28 16:27 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 ok 28 16:27 going on the code that is 28 16:27 got it 28 16:27 do you have any graphics ability? 28 16:27 I'm taking a look at gridpoint and cheap solutions you mean????? representation of paths? making tracks? 28 16:28 no, I was thinking a quick graphic showing my idea, since I explained it to you 28 16:28 ok 28 16:28 then when other people get in they can visualize it hopefully 28 16:28 I might be able to draw something 28 16:29 if not no big deal, but it might help 28 16:29 so I'll wander for a while to find things to do now ok 28 16:29 k 28 16:42 ok, I've added doc/daves-scheme.ps which contains a crappy diagram of the triangle 28 16:43 ok 28 16:45 sweet thanks batsman 28 16:46 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 better than nothing, good idea 28 16:46 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 k 28 16:50 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 I am extending car and Simulator to support rally mode it's fine by me 28 16:51 'kay 28 16:52 and davel is working on his A* thing btw, please add your emacs stuff at the bottom :-) 28 16:55 Right. 28 16:57 batsman: I am starting to see flaws in my idea I am rethinking stuff 28 16:57 :-P 28 16:59 batsman: ok, here's a slightly modified version 28 17:01 yes??? crap, my internet connection died 28 17:07 hi?? anybody there? 28 17:07 hi 28 17:08 my internet connection got down 28 17:08 you predicted it too 28 17:08 this bloody cable modem is a piece of crap 28 17:08 cause your crap my internet connection died message made it here 28 17:08 how could it??? I couldn't even ping machines outside the LAN???? anyway I'm extending FPN 28 17:09 k 28 17:09 to do the things required for Rally mode there's quite a lot we forgot, there 28 17:09 good lets hope we get there :-) 28 17:10 well, still 7H to go 28 17:11 I'd be surprised if I have mine done by then 28 17:11 uh well I keep w/ Rally mode 28 17:12 k 28 17:12 and hope we're getting some help in the following 7H 28 17:13 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 class var? 28 17:13 @@track 28 17:13 so only one track per program run? 28 17:13 yeah but it can be changed 28 17:13 ok 28 17:13 but each Car won't have its own track 28 17:14 k 28 17:14 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 I suggest you look at what I just did to strategy. 28 17:15 who all of us? 28 17:15 my stuff shouldn't affect or be affected by model/ 28 17:15 Well, it makes the most sense with that implementation of strategy to have car not know about the track. 28 17:15 in just changing units.rb 28 17:17 Since the strategy has to know about the track. 28 17:17 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 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 foo(*array) 28 17:21 Ah, right. I knew I'd seen that syntax somewhere. 28 17:29 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 Oh. Hrm. 28 17:30 nothing serious the really serious thing is that we're 6H30 from first release 28 17:31 Yeah. 28 17:31 and don't have a clear path to follow 28 17:33 I am a bit concerned it's been some time since we last seemed to be on track 28 17:35 Well, do people have a problem writing more strategies? 28 17:35 mmm could I write a strategy that tries to stick to the SP? or something like that? 28 17:35 I am working on something, tho its not a strategy 28 17:36 ?? 28 17:36 batsman: sounds good 28 17:36 first get the SP using gridpoint 28 17:36 not a Strategy as in it doesn't extend the Strategt class 28 17:36 then try to approximate it when generating the commands 28 17:36 how does gridpoint calc SP * davel hasn't looked at the source 28 17:37 http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=PathStrategies there's an explanation read the bottom part 28 17:37 oh ok, yeah I read that 28 17:37 And as I keep working and checking stuff in, the runstrategy.rb script in the top directory 28 17:37 I am gonna shower, bbiab 28 17:38 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 you mean for the lightning or the full contest? 28 17:39 lightning 28 17:40 k 28 17:40 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 batsman: please do. You can write a separate strategy, though. 28 17:41 that's what I'm planning to do 28 17:42 * daniel is a bit pessimistic about easily using the point grid because of how painfully slow the cars start 28 17:42 just subclass it, and put it in a separate file I'll take a look something is definitely better than nothing 28 17:47 I think there's a problem w/ our logic 28 17:52 Hrm? 28 17:52 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 Oh. Right, I should be deferring to car#crash? 28 17:54 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 The speed can't ever be bigger than 1 square per time slice. 28 17:55 you're right fine, then :) 28 17:55 That's one of the nice things about the constants they use. 28 17:56 back fresh and clean 28 17:56 good 28 17:56 I am gonna break down my stuff into subtasks 28 17:57 then tell us... why is the speed smaller than 1 square per time slice? by design (of the constants)? 28 17:57 first thing I am gonna try to generate some png maps with the sections deliniated 28 17:57 I don't see any explicit check in the Simulator algo 28 17:57 I think it must be design of the constants 28 17:58 so we need not check these things in Simulator, do we? 28 17:58 because they say its garaunteed that it wont be more than one square 28 17:58 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 I dont think so I think the friction causes the car to reach some sort of terminal velocity 28 17:58 Oh, no - the math (and the constants they chose) guarantee that the speed is always less than 1 28 17:59 sure 100%? what if this is a catcha thing? 28 17:59 yeah thats what I am saying 28 17:59 Yes, I'm sure. 28 17:59 me too 28 17:59 they often do such things ok 28 17:59 the friction ensures it 28 17:59 we assume it, ok 28 17:59 Actually, I'm pretty sure that the maximum velocity is significantly less than 1... 28 17:59 its a quadratic equation, I could prob find the max velocity hang on 28 18:01 I think the max speed is 1/2 28 18:01 hi 28 18:01 the ratio of F2 to F1 is 2 28 18:01 hi 28 18:01 davel: no, at 1/2 you can still keep accelerating. 28 18:02 yeah V will go up by 24 but down by F0 + F1*v + F2*v*v 28 18:02 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 correct 28 18:03 I'm confident it's less than 1 28 18:03 it's somewhere at approx. 0.75 28 18:03 k 28 18:04 will calculate it ... 28 18:04 .6965 and -1.1964 negative solution discarded => .7 if you got the equation right 28 18:04 So we're fine. 28 18:05 yes, it's safe, good to know 28 18:05 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 i got 0.69648, the same as batsman 28 18:06 Whereas the cars going that fast might initially appear to be the best we have. 28 18:09 daniel: the stuff in runstrategy.rb is really interesting daniel: looking forward to seeing it work :-) 28 18:09 if nobody complains i would now review the fixed-point arithmetics again 28 18:09 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 ok. atan2, sqrt i think? 28 18:10 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 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 the lighting division doesn't really matter to me, but I will help short term stuff if thats what everyone wants 28 18:12 if you have plans on participating lightning, you might have a suggestion on what else i should work? 28 18:12 We need a better strategy 28 18:12 anything that actually gets us closer to something that actually runs :) for instance 28 18:12 where is the current strategy implemented? 28 18:12 you could review the stuff in pointgrid.rb 28 18:13 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 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 ok 28 18:15 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 whaaat? only 2 minutes? it's fast enough by my book :) 28 18:16 On my 1Ghz Athlon 28 18:16 I have K7 1.7XP+ so 1 minute something for me :) 28 18:17 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 anyone seriously heading for a lighning entry? 28 18:20 hello people 28 18:20 hi 28 18:20 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 where do we stand? 28 18:20 tobias: lighting is not at the top of my mind but I can make it that way if need be 28 18:21 where is the log? 28 18:22 not on my mind, either 28 18:23 aleksi: what log? irc? 28 18:23 * daniel isn't certain that there really is a log. However, there are significant wiki comments. 28 18:23 which wiki? rubygarden? 28 18:23 I have a log, but I can't imagine you wanting to wade through it 28 18:23 http://www.urusai.org/cgi-bin/cvs/icfp/wiki 28 18:24 that one, ok 28 18:26 ok i will dive into the arithmetics and resurface in 1 hour or so 28 18:29 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 hi again what changed during my shower? hi aleksi long time no see :) 28 18:32 had to sleep a bit :) 28 18:32 it's been like 9 hours since we stole the code from aleksi_first_idea.rb and put in in model/ 28 18:32 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 I may have a working runstrategy.rb 28 18:33 it is ok if we remove aleksi_first_idea.rb now? great!!! 28 18:33 I'm still trying to determine whether I do 28 18:33 thanks for testg.rb too 28 18:34 testg.rb is a throwaway script, just to see if fill_grid is acceptable 28 18:35 but it's nice to be able to benchmark, at last 28 18:36 ???? my machine is fast as hell, or what? 13 seconds!!! 28 18:37 so you managed to fix FPN mul and div for negative numbers 28 18:37 it's been some time... we haven't touched FPN for a while 28 18:38 yes, it's great to see the infra is working :) 28 18:38 * daniel thinks he fixed them this morning, but doesn't really remember 28 18:38 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 what's dave's scheme about? 28 18:40 For track 8 For track 1 it's closer to 30 seconds 28 18:40 take a look at doc/daves-scheme.ps ok I was testing that on Een.trk 28 18:45 Ew. We have some kind of nasty bug. 28 18:46 ? 28 18:46 Does anyone mind if I add the .trk files to cvs under a "data" directory? 28 18:47 they're now in test/data IIRC well, one of them Een 28 18:47 perfect please adda 28 18:48 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 Not good. 28 18:51 nasty 28 18:51 I mean, amusing, sort of, but... 28 18:54 Curse my slow connection - cvs is still adding those data files. ruby runstrategy.rb test/data/0_stupid.trk BestPointTrackStrategy 28 18:55 That's what I'm using to test the runstrategy script. 28 18:55 ok 28 18:55 Once test/data/0_stupid.trk gets there... 28 18:56 I'll test it in a while, doing something now I hope to be able to show soon 28 18:57 Okay, cvs finally finished. 28 19:01 Stupid nickserv 28 19:01 better say something 28 19:01 If someone wants the name so bad, fine. 28 19:01 before it kicks me too 28 19:02 It's only an issue if your name is "registered" to someone else 28 19:04 Ah - it's a simulator bug. 28 19:04 you got it? nice 28 19:05 I got one of the bugs... :) 28 19:05 we still have to validate the simulator against the one online 28 19:05 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 no, doing something different to check another thing 28 19:07 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 don't they show it already? 28 19:08 I get messages like: 1) Failure!!! test_simulation_equivalence(TC_Simulator) [test/test_simulator.rb:72]: <#> expected but was <#> I'd like to see what called test_simulator_equivalence method 28 19:09 aleksi: first off, do a cvs update to get a better FPN representation in your error messages 28 19:11 test_simulator_equivalence is called automatically by test/unit doesn't make sense to trace into testunit, does it? 28 19:13 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 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 ack. guess you need to use caller then 28 19:18 * 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 I am getting nils inside the structure returned by t.fill_grid grid = t.pointgrid is that normal??? 28 19:21 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 :) 28 19:22 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 A?? ok I'll double check my code 28 19:24 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 I'll do it 28 19:26 when my update finishes.... 28 19:29 it takes forever 28 19:30 first line of dump works ok, ie. we find the starting point correctly has lennon been around? 28 19:30 Yeah, getting the track data makes the update long, but after that the updates will speed up again. 28 19:32 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 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 It could be that Een includes an unexpected character somewhere. 28 19:35 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 as far as I can tell, pointgrid works like a charm it generates 'pretty' images :P 28 19:43 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 batsman: how do I generate the pointgrid images? 28 19:44 something like ruby tools/dumpgrip.rb test/data/1_Simple.trk > out2.xpm 28 19:45 cool thanks 28 19:45 if you wait for one minute, I've got a new version with higher contrast :-) 28 19:45 What a shame that cvs doesn't make it easier to rename files. 28 19:45 daniel, I'm pretty sure simulator doesn't work ok but I'm fixing it 28 19:45 so whats the word on the lightning 28 19:46 dunno still 4H to go 28 19:46 here we come to the fact that infrastructure has to be rock solid before anything useful can be accomplished 28 19:46 we could have something 28 19:46 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 like? 28 19:47 my original plans for breaking the track into sections won't work well 28 19:47 well, it seemed pretty complicated from the beginning 28 19:47 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 if someone suggests other ideas, I'll try something else 28 19:57 batsman: the dumpgrip.rb is producing greyscale output 28 19:57 yes 28 19:57 and I don't know what to make of it 28 19:57 do you want colours? what do you want to make with that? 28 19:57 not really I want to know what this represents? 28 19:57 it was just meant to verify whether pointgrid works ok the grayscale represents the distance from the goal white = closer 28 19:58 ok 28 19:58 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 k I will try it 28 19:59 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 k I guess I will continue with my plans, please let me know if I am needed for any lightning needs 28 20:03 ok 28 20:03 hi 28 20:03 hi 28 20:03 hi tobias 28 20:04 m there was a bug in the fixed point multiplication -- fixed now 28 20:04 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 yes the spec was unbclear in this point 28 20:05 good 28 20:05 mthe icfp faq clarified it 28 20:05 oh, it was just 1.7 series debugger that was broken, 1.8 works all ok now I'll do miracles :) 28 20:05 :) 28 20:06 good tobias, very good! 28 20:06 tobias: what was wrong? 28 20:06 is it already in cvs? 28 20:06 mthe icfp faq clarified it ? don't see it mention in the FAQ 28 20:06 ok i'll show you 28 20:06 http://www.urusai.org/cgi-bin/cvs/icfp/chngview?cn=87 28 20:07 see http://www.cs.chalmers.se/~rjmh/Wash/QandAs/QAs.cgi#44 28 20:07 right there that's new, isn't it? I was cheching the static FAQ thing 28 20:07 mul(40,-209) == -1 we had mul(40,-209) == 0 we were doing wrong with negative mult results 28 20:08 I thought we had to truncate towards 0 28 20:09 but this is not a division, but a bit-shift! see Q4 on the same faq page 28 20:09 ok 28 20:10 i might implement sqrt and friends now, if no one objects 28 20:11 we won't need them for a while so if you can help get the simulator to work 28 20:11 I repeate my call for a better strategy. 28 20:11 or assist daniel... ... 28 20:12 Maybe if I could have everyone here run the simulator and see what's going wrong right now. 28 20:12 i am a bit out of touch there 28 20:12 daniel__: I am working on something I tried explaining to batsman, lets see if I can explain it 28 20:12 what should i run, daniel? hi lennon! 28 20:13 daniel__: you can have a look at doc/daves-scheme.ps hi! 28 20:13 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 ok, explain 28 20:13 so I break up the track into sections 28 20:13 i saw that ps drawing whats it mean break into sections? 28 20:14 when the car enters a new track section it will be limited to staying within the "headlight" vision 28 20:14 headlight? 28 20:14 which is a triangle from the cars starting point in the section, to the 2 ends of the section 28 20:15 Q54. Re: Q53. I'm a moron too. 28 20:15 :) 28 20:15 what's the purpose? 28 20:15 was that yours, aleksi??? :-P 28 20:15 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 ok 28 20:17 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 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 get me up to date on this -- you want to do a full search in each section -- limited by the triangle 28 20:20 yes think thats too large of a space? 28 20:21 that was my thought, yes mbut frankly, i have no clue 28 20:21 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 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 how large are your sections? 28 20:23 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 ok, fixed simulator now the basic test seems to go ok 28 20:27 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 Nope 28 20:27 nope, there's still some rounding error 28 20:27 :-( 28 20:27 lennon: no, what is the naive solution :-)( 28 20:27 can i mention an idea that i had just before going to sleep? 28 20:27 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 lennon: please 28 20:28 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 while doing the a* search, any actions that result in a crash will be discarded 28 20:28 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 will it track back to earlier sections? 28 20:29 tobias: yes 28 20:29 lennon: like? 28 20:29 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 not me 28 20:29 haven't 28 20:30 let me find a URL with some good intro material... 28 20:30 I can go to the bookstore and buy something :-) 28 20:30 try this: http://astronomy.swin.edu.au/~pbourke/curves/bezier/ 28 20:30 a problem would be to follow these curves, not? 28 20:31 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 yes i think so 28 20:32 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 sweet 28 20:33 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 approximate by hand? 28 20:33 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 yes 28 20:35 they say it's allowed 28 20:35 if you can get the drawing program to tell you the minimum radius,,, 28 20:35 explicitly 28 20:36 i don't think gimp does this 28 20:36 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 if the simulator needs work, i'd rather go check this now 28 20:41 hand-made solutions are explicitly allowed, even encouraged 28 20:41 is there a test that drives it and fails? 28 20:42 if you draw good curves, I'm sure you will have quite good rank on lighning 28 20:42 3H20 to go 28 20:42 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 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 so numbering cells works? 28 20:44 ? we have the pointgrid stuff running for quite some time now 28 20:45 ok, i was not there most of the time 28 20:45 right have you seen the pics? :-) 28 20:45 only pngs from the tracks what pics? 28 20:46 we can generate pics with info (grayscale) on the distance from the goal 28 20:46 i see 28 20:46 try ruby tools/dumpgrip.rb test/data/7_Gothenburg.trk > output.xpm 28 20:47 running it... ok 28 20:48 aha 28 20:48 looks like you propagate distance to nearest neighbours only horizontally and vertically? 28 20:48 can anyone here read russian? 28 20:48 in diagonal too, I think 28 20:49 doesn't look like diagonal 28 20:49 guess not 28 20:49 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 i see 28 20:50 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 lol 28 20:53 there's friction, so it will eventually stop 28 20:53 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 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 Hm. Good thinking. 28 20:54 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 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 but it's nice that we finally got to actually generating traces 28 20:58 aleksi, did you fix Simulator in the end? don't see that in the CVS logs 28 21:00 I'm about to adjust pointgrid to consider diagonal squares to be 1.5 away. Any objections? 28 21:01 make it 1.4 28 21:01 ok if you have a reason for that sqrt(2) :) 28 21:01 so use 5 and seven to stay with integers 28 21:02 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 ok 28 21:02 Although I like 5 and 7 28 21:03 what about looking even further than just to the nearest neighbours? 28 21:03 that wouldn't propagate the distance don't know what you win the way 28 21:03 * daniel__ must now run, but: 28 21:03 it would if you assign the distance accordingly 28 21:04 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 ok 28 21:04 Feel free to tweak runstrategy to say different things as it progresses 28 21:05 think I got the fastest 28 21:05 Or, in fact, to tweak anything in any old way 28 21:05 I cvs update and tell you ???? 28 21:07 hope daniel gets back soon his last strategy is giving interesting results 28 21:08 interesting, how? 28 21:08 it could be solving 0_stupid it's slow as hell, but it's going the right way at the moment 28 21:09 cool 28 21:09 now, we seriously need to do something about speed the fastest it gets is around 0.01 !!! 28 21:10 hehe 28 21:10 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 bad news: all cars died 28 21:13 new guys joinin up all the time 28 21:13 shit 28 21:13 in my strategy too :P what's up with daniel? 28 21:14 dont know, he said he had to leave 28 21:14 did he? when? didn't see it 28 21:14 daniel__ must now run, but: 28 21:15 he just asked for CPU time and went 28 21:15 yep 28 21:15 are the strategies in CVS? 28 21:15 right yes I can cvs ci mine 28 21:15 Where are they loaded from? 28 21:15 too let my cvs ci mine and I tell you how they work 28 21:16 I had a few ideas while doing some "home improvement" this afternoon. I'll like to give it a shot 28 21:16 ok 28 21:16 fire away 28 21:16 With the idea or the implementation (not done)? 28 21:16 primer on strategies: 28 21:16 idea 28 21:17 we have model/strategy.rb, which is the base class of all strategies 28 21:17 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 given a car, it creates the next car (the car carries the state) 28 21:17 It can accelerate, brake, turn at will 28 21:18 actually, it creates all possible next cars and then gives scores 28 21:18 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 do you want to implement a strategy? 28 21:19 I would love too and will try 28 21:19 ok 28 21:19 how does the trainer now how to drive? 28 21:19 gus: is the car sync'd with the trainer by step, or by position? 28 21:19 My kid is undoing my toilet bowl right now 28 21:19 isnt that what they are for? 28 21:19 It is a hefty situation 28 21:20 pfff we have people coming and going 28 21:20 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 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 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 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 Any thoughts? 28 21:23 sounds like a decent strategy i'm still working on my bezier curve idea, though ;) 28 21:24 we got all sorts of ideas between us hopefully some start to work 28 21:24 Bezier sounds like a good idea too. I was thinking of it. 28 21:24 i'm trying to work out the math for finding the control points, currently 28 21:24 But if you are already working on it... Cool! 28 21:24 but i'm making progress 28 21:24 2H30 to go... 28 21:25 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 yes 28 21:27 ok 28 21:27 this is what I first thought of 28 21:27 couldn't hurt 28 21:27 getting the SP and trying to stick to it :P 28 21:27 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 oh I see 28 21:28 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 that that's one path 28 21:29 it gives you the shortest path the the shortest (not fastest) 28 21:29 again, SP may not be optimal that's why i want something we can plug arbitrary paths into, and run them 28 21:29 so what? I'm happy if we get anything to work right now :-) 28 21:29 I think in most cases SP has no chance of being optimal 28 21:29 where the path doesn't include explicit accel/deccel traces 28 21:29 true true 28 21:29 just a set of points to cross 28 21:30 SP will never be optimal 28 21:30 we're like babies, so crawling across the finish lines is good enough 28 21:30 but you can for instance get the control points of your bezier from there... 28 21:30 i agree from the SP? 28 21:30 SP is optimal on a straight track with no turns :-) 28 21:30 :-) 28 21:30 i suppose that's true 28 21:31 ok, I added some 38 000 assertions to the code 28 21:31 in that case the strategy is pedal to the metal 28 21:31 ???? 38000???? 28 21:31 now Een data dump is equivalent to our simulator 28 21:31 the simulator is proven correct? great!!!!! 28 21:32 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 there was nothing broken in the sim, was there? 28 21:33 yes, couple of really weird bugs that I managed to slash without actually doing much, or anything 28 21:33 ok, time to go think about how to execute paths as simply as possible 28 21:33 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 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 could you tell me why the first line is wrong (ugly yes, but wrong?) 28 21:34 I just shortcutted 28 21:34 ok 28 21:34 there are multitude of possible command variations where if "Accelerates" is true 28 21:34 I just wanted to know what was broken in Simulator :) 28 21:35 a, al, la, ar, ra, rab, rba, bar, ... 28 21:35 rba? right, brake and accelerate??? don't get it 28 21:36 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 ok anyway, it works now so thanks :) 28 21:36 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 yes but you cannot accelerate AND brake at the same time, can you? 28 21:37 so, maybe I'll can start to come up with my own version of trace generator 28 21:38 ok 28 21:38 do we have already a tool that visualizes the path the cars drive? 28 21:38 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 I'm still working on my strategy sweet! right now 28 21:39 at least, assuming you path is calculated as a continuous formula... 28 21:39 lennon: nice nice 28 21:39 ...which means it won't neccesarily be that useful for other strategies 28 21:39 aleksi: I'm just running my strategies with runstrategy.rb and inspect the path 28 21:39 wow...it's amazing how much smarter i feel after a few hours sleep ;) ok, back to the calculus 28 21:40 batsman: it seems you can brake and accelerate in rally mode -- see bottom of page 6 of the task spec 28 21:40 I just realized why the strategies don't work!!!!!! 28 21:40 lennon, imagine all the people sleeping night and day imagine there's peace for everyone 28 21:40 abr, right 28 21:40 completing icfp with masterpiece 28 21:41 I got it now: in case someone is interested 28 21:41 yes, tell 28 21:41 batsman, why don't they work? 28 21:41 we try to get the score as 28 21:41 yes! 28 21:41 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 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 sounds good has anyone run the simulator against the Een.dump data? 28 21:46 tobias, yes equivalent 28 21:47 nice 28 21:47 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 aha impressive 28 21:48 supid me -- its there, yes, i already have it 28 21:50 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 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 ice cream man 28 22:06 ?? 28 22:06 you know the guys who drive around in the little ice cream trucks 28 22:07 yes, but what's up with him? 28 22:07 playing funny little music 28 22:07 is he volunteering to write code or what? :-P 28 22:07 nothing, just the first time I heard the music and seen one this summer 28 22:07 Hey - I see we have a second strategy 28 22:07 hi daniel 28 22:07 he didnt look like the coding type 28 22:07 Does it work any better? 28 22:07 well not really but I found the flaw in my strategy and I believe in yours too 28 22:08 oh? 28 22:08 we try to get the score as yes! 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_ so this doesn't bias towards the gradient or anything the solution is 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 have you guys seen this: http://www.cs.chalmers.se/~een/icfp/Een.gif 28 22:10 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 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 man! a really nice driver! 28 22:14 Okay, if that's what we're up against... 28 22:14 dont think so 28 22:14 we're screwed 28 22:20 Then again, we're screwed if we can never even drive around the 0_stupid track 28 22:20 :| 28 22:21 davel, cool driving I wonder if that trace -> anim gif converter is somewhere available? 28 22:21 that animated gif? I didnt drive that probably not til after the contest deadline 28 22:21 it belongs to one of the organizers 28 22:21 davel, I understood that, I just wondered if someone somewhere has that converter 28 22:22 yeah the contest organizers 28 22:22 if anything, it'd be in the site 28 22:22 :-) 28 22:22 ok, I have my own idea of A* searching 28 22:23 sweet lets hear 28 22:23 I'm gonna pursue it, but feel free to interrupt me if needed for the team effort 28 22:23 well I don't think we'll have anything in 1H30 mins :-( 28 22:23 davel, ok, if you're really interested in, I'll write it down at the wiki 28 22:23 aleksi, what is it? i'd like to hear 28 22:23 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 batsman, nope, doubt we'll have a worth lightning entry 28 22:24 I'm working on something that could give some results but chances are like 10% 28 22:24 well maybe we will, hehe probably 9.9% better than the rest of this rest of us 28 22:25 maybe I overestimated :) 28 22:26 aleksi: are you gonna write it up on the wiki? if so, urusai.org ? 28 22:28 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 we need it 28 22:29 ok I will try hard 28 22:36 daniel... 28 22:37 yeah? 28 22:37 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 Yeah, they do. We should special-case it in grid_value. 28 22:38 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 forget it, I'm stupid 28 22:41 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 Sounds good. 28 22:43 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 Not surprising 28 22:44 I hope it's right, at least :| now, is it possible to use that? 28 22:45 Do it for 8_ManyWays and I'll be impressed. 28 22:45 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 I HAVE IT!!! 28 22:47 Now if only we can figure out how to use this information. 28 22:47 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 Oh, no. Let me do a cvs update -d 28 22:48 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 I just want to ci that 28 22:50 put tools in tools 28 22:50 ok, I'm not braindead yet :) I mean the SP code isn't that something general for strategies to use? 28 22:51 Well, you could put it in strategy 28 22:51 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 Ok, so I'm looking at gradient_method. And? 28 22:55 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 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 the perpendicular line defines before and after ok? 28 22:59 ok 28 23:01 aleksi ? 28 23:06 55 minutes to go 28 23:07 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 really? I haven't run them for a whil 28 23:08 but one is failing and I dont know if its something on my rnf my end 28 23:08 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 is it in cvs 28 23:09 not yet wait I sec, I want colour :) 28 23:09 what do you want me to look at with the shortest path? 28 23:10 you can try to get the control points from that for your bezier thing 28 23:10 i was thinking about that 28 23:10 or implement a strategy w/ that 28 23:10 thats lennon 28 23:10 ok I cannot think very clearly now it's only 1AM localtime but I've been working on this since 7am 28 23:10 my lack of sleep is catching up to me too I have had 2h sleep since this started 28 23:11 w/ less than 2 hours break in total 28 23:11 any ballpark estimates on how many points we're going to be looking at in an SP solution? 28 23:11 you must be really bad 28 23:11 and that last many hours have been seriously unproductful 28 23:11 i.e., the simple one you posted the matrix for had 9; is is going to scale linearly, or something worse? 28 23:11 no idea 28 23:11 ok 28 23:12 I can count it if you want 28 23:12 i'll keep looking for n-point bezier algos, then 28 23:12 just give me a sec, I want colour 28 23:12 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 well, all I can tell you is that the solution for track 8 28 23:13 at least if we're calculating one continuous curve, rather than stiching together a bunch of small ones 28 23:13 took a couple screen pages 28 23:13 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 almost done 28 23:14 ...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 how do you put colour in a xpm? I keep touching the header and don't get anything 28 23:15 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 in the following: static char * foo_xpm[] = { "1024 768 92 1", what does the '1' mean? 28 23:16 and let's have a brief discussion if I didn't explain well enough 28 23:19 aha the SP for the first track has got 2140 points 28 23:19 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 but beware, it's mostly straight lines! 28 23:19 what is SP? 28 23:19 shortest path 28 23:19 oh, god...i wish i'd found this url about 24 hours ago: http://home1.stofanet.dk/breese/aaai99.html 28 23:21 da-da-da-duh except its just overview stuff 28 23:22 yeah, but it could have saved me at least a fair bit of blind stumbling 28 23:22 updated fixpoint a bit 28 23:22 points ok 28 23:23 ok i'm trying to ci but have conflicts 28 23:23 with units.rb? 28 23:23 no with runstrategy and others I haven't touched units.rb in ages :) 28 23:24 ha! ages -- no more that 24 hours possibly 28 23:24 davel, is there any idea in there? 28 23:25 have to go to bed -- see you tomorrow 28 23:25 ok cu just ci the dumpsp.rb thing 28 23:25 aleksi: my brainis failing fast 28 23:25 please check if I screwed anything in the process I had conflict and I'm not sure I resolved them 100% 28 23:26 I think, that since lightning entry wasn't possible, I might as well sleep well and be wise tomorrow 28 23:26 yeah 28 23:26 yeah good idea 28 23:26 we're all going now 28 23:26 we still have 2 full days 28 23:26 but please just take a look at the pics 28 23:27 instead of rushing to implement the idea now start with it tomorrow 28 23:27 I will 28 23:27 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 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 ok 12 hours??? 28 23:28 yeah almost 12 for me 28 23:28 or however long it's been 28 23:28 I was up at 6 my time 28 23:29 I started at 5GMT 28 23:29 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 now it's about 23H30GMT :) 7 hours of sleep is not bad I won't get that much today 28 23:29 I had 2 hours of sleep in since things started nap time for sure 28 23:30 i haven't had that much sleep in several days...the contest just came at the end of a tough week 28 23:30 wow aleksi, ran your tests for the first time, impressive 28 23:30 go sleep, kids 28 23:30 now, that's a man, davel!!! 28 23:30 my mind was relentless early one but now I dont have much 28 23:30 however be careful w/ the code 28 23:30 ? 28 23:30 hope you can get somebody to assist you it's otherwise gonna be hard to code alone, in the dark :) 28 23:31 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 ummm 28 23:32 lennon, when shall you sleep next time? 28 23:32 I'll probably aim for 7H sleep 28 23:32 its dinner time for me, but I will nap, I will be back within the next 6h 28 23:32 well, it's 4:40pm my time, and i got up around 9:30am 28 23:32 you know, spending 1H more time sleeping can boost my productivity tomorrow we're clones 28 23:33 i should make it until at least 3am or so, but then i'll need to nap again 28 23:33 but you're tougher than me 28 23:33 ok guys, let's have a nice night 28 23:33 I've only been here for 19H but I'm tired :P 28 23:33 seeya 28 23:33 I'll go home, and hack there 28 23:33 cu 28 23:33 ciao 28 23:33 I guess I'll write the finder in C and swig, because otherwise it'll be slow as hell sweet dreams 28 23:34 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 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 # (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 aaaaaaaah it works for me shit, it's ruby 1.8 sorry 28 23:35 me too 28 23:35 I forgot we're targeting 1.6.8 28 23:35 with 1.7 series 28 23:35 I can install 1.6.8 i mean 1.8 no big deal 28 23:35 nope, just let me change the code 28 23:36 latest preview or what? 28 23:36 s/sort_by/sort/ 28 23:36 could anyone prepare some hand made paths for the tracks? just polyline from start to finish, like [(10,10), (15,100), ...] 28 23:37 paths or trace ? 28 23:38 paths anyway, sweet dreams to everyone 28 23:38 bye 28 23:40 ok, just did ci w/ s/sort_by/sort/ 28 23:40 thanks now i just hope my poor little 800mhz chip can handle the processing... ;) 28 23:41 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 sweet dreams 28 23:43 cu guys, we'll see if you can surprise us tomorrow bye 28 23:44 bye 28 23:50 well batsman path tracing is pretty nice 28 23:52 the xpm renderer? yes it is 28 23:53 yep 28 23:53 weren't you going to go to sleep? 29 00:00 I am I need it seeya 29 07:01 hello? aleksi? I'm initializing my brain, need some more minutes to be fully operational while I have breakfast 29 07:06 uh? no commits this night?? 29 07:09 aleksi? 29 07:13 guess it's now me and me :) 29 07:26 hi!!! 29 07:32 anyone still alive out there? 29 07:32 I am 29 07:33 how goes it? 29 07:33 well, just initialized my brain seems there were no commits this night 29 07:34 i just made some 29 07:34 and my IRC log shows no activity here seems davel went sleep shortly after me 29 07:34 indeed 29 07:34 and that's the end of my logs 29 07:34 ok 29 07:35 mmm, I'll take some time to read first the code you committed then some math stuff on optimization and bezier 29 07:35 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 ok 29 07:36 i think we're going to have serious scaling problems there, unless we hand-draw the control points 29 07:36 ... I can have a few computers running whatever we get 29 07:37 well, we're looking at no less than O(N**2) complexity, even for less than pretty curves 29 07:37 and on monday, I could easily get a dozen PIII 800 Mhz or something 29 07:37 it's certainly an option 29 07:37 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 well, maybe i'll go back through some of my notes...i left off that track several hours ago 29 07:39 what your local time now? 's 29 07:39 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 uhh, 9:40am here 29 07:40 since the real crunch time is just coming up, 29 07:40 that's right spend some time to save more 29 07:40 and i've got a job interview on Tuesday 29 07:40 yes, better sleep well before 29 07:40 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 bags under the eys should have disappeared by then 29 07:41 let me know if you have any questions about the code or wiki comments 29 07:41 ok I'll tell you I'm still in my init phase waiting for the first caffeine dose 29 07:42 and you can speak? i'm fairly non-verbal until i at least smell my morning coffee 29 07:43 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 good plan -- the avoiding addiction, especially 29 07:43 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 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 I cannot take more than say ~100mg caffeine 29 07:47 if only that were enough to get me off caffeine, or nicotine... 29 07:47 w/o getting hooked again 29 07:47 ...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 which mains headache for a couple days or more s/mains/means/ 29 07:48 i actually do okay after about 24 hours with no caffeine 29 07:48 dunno why 29 07:48 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 it seems the ICFP contest... ... came at the wrong time for everybody 29 07:49 oh, well perhaps it will have come at the wrong time for the ocaml team, as well ;) or the schemers 29 07:49 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 and very good functional compilers 29 07:50 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 and have been, i hope 29 07:51 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 ouch 29 07:53 OTOH when it works it's pretty fast 29 07:53 my whole household gets withdrawl symptoms if we go 3 hours without access 29 07:53 up to 4Mbps 29 07:53 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 now, I'd trade the Mbps for reliability nice 29 07:54 there's always dialup, or ISDN ;) 29 07:54 not here I'm in a dorm near the univ. 29 07:55 ahh 29 07:55 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 most of the time, i try to keep my computer out of my bedroom 29 07:56 so I need like 1 minute to go from sleep to "potentially coding" state 29 07:56 otherwise, i never sleep 29 07:56 I use ear plugs all the time this isolates me from the Chinese too 29 07:56 not from the noise -- from the temptation 29 07:56 hehe I had to overcome that some months ago :) 29 07:59 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 basically, it can "see" the shape of a curve, 29 08:00 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 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 ummm, that "and direction" thing is interesting so one wall perpendicular to your current direction is "closer" that one paralell right? 29 08:02 not necessarily 29 08:02 it's a nice way to avoid running into the walls I mean, we could add such a term 29 08:03 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 do you think these things could be used to refine one path I mean, we have already the SP 29 08:03 we do 29 08:04 would it be possible to do some local optimization in curves? 29 08:04 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 possibly 29 08:04 maybe even using a centripetal fit model 29 08:04 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 except that the SP looks nothing like a good "racing line" 29 08:05 and even though it's stupid and non-optimal it works 29 08:05 personally, i'd rather start with a path that just stays equidistant from the walls and refine from there 29 08:05 that's why I'd like to be able to optimize paths well, take it like that: 29 08:06 the SP *likes* tight corners, because they are shorter distances 29 08:06 the SP gives you the overall path 29 08:06 but our model should avoid them, because they require you to slow down far too much 29 08:06 then you can modify it to always stay equidistant from the walls 29 08:06 esp. if we're even going to consider the rally mode sure 29 08:07 it should be easier and faster to refine one already existent path than to find it from scratch no? 29 08:07 you're right, of course 29 08:07 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 actually, i was just about to mention an article i found about "field effect" pathfinding that does exactly that 29 08:08 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 you basically get a wave propagation model from the destination and around obstacles sure 29 08:09 I'll try it now 29 08:09 okay 29 08:11 mmm poingrid has changed since I last saw it now there's a new adj term need some time to think 29 08:14 can i ask a favor, as long as you're poking around in the pointgrid code? 29 08:15 yes? 29 08:15 i'm hoping we can move some of the reusable geometric calculations out of there, and into the 'geom' module 29 08:15 geom? have to cvs update :) 29 08:16 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 strategy/avoidwalls.rb 29 08:16 it's just some general-purpose stuff right now, 29 08:16 interesting 29 08:17 and the avoidwalls bit is just the start of the algorithm 29 08:17 ok, I'll see if I can generalize it 29 08:17 but it does help to illustrate what i mean by "seeing" the shape of upcoming obstructions 29 08:17 nice, I might reuse #distance_to_wall 29 08:18 there's a Point class in geom.rb, which does distance calculation, interpolation, etc. and please do 29 08:18 I need that to calculate the penalty associated to tight curves 29 08:18 i basically just threw stuff there to get it into code before i forgot it sounds good 29 08:18 I think this could give good results 29 08:19 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 we can use them as terms in the scoring process 29 08:19 exactly 29 08:19 and then play w/ constants but will these things work as the shortest_path.rb ? 29 08:20 that's exactly what i wanted the neural net to do 29 08:20 I mean, make a distance matrix and deriving the path from there? 29 08:20 play w/constants, not the SP 29 08:21 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 that could work 29 08:22 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 esp. if the SP algo. was offset by the wall-avoidance or curve-fitting 29 08:22 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 How are you guys doing 29 08:24 but this would not hold if we add penalties due to walls hi 29 08:24 hmm 29 08:24 fine 29 08:24 by the way I'm from another team just so you know 29 08:24 a spy! 29 08:24 just came to say hi 29 08:24 we didn't make it within the first 24H 29 08:24 * lennon ducks and hides 29 08:24 a spy!!! :) 29 08:24 that's why I said I'm from another team so you can pause your conversation 29 08:24 you came here a few times! 29 08:24 yes very briefly how far are you guys? 29 08:25 you were monitoring our activities ok 29 08:25 in general just to see how far you are 29 08:25 which team are you from? 29 08:25 scheme 29 08:25 let's make some info exchange 29 08:25 sure but we're like in....4 people, 2 part time 29 08:25 here we had more people 29 08:26 (4 total...of which 2 part time our chan is pretty big but they're just observers 29 08:26 but we were not very productive the first day 29 08:26 * vincenz nods 29 08:26 or spies :) 29 08:26 we were pretty productive the first 12 hours or so (i fyou take aweay sleep) then we kinda got bogged down 29 08:26 we have eight cvs committers, 29 08:27 I had calculated a certain preprocessing step would take 5000 seconds I have 4 cvs committers 29 08:27 wow 29 08:27 yeah 29 08:27 but only six doing much 29 08:27 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 our team is quite distributed to say to least 29 08:28 are you close to GMT as well, then? 29 08:28 * vincenz nodsd I'm in belgium 29 08:28 i'm GMT-7 west coast, USA 29 08:28 another guy here is in austria 29 08:28 we have people in several time zones 29 08:28 then I've got two people from the east coast I think 29 08:28 here we range from GMT+6 to GMT-7 29 08:28 we've a couple more US folks (both east coast, IIRC) 29 08:28 does it go faster seeing you have 8 cvs'ers? 29 08:29 i wouldn't say "faster", necessarily... 29 08:29 honestly 29 08:29 cleaner code perhaps 29 08:29 I don't know how much you have 29 08:29 ...we just gave accounts to pretty much anyone who asked 29 08:29 you have people who can clean up 29 08:29 but I'm a little bit disappointed w/ the amount of code we have at the moment 29 08:29 codewise....we don't have a lot 29 08:29 but it's pretty clean 29 08:29 but that's cause scheme requires very little :P 29 08:29 and we have unit test for most of it 29 08:29 we don't 29 08:30 yes, that's really nice 29 08:30 but so far our steps work 29 08:30 now, the figure 29 08:30 besides, shouldn't you be talking in "expressions," not "lines"? 29 08:30 (took some cursing and debuggin) 29 08:30 we have >38000 unit tests :) 29 08:30 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 you could have come to Ruby 29 08:31 but we have some tools in java and c too 29 08:31 this team is 100% open :) 29 08:31 so is ours :) 29 08:31 we have one perl script still hiding in our cvs 29 08:31 just whoever came by got cvs access yes :) 29 08:31 our dirty little secret ;) 29 08:31 same here 29 08:31 if you want, I can rewrite it in Ruby 29 08:31 not really worth the time unless we have hours to kill before the deadline, or something 29 08:31 so...if you don't mind me asking at what stage are you? conceptually 29 08:32 ummm 29 08:32 esp. since it's just a track visualization tool 29 08:32 this is sensible information :) lennon? 29 08:32 we're all working from a lack of AI knowledge, 29 08:32 I suppose you can read in the track ah 29 08:32 is it OK to disclose our secret weapons? :-) 29 08:32 at the beginning of the ai stage? 29 08:32 but we're pretty close to a working set of heuristics 29 08:32 umm we have a framework 29 08:32 yeah 29 08:32 ah I think we're going to use heuristics too 29 08:32 past beginning, but not stable yet 29 08:32 for evaluating things 29 08:32 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 here, too 29 08:33 yes 29 08:33 test cases helped w/the bugs 29 08:33 but now it should be solid 29 08:33 skidding model? 29 08:33 we have 38000 assertions!!! 29 08:33 nothing yet 29 08:33 did you implement that at all? 29 08:33 o no 29 08:33 the skidding? us neither I mean...tiebreaker... 29 08:33 we were running lightning yes, first solve all 10 tracks 29 08:34 i'll be happy if we can get around all the tracks, personally 29 08:34 then optimize speed 29 08:34 10 tracks? lennon: I know what you mean 1-9...10? 29 08:34 0-9 29 08:34 eum 29 08:34 oh, wait... 29 08:34 hehe 29 08:34 0 is just in our repository oops 29 08:34 0 is our testing track :) 29 08:34 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 our real secret weapon is my roommate, who doesn't write code at all... 29 08:35 hehe 29 08:35 ...but is a certified race driving instructor ;) 29 08:35 the thinktank oh :) 29 08:35 hehe 29 08:35 well I'm going to shower and get some food 29 08:35 ok 29 08:36 bye people good luck! 29 08:36 cu 29 08:36 you too 29 08:36 good luck to you too well 29 08:36 well, that was certainly personable 29 08:36 :) but he had been spying on us :) hehe 29 08:37 if he's thinking that they "might use heuristics," i think we're ok 29 08:37 doesn't seem they're more advanced 29 08:37 as long as he doesn't have the wiki url ;) 29 08:37 yes :) nor CVS access 29 08:37 or a web browser, and access to google 29 08:37 but google takes some days to update, doesn't it? 29 08:38 depends on the site 29 08:38 is there any "sensible" link in the wiki (rubygarden's)? 29 08:38 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 I'm going to check it 29 08:38 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 ok 29 08:39 at least until the contest is over 29 08:39 then we're safe 29 08:39 it was read-only but informative ;) 29 08:39 yes by vincenz' words 29 08:40 so, as i was about to say before our visitor dropped in... 29 08:40 I would say they're in worse shape that us 29 08:40 one other thing i'd like to see in the new pointgrid: (or the test cases, at least) 29 08:40 yes? 29 08:40 why not generate it once, and then just marshal it to disk? 29 08:41 yes 29 08:41 each run takes a couple of minutes on my machines, 29 08:41 I had been thinking of that it'll be nice ok 29 08:41 which is time i usually spend staring at the terminal window should be just a few lines 29 08:41 I'll make the generalized pointgrid 29 08:41 i'm even happy to add it, once the new class is in place sounds good 29 08:41 which accepts a correction factor for a given point and is able to save to disk 29 08:42 i'm going to work some more on the rangefinding and curve fitting algos 29 08:42 ok cu now 29 08:45 just a small question 29 08:46 ?? 29 08:46 do you guys know of any other teams on freenode? 29 08:46 I do not 29 08:46 was jsut curiousy ok I'll leave the chan again bye! 29 08:46 been working on our code base for some 19H yesterday, no time to meet people hey! 29 08:46 what? 29 08:47 you can drop by to tell us 29 08:47 tell you? 29 08:47 ... if you found other teams 29 08:47 oh sure 29 08:47 :-) spying is fun 29 08:47 :) heh I'm not spying just curious 29 08:47 hehe I know 29 08:47 * vincenz leaves the chan 29 08:47 lennon 29 08:47 yes? 29 08:47 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 one of the risks of using an open channel on a public server, i suppose 29 08:48 for instance... A?jtra? did I miss something 29 08:49 i really don't think that we have that much for someone to steal 29 08:49 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 oh, good...we'll get lots done that way 29 08:49 we should spread the news we have a super-optimizing path finder algo it runs in 2 seconds 29 08:50 i can make one that runs in 2 seconds... 29 08:50 and test 3.10^11 combinations :) 29 08:50 ...it just won't be very pretty 29 08:50 can you? 29 08:50 maybe not 2 seconds, but fast 29 08:50 my problem is that I think I'm lacking some background 29 08:51 as am i 29 08:51 so I keep referring to the SP and pointgrid cause I see how it works and how it can be tweaked 29 08:51 that's fine 29 08:51 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 well, it took me about 8 hours to write the code that i checked in today 29 08:52 poingrid is tangible ???? 29 08:52 i spent a lot of time drawing splines, and reading algorithm descriptions, etc. 29 08:52 that much?? wow!! you've read quite a lot! 29 08:53 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 ok 29 08:53 'cause it certainly counts for the contest 29 08:53 yes :) in the long run 29 08:53 so, don't worry about not coming up with some amazing algorithm 29 08:54 thinking should be an optimal strategy :) I have ideas too but I want to have something _now_ to rely on 29 08:54 and that's a good view 29 08:54 even if it's dumb 29 08:54 that's why i wanted to use floats instead of FPNs 29 08:54 it's good if it makes all tracks why floats? speed? 29 08:54 i don't want to know how many man-hours have gone into the FPN code and yes, speed too 29 08:55 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 Dmitry ???? no AFAIK Idan? you are here, OK aleksi and me 29 08:57 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 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 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 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 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 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 basically, what i'm imagining is a hybrid static/dynamic planner: pointgrid, with the correction factor, becomes the static, "offline" stage 29 09:00 yes! exactly 29 09:01 which is then fed into a "dynamic" strategy-based evaluator, 29 09:01 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 that's why i'm thinking i should spend some time working on it 29 09:02 but it requires essentially thinking a lot not coding 29 09:02 even just getting the basic driver and trace output working, with a strategy that just follows the SP 29 09:02 that could be nice 29 09:02 and *then* starting to add heuristics 29 09:02 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 absolutely 29 09:03 as in fastest track I think we finally got the whole picture in place 29 09:03 but can we explain it to anyone else? or do we have to get it all in code before we forget? 29 09:03 read track -> process with generalized pointgrid -> derive path -> feed to strategy evaluator -> make traces I won't forget 29 09:04 ok 29 09:04 I've been up for only 2 H 29 09:04 good point 29 09:04 I will pass the knowledge to whoever comes here in the next 17H or so hi tobias! 29 09:04 hi 29 09:04 there hasn't been much activity this night 29 09:04 this night? 29 09:05 but a couple things happened now I mean in the last 9H or so 29 09:05 m i thought y'all went to sleep at 0:00 gmt 29 09:05 mostly, yes 29 09:05 i see 29 09:05 that'd be pretty early for me 29 09:05 :) 29 09:05 considering it's 5pm local 29 09:05 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 yes irc is public 29 09:06 seems they're not more advanced than us 29 09:06 he announced himself, and everything...not a very good spy, if you ask me ;) 29 09:07 we might have one spy incorporated now: jtra, he's been here since yesterday :) 29 09:07 he did tell you what they are doing? 29 09:07 right ohh, not really a lot 29 09:07 he said he "thought they were going to use heuristics" 29 09:07 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 any progress in following these nicely generated paths? 29 09:08 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 >1hour 29 09:08 i've been working on rangefinding and prediction code 29 09:08 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 where strategy evaluator also expands out to applying multiple weighted heuristics 29 09:10 nice 29 09:10 instead of a single monolithic method 29 09:10 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 too little time for that, maybe -- humans doing "educated guesses" should be more efficient 29 09:12 ok 29 09:12 depends on the number of heuristics, really 29 09:12 yes we shouldn't get many more than 10 or so and that's a max 29 09:13 but certainly not a priority 29 09:13 I cannot think of that many ok 29 09:13 the automatic tuning, not the limit 29 09:13 then I'm writing something on the overall picture in the wiki 29 09:14 go ahead 29 09:14 and then work in step (2) to bias against tight curves and paths close to walls 29 09:14 i will read it 29 09:14 my comments were a bit rambly, i know 29 09:14 we're all hit by lack of caffeine, it's ok :) 29 09:15 so, i think that tonight, i may go for a modest task, and then try to get some sleep 29 09:15 ok just don't push it too far it's better if you sleep the time you need 29 09:15 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 and come back again in 8H, much more productive 29 09:16 it should be pretty quick 29 09:16 i will leave again soon (family) and be there again tonight -- 19:00 gmt 29 09:16 ok 29 09:16 i just want to know if I'm going to have to reimplement rect/polar conversions, etc., in terms of FPNs 29 09:16 dunno 29 09:17 it's all just basic trig, but it's verbose, and needs a lot of testing 29 09:17 could you recommend some sources I could print out and look into over the course of the day 29 09:17 mmmm it'd be nice if we got the strategy part to work 29 09:18 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 that's runstrategy.rb model/strategy.rb and strategy/*rb 29 09:18 will look into them 29 09:19 but if you want to review anything else, it's ok, too 29 09:19 oh, you meant source code, not references... 29 09:19 lennon: if the calculations you do only have to be approximately accurate, i'd say use normal floats 29 09:19 but as I see it, we're going to have some work on 29 09:19 maybe i am a little tired ;) 29 09:19 1) strategy 2) heuristics 29 09:19 tobias: that's what i want to do, anyway 29 09:20 3) perhaps refining the generalized pointgrid (when I finish it) 29 09:20 tobias: in fact, that's what i would have done all along, given my first choice 29 09:20 ok 29 09:21 btw, tobias, thanks for fixing FPN I know it's a PITA 29 09:21 indeed 29 09:21 it took me like 1H just to add a few test cases 29 09:22 it takes a special kind of dedication to write your own math primitives library 29 09:22 yes it's that time frame 29 09:22 like we have 29 09:22 I know it's quite exhaustive 29 09:22 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 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 thanks. 29 09:24 FPN should be *really* solid now 29 09:24 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 as it's used by the simulator and it passes the 38000 test cases 29 09:24 tobias: i mean, instead of the strategy framework 29 09:24 well, I switching to coding mode 29 09:24 ok, will print that out, too batsman: 29 09:24 want to write the generalized pointgrid I've been talking all this time ? 29 09:24 and actually, the simulator has been failing a testcase for me since the last set of checkins 29 09:25 i thought about what if we do kind of raytracing in the pointgrid code? 29 09:25 raycasting ? lennon: 21 tests, 38152 assertions, 0 failures, 0 errors just right now 29 09:25 weird 29 09:25 do I have to update? 29 09:26 following longest unblocked straight lines and distribute distance values accordingly 29 09:26 not unless you're running something really old see! longest straight distances! 29 09:26 I updated after your commit 29 09:26 i've been talking talking about that all evening 29 09:26 :-) 29 09:26 mostly to myself, unfortunately ;) 29 09:26 we do all have something to hold to for instance, I'm the pointgrid + SP guy: I like tangible code 29 09:27 ok i just wanted to mention that thought of mine 29 09:27 you've been into heuristics and longest straights forever, lennon :) now daniel was the "strategy/" guy 29 09:28 i'll take that as a compliment 29 09:28 aleksi -> simulator 29 09:28 lennon: you mean for the pointgrid code, or for the car to actually follow these longest lines? 29 09:28 davel -> super A* on the way 29 09:28 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 that's not very difficult in the strategy 29 09:29 it would just yield more accurate distance values there 29 09:29 bias towards '.' and 'a' instead of turns 29 09:29 mbut it's maybe not worth the effort (often typing m at the start because i'm used to xpilot) 29 09:30 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 ok 29 09:31 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 the picture is down the page a bit, but i think it visualizes the algorithm pretty well 29 09:33 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 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 emm that's what we're doing *right now* 29 09:35 okay 29 09:35 with point_grid and shortest_path.rb 29 09:35 that's what i thought 29 09:35 pointgrid 29 09:35 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 ok I think I'll put these links in the wiki, they're really nice 29 09:36 cool 29 09:36 i will now leave and print some files out. See you around 19:00 gmt 29 09:36 ok 29 09:37 cu 29 09:45 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 very nice, indeed 29 09:46 hehe ok, now I'll try it where was your 'distance to walls' method? 29 09:47 strategy/avoidwall.rb 29 09:47 ok 29 09:47 avoidwalls.rb -- sorry 29 09:47 it's quite general 29 09:47 indeed 29 09:47 perhaps it belongs into track? Track#distance_to_walls(x,y) 29 09:48 except its direction-specific 29 09:48 I think it makes a worthy addition to Track 29 09:48 i had originally put it in Car, but Track would work, too 29 09:49 I just don't see how it works A?? 29 09:50 it might not -- it's basically a direct translation from pseudocode you're right 29 09:50 if I understand it... 29 09:50 the 'inc' variable is all fsck'd up 29 09:50 it only scans in one direction, (1,1) 29 09:51 right 29 09:51 ok 29 09:51 i originally had a mutiplier for 'pos', instead of an increment, which worked... 29 09:51 can I rewrite that and put it in Track? 29 09:51 ...but got less accurate the further you were 29 09:51 yes 29 09:51 sure 29 09:51 this needs to use more angle steps as you get further away 29 09:52 'distances_after_turns', you mean? 29 09:52 yes 29 09:52 yeah, the steps were just a WAG 29 09:52 actually 29 09:52 and a parameter 29 09:52 I would rename distance_after_turns 29 09:52 you guys, you just run 29 09:52 to distance_from_wall hi aleksi 29 09:53 morning people 29 09:53 hello 29 09:53 I never was a marathon type anyway :) 29 09:53 some news in the "big picture" side 29 09:53 i need to remove the &handler block param from that method, too... ...another byproduct of a previous version 29 09:53 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 alright i suppose it's not the world's most obscure algorithm ;) 29 09:54 :) if you have been up for >2X hours, all algos become obscure :-) 29 09:55 but i've only been up for 19 or so :) 29 09:55 aha then you need a few more minutes to deserve sleep :-P 29 09:56 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 good luck, and godspeed 29 09:57 god night 29 09:58 rest... cu later 29 10:03 do we already have a crash according to the last requirement on page 4 29 10:03 yes in car.rb: def crash?() @track.crash?(@x,@y) || (@track.finish?(@x,@y) && @prev_x > @x) end 29 10:04 indeed, great 29 10:04 I'm still trying to bias pointgrid not to get close to walls 29 10:08 lennon left? 29 10:08 yes is that you, tobias? 29 10:08 i'm tobias, someone uses my nick 29 10:08 ok uni-oldenburg.de :) yes, he needed some sleep 29 10:09 i looked over geom.rb. will send him email 29 10:09 found bugs? 29 10:09 or maybi check a fixed version in yes 29 10:09 better ci 29 10:09 ok 29 10:09 thanks 29 10:09 bye 29 10:09 as he's gonna sleep now... cu 29 10:30 aleksi??? 29 10:30 yes 29 10:30 what are you doing :) 29 10:31 I would not dare to tell you :) 29 10:31 just did the generalized pointgrid but its really slow ???? 29 10:31 surprising :) 29 10:31 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 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 and make an extension hehe we don't have the traces yet 29 10:32 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 cannot show the car moving until it moves :) but it sure is pretty 29 10:33 well I can make a trace by hand if that's the only way forward :) 29 10:33 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 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 but I don't want to lock people out 29 10:35 those finders won't find anything useful if they're written in ruby during this time period 29 10:35 if somebody has no compiler :| 29 10:35 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 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 I'm looking forward to seeing your animations :) 29 10:42 it' 29 10:42 yes? working already? ? 29 10:43 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 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 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 couple of test tracs would be great indeed 29 10:53 yes 29 10:53 I mean, even very small ones as well 29 10:53 but I'm getting stuck 29 10:53 kind of 10x10, 50x50, 100x100, 200x200 29 10:53 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 easy round, oval, square with dividing line, those would be easy to draw 29 10:54 I cannot see the behaviour yes the problem is that I don't know how the tool the org. gave works 29 10:54 oh, small road is a great idea 29 10:55 and first thing I tried to resize 0_stupid 29 10:55 btw. I changed my idea of guided heuristics during night 29 10:55 but my stupid programs keep blurring everything yes? what's your new position? 29 10:56 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 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 the most problematic portion for heuristics is to guide when to brake to prepare for curve 29 10:57 yes it has to foresee the curve 29 10:57 so we're all finally on same page :) 29 10:57 but I think it's doable if you have the SP 29 10:58 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 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 that's great 29 11:01 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 yes, that kind of big picture might work at least produce some results 29 11:03 yes 29 11:03 producing near optimal is hard :) 29 11:04 it's tangible yeah 29 11:07 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 batsman, which tool? you want to convert track to png? 29 11:17 no 29 11:17 ok 29 11:17 png 2 trk or xpm to trk there's png2trk by the orgs but it segfaults :( 29 11:18 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 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 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 ok I have the xpm now which is easy too will convert it now 29 11:20 ie. a magic number, filename as a comment, x, y size, maximum color and then the pic in RGB triplets 29 11:21 ok almost got a new track 29 11:21 no it isn't 29 11:21 ok I'll take one and put the others to black 29 11:25 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 great 29 11:29 it'll allow me to test the 'avoid walls' bias in pointgrid 29 11:35 hey? the unit tests don't work! somebody broke them 29 11:49 where is Pi defined? not in Math::Pi ??? 29 11:49 our Pi for FPN is at constants.rb 29 11:50 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 plus sin and cos (I've made a lookup table, but still slow) 29 11:57 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 I'll try to speed it up 29 11:59 C is the way to go 29 11:59 yes I think it'd be best to port Track to C this would speed everything up 29 12:03 ummm did one cheap approximation and now it's 5 times faster 29 12:04 C isn't cheap, but yes, it could be easily that 5 times faster :) 29 12:05 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 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 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 but the wall could be 1 pixel wide 29 12:06 this means that the algo won't bias ok if the track is too small 29 12:07 it's not in most of the tracks, but could be 29 12:07 the wall? it's no problem 29 12:07 how about not going in circles, but instead scan 10x10, 50x50, 100x100 areas 29 12:07 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 how about precalcing the coordinates in an array "coords_to_check" which is always in order of first closest, then farthest 29 12:09 ? 29 12:10 split up coordinate generation and make the searching loop like: coords_to_check.find {|coord| track[coord].wall? } 29 12:11 but that's essentially what I am doing now 29 12:12 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 ok 29 12:12 essentially probably yes, because I try to refactor it for speed, but do you do other things in the searching loop? 29 12:12 and then I get the index not much but I was using Math.cos and Math.sin now using table-lookup 29 12:13 ok, nevermind then 29 12:13 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 that's good, since you can do the propagation precalc before starting to use it 29 12:14 yes! 29 12:15 so runtime checks are just O(1) 29 12:21 Hi, is anybody here? 29 12:21 hi 29 12:21 Batsman, still here! Have had any sleep in 2 days? 29 12:21 yes, yesterday but I've been a lot here some 25H now :-) 29 12:22 What is going on? Can you give me a quick run down? 29 12:22 ok 29 12:22 Or are you busy at the moment? 29 12:23 no problem 29 12:23 Great! 29 12:23 I need some rest :) ok 29 12:23 I'm doing a trace simulation visualization 29 12:23 That's great 29 12:23 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 to bias against tight curves and avoid coming close to walls this is actually quite easy conceptually 29 12:25 I was thinking of an optional step , somewhere between pointgrid and strategy. 29 12:25 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 But maybe it fits into your generalized pointgrid 29 12:26 what is it? 29 12:26 The idea would be to reduce a difficult and non conventional circuit, like # 8 and 9 29 12:27 8 is not so difficult :P SP finds a path :) 29 12:27 To a more conventional road type circuit 29 12:27 how? ?? got one idea!!! could save us :) 29 12:37 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 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 great workaround indeed 29 12:57 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 with what common unix program can I convert png to gif at commandline? 29 13:06 convert convert bla.png bla.gif 29 13:16 it's prohibitingly slow 29 13:16 the conversion? what? 29 13:16 yes 29 13:17 of course, if you have to generate 1000 images... you should take one every 10 steps or so 29 13:19 i like the looks of geom.rb - whats it for? 29 13:19 hi dave 29 13:19 hi 29 13:19 it's lennon work 29 13:19 I am certainly well rested 29 13:19 he plans to use it sometime in the future great we need help 29 13:19 good for hours 29 13:19 ok summary 29 13:20 help with what k 29 13:20 hello davel 29 13:20 this morning 29 13:20 aleksi: hi 29 13:20 I saw THE BIG PICTURE 29 13:20 lol 29 13:20 no, really 29 13:20 it was ugly and tried to fight with us 29 13:20 uh ok 29 13:21 but we slashed it with JPEG2002 compression routine 29 13:21 http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=WholePicture 29 13:21 and it became the tiny picture 29 13:21 now 29 13:21 that was easy to tackle, and we won 29 13:21 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 yes 29 13:22 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 this way we can hand edit we could darken areas in the curves by hand 29 13:24 k, still sorta following 29 13:24 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 I did one test run and it found a different path for the first track an interesting one 29 13:26 k so you manually gimp'd the first track? 29 13:27 yes just select black invert selection fill with white invert colours blur 29 13:27 k, what'd you save it as 29 13:27 save as pnm 29 13:27 ok cool k 29 13:27 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 but does this just get us different paths? 29 13:28 that tries to follow the path 29 13:28 yeah 29 13:28 it gets paths we still need the strategy 29 13:28 thats still tough, making the driving decisions 29 13:28 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 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 k 29 13:30 possibilities are endless :P 29 13:31 no shit :-) 29 13:31 ok, I'll commit 29 13:31 k 29 13:31 can I add the field file I've been using? in /test/data/ ? ugh rather not it's 7MB 29 13:31 ooh 29 13:31 no problem I save it as gif 29 13:32 is it pnm? 29 13:32 http://www.cs.helsinki.fi/u/kaniemel/Een.gif 29 13:32 and then you convert to pnm 29 13:32 gzip it or bzip2 29 13:32 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 it's Een.trc on Een.trk 29 13:33 ok ufff anyway 29 13:34 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 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 yes 29 13:34 and yes, I think it drives pretty well 29 13:34 wait a sec that image is yours?? 29 13:35 a visualization takes couple of minutes for two cars and 9400 commands 29 13:35 yeah, whos image is that? 29 13:35 most of the time is spent to convert pngs to gifs to make gisicle to bunch them into anim gif 29 13:35 aleksi has been working on that, but did you already get it to work??? aleksi, is that yours ???? 29 13:35 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 what do the 2 lines represent, car and shadow? 29 13:36 can you ci this beauty? 29 13:36 and another one on wish list is to write some information about the status of a car 29 13:37 hehe this is great! ok, I ci my field stuff 29 13:37 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 oh 29 13:38 I'm more than impressed :-O 29 13:38 The visualizer could take as many traces in as wanted. 29 13:38 nice 29 13:40 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 ups, forgot to add one file, up now 29 13:45 davel, do you know about any faster png 2 gif converter than program convert? 29 13:45 no, sorry 29 14:01 dave? still there? 29 14:03 yes 29 14:03 just wanted to know what you're doing :) 29 14:04 woke up and jumped on irc, so I just finished doing the morning stuff, breakfast email, etc 29 14:04 and if you had some time to play with the new code field perturbation :) 29 14:04 nice name 29 14:04 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 I see you're cleaning/reading code, adding emacs stuff, etc 29 14:06 k I will look at dumpsp2 29 14:06 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 right 29 14:07 right now dumpsp2 takes some 4 minutes for me (track 1) 29 14:08 whoa 29 14:08 yes another thing in my todo is coding Track in C that would probably make everything 10x faster at least 29 14:09 yeah maybe 29 14:09 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 yep 29 14:14 batsman: so I need to open up 0_stupid_big in gimp, to produce the field.pnm I need? 29 14:14 the field.pnm you need is in test/data/ 29 14:14 oh 29 14:14 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 k 29 14:17 I think I know why it didn't behave the way it should, I made the images wrong :) 29 14:20 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 yeah I see that the SP is a bit off the walls now 29 14:22 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 if sin(alpha) = x how do I calculate alpha if I know x 29 14:35 asin? let me check the name 29 14:35 sin^-1, asin something else? 29 14:36 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 should I use atan2? 29 14:37 Math.asin works and multiplying the bias by a constant now the car prefers the middle of the track 29 14:38 atan2(sin(0.6), cos(0.6)) => 0.6 ie. I guess I can use atan2 29 14:38 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 yep looks good 29 14:48 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 looks great! and you fixed the issue with the colours of the cars 29 14:51 I have some results w/ the field perturbation now curves are nicer no peaks 29 14:51 k 29 14:52 might be about time to thing of the dynamic strategy 29 14:52 where's the PI defined? under math or? 29 14:52 Math::PI 29 14:52 what's the way to address it, Math.PI? great 29 14:54 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 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 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 ok 29 15:12 how do I check if my var points to NaN? 29 15:12 nan? I mean, Float#nan? 29 15:13 ie a = 0 / 0.0; if a == NaN 29 15:13 I was not very clear :) 29 15:13 perfect 29 15:18 now, if somebody capable of graphical doings could prepare me a sprite for the car 29 15:18 you can take the one in Een's animation I mean the organizer 29 15:19 that won't be me 29 15:19 I suffered enough just w/ the bitmaps for the field perturbation, thanks 29 15:21 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 you've done it? wow aha 29 15:22 nice work aleksi 29 15:22 really nice 29 15:22 curious, is it supposed to be inverse colors? 29 15:23 i think there's a problem with the palette 29 15:23 oh 29 15:23 the palette is took randomized 29 15:24 where did you take the car sprite from? or is it yours? 29 15:25 quick draw 20x20 in gimp 29 15:25 ok we should soon get more people here... I hope 29 15:26 almost noon eastern time 29 15:26 I'm checking my IRC logs to see when people said they'd be coming 29 15:27 ok 29 15:32 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 that would be good 29 15:37 wolrking on anything right now? 29 15:38 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 good but I thought you were having lunch, aleksi, you need some rest too :) 29 15:38 batsman: no code, no, but I am not getting very far with ideas either 29 15:38 now I'll go to eat something, then I'll bump into my version of planner 29 15:39 planner? 29 15:39 I am trying to think through things, see if anything useful comes up 29 15:39 ok I'm reading on A* 29 15:39 ok planner as in moves required to follow a path? 29 15:39 later I'll turns my eyes off the CRT 29 15:40 planner, as in finding a trace to complete the task with minimum steps, if possible 29 15:40 well, it's a lot, isn't it? 29 15:40 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 it's ok, I'm used to handling interrupts 29 15:41 happy reading 29 15:41 can quickly save context used to watching tv, reading my mail, chatting at the same time 29 15:41 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 u're right, switching contexts always has a cost but some times multitasking gets more output in the short term :P 29 15:46 I am wonder how far lennon is on the bezier idea 29 15:46 he said he hadn't advanced much on that 29 15:46 oh 29 15:46 let me check the logs Jun 29 09:36:07 i'm holding off on the bezier curve work for right now, though 29 15:47 k 29 15:47 it's been over 8 hours since then, though 29 15:48 you hoping things have changed while he slept :-) 29 15:48 yes :) 29 15:48 the subconscious hard at work 29 15:48 perhaps his roommate (the driver instructor) left a nice set of heuristics for him... 29 15:49 batsman: yer reading up on A*? 29 15:49 yes, a bit 29 15:49 have plans for it? 29 15:50 actually I am discovering what it is and find that it's our strategy.rb thing :-) 29 15:50 I was thinking that it could be used to follow a path 29 15:50 that *is* what we're doing :) we should normally just have to code the heuristics in strategy/* 29 15:51 really, oh 29 15:51 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 yeo yep 29 15:54 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 ok guys, now's there the info text also I'm heading to lunch (6.55PM) 29 15:56 it's about time :) thanks for everything 29 15:57 lunner or is it dunch 29 15:57 the first number is the time slice, right? 29 15:58 ? 29 15:59 yes, time step: car number x: xpos y: ypos 29 15:59 aleksi's animation http://www.cs.helsinki.fi/u/kaniemel/Een.gif now w/ text info 29 15:59 I could add speed and direction as well, if felt needed 29 15:59 thats crazy good 29 16:00 we could get the judges prize for that :-) 29 16:01 if we can get a trace for at least one of the tracks ... 29 16:01 please note the green especially on last N curves, there the other car (the one I tweaked a bit) crashes 29 16:01 :) yes, saw that 29 16:01 ok, it should be useful, and now I'm really out 29 16:01 ok will you come back today? 29 16:02 bye] 29 16:02 yep 29 16:02 cu later then 29 16:19 apperently 19 teams submitted for lightning 660 people on the contest ML 29 16:19 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 yeah, wonder if the low number will translate to low number of teams for the final deadline 29 16:21 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 How many people are left working on this project? 29 16:22 k, I am listening gus: just you :-) hurry up lol 29 16:22 yes, good that you came you only have to make the A* thing work piece of cake 29 16:23 Yeah.... Scared |-) I did it in my dream in less than 5 minutes Then I woke up! 29 16:23 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 It's an highly non deterministic alg 29 16:24 determinism is overrated 29 16:26 Wow, who did the Eeen.gif? 29 16:27 aleksi it's in CVS now :-) we can do gifs for any number of cars to compare performances 29 16:27 Great! What about the trace? Who did it? A strategy of his? 29 16:28 it's Een.trc the example one 29 16:28 Duh! 29 16:28 we still have no trace generator well the ones we have fail miserably ... 29 16:29 I was thinking that we could preprocess the track 29 16:29 how? 29 16:29 And enlarge the wall by a couple of pixel 29 16:29 aha I'm kind of doing that 29 16:29 So it would pinch the small corridor And make the SP friendly 29 16:29 with the perturbation field 29 16:29 OK 29 16:29 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 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 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 good 29 16:33 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 we can do many things just by manipulating the file used in path finding how big? 29 16:34 16k 29 16:34 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 Hold on one minute, gimp failed to generate a png that it can reread! 29 16:35 ?? wow 29 16:36 OK, my mistake Here it comes 29 16:36 ok, I'll check it 29 16:38 Well, it has a hard time to leave my machine 29 16:41 The image is the superposition of the track 8 With the modification I made to it 29 16:41 I'm just seeing it now 29 16:42 I.e., I generate the SP with pointgrid and make a circuit around it 29 16:42 are you using the strategy/shortest_path.rb code? 29 16:42 Now, the Strategy can work on a conventional circuit, no risk to get lost etc. No 29 16:43 your own code? 29 16:43 Yes I don't have a strategy folder Is it in CVS? 29 16:43 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 OK 29 16:44 so you couldn't run tools/dumpsp.rb, could you? 29 16:44 No 29 16:45 that's a nice idea to create a wide "virtual track" along the path and only allows solutions that stay inside 29 16:46 That's what I kind of did then 29 16:46 could you ci some code? I'd like to see that part 29 16:46 I could, but what I have is fairly ugly 29 16:46 I wrote yesterday something that make the path, would like to see how you do it too 29 16:46 I'd like to improve it 29 16:46 ok please compare with strategy/shortest_path.rb 29 16:47 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 I'd like to grow in circle instead of square 5 minutes, I need to take care of my crying baby 29 16:48 ok 29 17:11 I am back 29 17:25 sorry gus, didn't hear you 29 17:25 I am still here 29 17:25 ok 29 17:25 but I am about to take a shower and walk break 29 17:26 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 I'll be around all day 29 17:27 ok 29 17:28 I'll be around late tonight 29 17:28 it's 19h30 in my timezone 29 17:28 11:30am here 29 17:28 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 :-( otoh when it started it was still 8pm in your time zone 29 17:29 well thanks for being involved 29 17:33 Yes, but I didn't realize it and I checked the web site at midnight 29 17:33 dave, just saw your strategy/mod_track.rb 29 17:34 Actually, it's mine 29 17:34 ok you're still using his login :) 29 17:34 No pretty code by any mean 29 17:35 just reading it now mine, which does the same for the SP part, is in strategy/shortest_path.rb 29 17:35 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 beware, even if you cvs login again, the files under CVS/ in each directory still reflect your old login 29 17:36 To avoid the bottlenecks I created 29 17:36 ok 29 17:36 That is what happend for CVS 29 17:37 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 It's painful 29 17:38 yes that's why I just did co again :) 29 17:39 I'll do that 29 17:40 yeah you will need to up date the CVS files ruby could do it 29 17:40 yes but it's better if he focuses his coding in the ICFP :) 29 17:42 Well, I am co-ing right now 29 17:42 yep 29 17:42 Done deal 29 17:42 ok I think it'a about time we plan the future (tm) 29 17:44 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 True, but 29 17:46 ... 29 17:46 If we managed to get the SP to stay away from the walls 29 17:46 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 We might be able to get traces more easily 29 17:48 batsman, your observation is correct 29 17:48 aleksi, back again! 29 17:49 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 welcome back :) hope you got some caffeine in the meantime, & foostuff to sustain high-level thoughts :P yes 29 17:49 no coffee, I don't drink it. Nor tee. Nor cokes or anything. 29 17:50 not even tea???? 29 17:50 yeah coffee sucks 29 17:50 as for the curves... I thought my field perturbation thing would help there 29 17:50 I dont drink it, but I do like pop a whole lot 29 17:50 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 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 that really is an option 29 17:51 yes but we need display capabilities then 29 17:51 and there could be two different parts here. The path generator and optimizer. 29 17:51 we could save states too, so if we do crash, only have to back up a bit 29 17:52 not sure we could get this in time 29 17:52 The first one could be automatic or manual, and optimizer just brutal horsepower. 29 17:52 and it'll mean all the effort done today would be obsolete even your gif generator, aleksi :P 29 17:52 that kind of UI would not take loads of time 29 17:52 the problem is the display 29 17:52 someone wrote a java viewer, we could maybe use that as a basis for a driving tool 29 17:52 I'd have done it already but I just don't have any toolkits on this box 29 17:53 that's it, what could we use is there ruby/sdl or something like that? 29 17:53 so I'm going to concentrate on my take 29 17:53 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 my graphics experience is very limited, but I dont think this would require a whole lot 29 17:54 yes 29 17:54 ok, I'll check to raa to see the options 29 17:55 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 if needed I could try to do something in java 29 17:55 TK if you're familiar with it 29 17:55 but I have no experience with any of these :-( 29 17:55 I did some stuff with gtk+ a while back, tho I remember nothing 29 17:55 I programmed GTK way back, in C :) 29 17:56 I did gtkmm, so c++ 29 17:56 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 why not tk? 29 17:56 I did some tk 29 17:56 can it handle everything we need? it's standard in ruby so we can all use it easily 29 17:57 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 No ruby/tk though 29 17:57 mmmm wouldn't we want to drive the car 29 17:57 ncurses, could zoom in on sections of the map, and allow show the movements at the 1024x768 unit resolution 29 17:57 like a videogame? 29 17:57 probably you could use tk as well, it would be even portable to windows 29 17:57 What a gain! :) 29 17:58 ncurses would be fastest, and it allows you to make it a game 29 17:58 ok, I'm checking the pertinent chapter in the pickaxe book 29 17:58 I miss my pickaxe book 29 17:58 ie. it reads keys without requiring mouse movement or enter or anything 29 17:58 yes, but it could be messy you could get lost in the track 29 17:58 I donated it to a comp sci student group with a bunch of others, I should have kept that one 29 17:59 :) 29 17:59 just have the map on the other window, graphical window 29 17:59 ok otoh 29 17:59 well the code would tell you if you actually crashed or not 29 17:59 in X you can get pretty decent resolution for ncurses window 29 17:59 ncurses means no window I mean windows 29 18:00 in windows it's in cmd.exe's window, isn't it? And there the font is alterable too. 29 18:00 but do ncurses work in windows?? 29 18:00 doesn't matter, unless some of us, who's going to use it, stays on windows 29 18:00 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 hehe 29 18:01 I know that guy :) candidate for game developer 29 18:01 What about a java applet that we post on the web site 29 18:01 yes, we should be fairly proficient 29 18:02 Then we call our 15 years old cousin that play nintendo all day long 29 18:02 :-) 29 18:02 And get him to get the best path! 29 18:02 yeah yeah 29 18:02 that'd mean direct win!!! I'm however concerned about one thing... we could have done this from the beginning 29 18:02 first you have to persuade his parents to let him keep up one night 29 18:02 yes, it says it on the first page 29 18:02 well, actually for the last 20H 29 18:03 I think at least one of the lightning entries used this method 29 18:03 yes sure 29 18:03 batsman, are we successful with other options? ie. a*-variations, bezier thingie (something I can't recall?) 29 18:03 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 they only want traces and code but humans can direct the tracing 29 18:04 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 they bezier would just give us paths I think, still not traces 29 18:06 yes, it's still paths better paths, but paths 29 18:06 yep 29 18:06 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 we need F(P) = T :-) 29 18:07 yes! please everybody work of F(P) = T! :) this is a critical moment 29 18:07 I have had bits of thoughts about it, but nothing great 29 18:07 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 true 29 18:08 but I think we had better stick to F(P)=T I've been thinking about quite some things now 29 18:09 the game would at least give us something to submit tho 29 18:09 yes, but I still hope some stupid strategy tracking the SP should be able to 29 18:09 k 29 18:10 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 s/rubyicfp/c-icfp/ 29 18:10 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 yeah, iterative 29 18:11 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 cause we *have* to get that to work it's essential without that, no traces 29 18:14 is it def f(path); ... ; trace end ? 29 18:14 yes 29 18:14 ummm but in the middle you have A* search using as an heuristic the closeness to the path 29 18:14 davel, I'm sure I need to use C for my A* implementation ruby just won't cut it 29 18:15 as exposed in your wiki node, aleksi you might be right daniel's code right now 29 18:15 I'll drive the C primitives with ruby, but it's impossible to make ruby run fast enough 29 18:15 always keeps the top 500 cars or so 29 18:16 mul(a,b) in FixedPoints take forever with ruby, it's about three assembly lines 29 18:16 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 ie. you can do something like 400 million fixed point multiplications per second on my machine 29 18:18 with fpn in C? 29 18:18 I'll follow anybody towards the F(P)=T vision :) 29 18:18 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 ok, you don't want the method call overhead 29 18:18 implementing the thing that uses FPN in C will make it fly 29 18:18 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 ok, so let's divide the work force 29 18:19 I postpone everything else 29 18:19 batsman F(P)=T 29 18:19 F(P)=T is #1 for me now 29 18:19 aleksi F(magic)->T 29 18:19 ??? magic? 29 18:19 davel&gus & rest: the game 29 18:20 is the magic this? http://www.urusai.org/cgi-bin/cvs/icfp/wiki?p=AleksiSearcher 29 18:20 lennon: bezier thingie is this something along the lines you thought? 29 18:20 sure! 29 18:20 batsman, yes, but the magic part is missing there :) 29 18:20 Is lennon still around? 29 18:20 with heuristic_evaluation using the SP to evaluate how good the move is 29 18:20 its 11:20am lennons time 29 18:21 11:20 am? he should be here then 29 18:21 I guess 29 18:21 aleksi: what magic do you plan to use? 29 18:21 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 ha, it'll take some time before we have traces 29 18:22 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 that idea is essentially the one in strategy.rb, but you're doing it in C 29 18:23 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 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 ok cu later aleksi: I'll be happy to assist you 29 18:24 batsman, yes, maybe strategy.rb implements the A*-part of it, but the features I like are listed down there 29 18:25 ok, A* + genetic part kinda 29 18:25 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 evolving is nice, sure 29 18:26 still, I expect to find the first path pretty fast, but not fast enough to start with ruby 29 18:26 esp. since we could have one path close to the SP easily and then optimize it 29 18:26 nevertheless my idea is nothing very unique or special, hopefully it just works 29 18:26 ok tell me what I can do to help you is this paralellizable at all? (I mean the development) 29 18:27 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 ok 29 18:27 batsman, you feel you're hitting wall with your own idea? 29 18:27 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 ok, if you're willing to jump on with this one, then let's go :) 29 18:28 and then have all failing then, what can I do?? 29 18:28 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 F(P)=T is not essential for me, actually what I want is T!!! 29 18:29 ok, first let's write and wrap track in C 29 18:29 ok I can handle that 29 18:30 then let's create some decent Car and wrap it as well 29 18:30 do you want track to be C accessible from Ruby, or just C? 29 18:30 almost everything accessible from Ruby I propose hand-written C with SWIG for wrapping 29 18:30 an extension then, so this is just reimplementing Track in C, compatible w/ existing code base, right? 29 18:31 yes, the tests should work ok 29 18:31 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 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 ok here I go 29 18:32 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 what dir should everything live in? ext/track, say? 29 18:33 how about name generActive :) 29 18:33 do you want your own namespace for the project? 29 18:33 generAstarter? at this point I think we might be better to not mixup ourselves with Strategy 29 18:34 I ask because perhaps those working on Strategy could leverage CTrack 29 18:34 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 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 maybe ctrack should be placed in model as well, if we change the name of the class to CTrack? 29 18:35 the problem is 29 18:35 yeah, I'm the boss, hehe :) 29 18:35 that each extension has to be in its own dir 29 18:36 no, actually I will do only team work why? 29 18:36 because of how extconf.rb works it's creating a Makefile that links in all the *.c it sees 29 18:36 ah, ok 29 18:36 and creates the extension so model/ctrack, right? 29 18:37 but I guess all the classes we do in C can end up in a same .so 29 18:37 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 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 I think it's safer to just do make and then require inside the dirs 29 18:40 anyway, let's call the part of the project we're doing now _bastard_ 29 18:40 or specify ruby -Imodel/ctrack etc 29 18:40 which is acronym for Brilliant A* Development :D 29 18:40 bastard is cool kinda :-P 29 18:41 do you have any fixed point math for C? 29 18:42 no I'd have to write it from scratch or look for it somewhere 29 18:43 haha 29 18:49 could we use this library? http://www.gameprogrammer.com/4-fixed.html 29 18:49 is it compatible with the specs? 29 18:49 the code uses assembler in C but I managed to compile it 29 18:49 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 surely add and sub works, mul seems easily changed to be same, as does div 29 18:50 do I get ruby's file handle, or a file name, or what? 29 18:50 sin and cos have to be written by hand 29 18:51 think twice it took almost 20 hours to get FPN to work 29 18:51 these things are easier in C :) 29 18:51 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 beware of needing more than 32bits to impl mul() so maybe use long long ? 29 18:52 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 ok then file name 29 18:52 but in this case, it's really up to you, as calling fh.gets isn't hard from C side either 29 18:53 that's why I ask :) 29 18:53 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 ok handles then 29 18:53 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 I want to store the data in a malloced area better do it in C 29 18:55 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 I want to speed up access to the track data using a malloced buffer instead of Array of arrays 29 18:55 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 that's the point of doing it in C 29 18:56 then load could be ruby which just calls C setters to alter malloced structures 29 18:56 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 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 I think it was me, not sure :) 29 18:59 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 yes 29 19:00 to make an track instance the code will be track = Track.new.load("foo") 29 19:00 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 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 back 29 19:07 hello 29 19:07 davel: want to work on the game? 29 19:07 skip the discussion on log, nothing important 29 19:07 I'm choked about the weather, such nice weather out 29 19:07 could you deal with gus instead 29 19:08 aleksi: don't worry I wasn't gonna ask 29 19:08 Are you using an assembly library in C for math? 29 19:08 roll yourself into curtains and focus in your crt 29 19:08 I might be in trouble with my G4... 29 19:08 gus: sure what are your thoughts on the game 29 19:08 gus, oh, yes, this version has those 29 19:08 I have an athlon and a G3 29 19:08 but I'm sure it won't be a problem to roll it in plain C for with G* -directive 29 19:08 I need to ++ ++ my G3 ibook into a G5 :-) 29 19:09 almost done with CImpl::Track 29 19:09 let us just get this running 29 19:09 I have done a bit of ppc asm but thats prob not a great use of time 29 19:09 gosh, this C is awful, this is my first C program in 3 years... 29 19:09 c sucks :-) 29 19:09 what's wrong here: extern void transform1(point3 &newpt, point3 &oldpt, matrix4x3 &trans); claims "parse error before '&' 29 19:10 point3 is not defined? check the headers 29 19:10 point3 and matrix4x3 are just typedeffed about 10 rows before 29 19:10 wait a sec do you have a C++ compiler or C? that's valid C++ with references 29 19:11 I say gcc -c it works 29 19:11 dunno then 29 19:11 Arg... davel: how much ruby/tk do you know? 29 19:11 I'll put this to cvs so you can see 29 19:11 gus: 0 (but I don't think that would cause me much friction) 29 19:12 are any of you using ircII? could you say how can I use two channels and swap between them? 29 19:12 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 I can see that on same window as #rubyicfp well I'll forget that 29 19:14 sorry 29 19:14 hello tobias, guys might be interested in your ncurses and your expertise with it 29 19:14 yes 29 19:15 hi 29 19:15 hi tobias 29 19:15 I have done some tk from tcl None from ruby 29 19:15 for this project? 29 19:15 to write a sort of game 29 19:15 tobias: we wanna do a manually driven "game" 29 19:15 so we can generate traces by hadn 29 19:15 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 and ncurses for the ui? does not seem to fit 29 19:17 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 first, drawing the car so that you can see the direction it faces 29 19:18 showing as much as the terminal will allow we would have to use | - / and \ :-) 29 19:19 but otherwise, it might be ok 29 19:19 we hope not to spend too much time on it 29 19:19 hmm you know the clock example? 29 19:19 vaguely 29 19:20 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 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 next we would need a terminal + font combination that allows for a really tiny, but absolutely sqare font 29 19:21 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 no where? 29 19:22 http://www.cs.helsinki.fi/u/kaniemel/Een.gif 29 19:25 nice how was that path generated? 29 19:26 it's the example 29 19:26 its the sample provided 29 19:26 i see 29 19:26 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 yes would you want the text font big enough to be able to read some sort of display (say current speed) 29 19:28 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 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 at least you could have two terminals showing different things and move the information in druby 29 19:30 yes 29 19:33 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 yes numpad? 29 19:34 that's where i looked just now :) 29 19:36 gus, tobias, are we gonna go for this game idea, if so, how should we break things up? 29 19:36 i am undecided 29 19:37 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 i am not an expert, either. just did the wrapping and a few small apps 29 19:37 ie if nothing else works, last resort 29 19:38 i think we would have to start *now* 29 19:38 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 we will have to learn to play the game 29 19:39 cause I have an idea floating in my head, also, I could try to attack the game part myself 29 19:39 tobias just stated that GO! :) 29 19:39 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 aleksi: tobias just stated what? 29 19:40 i think we would have to start *now* 29 19:40 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 I think you should just choose tk or ncurses and give it a go 29 19:41 yes, thats what we are trying to do :-) 29 19:41 you'll see pretty soon if it will be dead end, not much time wasted 29 19:41 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 ok, let's make a vote, if nothing else works ok all those pro ncurses, hands up now! 29 19:42 * davel hands up 29 19:42 (I'll ask soon pro tk, but let's take this one first) 29 19:43 undecided 29 19:43 Never done any ncurses 29 19:43 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 ok, then tk! 29 19:43 I'd vote tk cause I know some 29 19:43 tk wins! no go for it! 29 19:44 whksh whksh (sound of a whip cracking :-) 29 19:44 :) 29 19:44 hi guys, just came back from coding CImpl::Track 29 19:44 hi 29 19:45 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 tobias: what do you think of doing it in tk? 29 19:45 Wow That was close! Who is working on it? Head count 29 19:45 working on game? 29 19:45 never done any tk 29 19:45 me, I guess 29 19:45 but go for it 29 19:46 yer not in then? 29 19:46 ok, aleksi just asked me to state my view on ncurses vs tk 29 19:46 i will certainly watch 29 19:46 it is: up to you :-) 29 19:46 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 I have no experience with either I'm going back to my ctrack.c whing 29 19:47 gus: I think its me and you 29 19:47 then third one to implement the binding of these two together with simulator and car status 29 19:47 thing 29 19:47 with tobias free to roam 29 19:47 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 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 yes, mostly 29 19:49 I don't mean to tell you what to do, just give some common ground I forgot my whip home :) 29 19:49 understood 29 19:51 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 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 at the link I sent, or somewhere else 29 19:55 Actually, man n canvas The tk doc 29 19:55 k 29 19:56 I am trying for now to get a simple display of a circuit and then scroll it freely 29 19:56 great 29 20:02 greetings. all 29 20:02 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 really? 29 20:03 yep we only just decided to go forth 29 20:03 forth as in forward, not stacks, right? ;) 29 20:03 stacks? 29 20:04 "Forth", the language? 29 20:04 forth as in forward, did I mispell? 29 20:04 stack-based, postfix lang.? 29 20:04 I get it 29 20:04 sorry 29 20:04 I dont really know forth its funny, dont be sorry 29 20:05 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 you mean java or clr ? 29 20:06 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 I dont know forth 29 20:06 just to trumpt any potential Perl teams out there and I'm still kidding so don't worry 29 20:06 parrot isn't all stack based, plus its not ready for consumption hows bezier doing? 29 20:07 and I'm *not* dealing with translating FPN to Parrot assembly code 29 20:07 isn't there a ruby compiler for parrot yet? (btw, I know the answer) 29 20:07 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 the cost of bezier curve generation scales exponentially with the number of control points 29 20:10 hello lennon 29 20:10 How's it going? 29 20:10 uh, oh the schemer! 29 20:10 How far are you guys? 29 20:10 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 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 vincenz, we got a nice show http://www.cs.helsinki.fi/u/kaniemel/Een.gif how it's going for you? 29 20:12 ok, I ci'd some emacs support comments to geom.rb thats all 29 20:12 is jimm, jim menard? all the guys up and working now :) 29 20:12 Yes, indeed. 29 20:13 aleksi: not quite there yet 29 20:13 btw, would it hurt anyone's feelings if i renamed "tools/dumpgrip.rb" to "tools/dumpgrid.rb"? 29 20:13 * vincenz departs 29 20:13 since that's what it reports in its own usage method? as a filename, i mean 29 20:13 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 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 anybody know who vincenz is? 29 20:14 it's in CVS, but it could be easier if I do it for you 29 20:14 you guys sounded like you know him/her 29 20:14 he's a member of the scheme team 29 20:14 ok 29 20:14 and he dropped in last night to say hello 29 20:14 sceme, cool scheme 29 20:14 I'm really not so interested about spies in open environment 29 20:14 nor am i esp. when they announce themselves 29 20:15 good if they can pick up some ideas to pursue 29 20:15 not a very good way to snoop 29 20:15 yeah I asked how he was doing, gave no answer... 29 20:15 I mean, if we would like to hide a bit, we should do it properly :) 29 20:15 for my info, how does one do that :-) 29 20:15 aleksi: not quite there yet 29 20:15 just choose a name that doesnt say who you really are? 29 20:16 Maybe we could use a Super Sekrit Kode like rot13! 29 20:16 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 :-) What are the two different outputs (yellow and red) in the Een gif at the URL you posted above? 29 20:17 sjuupo siikret koud tat is 29 20:17 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 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 Slow 29 20:18 jimm: crashes 29 20:18 The scrolling of canvas is still a mistory 29 20:18 gus: lets div up 29 20:18 is that our trace, or the one the organizers provided? in the animated GIF, i mean 29 20:19 lennon: the car that doesnt crash is the organizers trace 29 20:19 what do you want to do? 29 20:19 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 doesnt matter I havent done a "game" before 29 20:19 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 indeed 29 20:19 so if you know more enough to direct me, please do 29 20:20 I'd say it isn't very far from optimal 29 20:20 I agree, its prob close to optimal 29 20:20 I mean, order-of-magnitude-wise 29 20:20 right 29 20:20 Agreed 29 20:20 so, just to check before i start diving back in to coding up some bezier ops and the like: 29 20:20 but one might be able to chomp off some hundreds or even thousand commands 29 20:20 where are we at on the third stage of the new grand unified theory of car driving? 29 20:21 I feel it's not optimal in the beginning of last N, and during it 29 20:21 third stage being what, generating traces? 29 20:21 you might actually even want to try it 29 20:21 indeed the whole strategy-application-to-path phase 29 20:21 I dont think anyone has anything that is close to generating traces 29 20:21 okay, looks like i should focus there, first 29 20:22 we were calling it F(P)=T 29 20:22 modify around 4500-6000 and 6750-7250 and 8000- and see if you can make it even better by hand 29 20:22 something that takes a path and returns a trace, is something that we need :-) 29 20:22 then we have something that's better than organizer provided version, to submit 29 20:22 davel: i kind of figured that would be the case...good thing i started work on that geom module 29 20:23 but isn't that track is a sample, isn't it? 29 20:23 Well, I am not sure how to divide up. 29 20:23 I'm confused by terms. "trace" is the path the car takes, right? What is "path" then? 29 20:23 trace is the "actions" taken to follow a path 29 20:23 jimm: a "trace" is the exact commands the car executes 29 20:23 path is a concept of a good route (curve of pixels) to the finish line 29 20:24 Thanks, everyone. 29 20:24 +/- accel, left/right, etc 29 20:24 the path is something we've introduced as an intermediate structure, 29 20:24 nice line of commands follows some path, not necessarily good one 29 20:24 which is easier to work with and optimize than individual commands 29 20:24 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 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 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 lennon: what compiling a trace from a path? 29 20:25 after doing some infrastructure work yesterday (mostly trig and positioning code) davel: yes 29 20:25 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 the path info doesn't, 29 20:25 whats your ideas lennon 29 20:26 but i wrote a 'distance_to_wall' method yesterday 29 20:26 lennon: cool 29 20:26 which i can also use to determine the "shape" of upcoming curves, obstacles, etc. 29 20:26 lennon: is your compiler ideas related to the bez curvers? 29 20:26 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 basically doing a "sonar scan" of the relative distances to walls at different angles, from the same position 29 20:27 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 davel: the bezier curves may be an optimiation method, but they don't give us individual trace instructions 29 20:27 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 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 lennon: ok so how do you plan to compile a path into a trace? 29 20:28 davel: basically, i'm going to do a few simple lookaheads davel: one, what's the next point on the path? 29 20:28 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 davel: two, can i safely accelerate 29 20:29 lennon: sounds interesting, let me know if you need help 29 20:29 davel: sure aleksi: perfectly following a path may not be feasible, or even desireable 29 20:30 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 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 actually that's interesting concept, making A* search to find trace for path 29 20:30 jimm: that's something i'm going to experiment with 29 20:30 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 guys: I know how to estimate position of curves based on the SP 29 20:31 I have started working on the display 29 20:31 it's feasible 29 20:31 jimm, lennon, the upper bound is quite far away 29 20:31 aleksi: yep, i think much of the "strategy" code is going to get used in the trace generation 29 20:31 I guess I should continue I made steps forward I think I understood the scrolling 29 20:31 imagine a sequence of "la.la.la.la."... where the car makes spiral increasing it's speed 29 20:31 there's been lots of activity while I was coding CTrack 29 20:31 Just backward of my first intuition 29 20:31 batsman: based purely on the SP? do tell... 29 20:31 ok, here's the idea 29 20:31 then suddenly there's 90 degree turn back to origo 29 20:32 I am ready to start displaying the track in the canvas 29 20:32 given two points of the track the line joining them represents the local direction of the path 29 20:32 Go ahead and start the event stuff 29 20:32 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 now, you can average that in say 10 points and you have the "overall direction" of that segment then 29 20:32 batsman: that's exactly what my intention was, 29 20:32 gus: are you using the png's of the map? 29 20:32 you compare the "overall direction" of different segments looking for changes in the direction vector 29 20:33 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 the distance finding code is slow I implemented it this morning fixing your code 29 20:33 batsman: how bad is it? 29 20:33 it's sloooow 29 20:34 hmm... 29 20:34 it needs lots of sins and cos so I made a lookup table but even that way, slow 29 20:34 we all have our sins :-) 29 20:34 which are all going through FPN right now... damn the sins, i mean 29 20:34 no, I used Math.sin 29 20:34 really? nevermind 29 20:34 I didn't think of that! It sure would be more beautiful 29 20:34 not FPN!!! that would be slower 29 20:35 gus: what are you using? 29 20:35 batsman: naive question: any way to avoid sin/cos by working in other units like radians or something? 29 20:35 emmm 29 20:35 are you converting the textual maps to some sort of bitmap? 29 20:35 jimm: we *are* working in radians 29 20:35 *blush* sorry 29 20:35 jimm: *and* x, y coords 29 20:35 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 batsman: did you implement your own rect/polar conversion routines, or keep using Complex 29 20:36 well, take a look 29 20:36 Let me try with the png I was just going to paint somehow the part off track 29 20:36 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 k 29 20:36 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 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 ok, sorry 29 20:37 davel: does tk even support png? I am not sure reading the doc 29 20:37 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 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 gif and ppm/gpm 29 20:38 we could use xpmtoppm 29 20:39 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 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 batsman: actually, that would give us a pgplot interface, too...which might be very nice 29 20:40 gus: yes I am adding a game dir to cvs 29 20:41 ummm 29 20:41 and I just converted 1_Simple.ppm 29 20:41 Thanks 29 20:41 lennon: if you wait for a while, I have CTrack 29 20:41 batsman: really? decided to "roll your own", eh? 29 20:41 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 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 gus, it should be there, cvs up lennon: yeah os x ruby is definitely incomplete 29 20:43 lennon: I can ci the makefile too 29 20:43 davel, gus, PPM is _very_ easy format to write a reader on your own 29 20:43 batsman: that might help 29 20:43 ok, doing it 29 20:44 I guess batsman already wrote one today 29 20:44 davel, gus: did a ppm reader 29 20:44 aleksi: tk supposedly already supports ppm 29 20:44 see model/field.rb 29 20:45 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 TK supports ppm I am using it 29 20:47 good 29 20:47 sorry, broken ci of ctrack, fixing 29 20:48 gus, gonna go eat with a friend, I'll be back asap 29 20:48 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 batsman: well, looks like i'm going to have to install another version anyway 29 20:48 gus, I am still with ya on the game, and I will go hard when I get back 29 20:48 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 lennon: that's true, unless you've compiled and installed your own. 29 20:49 jimm: that's so pointless... 29 20:50 OK. Never mind. 29 20:50 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 lennon: what do you mean? I'm not dumping, just loading from PNM 29 20:50 batsman: nevermind 29 20:51 I am leaving in an hour 29 20:51 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 and for a couple of hours Hopefully I'll have something usefull 29 20:51 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 aleksi: sounds good 29 20:52 essentially by just painting one file :) 29 20:52 davel: thanks 29 20:52 that one, you could for instance apply a gaussian blut to the image and avoid getting close to walls,etcv 29 20:53 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 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 pointgrid calculates the distance from each point to the goal by a "flooding" algo. 29 20:55 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 cu 29 20:59 batsman: any benchmarks or estimates on how much the move to C is going to help? for track, i mean 29 20:59 not yet I'm fixing bugs :-( making the unit test etc 29 21:00 ok 29 21:00 at least it doesn't segfault anymore :-) 29 21:00 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 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 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 would anybody care to check that test/test_ctrack.rb does really test CTrack and that it passes all tests? :-) 29 21:14 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 I put it there because somebody couldn't run extconf.rb 29 21:15 i didn't think about it being auto-generated when i asked for the file my bad, i'm sorry 29 21:15 ok I'm removing it then? 29 21:15 cool 29 21:17 * 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 no compiler? :) 29 21:18 linker won't run under the newer os 29 21:18 ouch can you upgrade easily? 29 21:18 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 me could tells that the porper from of /mes commando ist /me 29 21:21 gotcha 29 21:21 :) my perfect english 29 21:24 ok, downloading the new dev tools now... only 300 -- wait, make that 299 -- to go ;) 29 21:25 gus: back any info, or should I just dive right in to high level game control 29 21:26 ooh...they have gcc 3.3 available for OS X! 29 21:26 ooo 29 21:26 that's the sound of nerd satisfaction 29 21:27 indeed 29 21:27 lennon: but 3.3 has an incompatible c++ abi from 3.1 29 21:27 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 nope, 3.1 `gcc --version` and its a 3.1 pre-release too 29 21:29 davel: well, regardless, the 10.1 tools include gcc 2.95.2 davel: which is just too damn old 29 21:29 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 davel: sure davel: i once updated my gentoo machine to gcc 3.2, without worry about it...baaaaad idea 29 21:30 lennon: are you using irb much? http://cherryville.org/files/readline.bundle 29 21:31 davel: thanks, that'll help 29 21:31 put that in /usr/lib/ruby/1.6/powerpc-darwin6.0 and irb will then have readline support 29 21:32 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 and correct answer to my earlier question was: please make sure you have right function declarations in your header file 29 21:36 I may add "and always compile with -Wall" 29 21:42 Help!!! I never found tk particularly fun but tk through ruby is very painfull 29 21:42 sorry, busy rewriting FPN in C... 29 21:42 very 29 21:42 how so? slow? 29 21:42 The binding between the tk call and the ruby ones is not straight forward 29 21:43 oh 29 21:43 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 you can't put it over the image? thats seriously dumb is that a ruby problem, or a tk restriction? 29 21:44 tk!!!! backgroundw = TkcWindow.new(canvas, 0, 0, "window" => background.path, "anchor" => "nw") Ooops! Didn't mean to do that 29 21:46 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 Correct But now I got to leave I have a commitment 29 21:48 ok, what do you suggest I do, try ruby/gtk ? 29 21:48 I won't be back for a good 4 hours I am pissed of! 29 21:48 pissed of what :-) gus well thanks for the initial work, I guess I will try ruby/gtk ... 29 21:51 OK, go for it I never played with ruby/gtk, but I'll catch up See later. 29 21:51 me neither seeya 29 21:56 we're dead, aren't we? 29 21:56 ssshhhhh don't say that :-) 29 21:57 didn't want to say it 29 21:57 the game might work :-) 29 21:57 but it's definitely the feeling the game seems gone tk is gone 29 21:57 I am trying gtk 29 21:57 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 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 well I will be here to the hopefull non-bitter end lennon: thats fine 29 21:58 yes 29 21:58 I will plug away at it, see if I can do anything useful (dont hope) 29 21:59 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 davel: can you send me the readline bundle url again? 29 22:01 http://cherryville.org/files/readline.bundle put it in /usr/lib/ruby/1.6/powerpc-darwin6.0 29 22:01 thanks 29 22:18 hi tobias 29 22:18 hi 29 22:18 things are getting hard 29 22:18 i suspect 29 22:19 aleksi & me are working on a C implementation we have already CTrack, which passes Track's unit tests 29 22:19 i saw that on cvs 29 22:19 now we're w/ cfixed we hope to be able to reuse you test cases 29 22:19 32bits enough for fpn? 29 22:19 no! 29 22:19 we're doing long long int 64 bits 29 22:20 ok 29 22:20 gcc extension 29 22:20 ok 29 22:21 do you know what happened to the "game" idea? 29 22:22 * davel is working on it 29 22:22 gus, davel and aleksi wanted to implement it in tk, thats what i know 29 22:22 * davel is trying, anyways 29 22:22 right now? good 29 22:22 yes, learning ruby/gtk 29 22:23 gus bot pissed w/ tk 29 22:23 gtk?? i though tk 29 22:23 we started with tk 29 22:23 have you checked anything in? 29 22:23 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 sorry i'm not much of a help 29 22:25 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 i think so 29 22:25 yes now I'm not very confident on actually submitting anything but it's been fun tobias: 29 22:26 i'm looking forward to see solutions of other teams 29 22:26 could you take a look at bastard/cfixed/ ? 29 22:26 I'm still confident on submitting something 29 22:26 yes 29 22:27 aleksi: me too!!! 29 22:27 after all, there's more than lightning entry time to do things 29 22:27 yep 29 22:27 you'r right!!! 29 22:27 and I'm much wiser than at friday, thanks to you guys 29 22:27 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 likely -- will look into it 29 22:28 ok thanks 29 22:29 files fixed.c, fixed_2.h, yes? 29 22:29 update they have changed a lot... 29 22:30 i see, new dir cfixed 29 22:30 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 ok 29 22:32 if I call the attribute 'fp' !!! the class is compatible with FPN!!!! 29 22:35 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 you're doing it??? 29 22:35 now 29 22:35 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 so much hassle to remember to put parentheses around if comparison statement, and braces to the code, not to mention semicolon... 29 22:44 yes :) you know 29 22:44 useless decoration 29 22:44 when writing CTrack I kept doing def ctrack_new(VALUE bla) etc and then, oh no, it's C 29 22:48 on thing thats interesting is there have been no japanese people involved 29 22:48 might be the language barrier 29 22:48 yes 29 22:48 I am trying to read some docs on ruby/gtk and imlib and its japanese 29 22:48 :) 29 22:48 we should have advertised at ruby-lang besides ruby-talk 29 23:16 hi lennon 29 23:17 sorry about the sudden disappearance i got called in for emergency kitchen-cleaning duty 29 23:17 :) 29 23:17 there are electrical problems often somewhere at california, isn't there :) 29 23:18 thankfully, i'm no longer in the great state of california... 29 23:18 ah, now those problems emerge mechanically as well 29 23:18 lennon: which state are you in? I am in the state of Alberta 29 23:18 ...i've returned to my ancestral home of Portland, Oregon 29 23:18 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 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 lol, agreed does that mean portland has the highest unemployment? does that mean you are unemployed? 29 23:20 how much unemployment? 29 23:20 if so, I can relate :-) 29 23:20 no, i'm "self employed" which means i'm unemployed, but don't get the benefits 29 23:20 me too, I pay myself far too little 29 23:21 lennon, shouldn't you be proud president of the state with the highest unemployment? instead :) 29 23:22 i'd rather just be employed 29 23:26 ok, no presidency for you then, just residency 29 23:29 lennon: did you say you have done ruby/gtk ? 29 23:29 indeed i did about 3000 lines of it last year 29 23:29 standard widget apps, or any graphical stuff (gdk, gdkpixbug, gdkimlib)? 29 23:29 mostly standard widgets 29 23:29 ok 29 23:30 never got into gdkpixbuf 29 23:30 what was the app (curious) 29 23:30 point-of-sale software touchscreen interface 29 23:30 cool! with ruby, thats nice 29 23:30 indeed it was the first non-trivial code i wrote in ruby, actually 29 23:31 basically wrapped cfixed. will look into tests and convenience funtions now hi? 29 23:32 hi thank you! 29 23:32 great 29 23:32 tobias, great 29 23:32 ah, needed to scroll down did not see my own message 29 23:33 just out of curiosity: is CTrack using CFixed directly, or through Ruby? 29 23:33 emmm 29 23:33 or neither? 29 23:33 let me remembe r 29 23:34 btw, is anyone else still having problems with test_simulator failing? 29 23:34 yes, now I remember CTrack has got 2 parts the core written in C and something in Ruby for convenience 29 23:35 it almost looks like an endianness issue, since the expected is 317, and the actual is -4294966978 29 23:35 the code to load a file, etc 29 23:35 lennon: I think thats because of ruby 1.6.7 (on the mac right?) 29 23:35 davel: is that the problem? 29 23:35 lennon: I have that problem with 1.6.7 on osx, but not w/ 1.6.8 on linux 29 23:35 I only need FPN to return the starting position 29 23:35 looks like it's time to update to 1.6.8, then 29 23:35 that's done on the ruby side so right now it returns 29 23:35 batsman: okay, that works 29 23:36 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 batsman: or just do 'FPN = CFixed' batsman: instead of replacing the text 29 23:38 yes don't know 29 23:38 or even alias FPN CFixed 29 23:38 as CTrack is right now in model/ should possibly be in bastard/ dunno 29 23:38 or 'ext/' 29 23:38 yes but we didn't follow that convention, so... 29 23:43 not far away from two day mark 29 23:44 yes 29 23:44 tobias, does this fixed_wrap pass the FixedPoint tests? 29 23:45 batsman: are you actively working on CTrack right now? 29 23:46 not I'm doing CCar 29 23:47 lennon, feel free to go on 29 23:47 batsman: CCar? 29 23:47 yes 29 23:47 mind if i ask why? 29 23:47 it's aleksi's request basically 29 23:47 okay 29 23:47 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 I'll head to #-icfp now :-) 29 23:48 without having to go through Ruby 29 23:48 oops, I meant #c-icfp 29 23:48 it seems as thought we're approaching the state of having most of the simulator in C, rather than Ruby...interesting 29 23:48 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 I'm still using ruby for the game, tho I am getting nowhere fast 29 23:48 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 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 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 sure 29 23:50 stupid quote of the day I'm coming close to non-functional 29 23:51 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 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 it's all ok 29 23:52 I'm just gonna check tobias' work 29 23:52 I forget module variable semantics 29 23:52 just go to rest if you feel so 29 23:52 and then sleep 29 23:52 can a module have @var 29 23:52 yes!!!! 29 23:52 or should it be @@var 29 23:52 it can have it, 29 23:52 that's a module class variable sorry 29 23:52 right 29 23:52 module instance variable of course 29 23:52 thats what I thouhgt 29 23:53 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 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 beware the instance variable is that of the object that represents the module 29 23:54 ok, so if it aint included, it won't be there for me 29 23:54 it doesn't belong to objects that include it or anything like that it will be!!! 29 23:54 what I want is some state for a module method 29 23:54 can I paste some core? code 29 23:54 sure 29 23:55 does someone have any free time? 29 23:55 >> module A >> @foo = "1" >> class << self >> attr_reader :foo >> end >> end => nil >> A.foo => "1" 29 23:55 I'd like to see one hand made polyline path for each of the tracks 29 23:55 what's wrong w/ the SP? just let dumpsp.rb generate it for you 29 23:56 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 sure I coded that 24H ago :-) ruby tools/dumpsp.rb > output.xpm it's creating an xpm with a red line representing the SP then you have dumpsp2.rb 29 23:57 and SP is? 29 23:57 that uses one complicated idea I call "field perturbation" shortest path 29 23:58 shortest path in this context means? 29 23:58 (in distance, not time) length == min oh, btw path = array of cell coors we have to go through s/coors/coords/ 29 23:59 batsman: quick question about ctrack_impl.c 29 23:59 yes? 30 00:00 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 have you shortest path == array of cell coords adjacent to each other, where adjacent means -1..+1 relative to current point 30 00:00 'rb_iv_set(self, "@finish", rb_ary_new3(2, a, b));" 30 00:01 let me see 30 00:01 shouldn't it be initializing '@finish' in the constructor, 30 00:01 I love deja-vu 30 00:01 you're right 30 00:01 then just appending points found in 'track_set'? davel: deja-vu about what? 30 00:01 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 yes 30 00:01 nothing said on irc 30 00:02 davel: okay 30 00:02 do you want me to fix it? I have the API fresh in my head 30 00:02 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 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 ok 30 00:02 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 last thing I do today 30 00:02 batsman: it should be like 2 lines 30 00:02 oh, did that happen to? hehe 30 00:02 yes :) 30 00:03 batsman, would you clear out this issue? There's probably good reason why it's like this. 30 00:04 hi folks. i implemented the convenience functions for CFixed and added tests from FPN 5 tests fail 30 00:04 tobias, are those in cvs? what to run? 30 00:04 will shortly look at them yes, in cvs 30 00:05 ok, fixed CTrack 30 00:05 switch to cfixed dir 30 00:05 now somebody should check the fix :-) 30 00:05 run ruby test_cfixed.rb 30 00:05 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 yes it's there ... now 30 00:07 batsman: the fix looks goot 30 00:07 good thanks 30 00:07 i think i am too tired to look into the failures now will do tomorrow 30 00:08 ok, thanks a lot tobias 30 00:08 thanks everybody 30 00:08 I think I'll soon go zzZZ too 30 00:08 tobias: the 'sin' and 'cos' errors just look like rounding probs 30 00:08 bye, g'night everyone 30 00:08 tobias, just add the test 30 00:09 they're very close 30 00:09 thanks 30 00:09 aleksi: the test is there, it's just in the wrong directory 30 00:09 where? of bastard/cfixed/ 30 00:09 'bastard/cfixed/test_cfixed.rb' 30 00:10 feel free to move it 30 00:10 is there an extconf.rb in the CVS, or is it only mine? 30 00:11 it's in CVS, too, i think 30 00:11 cvs update: move away ./extconf.rb; it is in the way yes ok, at least there's tests 30 00:17 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 i can take care of that, if you want to go get some sleep 30 00:18 perhaps one small script that sets RUBYOPT and calls ruby with the given args, etc and then 30 00:18 batsman: you been up for a long time is it midnight there yet? 30 00:18 consider moving model/ctrack to bastard it's 2:20am here GMT+2 30 00:18 batsman: what about moving both to 'ext/' 30 00:19 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 that's fine 30 00:20 well, today I've only been here for ~18H 30 00:20 i can just move model/ctrack 30 00:20 will try to make it better tomorrow :) 30 00:21 we've still got 23 hours and 40 minutes, so take your time sleeping 30 00:21 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 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 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 i'll be here for another 6-8 hours, at least 30 00:23 of where we're going good! 30 00:23 the knowledge shall not die! :) 30 00:23 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 alright sleep well 30 00:24 ok good luck :) cu I leave IRC open for the logs 30 00:25 seeya buddy I've got logs going too 30 00:25 cu later zzZZZ 30 00:33 tobias still here? or others? 30 00:33 he left 30 00:33 you are, at least 30 00:34 yep I think lennon is still around as well 30 00:34 as am i working on ctrack 30 00:34 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 aleksi: i'm refactoring ctrack to give you a native C api 30 00:35 but gives -28788:-11528 30 00:35 aleksi: since batsman said you'd want it for the simulator 30 00:35 ctrack is almost like crack beware 30 00:35 crack like addictive? but i'm almost done 30 00:35 so you think 30 00:35 it's just seperating the C code from the Ruby API manipulations 30 00:36 then you find out that you need a bit more before bed now, I think the test case might be broken 30 00:36 well, i'm just doing it short-term to implement a few additional methods i need for the path evaluator 30 00:36 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 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 but I think it's a calculation that we don't need, per 10-bit integer restriction on page 2 30 00:38 I know I can chop it with string utils, but I just wondered if there was a simple method 30 00:38 brb -- quick bite to eat 30 00:38 as I want to call it witin #{} 30 00:38 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 k 30 00:43 now you can point him to wiki 30 00:43 ok you leaving soon? so the wiki has catch up stuff for tobias? 30 00:44 yes I guess you just have to split the string and take only the name 30 00:44 k 30 00:49 yeah thats what I did I did sub! /.*::/, '' 30 00:50 split(/::/).last would be easier, would it ?) 30 00:51 I guess I did it that way to save creating new strings 30 00:52 clever 30 00:53 your way is more readable, so I should prob do it that way instead 30 00:54 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 which is that, passing the finish line from the right? 30 00:54 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 /list oops trying to check if my connection was still active aleksi: i'll take a look 30 01:00 quick ruby/c api question: does my 'free' method have to take a void? wait, nevermind; it does 30 01:03 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 wish i still had my copy of "Data Structures and Algorithms in Perl"... 30 01:05 my guess is a regular bst I have a copy of that book here 30 01:05 or regard the priority to be probability, and take one out with probability equivalent to it's priority / sum(all priorities) 30 01:05 fibonacci heap? 30 01:05 I'll see if it has anything 30 01:06 I need the latter especially 30 01:06 insert, create, decrement, find min., all O(1) delete is O(log N) 30 01:07 true 30 01:07 oh, I was wrong, I have Mastering Algorithms with Perl 30 01:07 but the last requirement takes ages 30 01:07 sum? 30 01:07 I guess we have to maintain the sum with inserts and deletes 30 01:07 that would work 30 01:07 yep 30 01:09 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 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 maybe I am not following, but if its a sorted array, why would distribution be skewed? 30 01:11 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 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 ah and how are you doing the heap? what structure? 30 01:17 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 maybe skip list would be fast here 30 01:24 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 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 lennon: whats the widget I need for gtk dropdown boxes? 30 01:53 GtkCombo, found it 30 01:56 davel, entry.rb on sample/testgtk ah, you found it 30 01:56 yep I just found it 30 02:15 aleksi: know how to make the combo box uneditable? nevermind 30 02:19 are you doing the game? 30 02:22 I'm going to sleep now see ya tomorrow 30 02:25 seeya I am *sloooooooowly* trying the game I will try to stay up from now til contest end :-) 30 02:30 anybody here but me? 30 04:13 hello, just me 30 04:14 any chance you want to do a little peer review of my modified version of ctrack? 30 04:14 uh ok 30 04:14 i've got a segfault showing up in the unit tests, 30 04:14 ooh, ok 30 04:14 but nothing when i do interactive testing in irb 30 04:14 is it ci'd ? 30 04:14 yep -- 'bastard/ctrack' 30 04:14 are you compiling with debugging ? 30 04:14 should be 30 04:15 ok, is there a core ? 30 04:15 nope 30 04:16 k, I will try you using osx still? 30 04:16 at the moment though i tried it out on my linux machine, and it segfaulted there 30 04:16 k 30 04:16 on os x, i actually get a "bus error" 30 04:16 oh k, compiled, how to test? 753 lines of C :-) 30 04:18 i've modified 'test/test_ctrack' to use my lib, so just run test.rb as usual 30 04:18 k require': No such file to load -- bastard/ctrack/ctrack_wrap (LoadError) otherwise, everything passes 30 04:19 what directory are you in? 30 04:19 base directory icfp 30 04:19 are you on os x, as well? or linux? 30 04:20 no linux now 30 04:20 look for the 'bastard/ctrack/ctrack.so' file 30 04:20 I could try on osx nope doesn't exist 30 04:20 sorry, 'ctrack_wrap.so' after compilation? that should be the target that extconf.rb puts into the Makefile 30 04:20 had to run extconf.rb 30 04:21 sorry, yeah how's it looking now? any luck with building the lib? 30 04:22 yep it failed the tests that is 30 04:22 right now you're where i've been for the last hour :) 30 04:22 k 30 04:24 well I got a core 30 04:25 can you tell where the segfault is happening? 30 04:25 I don't know how to debug a shared lib 30 04:25 hmm... 30 04:25 normally when I debug I have the runnable executable, and the core 30 04:26 what version of ruby are you running on that box? 30 04:26 1.6.8 30 04:26 damn...my linux machine is running 1.8 30 04:26 I don't think it would be ruby, or would it be ... what would that change? 30 04:26 so the core itself wouldn't do me much good 30 04:26 oh you can get core by doing 'ulimit -c unlimited' 30 04:27 on the os-x box? 30 04:27 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 on os x, actuall, i think it's unlimit stack but still no core 30 04:28 but thats stack, not core 30 04:28 hmm...over to the linux box right... ...so 'unlimit core' aha! 30 04:29 yeah or 'coredumpsize' but how do you plan to debug the core? 30 04:30 okay, so the the box claims it dumped core... ...but there's no corefile wait, found it 30 04:30 really, strange ok 30 04:30 in /cores weird 30 04:31 whoa! 30 04:31 what? 30 04:31 that it was in /cores :-) weird, whoa, y'know 30 04:32 those wacky apple folks 30 04:32 yeah, but I still like them I love my ibook 30 04:32 ok, so there was no stack in the core so i'm trying 'gdb ruby test.rb' 30 04:32 good ideqa 30 04:33 ...which has now hung 30 04:33 oh you need to do gdb ruby then run test.rb ta-da rb_num2long is the culp 30 04:33 right num2long? 30 04:34 I am getting rb_num2long oh, thats in ruby is it? did we find a bug? 30 04:35 i doubt it... ...but it is possible 30 04:35 yeah 30 04:35 i'm not seeing any of my lib on the stack right now which is weird 30 04:35 I see track_rb_crash_p as the second on the stack 30 04:35 really? ok there it is -- i must be going blind too much time in front of the computer this weekend ;) 30 04:37 okay, but there's nothing inside the main C module which is where i assumed the problem would be 30 04:37 what do you mean? 30 04:37 anything with 'track_rb_' in the name is just the ruby wrapper well, ruby-c wrapper 30 04:38 oh 30 04:38 i split it into two modules, 30 04:38 well something in there is calling rb_num2long is that where its failing for you? 30 04:38 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 ctrack_wrap.c:85 yep it is funny line 85 nx = NUM2INT(x); 30 04:40 or 'ny = NUM2INT(x);' or 'return INT2NUM(nval);' 30 04:40 no, its the one I said line 85 30 04:40 really? 30 04:40 thats what the backtrace tells me 30 04:40 damn, you're right wait -- 30 04:41 its being called from nval = track_rb_crash_p(td, nx, ny); 30 04:41 go up another frame, and you've got line 90 30 04:41 line 90 30 04:41 i got it it should be calling 'nval = track_crash_p'! 30 04:42 k 30 04:42 thanks 30 04:42 it was fun 30 04:42 let me test it again after a recompile 30 04:42 :-) 30 04:42 it also probably saved me another hour or more of banging my head against it oh, here we go again... 30 04:43 programming is so much fun 'nother bug? 30 04:43 yeah 30 04:43 where? 30 04:43 just a sec this whole process i why i try to avoid c, usually 30 04:44 yeah I dont like c much 30 04:44 now it's getting a 'EXC_BAD_ACCESS' signal nul ptr deref? 30 04:44 sigsegv here track_rb_finish_p is calling itself 30 04:45 well, you're still running the old code, right? 30 04:45 should that be track_rb_finish_p calling track_finish_p ? no I fixed the code on my end and recompiled 30 04:45 ok 30 04:45 line 126 30 04:45 oh, now i get it... i copied and pasted and renamed and got 3 bugs for the price of 1 30 04:46 nice 30 04:46 cool looks like it runs without a segfault now just other test_case failures ;) 30 04:47 yep, but some tests fail first 2 are 0,1 true,false probs 30 04:47 yeah which knew were going to happen the others are funky, though 30 04:48 yep have fun, I am going back to the game ... which is slooow going 30 04:48 well, good luck to you let me know if i can return the favor 30 04:48 yeah you too, well I might have gtk questions for you 30 04:49 hopefully i'll still remember enough from last year... ;) 30 04:49 like how do I zoom and crop a loaded pixbuf, and then pan :-) 30 04:49 umm...opengl? or libart? 30 04:50 k 30 05:01 hey I am doing a commit of some new files, my ctrack_wrap.c will also be ci'd ... 30 05:04 you a basketball fan ? 30 05:37 dave, did you check in more changes to 'ctrack_wrap.c'? 30 05:37 I just checked in fixes those three 30 05:37 okay 30 05:37 the cut&paste problems 30 05:38 right i think i checked them in, too 30 05:38 I had another commit, so I did em all 30 05:38 and then did other work on the file 30 05:38 they shouldn't have conflicted 30 05:38 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 cool 30 05:39 i was passing a ruby object instead of a char to one of the low-level c functions stupid typo 30 05:39 is there any bench code to see how things have improved 30 05:39 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 k 30 05:40 which i can *finally* get back to now stupid C 30 05:41 i agree c sucks in so many ways 30 05:48 except speed and memory consumption it's real fast when it segfaults right out of the gate ;) 30 05:49 yeah, but speed and memory aren't part of the language, its just an implementation detail 30 05:49 true enough 30 06:15 back in 10 30 06:30 you still working on the path->trace compiler? 30 06:36 stupid irc client keeps timing out 30 06:36 I've noticed which client? you need to be more talkative :-) 30 06:37 "JediKnight" just a random freeware client i found i should really probably switch to ircle unless you have a recommendation 30 06:37 linux? 30 06:38 os-x 30 06:38 I like xchat 30 06:38 under linux, it's xchat all the way but my linux box can't go outside with me, 30 06:38 jimm was using Fire I think, which is an IM app that can do IRC too 30 06:38 and that's the only way i've gotten any fresh air this weekend 30 06:38 you're outside right now? 30 06:38 i'm headed there in a minute 30 06:38 isn't it dark? 30 06:38 powerbook + linksys ap + cable modem == happy i have a porch light 30 06:39 oh so not straying far, cool mmmm, wireless 30 06:39 i'm completely spoiled now i was house-sitting for a while last week, and i only had dialup 30 06:39 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 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 yeah, that part seems alright know anythinga about graphics contexts? 30 06:43 you mean drawable areas, right? 30 06:43 are you working on the "compiler" still? 30 06:43 yup 30 06:43 ok, drawble areas, I don't think they are the same 30 06:43 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 lol, it is sick, I wonder why I don't know, I will read up a bit I guess 30 06:45 probably the same reason you're still pluggin away at gdkpixbuf ;) (the sickness, i mean) 30 06:45 I am using it to render a pixbuf into a drawble true! rubyfan: hello 30 06:46 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 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 are you using gtk 1.2, or 2.X? 30 06:47 I don't know wht it needs 5 of each I think 1.2x 30 06:47 are the fonts antialiased? if not, it's 1.2 30 06:48 I haven't looked at fonts they don't look aa 30 06:48 probably 1.2 30 06:49 libgtk-1.2.so.0 know of any ruby/gtk apps I could use to look at the source? 30 06:51 you want pixbuf-specific stuff, right? 30 06:51 yeah more on the gdk side of things or even gtk with image related stuff 30 06:52 are there not useful examples in the ruby-gtk or ruby-gdkpixbuf source tarballs? 30 06:52 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 http://raa.ruby-lang.org/list.rhtml?name=rubysamegame the "same game" written w/ruby-gtk 30 06:53 cool thx 30 06:53 no prob 30 06:58 ugh...FPN.new...fpn.to_f...FPN.new... 30 06:58 nice 30 06:58 find something useful? 30 07:00 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 but looking on the ruby-gnome2 site there seems to be a whole lot more in the way of samples 30 07:02 well, that could work...though the dependencies are a good bit larger 30 07:02 yeah 30 07:09 hi 30 07:09 welcome back 30 07:09 hi 30 07:09 checked in updated versions of cfixed tests, and updated implementation tests work now 30 07:10 great hmm...may need to update my version of ruby 30 07:11 there was a bug in Sin, but apart from that the test failures were because the tests assumed >25bits precision 30 07:11 on my box, the cfixed tests fail well, two of them anyway 30 07:11 did you remake the extension? 30 07:11 oops silly me ;) 30 07:11 there was a bug in the c code 30 07:11 i should know better, esp. given the time i spent on ctrack this evening 30 07:11 that'sw why 30 07:12 yep, they're all golden, now 30 07:13 ruby test.rb -> No such file to load -- bastard/ctrack/ctrack_wrap (LoadError) 30 07:13 tobias: you have to build the extension 30 07:13 oops :-) 30 07:13 i can sympathize :) 30 07:14 Hello, so what's the status of the project? Will there be a Ruby entry? 30 07:14 who wants to know :-) 30 07:14 oh, i am fairly certain there will be an entry... 30 07:14 This is PhilTomson 30 07:14 ...of what quality, we don't know yet :) 30 07:14 Kind of a strange competition this year. 30 07:14 how's it going, Phil? 30 07:14 how so? 30 07:15 I mean, they're not really looking for a program, per se. 30 07:15 yeah, 30 07:15 nope -- they just want the output 30 07:15 ok have to go to work now. maybe see you later 30 07:15 they want code, but not to run it 30 07:15 thanks, tobias 30 07:15 seeya 30 07:15 bye 30 07:16 So if I understand it correctly, they post some tracks and we have to find the fasted route 30 07:16 exactly but you have to output the route as a series of instructions controlling the car not just a path 30 07:17 I guess that picture of a race car on a track on their web page was a clue... 30 07:18 indeed 30 07:18 so have you come up with any routes? 30 07:18 we have a shortest-path engine which finds at least a legal path 30 07:19 morning... 30 07:19 i'm working on the "driver" which will execute it 30 07:19 it's been 7H since I left 30 07:19 morning, batsman that long? so it has... 30 07:19 well, a bit less 30 07:20 hey you two live in the same city? 30 07:20 who? 30 07:20 you and phil 30 07:20 phil and i almost do yeah 30 07:20 Yeah, lennon and I are probably about 15 miles apart. 30 07:21 cozy :-) 30 07:21 actually the first person i've talked to on this channel who i'd ever met before prior to this weekend 30 07:21 have to go in 15 minutes, but will be back in ~ 1H or so, I hope 30 07:21 k 30 07:21 batsman: ok 30 07:21 ok, I'm checking CVS & IRC logs 30 07:21 batsman: i refactored ctrack, to give it a simple pure C api, in addition to the Ruby one 30 07:22 ok 30 07:22 and i'm still working on the driver class 30 07:22 nice, aleksi will need that 30 07:22 slow going, since i can't test most of it until it's all working 30 07:22 :( 30 07:23 i probably need to switch gears, and start working on a framework (i.e., script) to drive it no pun intended ;) 30 07:23 :) 30 07:23 just to let you guys know, I will prob be up for another 1.5-2h 30 07:23 it must be about time for u to sleep, I guess 30 07:23 rubyfan: would you like an account to access cvs and our wiki? rubyfan: or just dropping in to say hi? 30 07:24 (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 lennon: mostly just dropping in to say hi and cheer you on. 30 07:24 rubyfan: that works 30 07:24 thanks rubyfan 30 07:25 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 bad timing... 30 07:26 that seems to be the theme this weekend for several people myself included 30 07:26 So how far along do you think you are? 30 07:27 we were quite far with a 100% Ruby implementation what we call "Strategy" (actually an A* search) but it was slow 30 07:28 Why are you doing some parts in C - is runtime really that big of an issue? 30 07:28 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 Wow, that's a lot of test cases... 30 07:29 impressive, isn't it? :-) we got our simulator "certified" 30 07:30 certified against their simulator? 30 07:30 same results on the test track as the organizers' now we have the simulator in C 30 07:31 batsman: well, we have most of the simulator in C 30 07:31 most? 30 07:31 So you need the simulator for testing purposes, right? 30 07:31 I thought aleksi would have ended this :| 30 07:32 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 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 batsman: see you then 30 07:33 seeya 30 07:33 Yeah, I gotta go too. Good luck! 30 07:33 thanks 30 07:34 bye 30 07:44 can i rack your brain for a minute, dave? whenever you're at a stopping point 30 07:44 yep go for it 30 07:45 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 k 30 07:45 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 sounds correct 30 07:48 ok just wanted to see if i was way off base 30 07:48 no no 30 07:49 the thing is, wait, nevermind i was just about to say something really dumb brain cramp 30 07:49 hehe oh yeah I am getting to brain cramp too 30 07:50 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 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 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 really, do you have an early morning interview? 7am or something ? 30 07:51 well, the contest ends at 4:59pm local time, and my interview is at 6pm the next day 30 07:52 thats 24h 30 07:52 me being GMT-7 and all 30 07:52 but I guess you will sleep a bunch 30 07:52 oh, you're right definitely into brain cramp territory 30 07:52 yep 30 07:53 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 yeah a few of us have been at it like that I have had more than 20minutes of break tho 30 07:54 probably not the most productive way to go about it, but damn interesting 30 07:54 yeah its definitely fun/interesting funteresting I gues you know you're tired when you make up really dumb words 30 07:56 or read them, and immediately know exactly what they mean :) 30 07:56 :-) 30 08:00 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 yeah isn't that pretty much what you were suggesting earlier? 30 08:01 sort of but i didn't have a clear idea of how to relax the path 30 08:02 oh cool 30 08:06 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 no prob oh yeah theres a great idea :-) what was it you said, sick? 30 08:07 masochistic, even 30 08:07 sadistic 30 08:08 it's only sadistic if you do it to someone else 30 08:08 really, oh 30 08:08 maybe we should just settle for "twisted" 30 08:09 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 brb 30 08:34 hmm checking what the output of the dumpsp2.rb looks like with various skip rates on the path 30 08:35 and 30 08:35 trying to figure out what the deal is with the 'pnm' files 30 08:36 you mean how to view them? pnmto[tab] 30 08:36 no, just why i can't create a simple visual trace any more 30 08:36 ph oh 30 08:36 like the xpms i made last night 30 08:37 sorry dont know 30 08:38 ok, figured it out 30 08:39 ok good I didnt wanna look at any pnm stuff right now ... 30 08:52 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 ok, I am heading so bed soon, how long do you think it will take you to write? 30 08:56 hi again any activity in the last hour? :P 30 08:57 lots of activity, but not lots of code 30 08:57 ok 30 08:57 i do think i finally know how to do the path evaluation another eureka moment 30 08:57 I had this interview for some crappy thing at the university, and I realized I do really need caffeine :-P 30 08:58 at times, we all do 30 08:58 I'll take some ~130mg now 30 08:59 should i wait to throw this at you until you can do that? 30 08:59 you know your drug dosages dont you 30 08:59 I control that since I got this caffeine addiction :P 30 09:00 ah 30 09:00 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 oh too bad 30 09:05 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 sounds good 30 09:06 I come back some 30mins later, to stay till the end BTW, http://www.thekode.net/plan.gif 30 09:07 in a couple of minutes, i'm going to have a new page on the wiki explaining my latest brainstorm 30 09:07 ok 30 09:07 I am going to sleep asap 30 09:07 how long? 30 09:07 davel: go for it, man 30 09:07 you guys finished? 30 09:07 15 min topsa 30 09:07 hi vincenz 30 09:07 of course -- we're writing games at this point ;) 30 09:07 amazing 30 09:07 how is it going? 30 09:07 so and so we've really only been 2 developers 30 09:08 yes, writing doom3+ now :P 30 09:08 with a third for little utils 30 09:08 now seriously 30 09:08 we got a bit bogged down today with hand-tooling some C 30 09:08 I guess some real info exchange won't hurt, anyone objects? ok vincenz here goes some sensible info 30 09:09 ? 30 09:09 we had a framework to evaluate paths and create them 30 09:09 hmm yup 30 09:09 emm sorry, I mean traces 30 09:09 like us 30 09:09 using heuristics 30 09:09 oh 30 09:09 and leveraging the paths created by another module 30 09:09 genetic algorithm 30 09:09 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 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 ummm we wanted to use info on the shortest path (which we have) to trim down the tree 30 09:12 I think most groups did that 30 09:12 however the A* trace evaluator 30 09:12 so it all works well? 30 09:13 whose code whe checked in more than 25 hours ago didn't work :) and moreover, was too slow :-( 30 09:13 ouch that sux 30 09:13 the cars kept doing stupid stuff 30 09:13 I just made a nice little gui 30 09:13 brake, accell, brake, accel 30 09:13 worked through the night for a new version for it cause the old one was WAY too slow 30 09:13 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 nah driving by hand is impossible and I'm out of cigs :/ 30 09:15 is your simulator engine certified? 30 09:16 yes 30 09:16 good 30 09:16 that's the part we got first 30 09:16 ours too, the famous 38000 tests but now we're rewriting in C, for speed reusing the test cases 30 09:16 38000 tests? 30 09:16 yes! 30 09:16 euhm I wrote it all by hand no test and it works 30 09:17 one for every state then it's not certified :-) 30 09:17 it is foolproof 30 09:17 but just "seems to work for me" :) ok 30 09:17 I ran the trace file they sent me and I got the EXACT same readings 30 09:17 did you use your own fixed point 30 09:17 after 10000 steps yes 30 09:17 ok, then it's certified after all, same as ours :) 30 09:17 implemented all as in the specs 30 09:17 in scheme? 30 09:17 yup 30 09:17 we have our own in Ruby 30 09:18 I don't consider overflow 30 09:18 but it's not really fast, is it? 30 09:18 *shrugs* sure it is I just use ints 30 09:18 ugh 30 09:18 shift left 16 shift right 16 and for directions 30 09:18 we were using Fixnums too and Bignum 30 09:19 (* real-pi (direction theirpiconstant)) 30 09:19 but were not satisfied by the speed 30 09:19 i thought the spec said that 32 bits were insufficient for the FP math? 30 09:19 euhm 30 09:19 scheme must have Bignum too 30 09:19 scheme integers are infiny I thinkg 30 09:19 gotcha 30 09:19 as ours 30 09:19 either aewy 30 09:19 to me, integer != int 30 09:19 speed is not of any relevance for us 30 09:19 but then again, i wrote a bunch of C today 30 09:19 ummm, I guess you compile your scheme code, don't you? 30 09:19 nope 30 09:20 interpreted??? and it's fast?? 30 09:20 I don't need speed the simulator is fast enough I don't brute force 30 09:20 you're using genetic alg. 30 09:20 nope I doubt that'd even get any results 30 09:21 no? you stated that above, didn't you? 30 09:21 batsman: the algorithms make far more of a diff. than the execution model 30 09:21 no I thought you guys did 30 09:21 we told you we're using A* now and cutting down possibilites using info from shortest path 30 09:22 I use my gui to click relevant points and then use dijkstra 30 09:22 vincenz: we're considered using an adaptive algorithm to control heuristic weighting, but that's about it 30 09:22 takes one screen-refresh-rate 30 09:22 ok! 30 09:22 to calculate all possible connection lines between the points 30 09:22 but this gives the path 30 09:22 yup 30 09:22 not the traces! 30 09:22 oh hehe 30 09:22 path != traces we had the path forever here 30 09:23 it's not even good enough I know that 30 09:23 the shortest one but we cannot transform that into traces 30 09:23 I still have to fix it so I relax dijkstra a bit shortest path is not good 30 09:23 we know 30 09:23 batsman: that's what I was stuck on too 30 09:23 that's why we introduced biases 30 09:23 batsman: then I realized you shouldn't see this as a transformation 30 09:23 batsman: you should go check the wiki -- i've put some notes on that subject there 30 09:23 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 well 30 09:24 "getting too far away from SP is bad" 30 09:24 you shouldn't see path->trace as a transformation 30 09:24 but weighted 30 09:24 heh 30 09:24 lennon: OK, I read it 30 09:25 vincenz: how are you approaching the, umm, transition? 30 09:25 yup I have a little robot 30 09:25 this is the critical thing :) 30 09:25 driving aruond and as side effect I output it's decisions 30 09:25 so you're generating the traces and path-decision time? that makes sense 30 09:26 and how do you use the path info from dijkstra? 30 09:26 as waypoitns directed 30 09:26 hehe sounds familiar 30 09:26 but I still don't see the transition path -> traces 30 09:26 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 yes, but what is the path good for? 30 09:27 for way points that's a pretty big world for such a lonely littel robot 30 09:27 ummm so you restrict the possible actual path 30 09:27 euhm....how else does it know where to heaed? 30 09:28 to something around the one obtained with dijkstra, right? 30 09:28 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 that's it 30 09:28 but he keeps missing the first curve 30 09:28 that's what we wanted to do follow the path 30 09:28 now you share some info 30 09:28 but it didn't work for us that's what I told you before trying to leverage path info 30 09:28 why not? 30 09:29 in the A* thing 30 09:29 euhm 30 09:29 the car did stupid stuff 30 09:29 I don't use a* that's overkill performance wise 30 09:29 ok 30 09:29 I use a much simpler system 30 09:29 actually, we've reduced our framework quite a bit now 30 09:29 vincenz: about an hour before you got here, i basically stumbled onto a similar idea to what you described 30 09:29 so I don't know if we could call it a* anymore 30 09:30 generate the SP, 30 09:30 lennon: reading the wiki now 30 09:30 then take 1 in N points along it, as your first-order checkpoints balance the SP's affinity for tight turns 30 09:30 the key is to have a good robot to follow waypoints where's the wiki? 30 09:30 yes! he, secret 30 09:30 heh 30 09:30 :-) 30 09:31 I doubt it matters much at this stage, except for little formulas 30 09:31 with a simple algo that looks for the longest route before it hits a wall 30 09:31 well it's pw protected too ask lennon about that he's the one that runs it 30 09:31 i can loosen that, if you like allow anon access 30 09:31 hmm 30 09:31 it's mostly just ramblings and slightly out-of-date api descs and pseudocode 30 09:31 what ai model did you use for driving? 30 09:32 all the fun stuff's in cvs 30 09:32 or wanted to use? yeah we have a really neat gui :) 30 09:32 the gui is just for creating the path, right? or can it display the simulation run? 30 09:32 both I can flip back and forth reset my robot 30 09:33 good 30 09:33 very nice indeed 30 09:33 and it's quite smooth I can show the netlist I can show the dijkstra list 30 09:33 are you guys using drscheme, then? 30 09:33 this is what we have now: http://www.cs.helsinki.fi/u/kaniemel/Een.gif 30 09:33 we were using mzscheme 30 09:33 or some C-based gui toolkit? 30 09:33 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 it's really impressive 30 09:34 scheme is nicer than I thought 30 09:34 says good things about the toolkit, as well 30 09:34 originally I had planned to do it inocaml 30 09:35 as the French team that always wins or does 2nd :) 30 09:35 that's from Een.trc right? 30 09:35 "Caml's 'r us" or something 30 09:35 first time I saw that pic ,,, 30 09:35 right 30 09:35 I freaked 30 09:35 hehe 30 09:35 I wonder how they got to the trc file 30 09:36 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 I thikn we have a pretty neat conecpt for our ai 30 09:39 nice 30 09:39 euhm...I didn't mention it 30 09:39 I wish ours had worked at the time we wrote it some 25 hours ago 30 09:39 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 but you said the car crashed in the last curve, didn't you? 30 09:40 first curve I took it JUST too wide but like I said we JUST got started 30 09:40 ok 30 09:40 the framework is there it just has to be used properly 30 09:40 beware ours has been here for >1day and still doesn't give results :-( 30 09:40 batsman: we've also been writing C which cuts our productivity by about 75% at least 30 09:41 hehe 30 09:41 right, actually there was almost no work on the Strategy framework :( 30 09:41 we actually have some stuff in 4 langs 30 09:41 we jumped in aleksi's wagon for C 30 09:41 java : early picker gui c: to create png's from trks sisc: to be used in the javapicker and mzscheme : 30 09:42 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 what do you mean by fast? 30 09:43 which means we can stumble around on the AI much more quickly ;) 30 09:43 our slowest part is reading in the .trk flie 30 09:44 yes! 30 09:44 5-10 seconds :/ 30 09:44 lennon, cannot find your new stuff in the wiki 30 09:44 annoying when you start a gui 30 09:44 um, ours is faster, I think 30 09:45 batsman: damn -- changed the index, linked to it, then the index changed back 30 09:46 batsman: ok, now it's the last item in the index list 30 09:47 WebResources ? 30 09:47 refresh 30 09:47 ok, now I see it hey this idea is the one I've had since yesterday morning the checkpoints thing 30 09:48 that's great 30 09:48 that's why I wanted to take the checkpoints from the SP or any other path 30 09:48 then i can sleep for a while pretty soon 30 09:49 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 but i think i do 30 09:49 :-( actually I know how to make it 30 09:49 let me post an image for you to look at... 30 09:49 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 ok i'll check it out when i'm back on my linux box 30 09:51 you see the lines orthogonal to the path? ok 30 09:51 ps files are tough to view in os x 30 09:51 I can do a gif and add it if you want easy stuff doing it right now 30 09:51 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 ok 30 09:52 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 ok yes! I see the checkpoints we're thinking the same I have one algo 30 09:53 that's just the SP, with 1 in 10 points drawn 30 09:53 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 ok couldn't we just get that info from the pointgrid? the ordering of checkpoints, i mean 30 09:54 night guys 30 09:54 yes 30 09:54 davel: good night 30 09:54 you have the order good night but you need to know 30 09:54 seeya in 2-3h 30 09:54 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 in case anyone is wonder, the game stuff is slow moving 30 09:55 know what I mean? ok, don't worry dave 30 09:55 batsman: yes 30 09:55 but there is some code in game/ if anyone wants to look 30 09:55 good ok, attaching the pic 30 09:56 batsman: i think i know how to do what you're asking 30 09:56 yes I know too, I think 30 09:56 ok 30 09:56 let's see if we have the same idea 30 09:56 btw, the pic is showing up as <7k and blank :/ 30 09:56 scroll down 30 09:57 oh -- just really good compression 30 09:57 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 heh that's exagerrated 30 09:58 even if you didn't match a point 30 09:58 there's a better way 30 09:58 yes? 30 09:58 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 ummm 30 09:58 or thereabouts 30 09:58 good thanks thanks a lot vincenz! 30 09:59 i had also thought about widening the points a bit further, even and always shooting for the furthest "visible" one 30 09:59 I think vincenz saved us :) 30 09:59 meaning no walls are between you and it 30 09:59 lennon: at 80% dist you should already be in lov of next point or you've picked bad points 30 10:00 sure 30 10:00 yes nice now we need to get our C core certified 30 10:00 my idea was to potentially jump more than one point at a time 30 10:00 80% is just some number 30 10:00 and implement this 30 10:00 I'm of course not sure of the correct value (if there is any) 30 10:00 it's because our points are very close 30 10:00 to avoid the localized problems of the SP path vincenz: sounds like an excellent application of an adaptive algorithm 30 10:01 oh 30 10:01 finding the right value, i mean 30 10:01 have to quit for 10mins, will be back 30 10:01 nah I just use a thumb-factor that's why I'm an engineer 30 10:01 that works, too 30 10:01 :P my points are quite far awy 30 10:02 i'm just a would-be linguist who never finished school 30 10:02 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 how to you do your speed control, if you don't mind me asking? 30 10:02 we're still thinking that any ideas you'd like to share? 30 10:03 us, too nothing except a general distance-finding algo that tells us how far we've got until we crash 30 10:03 heh that's one of the first things we had 30 10:03 nothing global, yet... 30 10:03 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 hand-tooled scripts, mostly 30 10:04 I mean the ai framework 30 10:04 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 behaviour based you mean I have something like that but a bit more expansive 30 10:07 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 neither have we 30 10:07 we've ended up with any number of parallel efforts going on that don't necessarily connect very well 30 10:08 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 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 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 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 back 30 10:11 i think a group of four, with two pairs each in similar timezones (or sleep schedules) might be close to optimal 30 10:11 yeah 30 10:11 but now I'd need lunch 30 10:11 grr 30 10:11 we have 3 time zones here: 30 10:11 distance-to-wall won't work 30 10:11 GMT+6 (7)? 30 10:12 I have bugs 30 10:12 GMT+2 and + 3 GMT-6 perhaps even four 30 10:12 vincenz: how won't it work? 30 10:12 ? in our case, it was slow 30 10:12 but usable 30 10:13 perhaps doing it in C... 30 10:13 well it works for checking collision with walls but we just get wrong readings 30 10:13 batsman: that's on my list for the new ctrack module 30 10:13 ok, good then we should cache that info as it's run once per track 30 10:13 batsman: but i need geometric functions in C, too 30 10:13 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 how long are you staying here, lennon? 30 10:15 prob. another hour, tops if i'm going to be around much tomorrow 30 10:15 heh 30 10:15 i need to get some sleep fairly soon 30 10:16 I already pulled an allinght 30 10:16 ok 30 10:16 vincenz: i've just lost track of when "night" is 30 10:16 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 vincenz: i did like 24 on, 5 off, 20 on... 30 10:16 perhaps I'll get aleksi back 30 10:16 batsman: others should return pretty soon 30 10:16 good I'll try to wrap simulate.c in Ruby and test conformance 30 10:17 batsman: is it complete yet? 30 10:17 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 batsman: btw, i'm probably going to modify the algo. you used in track.rb for wall distance 30 10:17 ok make it as you wish just make sure 30 10:18 batsman: there's not really any need to scan behind the current position 30 10:18 you decrease the angle step as you increase the radius 30 10:18 batsman: sure 30 10:18 we can compute this once per track and store it in a file so speed is not really the top concern 30 10:19 batsman: per track? don't you mean per checkpoint? 30 10:19 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 okay, now i see what you're getting at cache it like the pointgrid 30 10:19 the distance_to_wall is just a lookup O(1) 30 10:20 ? 30 10:20 i really need to refactor the ctrack code again...make it into a general matrix class 30 10:20 perhaps 30 10:20 then build track, pointgrid, and walldist on that 30 10:20 but ctrack does a couple more things such as realizing where the start was, etc 30 10:20 well, ctrack could still be in C 30 10:20 that's right! 30 10:20 and just use the matrix lib 30 10:21 we don't want to have to go through Ruby 30 10:21 as could pointgrid and walldist 30 10:21 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 that's why i rewrote it this evening 30 10:21 having direct access to the data structs, etc 30 10:21 there are two apis -- the ruby one uses the native c one 30 10:21 ok 30 10:22 anyway, go eat i'll be here when you get back 30 10:22 yes, following my plan http://www.thekode.net/plan.gif 30 10:34 checked in a change to test.rb that automatically compiles all extensions before running the tests 30 10:45 extreme programming? 30 10:50 hi again 30 10:50 hi 30 10:50 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 batsman, just saw your limited-bits-explanation for me on the wiki 30 10:51 before, I only had MA 1/4sli and fruits it's not mine??? aleksi's 30 10:52 found that bug (bug in the test code) this morning, too 30 10:52 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 I will mostly lurk mbeing at work at the moment 30 10:53 :) 30 11:00 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 i'm just stopping in to let people know that i'm going to sleep for 3-4 hours 30 11:04 ok thanks for everything now I'll package simulator.c I mean, wrap it 30 11:04 hopefully, i should be around for the last 9+ hours of the contest 30 11:05 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 thanks 30 11:20 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 I claim ownership of ccar/ and csimulator/ 30 11:25 great! 30 11:25 have to fix this stuff, will do as lennon did in ctrack, which is neat 30 11:25 hello again 30 11:25 hi I'm wrapping csimulator and fixing ccar 30 11:25 I'm going to be away for two hours still, gotta eat and there's one work meeting 30 11:25 ok nice 30 11:25 sounds great, as those are the one's I'll need most 30 11:25 that should give me time to fix csimulator 30 11:25 and ctrack of course 30 11:25 then we can run the unit tests again ctrack is in good shape now lennon cleaned it nicely 30 11:25 for ctrack I asked yesterday if crash takes last requirement on page 4 in account 30 11:26 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 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 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 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 yes 30 11:29 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 but hope we have results too :) :-) 30 11:30 yes :) ok, I'll go for lunch now 30 11:43 good, cu later 30 12:27 for the record: starting to work on testing csimulator and ccar, etc 30 12:34 broke one unit test when implementing extension standards, will solve it now 30 12:41 IMPORTANT NOTE FOR ALL MANKIND READ bastard/README.standards BEFORE WRITING AN EXTENSION! 30 13:28 k 30 13:29 hi again I'm working hard now to get all the extensions right 30 13:29 hi 30 13:29 I claim ownership of most things in /bastard/ :-) 30 13:30 ownership??? 30 13:30 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 ok, I dont have any immediate needs to edit them 30 13:33 good 30 13:33 when I last compiled and used them, things worked fine, no link errs etc 30 13:33 just got test/test_ccar.rb to start working nope 30 13:33 when did all that change 30 13:34 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 I loaded and used ctrack a few hours ago 30 13:34 AFAIK nobody had used CCar until now 30 13:34 ld.so k 30 13:34 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 k 30 13:35 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 ok, got test_csimulator to work now, the simulation fails on the first step :-( have to fix simulator.c 30 14:06 k just me and you here? 30 14:06 yes we should have aleksi back RSN 30 14:07 k 30 14:08 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 that was 3H ago 30 14:09 k 30 14:10 shit! segmentation fault in ccar crap! I must have introduced the problem in the last ci 30 14:15 fixed 30 14:25 ok, finally got real tests that work test_ccar should be good by now the others too 30 14:25 cool 30 14:25 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 Hi 30 14:27 hi gus 30 14:27 ready for some serious hacking? 30 14:27 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 k 30 14:28 ok 30 14:28 How are things doing? 30 14:28 will you come here later? well I've been cleaning the extensions bastard/* ccar ctrack 30 14:29 I'll do my best to come back later 30 14:29 csimulator cfixed now we have unit tests for all of them 30 14:29 I am sloooooooooowly try to work on the ruby/gtk game 30 14:29 the only one not passing is csimulator but it will it's only one function after all, some 25 LOCs 30 14:30 OK, I get to work 30 14:30 ok cu 30 14:30 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 cu 30 14:31 bye 30 14:50 got some test cases to work in test_csimulator.rb forgot to do car.t = car.d at end of step 30 14:50 k oh you're working on the rally stuff 30 14:51 not rally the bug was there 30 14:51 isn't t part of the rally ? 30 14:51 because our car carries t too right now t == d 30 14:51 yep 30 14:51 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 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 nice 30 15:02 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 cool 30 15:03 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 cool 30 15:04 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 yep 30 15:06 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 hi 30 16:01 hi tobias 30 16:01 hi how are things? 30 16:02 well 30 16:02 nice 30 16:02 dave's working on the game I've been cleaning bastard/ 30 16:02 something playable? 30 16:02 haha, no! 30 16:03 another interesting thing is 30 16:03 gtk sucks, the docs at least 30 16:03 Finished in 20.2745 seconds. 61 tests, 76366 assertions, 0 failures, 0 errors 30 16:03 I am slow slow moving 30 16:03 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 does that buy us better solutions? 30 16:05 it should 30 16:05 nice 30 16:05 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 i sounds like work my family is coming back -- till later 30 16:07 cu 30 16:31 perl to the resuce ... maybe 30 16:33 perl? switching to perl/gtk? 30 16:33 the perl gtk docs seem more useful no not switching yet, anyways I dont think I would have time 30 16:33 ok I have one strategy 30 16:34 whats that? 30 16:34 do you think you could finish this in time, really? 30 16:34 maybe, but it wouldn't leave a lot of time for playing the game to get good results 30 16:34 aha have you read vincenz's comments here? 30 16:35 no, I skipped most of them whats the low down? 30 16:35 ok, have you heard about his GUI? he's got a GUI that represents the simulation 30 16:36 I just know he has one ok 30 16:36 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 um 30 16:37 even the realtime display only is good just show the map and a point :) should be easy, no? 30 16:37 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 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 is this to help evaluate heuristics 30 16:38 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 ok 30 16:39 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 map I got, point I think I can do, and speed would be trivail (just use the simulator, right?) 30 16:40 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 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 that way we can backtrack zoomed! nice 30 16:41 why is it all through stdin, its all ruby 30 16:42 ummm cause perhaps it won't be if we use csimulator we can bypass ruby completely if needed 30 16:42 but it has a ruby wrapper right? 30 16:42 yes it's usable from ruby 30 16:42 then I will just create the necessary objects from within ruby 30 16:42 but I think it's better if the GUI is not tied to an implementation 30 16:43 ok, I will try to whip up the viewer 30 16:43 there's no object :) just a module you do new_car = CSimulator.step(car, ".") etc 30 16:43 ok, stdin then 30 16:43 but always creating cars could be costly stdin is easy, isn't it? 30 16:44 yep just didnt see the reason at first 30 16:44 as I'm asking you a favour I don't want to make it difficult shouldn't take you much time 30 16:44 gonna grab a bowl of cereal, then I will start 30 16:44 just show the map w/o zooming and one point (or square), that's it ok what time is it there? 30 16:45 all I need to do is figure out how to draw a point on a "DrawableArea" :-) 10:45am 30 16:45 here 18H45 (6:45pm) 30 16:45 you don't want zooming? 30 16:45 ummm if it costs you nothing, then yes :) 30 16:45 k I will try to get something done for t-6h 30 16:46 ummm what time is it now? 30 16:46 could be faster 30 16:46 t-7H? 30 16:46 t-7.25h 30 16:46 ok I'm starting to think of how to actually output traces now that CSimulator is nice and fast 30 16:46 cool 30 16:46 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 k I'm on the job, cereal consumed 30 16:52 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 yeah 30 16:56 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 that's what I've been wanting to do for the last 30 hours or so :) 30 16:57 yeah I know 30 16:58 but I thought that the checkpoints would be taken from the shortest path, with some heuristics 30 16:58 its been a really interesting time seeing how people interact etc 30 16:58 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 I tried getting an entry in for last years icfp contest I was soooo close 30 17:00 :) not your first time? 30 17:00 but it was just me, and a friend who didnt know ruby, so I think he slowed things down a bit :-) 30 17:00 :-) I think we should have planned more in the next few hours, we code like crazy 30 17:00 well I *really* wanted to get something done this year yep 30 17:00 instead of getting the whole picture I think yesterday we lost some opportunities 30 17:01 yes 30 17:01 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 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 oh? 30 17:04 eletrical engineering 30 17:04 ok 30 17:04 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 learning is fun 30 17:05 has been for fun or to learn :) so I think I have to get to the trace generator :) 30 17:06 yep 30 17:26 batsman: :) 30 17:26 yes? 30 17:26 just :) 30 17:26 you got it? hi lennon vincenz: ?? 30 17:27 greetings, all 30 17:27 never mind me I'm a wreck 30 17:28 just :) ??? 30 17:28 * lennon is still doing an integrity check on his brain vincenz: are you still awake? that's hard-core... 30 17:29 guys Finished in 19.898357 seconds. 61 tests, 76366 assertions, 0 failures, 0 errors 30 17:29 no I went to sleep for 6 hours 30 17:29 vincenz: that's good 30 17:29 final phase 30 17:29 it's 87:30 pm I mean 7:30 hmm I still don't get which 38000 assertions 30 17:29 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 batsman: what's our status? 30 17:30 status: CSimulator running and certified writing AI stuff 30 17:30 ohhhhhhhhhhhh heh 30 17:31 ? 30 17:31 I did it with my eyes checked the last line :P 30 17:31 ?? 30 17:31 batsman: who's working on what part of the driving ai? 30 17:31 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 ok 30 17:32 BTW, vincenz I realized something interesting 30 17:33 what? 30 17:33 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 we had all the same idea :-P 30 17:33 hehe 30 17:33 we expressed it differently but everybody is using checkpoints 30 17:33 so what's the framework? 30 17:33 and trying to follow 30 17:33 find next point? and then? 30 17:33 I've seen the idea replicated in our wiki like 5 times :) 30 17:33 vincenz: to follow the current point, 30 17:33 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 vincenz: check the distance, delta in angle from the car's current, and distance to wall 30 17:34 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 heh 30 17:35 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 hehe 30 17:36 now, really, how advanced are you, vincenz? got traces already? 30 17:37 euhm no 30 17:37 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 I think that writing a trace will be trivial 30 17:39 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 math stuff 30 17:43 math stuff? where? 30 17:43 euhm 30 17:44 whats euhm? 30 17:44 in calculations for the car 30 17:44 you French? or French-speaking? 30 17:45 me? I learned some french about 10 years ago, in jr high school 30 17:45 me? 30 17:45 is euhm french? 30 17:46 I'm belgian, main language is dutch, though I speak better english, and yes I speak a bit of french 30 17:46 je le crois bien 30 17:46 euhm is not a work word 30 17:46 no, just that 30 17:46 euhm is when you're thinking and you go uhm 30 17:46 yes Frenchmen 30 17:46 buti with a longer vowel 30 17:46 go eeeueuuuu with the "schwa" 30 17:46 dutch it's euhm 30 17:46 @ 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 then, the teachers goes "en franAS:ais" and the students laugh "eu eu eu eueeue euuu" in a completely different way w/ the schwa sound :-) 30 17:48 batsman: i figured out why we can't cache distance to walls once per track: 30 17:48 why? 30 17:49 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 ummm right 30 17:49 well, that's dependent on direction not just position 30 17:50 I guess we should add something like distance(direction, x, y) to CTrack 30 17:50 the whole point is to find the direction to travel which has the clearest path 30 17:50 but... before coding we have to think "long term" that is, about what is happening in the next 6 hours :) 30 17:50 i coded it in ruby last night 30 17:50 good 30 17:50 i'm going to use that, until it proves too slow 30 17:50 however, we still need something to create traces 30 17:51 that's the "driver" class, which i kept banging my head against, until i figured out the checkpoint scheme 30 17:51 yes I now have a checkpoint thing too actually, 30 17:51 now the driver just needs to pull the next checkpoint from its list, 30 17:51 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 compare it to a longest-path algorithm, 30 17:52 I though they could be extracted from the SP 30 17:52 split the difference in preferred direction by some weight, and go 30 17:52 ok sounds nice cause not sophisticated 30 17:53 speed control will have to come later 30 17:53 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 ok 30 17:53 we can use this to evaluate traces and debug 30 17:54 sure 30 17:54 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 well, we could always undertake another rewrite, this time in Scheme ;) 30 17:54 :) 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 want a screenshot? 30 17:55 we aim at the next 30 17:55 how do I make a screenshot in kde? 30 17:55 lol 30 17:55 that'd be nice :) 30 17:56 JNO WA MY CAR is giong to the finish!!! 30 17:56 !!!! did it! which track? 1? you can use gimp and "acquire" 30 17:57 yup track 1 30 17:57 good for you 30 17:59 batsman: wait a minute! 30 18:00 ? 30 18:00 batsman: why not just have simulate.c generate traces as it executes? 30 18:00 hmm where can I put the pick? 30 18:00 generate traces??? 30 18:00 pic? 30 18:00 lennon, is our wiki open? 30 18:00 lennon: finally figured that out? 30 18:00 * lennon was too damn tired last night the wiki will be open in about 30 seconds... 30 18:01 right now, we are passing the commands to simulate.c something has to generate them 30 18:01 ...and it's done 30 18:01 nice 30 18:01 vincenz: http://www.urusai.org/cgi-bin/cvs/icfp 30 18:01 ok vincenz, don't laugh too much :) at our puny attempts to do something 30 18:02 batsman: right, so assuming something is generating them... 30 18:02 it would save them as well, and? 30 18:02 batsman: just let the simulator save them right 30 18:02 ok 30 18:02 batsman: then, as soon as we have a strategy that works, 30 18:02 yes 30 18:02 batsman: we have our trace, as well 30 18:02 "as soon as" of course 30 18:02 :) 30 18:03 now, didn't we already know that before??? 30 18:03 hmm 30 18:03 we are still in the "as soon as ..." 30 18:03 attach doesn't work 30 18:03 vincenz: is it > 100K? 30 18:03 are u using mozilla 1.3? the wiki is broken for mozilla 1.3 30 18:03 vincenz: the wiki has a hard limit of 100K for attachments batsman: and only login is broken 30 18:04 ok guys less than 6 H 30 18:05 lennon: nothing hapens when I press attach 30 18:05 ouch, want to see your pic 30 18:05 just says...page loaded 30 18:05 if we don't make it, at least *you* have to :) 30 18:05 vincenz: are you using moz, or konq? 30 18:06 kong let me open mzo 30 18:06 vincenz: just send it to me: batsman DOT geo AT yahoo DOT com 30 18:06 'cause anonymous attachments are working fine for me until Safari, which is KHTML-based 30 18:06 then I'll attach it 30 18:06 must be cause I'm firewalled 30 18:07 don't spam me, though }:-> 30 18:08 heh I don't spam 30 18:08 }:-) mmm cannot get it w/ dcc no route to host you're firewalled, I guess can you send email? 30 18:10 wait up kinda busy 30 18:10 ok 30 18:14 I wonder what happened to aleksi he said he'b be back in 2H some 6H ago 30 18:16 he may well have decided to cut his losses 30 18:16 mmmm 30 18:16 losses? ;-/ 30 18:16 but now it's 21H in his timezone 30 18:16 of time 30 18:17 it shouldn't be too bad to spend some 4-5 more 30 18:17 or he had somewhere pressing to be 30 18:17 after being here for most of the previous days 30 18:18 indeed 30 18:18 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 i hate it when my client idles out 30 18:39 batsman, you here? 30 18:39 yes 30 18:40 brb 30 18:40 I am kinda stuck with the stdin idea because ... 30 18:40 ? 30 18:40 when the gui app is created, the gtk event loop takes over 30 18:40 I see, you don't want blocking things 30 18:41 so I can't sit there and listen on stdin 30 18:41 can you have a thread ? reading and updating x, y? 30 18:55 guys? 30 18:55 yes? 30 18:55 lost my internet connection I thought I was out couldn't even ping my router 30 18:55 perfect timing 30 18:56 he 30 18:56 okay, i'm on the last bit of a first Driver implementation 30 18:56 ok 30 18:56 i need an uber-simple algo to determine whether we should accelerate, coast, or brake 30 18:56 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 how does it do speed control? 30 18:57 he 30 18:57 and we already have the points from the SP 30 18:57 "braindead" speed < .1 by def I mean if speed > .1, brake unconditionnaly that's why it is braindead 30 18:58 so it uses the "old granny driver" heuristic 30 18:58 :) but even that way it crashes with 0_stupid.trk after 160 steps 30 18:58 you guys have any tracks you'd like th share for test? 30 18:59 but it's fast it crashes in .04 secs or so 30 18:59 have you checked it in yet? 30 18:59 yes it's in btw in case my connection dies ... 30 18:59 i don't see it 30 19:00 should be in bastard/ no? 30 19:00 now it showed up 30 19:00 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 cause I always see so many postings about that in ruby-talk :) 30 19:02 I am sorta there 30 19:02 great 30 19:02 I now get stdin being read 30 19:02 good 30 19:02 but when I try to update the image, its blanking out entire rect regions 30 19:03 mmm but can we actually see anything? 30 19:03 the gui code isn't getting control to update I guess the map displays 30 19:03 even if it's ugly, it's good enough just want to see how the car crashes 30 19:03 but once it reads in a position its is basically useless 30 19:04 ok 30 19:04 no it wont get that far 30 19:06 WOO smooth gui I made a change now it smoothly goes start-> finish 5 seconds 30 19:06 good! 30 19:06 drawing is the slow part :) 30 19:07 we still didn't get your pic 30 19:10 ok, fixed some shameful bugs in braindead now it follows the sp and doesn't crash nearly as fast 30 19:12 i'll take a look, and see if i can't copy it for my driver class 30 19:12 well, it's really stupid 30 19:12 which should be a good bit more intelligent about direction-finding and speed 30 19:13 don't think you'll see anything in my code just wrote it for the morale I needed something 30 19:13 batsman: one quick question: are you using the regular Ruby track in the driver, and the ctrack in the simulator? 30 19:14 hehe, it crashes after over 20000 cycles "crossed the bad way" mmm the simulator doesn't need the track 30 19:14 couldn't we just do it as two stages: read track, generate pointgrid, dump 30 19:14 CSimulator only takes car and command yes it makes sense to dump the pointgrid, of course 30 19:15 have you tried using ctrack in place of track as the base class for pointgrid? 30 19:15 there was some problem with the API being different :P 30 19:15 how so? 30 19:16 yes pointgrid uses @data[y][x] 30 19:16 ah 30 19:16 CTrack would be self[x,y] that's all just a matter of s/@data[y][x]/self[x,y]/g 30 19:16 perhaps i'll change that...just so i can feel better about the time spent working on CTrack 30 19:17 ok 30 19:18 that was a quick change: all of 1 line 30 19:18 ok 30 19:20 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 oops -- had to change refs to '@x_dim' and '@y_dim' to method calls 30 19:24 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 my connection could die at any time 30 19:26 bingo! batsman: which code? 30 19:27 k 30 19:27 okay, well them I'm checking in my current Driver code, just so you can get it 30 19:27 I am getting nowhere, argh! 30 19:28 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 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 aren't converting from FPN? 30 19:30 it's a CCar 30 19:30 ah 30 19:30 does no magic, just returns Fixnums 30 19:30 right 30 19:30 you can get CCar#state_f, though 30 19:34 ok got it till point #3 now :) only some 10 more to go or so 30 19:35 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 ok where is it? 30 19:36 model/driver.rb 30 19:36 good can I correct obvious bugs? 30 19:37 please do i'm writing a script to instantiate and run it right now 30 19:38 but it's no good if we're both editing... ok then are you using CCar or Car ? 30 19:38 CCar, preferably 30 19:38 ok 30 19:40 you use CSimulator, don't you? 30 19:40 yep need to populate that instance variable, too, don't i? 30 19:41 no CSimulator is a module no need to instantiate 30 19:41 ok 30 19:41 just CSimulator.step I'll s//// it 30 19:41 sounds good 30 19:44 batsman: can you change the constructor to accept the list of checkpoints as the second arg? 30 19:44 yes 30 19:45 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 actually, there's no initialize as of now, is there? 30 19:45 so many details... 30 19:45 what's the first arg?? the track? 30 19:45 first arg should be track, yes second should be checkpoints 30 19:46 ok ok done 30 19:46 cool checked in? 30 19:46 wait ok now, the logic for @should_accelerate, etc is still to be done 30 19:47 oh, crap did i not check that in? 30 19:48 ... 30 19:48 well, checkin your stuff, and i'll merge them by hand 30 19:48 I ci already 30 19:48 ok 30 19:49 ooops, forgot about the check for crash in drive sorry 30 19:49 no problem done now? or should i do it? tell you what..i'll just take care of it 30 19:51 ok, sorry, didn't hear you 30 19:52 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 hi tobias 30 19:52 hi 30 19:53 lennon: u're right, it's small so I missed it :) things are pretty desperate now :) 30 19:53 supposedly i like these moments 30 19:54 well, we all knew it would be like that, didn't we? :) 30 19:54 ok, fixing parse errors in 'driver.rb' 30 19:54 when you can here time ticking out 30 19:54 first time I realized that was perhaps 35H ago or so 30 19:54 when the C coding began? 30 19:55 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 we're not dead yet 30 19:56 and aleksi, who should have used his magic, disappeared 30 19:56 just limping badly 30 19:57 worst than that 30 19:57 do we have a maybe bad solution by now? 30 19:57 just take a look at vincenz well if bad means "which makes the car crash", yes :) 30 19:57 :) 30 19:58 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 anyone interested in continuing this project after the deadline? 30 19:58 I would be it's fun 30 19:59 i would also be 30 19:59 plus I'm looking forward to the next ICFP I'll be much better at it 30 19:59 maybe i can even get to the level to understand the current code :) 30 19:59 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 we don't have to use our code 30 20:00 and we coded that almost 48H ago :) 30 20:00 we could learn from the other entry's and map the concepts to ruby 30 20:00 mmmm right would anybody be interested in the next ICFP?? if we prepare a little before chances would boost 30 20:01 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 yes but do you think this should be made in teamwork? 30 20:02 I plan to do the next icfp 30 20:02 I certainly will 30 20:02 it i would be interested to be a part time member of the next icfp team :-) 30 20:02 sure, maybe (re: teamwork) 30 20:03 ok, but at a slower pace :) 30 20:03 ok...almost there getting my driver class to run and generate traces 30 20:03 our car drives on track 1 30 20:03 good 30 20:04 but the rest of the tracks actually give bugs :/ trying to fix gui 30 20:04 bugs? 30 20:04 hehe 30 20:04 it drives through the whole track 1? really? 30 20:04 yes, they did it 30 20:04 we can participate! 30 20:05 ? 30 20:05 that's a valid solution, then 30 20:05 hey 30 20:05 I'm not on the ruby team 30 20:05 tobias he's from the scheme team :-P 30 20:05 oh 30 20:05 lol 30 20:05 what did u think, man :-))))) we told u we were almost dead.... 30 20:06 :) 30 20:06 now, only 2 things could save us lennon's driver or aleksi suddenly appearing with a working A* :) 30 20:07 an extention could save us too :-) 30 20:07 he 30 20:07 or a time machine 30 20:07 I'm no longer able to make the hard stuff 30 20:07 all of which have similar probabilities of happening 30 20:08 I wasted my hacking power on the extensions 30 20:08 I need cigarettes :( 30 20:08 I had a really productive time after lunch 30 20:08 ugh 30 20:08 my first real lunch since ICFP began 30 20:08 i went through the night slept betwee 1pm and 8pm my time 30 20:08 ouch 30 20:08 and didn't eat yesterday and the day before (I forgot about it as I was so involved) 30 20:09 that's *bad* I got another lesson fron ICFP this year sleep as much as possible really :) 30 20:09 vincenz: I know what thats like 30 20:10 caffeine = good, food = better 30 20:10 are you all 1st time icfp participants (i am, batsman just said so) ? 30 20:10 I am dave isn't he participated last year almost submitted :) 30 20:11 wow 30 20:11 i am 30 20:11 last year was so much easier, similar problems too 30 20:11 wasn't last year's in september or so? 30 20:11 we for sure would have had an entry in with all these people auguest I think august 30 20:12 ok 30 20:12 this year is earlier for some reason 30 20:12 hI'm a 1st timer 30 20:12 I hoped they'd start doing it every 6 months 30 20:12 so is the other ppll on my team 30 20:12 the conference is earlier this year, thus the contest also 30 20:12 batsman_: yeah me too, except I have a job... 30 20:12 yyes 30 20:12 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 I ahd to ask for vacation today 30 20:13 :| and then, tomorrow you productivity will be near 0 at work 30 20:13 ehe who cares it's not a contest just work 30 20:14 right well vincenz, any chances you're getting more tracks to work? 30 20:14 yes the big problem is my gui it's having problems 30 20:14 batsman_, lennon, you guys still working on things? 30 20:15 I'm mostly seeing lennon's efforts he's trying really hard 30 20:15 ok 30 20:15 I'll try to help but don't know how at the moment 30 20:16 cuz I think I am stuck with the viewer 30 20:16 vincenz: does your solution involve humans giving hints? 30 20:16 definitely he's using a gui to set checkpoints 30 20:16 I don't know gdk/gtk and I am stuck 30 20:16 tobias: the solution involves being able to see if our things works and for that I need a wellworking gui 30 20:17 what gui binding or you using for scheme? 30 20:17 mred it's gui made in scheme mzscheme (drscheme) aha :) 30 20:19 shit! now i get a segfault! 30 20:19 ?? segfault, where? 30 20:20 davel: what version of gtk binding were you using? 30 20:20 it might be my fault... extensions :-( 30 20:20 or mine, since it looks like it's in ctrack 30 20:20 which ones are you using? 30 20:20 ctrack, ccar 30 20:20 ummm ccar should be safe as for ctrack 30 20:20 tobias: 1.2 30 20:20 you did a nice work w/ it, too 30 20:21 extensions? 30 20:21 extensions in C for Ruby 30 20:21 vincenz: C code 30 20:21 yick 30 20:21 eactly exactly 30 20:21 gotta love scheme since 72 hours scheme is my new fave language 30 20:21 batsman: found the segfault 30 20:21 winning over ocaml 30 20:21 really? where? 30 20:22 segfaults... I feel sorry for you :/ 30 20:22 passing a float to a ctrack function that used 'FIX2INT' 30 20:22 vincenz: tried common lisp? 30 20:22 segfaults are our fault (no pun...) because we introduced extensions 30 20:22 davel: nah 30 20:23 I like lisp a lot 30 20:23 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 hehe 30 20:24 I'm still considering using my bindings to use Java from Ruby and then write some crap in Java :P 30 20:24 heh java is a bitch too so much code for something simple 30 20:25 yes 30 20:25 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 scheme is nice because it does not need these #' quotes like common lisp does and has continuations :) 30 20:27 yup and you can do (varname varname) if varname 1 points to a func 30 20:28 what? common lisp has no continuations??? 30 20:28 yes no batsman: no 30 20:28 crap, then I don't want to learn it anymore 30 20:28 graham simulates them in onlisp 30 20:28 by transforming EVERYTHING to cps? 30 20:28 so you can say you can implement them in comon lisp 30 20:29 well, anyway, I had already chosen scheme as my lisp dialect of choice 30 20:29 why not just use scheme? 30 20:29 to use some time in the future 30 20:29 what's commonlips got that a decent implementation of scheme doesn'? 30 20:29 :) 30 20:29 lisp, not lips (that's not a freudian slip) 30 20:29 a HUGE library 30 20:29 get mzscheme 30 20:29 non-hygienic macros 30 20:29 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 yes 30 20:30 what are they? 30 20:30 introduce crap in the language :) 30 20:30 no, it's actually more powerful than hygienic 30 20:30 like somebody not collecting the garbage or so I guess :) 30 20:31 garbage always get collected tobias: give me an example 30 20:31 wait... 30 20:31 can someone look at 'geom.rb' and tell me why 'line.interpolate' would be creating points with x: -Infinity, y: Infinity 30 20:31 hmm 30 20:31 i have to go smoke before i break something, like my laptop 30 20:31 ok, I'll check 30 20:32 (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 variable capture 30 20:33 yes! aif means ... 30 20:34 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 hmm gui works sweet car-algo's not this sux there's this one guy who works pretty well 30 20:35 ... "anamorphic if" 30 20:35 but he's gone for the moment but the thir member who started he's mostly idle 30 20:36 tobias, "anaphoric" 30 20:36 tobias: how is that different from (let ((value (slow func))) (if.....value send it 30 20:36 yes, thats it lesser typing 30 20:37 heh 30 20:37 more clear 30 20:37 all macros are about are lesser typing 30 20:37 expressive, no clutter 30 20:37 you could do completely without 30 20:37 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 they can do at compile-time, but you always coud do it at runtime, not? 30 20:39 yeah, I meant that certain compile-time calculations could only be done with macros 30 20:40 common lisp is my language of the year (tm) 30 20:40 this year I take it? 30 20:40 yes of this year 30 20:40 and you're learning with graham's on lisp? 30 20:40 is it? hey finished with haskell already? 30 20:41 (shy) no 30 20:41 any other sources for learning lisp 30 20:41 ah, ok, *your* language of the year 30 20:41 jim its all up to you at this point, don don't fail us :-) 30 20:41 jim, we're counting on you 30 20:42 LOL 30 20:42 we wrote the C core as you told us to 30 20:42 OK. I'll finish coding everything. Just give me five minutes :-) 30 20:42 davel: i read through touretzky's "gentle introduction" davel: but can not recommend it. 30 20:42 ok, we'll give you 10, but make it pretty 30 20:42 rather, i recommend not to read it 30 20:43 :) 30 20:43 ok, I haven't heard of it is it that bad? 30 20:43 it's so boring a book, probably the most boring book i've ever forced myself to finish without need 30 20:44 oh thats bad 30 20:44 ok, batsman, tobias, and jimm: can you look at 'geom.rb', in the 'Point#translate' method? 30 20:44 Point#translate? 30 20:44 Point class, translate instance method 30 20:44 yes, I know 30 20:44 alright 30 20:44 I mean, wasn't the problem related to Line? 30 20:44 for some reason, 30 20:45 did you fix "yeild traverse(t)"? 30 20:45 oh, that: yes 30 20:45 ok 30 20:45 the problem is in the Infitity coords which Point#translate is generating 30 20:45 yes 30 20:46 now the question is, why, with reasonable inputs, would that happen? for example: 30 20:46 what inputs? 30 20:47 what are your storing in @A>>, CFixed? 30 20:47 right now, it's crashing on Point<2.0, 6.0>.translate(94.0, -2.0) 30 20:47 @x 30 20:47 should all be floats 30 20:47 I loaded 'geom.rb' into irb, and did "Point.new(2.0, 6.0).translate(94.0, -2.0)". No crash. 30 20:48 damn 30 20:48 works fine for me too 30 20:48 okay, so there's probably a fixed, or something, creeping in there 30 20:48 irb(main):003:0> Point.new(2.0, 6.0).translate(94.0, -2.0) => # 30 20:48 try running 'ruby tools/drive_course.rb' after an update 30 20:48 Are you passing a fixed into Point.new or translate? 30 20:48 works for me too 30 20:48 you'll get debugging output on the console 30 20:48 woo I almost got through track 7 30 20:48 wow 30 20:48 jimm: I'm passing floats 30 20:49 lennon: ~/src/icfp> ruby tools/drive_course.rb Syntax: ruby tools/drive_course.rb lennon: never mind 30 20:49 jimm: sorry, you have to give it a track filename 30 20:49 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 batsman: you must have had a conflict -- the <<<<<< stuff is CVS's fault 30 20:50 lennon: it's chugging away for me (I'm trying 5_Car.trk) 30 20:50 you're right, stupid of mine 30 20:50 lennon: ... still chugging away ... 30 20:51 jimm: it'll probably do that for a while... 30 20:51 OK 30 20:51 ...or maybe forever, if i've really screwed it all up 30 20:51 it fails for me with 0_stupid.trk 30 20:51 at least the memory consumption seems reasonably stable 0_stupid.trk is the one that caused the crash for me 30 20:51 it's because it's small 30 20:51 I'll start up a second run on 0_stupid.trk 30 20:52 pointgrid ends fast and then processing begins and the thing crashes 30 20:52 batsman: but i rean pointgrid on several of the non-trivial maps, 30 20:52 now it died for 5 too 30 20:52 lennon: 0_stupid.trk fails with "./model/driver.rb:41:in `to_i': Infinity (FloatDomainError)" 30 20:52 batsman: and it finished much more quickly than this 30 20:52 ./model/driver.rb:41:in `to_i': -Infinity (FloatDomainError) 30 20:53 all: so, now you see where the bug is happening 30 20:53 ok 30 20:54 lennon: same failure wity track 5_Car.trk 30 20:54 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 do you use Vector#apply_to? thers a bug in that method ah yes, you use it 30 20:55 tobias: yes, I do, in Vector#line_to 30 20:55 the orig parameter is unused 30 20:55 right i'll fix it 30 20:56 x=orig+... i suppose 30 20:56 heh *crosses his fingers* let's hope we can fix our algo to clear the other tracks 30 20:58 I got it! 30 20:58 batsman: do tell 30 20:58 this is broken: steps.times do |i| t = 1.0 / i it divides by 0 30 20:58 * lennon feel dumb 30 20:59 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 lennon: but I have decided I will die coding lennon: anything I can do to help you? 30 21:02 batsman: just continuing to debug -- i'll re-checkin in a moment 30 21:04 batsman: i'm thinking we may have performance issues with this code... 30 21:04 really... 30 21:04 ...running it over 0_simple.trk is taking *waaaay* too long 30 21:05 cannot believe it 0_simple is around 10x10 30 21:05 655350x655350 30 21:06 alright, time to start looking for quick optimizations 30 21:06 ok 30 21:06 just checked in the latest versions which run without errors, but for too long 30 21:07 hello how are we doing? 30 21:07 hi aleksi what happened? we wanted your magic :) 30 21:07 A* finished? 30 21:07 ...... 30 21:07 I've done naive solution and watched why it didn't work 30 21:08 yes, did you bring in the code... ? :) 30 21:08 now I have the magic ready, but there's no hope I can do it to the deadline by myself 30 21:08 there's 3 hours 30 21:08 oh so its a final lap push? 30 21:08 you have the C core working 30 21:08 so if you guys are out of hope on your own solution, maybe we shold collaborative try this 30 21:08 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 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 well aleksi, I did my homework now all the extensions are quite nicely integrated and unit tested and CSimulator passes the 38000 test cases 30 21:11 batsman, perfect, just so great! disclaimers: I can't make any promises this will work. But the way I see it, there's not too much to do, and get it running. 30 21:12 ok 30 21:12 I'm pretty confident we can make it run on multiple tracks, and perhaps get even few solutions to the deadline. 30 21:12 aleksi: can you look at 'model/driver.rb', and see how much of it is applicable to your model? aleksi: nevermind, just updated from cvs you're way ahead of me on this 30 21:13 If no solutions will be produced the reason will probably be that the needed runtime is just too prohibitive, still. 30 21:13 :) this is highly probable too 30 21:13 But if even some solutions will be produced, there might be some chance we get solutions to all of this. 30 21:13 that sounds really good 30 21:13 lennon, I'll look anyway, there might be usable code. 30 21:14 now, if only you had come back a couple hours before... 30 21:14 I'm sorry we're not now at saturday morning, or even sunday evening, but I know that we all have done our best. and in some cases that has been more than marvellous work (like the solid framework, almost ready C side) so, it's time to decide shall we use the team time for 1) some ready solution 2) to implement according the "paper" I wrote 3) give up, and just have fun to the bitter end :) 30 21:15 personally, I fond it better to be able to blame the computer for not being faster :) find 30 21:16 me too <:o[P] 30 21:17 lennon: there has to be something broken in driver.rb, this is just too slow, > 10 minutes for a 10x10 track... the others will be 10000 times slower!! 30 21:18 any people who would like to be picking people for our team? 30 21:18 batsman: i know 30 21:18 vincenz, are you capable of ruby or C coding? and have loads of CPU power behind you? 30 21:19 batsman: i'm trying to check where to bottlenecks are right now 30 21:19 ok 30 21:19 batsman: is there a profiler included with Ruby? 30 21:19 yes 30 21:19 so guys, who are online? lennon and batsman sure, others? 30 21:19 but better not use it it'll make it even slower :) I think it's ruby -rprofile bla.rb 30 21:19 jimm, and tobias have be here recently as well 30 21:20 tobias has been around dave should be too 30 21:20 batsman: i'm not going to run to completion, just long enough to see what the hotspots are 30 21:20 what shall we do? 30 21:20 well right now I'm idle if given a task I'll die coding 30 21:20 I'm willing to do help if there's good idea out there, that this team wants to push forward. 30 21:20 ouch, tobias went 30 21:20 If not, I'm very willing to push this idea forward. 30 21:20 batsman: okay, i think i found part of the problem... batsman: it's not doing anything but coasting 30 21:21 i am here 30 21:21 we have couple of hours, so where shall we go? 30 21:21 batsman: which means a never-ending loop 30 21:21 I see I'm willing to code somebody tell me what := :) 30 21:22 all: tell you what i'm going to keep plugging away on my Driver impl 30 21:22 VOTE TIME, you can say 1) someone's idea, and name the idea, 2) give up 30 21:22 which isn't that different from Aleksi's design, though much sloppier 30 21:22 so as I see it, we have the following options lennon: kind of working driver in Ruby, slow aleksi: fast thing that might be implemented in time 30 21:24 for my vote, I will put my time towards the idea that is most likely 30 21:24 which is.... ? 30 21:24 I have to ask 30 21:24 that's what I want to know too 30 21:24 aleksi: do you think your idea can honestly be solved in time? lennon: same question 30 21:25 lennon's should be easier to develop in fact it's mostly done 30 21:25 davel, you tell me, check out the tasks at the end of the above url, and see where you end up 30 21:25 but no guarantees on whether it'll be fast enough 30 21:25 right now, I am don't know the status of either one to determine if its feasible 30 21:25 i'm just debugging a loop in the move selection 30 21:25 I think it is, but can't say for sure 30 21:25 there's 2H30 to the end 30 21:25 davel: more bugs could appear, of course, but it's a pretty simple algo 30 21:25 I like where lennon is, and driver.rb's idea, there's something similar going on but I have very strong belief, Ruby is too slow to run A*-alikes through a track 30 21:26 mmm 30 21:26 aleksi: I did read the url, and to be honest I don't know if we could complete the idea in time, thats why I wanted to hear what you think 30 21:26 without advanced heuristics that keep it away from uninteresting paths 30 21:26 lennon is not backtracking he only considers one car and drives it 30 21:27 using the SP as my base path 30 21:27 still, since I haven't seen the behavior of my algorith, can't say if it's good enough, but it's as good as I can think of my take is, if the question is which will find a solution sooner: lennon's implementation tweaking and development + it's run time or my idea's implementation + it's run time, I'd bet my idea! 30 21:28 cause your solution is faster? aleksi: will your solution be C or simply use CSimulator & friends from Ruby 30 21:29 batsman, way much faster, because of much better heuristics and C implementation (has much less to play in here compared to heuristics) 30 21:30 but it still has one problem: setting checkpoints davel: you didn't get the GUI to work, did you? 30 21:30 no 30 21:30 ok 30 21:30 batsman, steps 1, 2 and 3 can be done simultaneously, so if three is done it will be in C, if not, it will be in Ruby 30 21:30 wasn't easy at all 30 21:30 sorry I am not a gdk/gtk guy 30 21:30 batsman, step two, setting the checkpoints won't be very big task 30 21:30 prob shoulda went with ncurses :-) 30 21:31 :-) 30 21:32 aleksi: I'm on the scheme team 30 21:32 for 1_Simple, there could be around 25 points, and could be reduced even from that 30 21:33 ummm, do you think it'll be ok to just pick them by hand, without a GUI or anything? tobias, having quite a lot of problems, aren't you.... ok 30 21:34 hi daisy 30 21:34 batsman, they could be pick by hand using GUI to pick up coordinates, but for the speed for the point there has to be just good judgment (ie. first take too slow speed, then increase until crashes start to occur or no trace found) 30 21:34 ok 30 21:34 hi 30 21:34 one criterium that could help us choose which one is more parallelizable in devel.? 30 21:35 lennon has only one piece of source code 30 21:35 that isn't good as we cannot all edit at the same time OTOH if it's smaller it's easier to debug aaaargh 30 21:35 I'll need C parts differently, helper classes differently, the paths different ie. there's job for 4 people 30 21:36 lennon, please, say something 30 21:36 0_stupid is still running here 30 21:36 are you using lennon's old code? he modified it since then 30 21:37 I propose lennon keeps doing what he's doing, and shouts if he needs occasionally other's help. The rest of us, let's pursue on my idea! 30 21:37 oh 30 21:37 the car wasn't moving 30 21:37 that might be the reason 30 21:37 he found it dave joining the A* side? 30 21:37 bye, clone 30 21:37 eh 30 21:37 hee, this will be easy as tobias could create clones of himself :) 30 21:38 tobias, ready for serious hacking? 30 21:38 not really 30 21:38 we're facing a tough decision we have lennon working on his driver 30 21:38 i will leave you soon, guys 30 21:38 and aleksi has a proposal which sounds nice but is complicated ok, tobias, nice to have had you around :-) 30 21:39 tobias, can you still do something? 30 21:39 thanks for the fuzzy feeling :-) 10 minutes or so 30 21:39 or are you leaving very soon ah, ok, then many thanks for spending time with us! your code was very valuable! 30 21:39 tobias thanks 30 21:40 thank you it was a pleasure 30 21:40 davel, batsman, I'll go forward now 30 21:40 ok 30 21:40 ok forward, how? 30 21:40 as lennon doesn't say I word, I'm joining the A* camp let's divide work 30 21:40 so if you'll join me, say so, if not, it's all ok! 30 21:40 sorry, kids busy coding 30 21:41 lennon, good for you! :) 30 21:41 minimized the irc window for a bit, and promptly forgot 30 21:41 we were just about to go to aleksi's A* 30 21:41 you clearly don't have the addiction yet :) 30 21:41 to IRC, or to A*? 30 21:41 lennon, do you need any help for your part? whee :) 30 21:41 well to be honest, I don't feel optimistic, and I am probably not all there mentally, but given easy to chew tasks I will try a final push 30 21:42 I'm not in too bad a shape 30 21:42 i think i'll be fine -- it's just debugging stupid logic errors in my move selection heuristics right now 30 21:42 davel, batsman, who do you think is better to do the helper class? 30 21:42 had some real food today 30 21:42 you guys go ahead on aleksi's 30 21:42 ie. class Path, and then the methods I list in it? lennon, ok, but shout when you need a hand 30 21:42 I don't get the meaning of these methods 30 21:43 first some definitions do you understand what I mean with a path (with speed constraints)? 30 21:43 yes 30 21:43 that is, a polyline having coords, and speed info in it 30 21:43 list (array) or points + speed constraints on them, right? 30 21:43 the speed constraint should interpolate along the line 30 21:44 ok go on... 30 21:44 path location is a point on a path where we are when measured "how far it's to the end". 30 21:44 how do we get that 30 21:45 ie. take line segment from A to B, and assume we've passed point A, and not yet B 30 21:45 ok, why does that method reurn a line segment? return def find_path_location(x, y) -> [line_segment, distance from segment start] 30 21:45 now take line perpendicular to line AB (or vector A->B) 30 21:45 does it return a segment near that point? somebody? 30 21:46 find a point in line AB where the orhogonal line (or perpendicular, I don't know the english term, but a line in 90 degree crossing the original line) crosses AB and touches the point where we are now, I'll answer the questions you posed: "why does the method return line segment" well, in the heuristics I need to have both point A and B (ie. line segment), and then know how far from point A to the direction of B is the path location 30 21:48 man we need a collaborative drawing app for this, textual non visual descriptions aren't working too welll 30 21:48 mmm I see it 30 21:48 it could be also a coordtinate, but it's easier if expressed in terms of [from point A, distance * unit vector A->B] I'll, make a drawing for the terms give me couple of minutes 30 21:49 you do an orthogonal projection of the point we're in over the segment AB isn't it that? then with the projected point you check the distances 30 21:49 yes 30 21:49 did I get it? 30 21:49 yes, I guess you're right 30 21:49 dave, does it make it for you? 30 21:50 still churning 30 21:50 so find_path_location would find the segment AB near the point (x,y) and say how near B it is with the projection and everything right? 30 21:51 ok, I understand what yer saying, but I am not visuallizing it so if you both agrree then lets move on ok now I see it 30 21:52 good, so next point def find_target_point(x, y) -> [line_segment, distance from segment start] 30 21:53 wich you luck, bye 30 21:53 is this the same for an arbitrary point? what's the difference with find_path_location? I guess aleksi is drawing now 30 21:53 i guess 30 21:54 next time we want some virtual blackboard does this exist at all? 30 21:54 the "projected" or "projection" terminology was confusing me batsman_: yes it does exist windows has netmeeting 30 21:54 I don't know if it's standard english he, don't want to switch to windows :P 30 21:54 and I think there is some jabber based collaboration app 30 21:55 I'd go as far as writing it 30 21:55 yeah I understand that 30 21:55 plus, I don't want to power off my PC my update is over 160 days no IIRC it would be 200+ if I hadn't shutdown by accident s/update/uptime/ 30 21:55 he 30 21:56 I keep mixing words, can't believe it! 30 21:56 whats your native lang? 30 21:56 Spanish 30 21:56 oh 30 21:56 but English is like my 3rd language French being second 30 21:57 seems like everyone has been typing good english 30 21:57 and now I'm working on my German 30 21:57 but typing and speaking are 2 different things :-) 30 21:57 :) 30 21:57 I know english and can read and understand a bit of french but I can't speak it or write it I guess I am read only at french and not that good 30 21:58 right now I'm not very functional w/ German as I hardly get the chance to speak here w/ all my Chinese neighbours :) 30 21:58 t-2h 30 21:58 yes guess aleksi is still drawing 30 21:58 I dont think we'll get anywhere close 30 21:59 no, but I decided I will die coding :-) this is part of the fun fighting against fast fate 30 21:59 I think for a decent algorithm we'd probably need at least 10 min for the simplest of maps 30 21:59 shit I cannot type anymore or what??????? mmmm my fingers type on their own I think sentences 30 22:00 it'll be interesting to see how fast the purely computer driven traces were able to be generated 30 22:00 and then when typing, I do random word substitutions 30 22:00 I dont think there is much fight left, in me or in the contest I think we're tko'd with 2 rounds to KO 30 22:01 :) r u giving up? 30 22:01 mentally I already have 30 22:01 IIRC you wrote "to he (hopefully not) bitter end" mmm 30 22:01 its just physically that I am at the computer still 30 22:01 we all have 30 22:02 you recall well but who's to say now isn't the end? 30 22:02 as I said, it's been over 30+ hours since I saw we wouldn't finish :) perhaps aleksi comes back with code and magic ;) 30 22:03 I haven't fealt that we have a chance since the 1st half of the contest 30 22:03 yes 30 22:03 yeah 30 22:03 72/2 = 36 just like me :) 30 22:04 yep i think find_target_point is to find the next point we are aiming for 30 22:05 then, it could be done with vincenz' algo 30 22:06 not the intersection of the line segment AB, but the line segment PB and the distance (where P is the current x,y) 30 22:06 I see hopefully aleksi's drawing will clear this issues 30 22:06 soon 30 22:06 yep so are you a graduated electrical eng? or still in school? 30 22:07 mmm actually I'd be doing my 5th year had I stayed in Spain but I came to Stuttgart 30 22:07 the pic is making it's way through the net 30 22:07 I am unemployed and no degree less. I went to school starting with math (some applied some pure), then took computers, really really liked it, and went fast at my own pace 30 22:08 http://www.cs.helsinki.fi/u/kaniemel/heuristics_terms.gif 30 22:08 so now I'm in a special exchange 30 22:08 don't know whether I should go back and finish school or not 30 22:08 when I finish this MSc. (which is crap BTW) I get my degree at home (so much better) and this 30 22:09 do the pic make it any clearer? 30 22:09 I hope so, it's nice 30 22:09 yep 30 22:09 the path location is on the path, the nearest line segment and along it the target point is ahead of path location, and depends how much speed we have there are couple of interesting angles 30 22:10 ok 30 22:10 this target point idea is interesting now, quick coding!!! 30 22:11 so, we should make a class that holds polyline, and can give out path location, and target given current coordinates who 30 22:11 my brain will toast in some 90 minutes 30 22:11 who'll start with path? 30 22:11 what is the criterium for the target point? ? 30 22:11 ok, maybe other way round, who's better in C? batsman, what do you mean with criterium? 30 22:12 at this point, I think the code that will eminate from my fingers is gonna be pretty poor quality can you give a quick desc of alpha and beta 30 22:13 it's path_location + unit(AB)*|speed_vector|, and if we end up over B, we have to continue on next segment for the over going part 30 22:13 sorry I'm back 30 22:13 ok 30 22:13 alpha is an angle between where we are heading and where should be heading 30 22:13 my computer almost died 30 22:13 ok 30 22:13 I forgot lennon's work in the background and it was taking some 900MB RAM now 30 22:13 batsman: oops 30 22:13 so my PC began swapping like crazy 30 22:14 beta is angle between where we are heading and where should we be heading if we would be at the end of the speed vector 30 22:14 k 30 22:14 ok 30 22:14 beta is much quicker to react on turns, but alpha tells generally where we should go 30 22:15 I think I'm probably the C man I've coded quite some C lately 30 22:15 batsman, did you get how do we find target point? 30 22:15 alright then 30 22:16 target = path location + unitary_vect(AB) * speed 30 22:16 can i interrupt briefly? 30 22:16 davel, give it a try (the class Path), and we'll help you through when you hit to problems lennon, surely, thanks 30 22:16 yes? 30 22:16 do we have a tool to visualize traces? 30 22:16 yes aleksi's 30 22:16 lennon, submit your trace in cvs and I'll make a pic out of it 30 22:17 tools/trace_graphic_simulation.rb ok, aleksi, what do I do? I can handle C, but what is to be implemented??? 30 22:17 hehe you're using my algo? 30 22:17 one branch yes the other not :) we're trying with some A* now 30 22:18 which alg is that? 30 22:18 restricted A* aleksi's A* lennon's mostly like vincenz' 30 22:18 aleksi: so I am gonna do the Path class? 30 22:18 batsman, take step 3 30 22:18 whats batsman_ doing in C? 30 22:19 davel, look at the bottom of the page, there are the steps 30 22:19 ok optimize bastard.rb and use etc, etc I mean C obviously 30 22:20 so am I implementing just the Path ? 30 22:20 I hope I can type code better than English 30 22:20 reload the HTML to get better html for step 3 davel, yes, and shout when you're hitting a problem 30 22:21 ok 30 22:21 ok 30 22:22 aleksi: I can use CTrack right away and dump that "select implementation" thing, right? it's because CTrack and Track's interfaces are slightly different w.r.t. the starting point for example 30 22:23 batsman, there's implementation.rb it should be made to work it's an easy to way to choose whether to go ruby or c way 30 22:24 but why use Track if CTrack does the same faster? 30 22:24 it doesn't work right now, the Constant renaming doesn't work 30 22:24 same with CSimulator 30 22:24 batsman, we should use CTrack if possible, but Track should be fallback if needed 30 22:25 but why wouldn't it be possible??? ok, I'm trying to make it work with both things 30 22:25 if you make implementation.rb work, first thing is probably done with it 30 22:25 I might modify CTrack a little bit in the process 30 22:25 all: when using CTrack, watch out -- don't pass Floats or Bignums as x, y params 30 22:25 yes, only Fixnums I'll correct that right now 30 22:26 find_path_location(x, y) -> which point is x,y ? 30 22:26 car location ie, find path location when car is at x,y 30 22:27 using the a line perpendicular to AB ? 30 22:27 yep 30 22:30 batsman, did you understand what I meant with implementation.rb? 30 22:30 yes, select the classes to use no? 30 22:30 great I just wasn't sure 30 22:31 I just don't see why we would prefer to use Simulator instead of CSimulator, as the latter is faster and as correct as the first, but I'm doing it the way you want 30 22:35 we will use CSimulator, Simulator is there "just in case" 30 22:35 ok 30 22:40 do we have atan for the FPN class? 30 22:40 perhaps tobias added it I see one atan there and atan2 too 30 22:41 which fpn class will I be using? whats the diff between atan and atan2 ? 30 22:42 atan2 seems smarter the code is bigger :) 30 22:42 ok 30 22:42 cannot tell much more 30 22:42 yeah man atan2 I guess its what I want 30 22:44 yes atan2 == much better 30 22:48 you can do atan2 in floats if needed staying in fixed points isn't necessary, actually the opposite 30 22:49 wont the positions I am given be FPN? 30 22:49 use fixed points only if floats are too slow, the conversions too painful or calculations relate to simulation where conformance is important 30 22:49 shit, CCar and Car are not compatible 30 22:50 they don't necessarily have to be 30 22:50 Car#x returns FPN, which has method #to_i to give normal value ie >> 16 CCar#x returns Fixnum which is real thing << 16 30 22:50 make things work with CCar and change afterwards CCar to work just like Car 30 22:50 I have to copy with that in the code for instance CTrack will fail if passed big numbers arrggghh have to change some things the workaround is using #state_f[0] and #state_f[1] 30 22:52 ok davel, there's need for one more routine 30 22:52 ok I hate to admit it, but I am going slow! 30 22:53 I can't say that, since I'm not competing with you 30 22:53 ? you can't say what? 30 22:55 I can't say if you're going slow. If you feel so it might be true. Or the feeling might be deceiving if you're tired. 30 22:55 oh, I see what you're say saying 30 22:55 I often become more focused it I'm a bit tired. Kind of, can't think anything else besides the immediate job at hand. 30 22:55 well, I am comparing myself against the time that is left which is now 1h 30 22:56 normally my thoughts are just bouncing everywhere 30 22:56 I am the same, I am more focues when I am tired, and when I am awake and active my mind wanders, but when I am tired, my mind doesn't work too well 30 22:57 I'll probably complete implementation of this idea no matter if we didn't beat the deadline. I might even implement the same thing in another language, just to compare the implementation and development time. But not probably in LISP or Occaml before autumn. 30 22:59 yeah at this point, thats what I am thinking, contest is not happening, but I would like to solve the problem 30 22:59 aleksi: can you make an image from 'http://www.urusai.org/cgi-bin/cvs/icfp/attach_get?id=3,Een.trc' 30 22:59 I'll probably reject the possibility of being able to submit something only 15 minutes to the deadline, but yes, my idea is same, I'll solve the problem for fun yep 30 23:00 fyi, that trace took about 2 minutes to generate ;) or less using none of the C code just Ruby 30 23:01 from what? 30 23:01