2012-09-07T01:03:12 *** Areks has joined #aichallenge 2012-09-07T01:06:34 *** replore has quit IRC (Remote host closed the connection) 2012-09-07T01:26:54 *** mceier has quit IRC (Quit: leaving) 2012-09-07T01:34:49 *** rofer has quit IRC (Ping timeout: 246 seconds) 2012-09-07T01:50:25 yeah, i've been considering that 2012-09-07T02:03:18 *** replore has joined #aichallenge 2012-09-07T02:24:14 *** mceier has joined #aichallenge 2012-09-07T02:28:43 *** replore has quit IRC (Remote host closed the connection) 2012-09-07T02:53:07 *** kilae has joined #aichallenge 2012-09-07T02:55:21 *** epicmonkey_ has joined #aichallenge 2012-09-07T03:07:27 *** epicmonkey_ has quit IRC (Ping timeout: 264 seconds) 2012-09-07T03:12:50 *** Samvara has quit IRC (Ping timeout: 260 seconds) 2012-09-07T03:20:26 *** antimatroidl has joined #aichallenge 2012-09-07T03:31:46 *** rofer has joined #aichallenge 2012-09-07T03:33:07 *** antimatroidl has quit IRC (Quit: Leaving.) 2012-09-07T03:33:49 *** antimatroidl has joined #aichallenge 2012-09-07T03:34:19 *** antimatroidl has quit IRC (Client Quit) 2012-09-07T03:59:27 *** mcstar has joined #aichallenge 2012-09-07T04:09:15 *** kilae_ has joined #aichallenge 2012-09-07T04:11:38 *** kilae has quit IRC (Ping timeout: 246 seconds) 2012-09-07T04:19:41 *** epicmonkey_ has joined #aichallenge 2012-09-07T04:30:57 *** kilae has joined #aichallenge 2012-09-07T04:31:07 *** antimatroidl has joined #aichallenge 2012-09-07T04:33:58 *** kilae_ has quit IRC (Ping timeout: 255 seconds) 2012-09-07T04:42:12 *** antimatroidl1 has joined #aichallenge 2012-09-07T04:42:12 *** antimatroidl has quit IRC (Read error: Connection reset by peer) 2012-09-07T05:25:20 mcstar: you there? 2012-09-07T05:25:44 yes 2012-09-07T05:25:54 still no wifi? 2012-09-07T05:26:10 haven't tried again, friend and i have made heaps of progress with diagram stuff 2012-09-07T05:26:15 i will at some point 2012-09-07T05:26:38 so i implemented multiplication of diagrams by edges and i'm curious about that problem for repeatedly taking the union of non pairwise disjoint sets 2012-09-07T05:26:44 do you know what that probem is called? 2012-09-07T05:26:51 it's too obvious not to be well known 2012-09-07T05:27:15 ill have to think 2012-09-07T05:27:40 pairwise non-disjoint? 2012-09-07T05:27:55 or non-pairwise disjoint? 2012-09-07T05:27:59 consider {1,2}, {2,3}. {3,4} 2012-09-07T05:28:09 the intersection of all 3 sets is empty 2012-09-07T05:28:15 but the intersection of pars is not 2012-09-07T05:28:20 yes 2012-09-07T05:28:29 to be unambiguous i say pairwise disjoint rather than disjoint 2012-09-07T05:28:34 antimatroidl1: http://boingboing.net/2012/08/07/what-do-christian-fundamentali.html you'll find this funny 2012-09-07T05:29:34 antimatroidl1: you're doing the devil's work. 2012-09-07T05:29:45 antimatroidl1: i dont think theres a special name for that kind of union, it is basically just a simple union, the order you union sets together doesnt matter 2012-09-07T05:30:11 you just specify the constraints, the sets must follow, and just take the union of them 2012-09-07T05:31:05 mcstar: exactly, the end result is independent of the way you do it (if done properly) 2012-09-07T05:31:05 in this case, as i can see, theres not much constraint either 2012-09-07T05:31:14 so my quesiton is waht's the most efficient way to do it? 2012-09-07T05:31:23 algorithmically? 2012-09-07T05:31:26 in C++? 2012-09-07T05:31:26 and surely that's a problem people have looked at and has a name 2012-09-07T05:31:27 yes 2012-09-07T05:31:35 my friend and i are making a library 2012-09-07T05:31:38 std::set is a tree so stuff like intersections is super fast 2012-09-07T05:31:41 you use the ordering of the elements 2012-09-07T05:31:42 as long as it's an ordered set 2012-09-07T05:32:00 antimatroidl1: you traverse all the sets in ascending order 2012-09-07T05:32:07 i parallel 2012-09-07T05:32:10 unordered_set... would be terrible for actual set operations afaict 2012-09-07T05:32:10 basically, thats it 2012-09-07T05:32:21 thestinger: they're ordered :) 2012-09-07T05:32:23 *** pairofdice has joined #aichallenge 2012-09-07T05:32:49 would be nice if C++ had the same operator overloads python does for sets 2012-09-07T05:33:06 why? 2012-09-07T05:33:15 because they're intuitive 2012-09-07T05:33:15 an operator is just an ifix function 2012-09-07T05:33:20 infix* 2012-09-07T05:33:25 in haskell 2012-09-07T05:33:28 not so much in C++ :P 2012-09-07T05:33:29 :) 2012-09-07T05:33:43 you can overload the comma operator in C++... 2012-09-07T05:33:47 thestinger: the idea is as follows, you have a set of sets, not all pairwise disjoint, you want to repeatedly take unions of non-pairwise disjoint sets until you have a set of pairwise disjoint sets 2012-09-07T05:34:43 antimatroidl1: so, thats basically, what i wrote in haskell? 2012-09-07T05:34:44 antimatroidl1: well doing unions is fast as hell :P 2012-09-07T05:35:02 and there are really efficient algorithms in the std lib already 2012-09-07T05:35:04 https://gist.github.com/3664627 2012-09-07T05:35:07 http://en.cppreference.com/w/cpp/algorithm/set_union 2012-09-07T05:36:28 this is a kind of clustering problem 2012-09-07T05:36:58 antimatroidl1: how often do you actually make the original sets? 2012-09-07T05:37:00 antimatroidl1: do you actually know, that recursive algorithm i wrote is slow? 2012-09-07T05:37:28 antimatroidl1: using sorted vectors will be faster if you make all the original sets in advance 2012-09-07T05:37:29 i think he wants to enumerate a lot of them 2012-09-07T05:37:58 std::set is only better than a sorted vector if you add elements in between searches/deletes 2012-09-07T05:39:08 and std::set_union will work with (sorted) vectors 2012-09-07T05:39:31 i think what i wrote before, the ascending parallel traversal of the sets will be the best 2012-09-07T05:39:42 it can be tricky to actually write it in c++ 2012-09-07T05:40:00 mcstar: of more than 2 sets? 2012-09-07T05:40:06 many more 2012-09-07T05:40:09 all of them at once 2012-09-07T05:40:53 so something like zipWith? 2012-09-07T05:40:58 i just wouldnt want to write it, until im sure, the algorithm i have now is actually slow 2012-09-07T05:41:03 thestinger: no 2012-09-07T05:41:10 that enumerates element by element 2012-09-07T05:41:28 i want to enumerate according to 'value' 2012-09-07T05:41:44 i have trouble explaining myself 2012-09-07T05:42:13 if there are 2 sets, for example, you dont enumerate them 1 by 1 in parallel 2012-09-07T05:42:24 *** Devnix has joined #aichallenge 2012-09-07T05:42:26 Hi ! 2012-09-07T05:42:35 but you do it, until the lowest element of one will be higher than the other's lowest 2012-09-07T05:42:37 and then change 2012-09-07T05:42:40 and then change 2012-09-07T05:42:50 Does someone know when will the next contest will be ? (and what will it be about ? :) 2012-09-07T05:42:55 so you are always at the lowest elements of all the sets at a given time 2012-09-07T05:43:09 because it will make union and chekcing of intersection easy 2012-09-07T05:43:17 well is the # of sets determined at runtime? 2012-09-07T05:43:22 gah, sorry, brother arrived 2012-09-07T05:43:27 he's gone now 2012-09-07T05:43:28 thestinger: yes, at runtime 2012-09-07T05:43:34 ah, then it's annoying 2012-09-07T05:43:35 when else? 2012-09-07T05:43:58 Devnix: no, sorry, undecided 2012-09-07T05:44:22 thestinger: i don't care that much about speed, but i am interested in the algorithm to do it 2012-09-07T05:44:31 it's already fast enough 2012-09-07T05:44:38 antimatroidl1: well if you need to take the union of 214 sets, you want to do what mcstar said 2012-09-07T05:44:53 iterate over 214 sorted sequences at the same time 2012-09-07T05:45:28 and just write out the results to a single vector 2012-09-07T05:45:35 wait, you're discussing how to take the union of two sets right? 2012-09-07T05:45:40 that's not what i'm interested in atm 2012-09-07T05:45:50 thestinger: it is more complicated than that, since you dont want to take the union if the sets dont have any intersection 2012-09-07T05:45:57 antimatroidl1: no 2012-09-07T05:46:18 mcstar: ah 2012-09-07T05:46:22 antimatroidl1: you are interested in the same algorithm that i showed you in haskell 2012-09-07T05:46:31 i didn't understand your code 2012-09-07T05:46:36 yeah... 2012-09-07T05:46:37 :) 2012-09-07T05:46:38 but i'm pretty sure i'm doing the equivalent thing 2012-09-07T05:47:51 antimatroidl1: have you changed the representation of your diagrams? 2012-09-07T05:48:00 you had a set per node, right? 2012-09-07T05:48:13 but i guess, you did 2012-09-07T05:48:14 yeah 2012-09-07T05:48:16 i changed it to edges 2012-09-07T05:48:47 *** Devnix has quit IRC (Quit: Page closed) 2012-09-07T05:50:12 i'm still running on ancient gcc, hence the lack of auto 2012-09-07T05:50:21 use clang. 2012-09-07T05:50:25 silly antimatroidl 2012-09-07T05:50:38 nah, once i fix my wireless the laptop will go back in its case 2012-09-07T05:50:46 well, he is on slow internet 2012-09-07T05:51:03 and tight 2012-09-07T05:51:10 antimatroidl1: don't you already have clang? :P 2012-09-07T05:51:29 not sure haa 2012-09-07T05:51:35 antimatroidl1: theres not much wrong with osx, as i said, you could just install gcc from macports 2012-09-07T05:51:39 i'm not good with computor 2012-09-07T05:51:40 it is almost trivial 2012-09-07T05:51:48 antimatroidl1: just try clang instead of gcc 2012-09-07T05:51:52 same command syntax 2012-09-07T05:51:58 i use code::blocks to compile 2012-09-07T05:52:26 thestinger: he would still need to build clang on osx 2012-09-07T05:52:39 mcstar: clang is essentially an apple project 2012-09-07T05:52:43 so? 2012-09-07T05:52:44 he can get a build 2012-09-07T05:52:48 it not like you have the latest 2012-09-07T05:52:50 it comes with their free tools 2012-09-07T05:52:56 if i was going to spent time doing something, it'd be on fixing my wireless 2012-09-07T05:53:04 thats still possibly a big download 2012-09-07T05:53:36 which i will probably do later tonight 2012-09-07T05:53:40 hopefully aha 2012-09-07T05:53:43 http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 :P 2012-09-07T05:53:48 Size: 1.46 GB 2012-09-07T05:53:57 start with properly blacklisting b43 :) 2012-09-07T05:53:57 i have 20gb/m 2012-09-07T05:53:59 no thanks 2012-09-07T05:54:02 I think they offer one without xcode 2012-09-07T05:54:29 antimatroidl1: whats the version of python you have instlaled? 2012-09-07T05:54:45 2.6.1 2012-09-07T05:55:04 not too terrible 2012-09-07T05:55:08 pretty terrible. 2012-09-07T05:55:11 should be 2.7.3 2012-09-07T05:55:18 its osx... 2012-09-07T05:55:22 still. 2012-09-07T05:55:27 thestinger: he has gcc 4.2 2012-09-07T05:55:33 that actually has a reason behind it 2012-09-07T05:55:41 they don't want any GPLv3 software shipped with it 2012-09-07T05:55:51 it is from xcode 2012-09-07T05:56:06 osx doesnt ship with gcc afaik 2012-09-07T05:56:19 mcstar: well if he has xcode he has clang 2012-09-07T05:56:31 xcode uses clang for completion, etc. 2012-09-07T05:56:34 but clang lagged behind gcc in c++11 support 2012-09-07T05:56:39 it's ahead now 2012-09-07T05:56:48 and it's more than gcc 4.2... 2012-09-07T05:56:49 so??? 2012-09-07T05:56:52 what he has is not new 2012-09-07T05:57:00 quite old in fact 2012-09-07T05:57:02 newer than gcc from last decade :P 2012-09-07T05:57:22 xcode no longer comes with gcc apparently 2012-09-07T05:57:40 thestinger: anyway i recommended using python, but i was faced with strong opposition 2012-09-07T05:57:43 XD 2012-09-07T05:58:42 iirc he wrote map generators in python for ants 2012-09-07T06:01:13 mcstar: only cause i had to for planet wars 2012-09-07T06:01:23 the only programming i've done in python is map generators 2012-09-07T06:01:35 antimatroidl1: so, you didnt like it? 2012-09-07T06:01:37 i understand c++, it works well for me :P 2012-09-07T06:01:40 nope 2012-09-07T06:01:42 you understand C++? 2012-09-07T06:01:51 i understand it well enough to do what i need to do 2012-09-07T06:01:56 i don't understand c++ 2012-09-07T06:02:03 antimatroidl1: did you fell good about, that you didnt need to compile your code to test? 2012-09-07T06:02:06 feel* 2012-09-07T06:02:17 compiling is easy 2012-09-07T06:02:29 i just hit a button in code::blocks and it compiles and runs 2012-09-07T06:02:37 maybe because im on a slow machine, i hate compilation 2012-09-07T06:03:03 ocaml is super fast to compile <3 2012-09-07T06:03:10 less than ass 2012-09-07T06:03:24 I really wish C and C++ didn't lack modules 2012-09-07T06:03:28 even clang compile time is awful 2012-09-07T06:07:22 *** antimatroidl1 has quit IRC (Ping timeout: 276 seconds) 2012-09-07T06:08:00 *** antimatroidl has joined #aichallenge 2012-09-07T06:08:21 thestinger: i dont remember, did i tell you about a 'programmer benchmark' that i read a long time ago? i remember telling it here, but possibly you werent around 2012-09-07T06:08:28 even norving did the test 2012-09-07T06:08:35 don't remember 2012-09-07T06:08:45 let me find it, you will like it 2012-09-07T06:09:24 sudoku solver? 2012-09-07T06:09:33 no 2012-09-07T06:09:37 thestinger: http://norvig.com/java-lisp.html 2012-09-07T06:09:44 dont read the code in black 2012-09-07T06:10:08 there are links to the original announcement 2012-09-07T06:10:23 they were trying to compare languages, like c++, java 2012-09-07T06:10:28 it's really fucking hard to write good C++ 2012-09-07T06:10:55 I mean, I bet most C++ programmers can't write an equivalent to std::vector with exception-safe copy constructor, assignment and move constructor 2012-09-07T06:11:11 you dont have to 2012-09-07T06:11:17 thats what the experts are for 2012-09-07T06:11:20 you sometimes do need to write classes 2012-09-07T06:11:21 :) 2012-09-07T06:11:28 that manage resources 2012-09-07T06:11:54 for example, what if you need a (fast) ring buffer but don't want to use boost? 2012-09-07T06:12:04 you can't build it on std::vector 2012-09-07T06:12:11 you have to use a raw chunk of memory and placement new 2012-09-07T06:12:36 aerique: i think i told you about this ^^ didnt i? 2012-09-07T06:12:42 anyway fuck C++ 2012-09-07T06:12:45 or maybe, it was on #lisp 2012-09-07T06:13:25 * thestinger anxiously awaits rust 0.4 2012-09-07T06:14:52 thestinger: http://www.flownet.com/ron/papers/lisp-java/ this is the problem description 2012-09-07T06:15:12 i did write the program in question 2012-09-07T06:15:16 though, i was pretty slow 2012-09-07T06:15:51 in which language? 2012-09-07T06:15:56 cl 2012-09-07T06:16:09 mcstar: i've definitely seen those links before :) 2012-09-07T06:16:38 mcstar: by "slow" I interpret it as meaning you thought it through well and made something beautiful :P 2012-09-07T06:16:57 thestinger: no, it was harder than i expected 2012-09-07T06:17:06 i spent i think 7-8 hours on it 2012-09-07T06:17:11 it was more than a year ago 2012-09-07T06:17:18 when i was 'learning' lisp 2012-09-07T06:17:43 (quoatation marks is because, i obviously still dont know it) 2012-09-07T06:18:07 common lisp is pretty huge though, isn't it? 2012-09-07T06:18:16 well, yeah 2012-09-07T06:18:20 I should go through that remastered SICP 2012-09-07T06:18:23 but not that huge 2012-09-07T06:18:32 i mean there are parts that arent standardized but should have been 2012-09-07T06:18:58 and i think the process happened around 1984 2012-09-07T06:19:05 the language is basically the same since 2012-09-07T06:19:11 1984 to 1994 or so 2012-09-07T06:19:31 but cltl 2 is not implemented right? 2012-09-07T06:19:41 only parts of it 2012-09-07T06:20:42 don't know, I don't think it is really relevant anymore. With quicklisp and the abundance of libraries. 2012-09-07T06:23:18 aerique: well, it makes the task of library writer harder, to adapt to all major implementations 2012-09-07T06:23:42 if they have to do more work than they would have had to, then you see less libraries i think 2012-09-07T06:25:56 mcstar: perhaps, but it seems easy enough to write libraries for CL currently and a lot of cross-implementation issues are caught by the trivial-* libraries 2012-09-07T06:27:06 *** kilae_ has joined #aichallenge 2012-09-07T06:27:06 thestinger: http://www.lispworks.com/documentation/HyperSpec/Body/m_defset.htm 2012-09-07T06:27:10 mcstar: perhaps SBCL will become a leading implementation that will innovate at some point and that others will have to follow 2012-09-07T06:27:14 this is clhs, the documentation 2012-09-07T06:27:27 quite thorough, and has a vocubulary of its own 2012-09-07T06:27:48 aerique: :) maybe 2012-09-07T06:27:51 *** replore has joined #aichallenge 2012-09-07T06:28:03 it is certainly cheap 2012-09-07T06:30:07 *** kilae has quit IRC (Ping timeout: 256 seconds) 2012-09-07T06:30:45 *** Scooper has joined #aichallenge 2012-09-07T06:31:34 yay, i found mine 2012-09-07T06:33:13 third of norvig's solution are comments 2012-09-07T06:33:35 thestinger: will you accept the challenge/ 2012-09-07T06:33:36 ? 2012-09-07T06:33:42 too lazy 2012-09-07T06:33:46 haha 2012-09-07T06:33:47 maybe another day 2012-09-07T06:33:50 you could use python 2012-09-07T06:33:55 it's 6:30am 2012-09-07T06:33:57 i didn't sleep :P 2012-09-07T06:34:00 it's a bad day to do it 2012-09-07T06:34:03 oh 2012-09-07T06:34:07 whats wrong with you? 2012-09-07T06:34:10 I have to drive to my dentist's office at 9am 2012-09-07T06:34:24 wo any sleep? 2012-09-07T06:34:36 yep 2012-09-07T06:34:46 don't worry I'll try not to kill too many people 2012-09-07T06:34:53 or yourself 2012-09-07T06:35:47 at least I'd get some sleep 2012-09-07T06:35:59 a long one 2012-09-07T06:36:11 inevitable anyway 2012-09-07T06:36:11 i have to go water the garden 2012-09-07T06:36:20 mcstar: you have a garden? :0 2012-09-07T06:36:25 are there tomatoes? 2012-09-07T06:36:42 yes 2012-09-07T06:36:50 and a lot of other vegetables 2012-09-07T06:36:59 though, its the end of the season 2012-09-07T06:37:16 nom nom cherry tomatoes 2012-09-07T06:37:33 *** antimatroidl has quit IRC (Ping timeout: 268 seconds) 2012-09-07T06:37:36 :) 2012-09-07T06:37:50 *** antimatroidl has joined #aichallenge 2012-09-07T06:44:52 *** antimatroidl has quit IRC (Read error: Connection reset by peer) 2012-09-07T06:45:05 *** antimatroidl has joined #aichallenge 2012-09-07T07:02:09 *** replore has quit IRC (Remote host closed the connection) 2012-09-07T07:10:19 *** thestinger has quit IRC (Quit: nap) 2012-09-07T07:25:56 *** Scooper has quit IRC (Remote host closed the connection) 2012-09-07T07:26:36 *** Scooper has joined #aichallenge 2012-09-07T07:34:58 *** sigh has joined #aichallenge 2012-09-07T07:35:53 *** antimatroidl has quit IRC (Ping timeout: 252 seconds) 2012-09-07T07:43:42 *** antimatroidl has joined #aichallenge 2012-09-07T07:46:02 *** Garf has quit IRC (Quit: Make a new plan, Stan!) 2012-09-07T07:46:13 *** Icebone1000 has joined #aichallenge 2012-09-07T07:46:36 anyone can give me a tip? 2012-09-07T07:47:36 how do you keep track of your ants? lets say I computed a path with a*, how do I know whats the ant from previous turn that I need to keep in that path? 2012-09-07T07:48:29 Icebone1000: i recalculated everything each turn 2012-09-07T07:48:39 too much can change in one turn for me to want to retain information 2012-09-07T07:49:12 wow, I was afraid that was the answer...but an a* per turn per ant, doesnt that is dangerous (theres a time limit) 2012-09-07T07:50:31 i don't think i ended up using a* 2012-09-07T07:50:40 i would often just bfs from targets to ants 2012-09-07T07:50:57 i was thinking in calculating a path with a*, only for the ants that stayed in the same pos for 2 turns ( means it is stuck against a wall).. 2012-09-07T07:51:03 you can do a* with multiple targets and multiple sources 2012-09-07T07:51:08 but it's not very nice or efficient 2012-09-07T07:51:24 isnt a* cheaper? 2012-09-07T07:51:38 i can't remember the specifics 2012-09-07T07:51:43 but most people found it wasn't worth it 2012-09-07T07:51:50 a bfs is pretty fast 2012-09-07T07:52:03 it gets more difficult when the dimensions get closer to 200x200 2012-09-07T07:52:05 bfs will look everything, a* use a heuristic to go more straight in the right path' 2012-09-07T07:52:08 i tested my bot on maps up to that 2012-09-07T07:52:28 yes, but there's overhead to using a* and it's difficult to assign targets 2012-09-07T07:52:53 why you do it from target, and not from ants? 2012-09-07T07:53:55 you then know which direction to move the ant when you find it, rather than having to store that information 2012-09-07T07:54:12 and the number of ants vs the number of targets can be quite different 2012-09-07T07:54:24 i would bfs from multiple sources and move a target as i find it 2012-09-07T07:54:41 then bfs again from the remaining targets (you have to start the search over) 2012-09-07T07:54:58 i'm not positive everything i'm saying is correct, i haven't played with this stuff in a while 2012-09-07T07:56:25 "you then know which direction to move the ant when you find it, rather than having to store that information"-> would you explain more? I dont have vision enough to understand why that 2012-09-07T07:57:06 say you search target to ant, when you find an ant, just move it into the square you just found it from 2012-09-07T07:57:23 if you search ant to target, then when you find a target you have to remember which direction you moved to find it 2012-09-07T07:59:48 why the same dont apply to the ant to target? is it a bfs feature Im not aware? 2012-09-07T08:04:51 the position of food items dont change, but the position of the ants change every turn, if you search from food to ants, you can use the same distance map from the previous turn 2012-09-07T08:05:27 mcstar: shit 2012-09-07T08:05:35 i could have used that, you can just update from new food too 2012-09-07T08:05:42 :) 2012-09-07T08:05:50 although removing old info from removed food might be a little tricky 2012-09-07T08:06:12 yeah, path finding wasnt a big part of Ants 2012-09-07T08:06:17 you just had to get it right 2012-09-07T08:06:33 in compiled languages speed wasnt an issua 2012-09-07T08:06:36 e* 2012-09-07T08:06:43 not like with the tree search... 2012-09-07T08:07:00 trees are insane 2012-09-07T08:08:02 Now I want to go back to ants :| 2012-09-07T08:08:26 And fix my stupid stupid code 2012-09-07T08:09:09 I got the c# starter, and now closer ants to food tiles go straight to it, ants that are not asigned food task, move in the first free direction(like in the starter), now cames the pathfinding.., 2012-09-07T08:11:44 ah, i remember now what i wanted to say 2012-09-07T08:11:59 theres a good reason for using bfs instead of a* 2012-09-07T08:12:08 a* is for point-to-point search 2012-09-07T08:12:19 bfs you can use the one search for all ants 2012-09-07T08:12:22 but thats not too good for searching for multiple targets 2012-09-07T08:12:23 Not so for a* 2012-09-07T08:12:26 of a criterion 2012-09-07T08:12:46 but with bfs, you can stop the search once you found something interesting 2012-09-07T08:13:02 of->or 2012-09-07T08:13:49 pairofdice: you could just make a shortest-distance cell-map of food items, but that doesnt give you optimality 2012-09-07T08:13:50 lots of good info 2012-09-07T08:13:51 Oh, when a food item finds an ant, stop the bfs from that food but continue from others 2012-09-07T08:14:51 distributing the ants for targets, when you actually know the path-length of stuff is the problem 2012-09-07T08:14:51 you mean bfs with multiple start points? 2012-09-07T08:15:03 this can be solved with the hungarian method 2012-09-07T08:15:05 which i used a lot 2012-09-07T08:15:16 Just add all the foods as the what was the word 2012-09-07T08:15:19 Icebone1000: yeah, thats trivial, but not optimal 2012-09-07T08:15:55 basically, at the end i moved all my ants with this optimization algorithm 2012-09-07T08:16:10 Yeah, my distribution sucked majorly 2012-09-07T08:16:22 I want to fix it 2012-09-07T08:16:32 my downfall was that at the very end i made my ants more agressive by replacing my tree search with a heuristic 2012-09-07T08:17:03 (making them agressive was a good thing, but the heuristic kept losing a lot of ants..) 2012-09-07T08:21:03 when doing bfs with multiple start points(food tiles), how do you know from witch food tile you sending the ant you found? I dont get how it would work, compared with separated bfs. You have 2 start points, are they tottaly independent or tottaly mixed together? 2012-09-07T08:21:51 imagine the food items on an empty map 2012-09-07T08:22:06 now imagine, that you write down a number on every tile 2012-09-07T08:22:18 this number is the steps from the closest food item to that particular tile 2012-09-07T08:22:43 if you do a bfs from all the food items at once, and you fill the map, what i said will be the result 2012-09-07T08:23:23 now i have to call me e-bank, cause i forgot my password again 2012-09-07T08:23:28 my* 2012-09-07T08:23:42 thanks for the help 2012-09-07T08:24:05 although I dont get the last part yet ¦D 2012-09-07T08:25:13 bfs enumerates the tiles from the targets in increasing order of length 2012-09-07T08:25:24 do you see this? 2012-09-07T08:25:39 if you have 2 start points, you will have 2 numbers on each tile @.@ 2012-09-07T08:26:07 yes 2012-09-07T08:26:08 no 2012-09-07T08:26:28 how can that be 2012-09-07T08:26:33 phone 2012-09-07T08:26:51 explains everything..lol 2012-09-07T08:31:10 * pairofdice looks into hungarian method 2012-09-07T08:31:50 Umm, not while cooking 2012-09-07T08:56:47 *** Icebone1000 has quit IRC (Ping timeout: 245 seconds) 2012-09-07T08:58:57 *** kilae has joined #aichallenge 2012-09-07T09:01:36 *** kilae_ has quit IRC (Ping timeout: 240 seconds) 2012-09-07T09:53:45 *** kilae_ has joined #aichallenge 2012-09-07T09:57:20 *** kilae has quit IRC (Ping timeout: 268 seconds) 2012-09-07T10:17:52 *** contestbot has joined #aichallenge 2012-09-07T10:17:52 *** ChanServ sets mode: +o contestbot 2012-09-07T10:28:47 *** mceier has quit IRC (Quit: leaving) 2012-09-07T10:34:26 *** Areks has quit IRC (Ping timeout: 272 seconds) 2012-09-07T11:07:54 *** monstaokki has joined #aichallenge 2012-09-07T11:35:46 *** mceier has joined #aichallenge 2012-09-07T11:56:52 *** Icebone1000 has joined #aichallenge 2012-09-07T11:57:11 yo 2012-09-07T12:01:41 *** monstaokki has left #aichallenge 2012-09-07T12:09:12 *** replore has joined #aichallenge 2012-09-07T12:13:14 waiting for something? 2012-09-07T12:16:02 *** epicmonkey_ has quit IRC (Ping timeout: 246 seconds) 2012-09-07T12:21:05 firefox crashed when i tried to change gmail's listing mode 2012-09-07T12:37:33 pairofdice: i have to admit, i never went as far as implementing it 2012-09-07T12:37:50 i think i should though, it is interesting 2012-09-07T12:46:23 *** sigh has quit IRC (Remote host closed the connection) 2012-09-07T12:46:29 *** kilae has joined #aichallenge 2012-09-07T12:48:59 *** kilae_ has quit IRC (Ping timeout: 240 seconds) 2012-09-07T13:04:17 *** Icebone1000 has quit IRC (Ping timeout: 245 seconds) 2012-09-07T13:25:32 *** mviel has quit IRC (Quit: Leaving) 2012-09-07T13:25:42 *** foRei has joined #aichallenge 2012-09-07T13:32:39 *** pairofdice has quit IRC (Quit: In girum imus nocte et consumimur igni.) 2012-09-07T13:36:21 *** kilae has quit IRC (Quit: ChatZilla 0.9.88.2 [Firefox 15.0/20120824154833]) 2012-09-07T14:01:38 *** SJRvanSchaik has quit IRC (Ping timeout: 246 seconds) 2012-09-07T14:02:29 *** CIA-54 has quit IRC (Ping timeout: 244 seconds) 2012-09-07T14:08:14 *** amstan has joined #aichallenge 2012-09-07T14:08:14 *** ChanServ sets mode: +o amstan 2012-09-07T14:09:19 *** amstan has quit IRC (Client Quit) 2012-09-07T14:22:54 *** CIA-54 has joined #aichallenge 2012-09-07T14:53:01 *** t has joined #aichallenge 2012-09-07T14:53:25 *** t is now known as Guest68617 2012-09-07T14:54:35 *** Guest68617 has quit IRC (Client Quit) 2012-09-07T14:59:53 antimatroidl: are you there?\ 2012-09-07T15:06:12 i am 2012-09-07T15:06:59 antimatroidl: i had an idea on your set merge 2012-09-07T15:07:17 .. 2012-09-07T15:07:30 i just gave it a bit of thought before i implement my matching stuff 2012-09-07T15:07:36 and i think it is efficent 2012-09-07T15:07:40 efficient 2012-09-07T15:07:51 anyway, ill do it in some language 2012-09-07T15:08:06 after i have it, ill tell you the algorithm, ok? 2012-09-07T15:08:21 antimatroidl: is python ok? 2012-09-07T15:08:28 i mean, can you read it? 2012-09-07T15:08:54 i dont want to use c++, and you dont want to read haskell, so, i thought maybe python 2012-09-07T15:13:10 antimatroidl: ill have to use c++, i want doubly linked lists 2012-09-07T15:13:17 stl has them, right? 2012-09-07T15:13:59 bah sorry 2012-09-07T15:14:01 reading 2012-09-07T15:14:29 mcstar: i rekon they would 2012-09-07T15:14:35 ok 2012-09-07T15:21:57 *** replore has quit IRC (Remote host closed the connection) 2012-09-07T15:27:39 *** age has joined #aichallenge 2012-09-07T15:27:47 hi there 2012-09-07T15:28:02 *** age is now known as Guest19315 2012-09-07T15:28:29 any news on the next contest? <3 2012-09-07T15:33:35 *** thestinger has joined #aichallenge 2012-09-07T15:33:36 unfortunately no 2012-09-07T15:34:12 okay, thank you :) 2012-09-07T15:36:01 i am totally looking forward to the next one. 2012-09-07T15:36:20 yeah, a lot of ppl are 2012-09-07T15:59:49 *** epicmonkey_ has joined #aichallenge 2012-09-07T16:00:43 *** Accoun has quit IRC () 2012-09-07T16:12:43 *** Accoun has joined #aichallenge 2012-09-07T16:32:31 *** replore has joined #aichallenge 2012-09-07T16:36:56 *** replore has quit IRC (Ping timeout: 240 seconds) 2012-09-07T16:47:20 how much i hate c++ 2012-09-07T16:48:21 *** epicmonkey_ has quit IRC (Ping timeout: 246 seconds) 2012-09-07T16:49:36 omg 2012-09-07T16:49:52 i had several pages of error because of a wrong variable name 2012-09-07T16:53:54 :) 2012-09-07T16:55:42 mcstar: try using expression templates 2012-09-07T16:55:48 watch the error size reach 600KiB 2012-09-07T16:55:59 no thanks 2012-09-07T16:56:34 mcstar: http://www.boost.org/doc/libs/1_51_0/libs/phoenix/doc/html/phoenix/modules/statement.html this crap was all done before C++11 added lambdas 2012-09-07T16:56:45 and the sad part is, it's still better in many ways (because they are polymorphic) 2012-09-07T16:56:59 they just have their own statements, etc. 2012-09-07T16:57:03 that are really template hackery 2012-09-07T16:57:06 *** Guest19315 has quit IRC (Quit: Page closed) 2012-09-07T16:57:19 if_(condition) [ ] 2012-09-07T16:57:46 for(a, b, c) [], takes an enormous amount of hacks 2012-09-07T16:57:51 overloaded comma operator 2012-09-07T16:57:58 i dont understand 2012-09-07T16:58:05 is that a macro system? 2012-09-07T16:58:09 mcstar: no, templates 2012-09-07T16:58:18 mcstar: they use functions, operator overloads, etc. 2012-09-07T16:58:25 it's called expression templates 2012-09-07T16:58:35 so, if_ is some class with [] overloaded? 2012-09-07T16:58:48 well, a function I think 2012-09-07T16:58:54 anyway, back to what i was doing 2012-09-07T16:58:55 and it returns a class with [] overloaded 2012-09-07T16:59:01 this is horrible enough, really 2012-09-07T16:59:09 so if the condition is false, it doesn't run the stuff in [] 2012-09-07T16:59:18 great 2012-09-07T16:59:21 im impressed 2012-09-07T16:59:25 (no, im not) 2012-09-07T16:59:52 but it let people use closures without nested class boilerplate before C++11 2012-09-07T16:59:52 thestinger: did the dentist pull your tooth? 2012-09-07T16:59:56 no :P 2012-09-07T17:00:09 I've never had a cavity 2012-09-07T17:00:16 i had never been to a dentist 2012-09-07T17:00:47 but i think i have at least 1 cavity 2012-09-07T17:10:17 antimatroidl: ok, i have it, but it isnt tested 2012-09-07T17:11:04 antimatroidl: should i add inline comments, or is it enough to just describe the alg? 2012-09-07T17:11:18 mcstar: why not go to a dentist? 2012-09-07T17:11:24 my uncle is a dentist, i've been all my life 2012-09-07T17:11:36 i havent had problems with my teeth 2012-09-07T17:11:47 check ups? 2012-09-07T17:11:50 no 2012-09-07T17:12:05 i know i have 1 cavity, but it doesnt bother me 2012-09-07T17:12:10 and doesnt seem to grow 2012-09-07T17:12:15 until you get a blood infection and die 2012-09-07T17:12:22 idk, ill go when i will have money 2012-09-07T17:12:32 currently, uni just took all my money 2012-09-07T17:12:35 it's not covered here under government health care 2012-09-07T17:12:40 im quite literally broke 2012-09-07T17:12:46 yeah fair enough 2012-09-07T17:13:20 "get a job" /trollface :) 2012-09-07T17:13:55 "be born wealthy" 2012-09-07T17:14:03 gina reinhart's advice 2012-09-07T17:14:03 ^ correct solution 2012-09-07T17:14:24 i think i can work again for that firm i did previously 2012-09-07T17:14:31 http://hpaste.org/74423 2012-09-07T17:15:14 i think ill just describe what it does, or supposed to 2012-09-07T17:15:35 i will use list even for vectors 2012-09-07T17:15:48 obviously, it has implications, but makes the description simpler 2012-09-07T17:16:05 so, you have a list of list of nodes 2012-09-07T17:16:34 now, lets suppose, that you already did the U -> M, L -> M conversions 2012-09-07T17:17:38 you traverse all the sets, and if a node is M, you make a mark in a vector for that particular index, that the node carries 2012-09-07T17:17:46 this is the lattice index of the node 2012-09-07T17:18:23 if the vector had 0 for that index, it means, you havent encountered a set before, that had that lattice idnex 2012-09-07T17:18:30 so you just set it 2012-09-07T17:19:14 if it is different from 0, you will use that set index, that you found for that lattice index, and will use that for all the nodes that remain in the set you were iterating over 2012-09-07T17:19:39 this way, you actually take the unions of sets that have any intersection 2012-09-07T17:20:03 hmmm okay 2012-09-07T17:20:09 no, not really 2012-09-07T17:20:09 i think i follow that 2012-09-07T17:20:13 i forgot something 2012-09-07T17:20:28 no 2012-09-07T17:20:30 no, its ok 2012-09-07T17:20:40 i remember now, that i covered an edge case 2012-09-07T17:20:58 first i thought, you have to reiterate over the elements of that set 2012-09-07T17:21:04 to correct the numbers 2012-09-07T17:21:08 but you dont have to 2012-09-07T17:21:10 thats the trick 2012-09-07T17:21:39 wait 2012-09-07T17:21:48 i havent thought this through completely 2012-09-07T17:22:27 yeah, ok, you have to correct for it 2012-09-07T17:22:58 all in all, i think this would be efficient, since you dont have to do too much extra work 2012-09-07T17:23:14 but it would look ugly 2012-09-07T17:24:06 anyway, in the end, you have this lattice index -> set index correspondence 2012-09-07T17:24:37 and the update will guarantee, that a lattice index will only belong to 1 set 2012-09-07T17:24:56 and all the sets, that had common elelments will have the same index 2012-09-07T17:25:46 so, you can recreate the unions, from this association vector or whatever 2012-09-07T17:26:04 actually, thats the part i wanted to use a doubly linked, as in the implementation 2012-09-07T17:26:44 so you can delete the elelemnts of a given index, when you build the unions, so you can traverse a shrinking list 2012-09-07T17:27:53 in the beginning, i add those sets to the output set, that had no M elements after the conversion 2012-09-07T17:28:10 because those wouldnt show up in the algorithm, and they would be lost 2012-09-07T17:32:22 it's 7:30am but i'll play around with that at some point 2012-09-07T17:32:48 antimatroidl: ill go to sleep very soon 2012-09-07T17:32:56 if you have a question ask now 2012-09-07T17:33:01 i think i see the algorithm now 2012-09-07T17:33:14 but i dont want to correctly do it in c++ :) 2012-09-07T17:33:22 i'd have to get my hands dirty to have question 2012-09-07T17:33:32 but thanks :) 2012-09-07T17:33:36 ok 2012-09-07T17:52:39 mcstar: do it in C :P 2012-09-07T17:52:48 implemented your own rbtree for starters 2012-09-07T17:53:22 C is for flipping bit in hardware 2012-09-07T17:53:25 btis* 2012-09-07T17:53:28 bits* 2012-09-07T17:54:04 thestinger: look at all the successfull operating system written in object oriented languages 2012-09-07T17:54:09 s 2012-09-07T17:54:25 mcstar: there's no reason you can't write an OS with C++ 2012-09-07T17:54:48 beos is full oo 2012-09-07T17:54:59 haiku! :P 2012-09-07T17:55:00 and c++ 2012-09-07T17:55:04 yeah 2012-09-07T17:55:20 the linux kernel uses tons of manual virtual functions 2012-09-07T17:55:33 it would be *faster* to use the C++ virtual functions because they are optimized better 2012-09-07T17:55:38 still, sir linus cant stand c++ 2012-09-07T17:56:00 I think linus just likes trolling people on mailing lists. 2012-09-07T17:56:24 actually, i think his 'only c' opinion is quite string 2012-09-07T17:56:26 strong* 2012-09-07T17:56:47 probably there are a lot of lousy programmers writing really bad c++ out there 2012-09-07T17:56:51 and he met them.. 2012-09-07T17:56:54 there are 2012-09-07T17:56:58 C++ is a huge, terrible language 2012-09-07T17:57:13 C is a terrible language too, but at least it's incredibly small by comparison 2012-09-07T17:57:26 but they recreate a ton of those C++ idioms *in C* anyway 2012-09-07T17:57:35 they even have hacks like their own static assert 2012-09-07T17:58:19 thestinger: do you know greenspun's tenth rule? 2012-09-07T17:58:39 oh right 2012-09-07T17:58:44 mcstar: yes, but not by name 2012-09-07T17:59:56 lol, im tempted to use a goto here.. 2012-09-07T18:02:47 goto is perfectly idiomatic in actual C :P 2012-09-07T18:02:59 you use it to implement the equivalent to raii 2012-09-07T18:03:26 call cleanup functions in reverse order (as popping off the stack) at the end, and use labels to jump to the right point instead of just return 2012-09-07T18:03:32 as if popping* 2012-09-07T18:03:45 using it for breaking out of nested loops is fine too 2012-09-07T18:04:00 just only go down, and don't jump pass variable initializations/declarations 2012-09-07T18:04:17 past 2012-09-07T18:18:42 *** coeus has joined #aichallenge 2012-09-07T18:38:33 antimatroidl: http://hpaste.org/74425 this is a better version, it loops for some reason, im too tired to figure it out, but conceptually it is better than the first 2012-09-07T18:38:38 gn 2012-09-07T18:38:40 *** mcstar has quit IRC (Quit: mcstar) 2012-09-07T19:09:20 *** Scooper has quit IRC (Quit: Leaving) 2012-09-07T19:11:33 *** foRei has quit IRC (Quit: Bye) 2012-09-07T19:18:47 *** amstan has joined #aichallenge 2012-09-07T19:18:47 *** ChanServ sets mode: +o amstan 2012-09-07T19:26:33 *** cyphase has quit IRC (Ping timeout: 268 seconds) 2012-09-07T19:37:03 *** sigh has joined #aichallenge 2012-09-07T19:37:17 *** cyphase has joined #aichallenge 2012-09-07T20:34:48 *** thestinger has quit IRC (Ping timeout: 246 seconds) 2012-09-07T20:35:29 *** thestinger has joined #aichallenge 2012-09-07T20:42:22 *** replore_ has joined #aichallenge 2012-09-07T21:03:59 *** replore_ has quit IRC (Remote host closed the connection) 2012-09-07T21:49:59 *** coeus has quit IRC (Ping timeout: 252 seconds) 2012-09-07T21:56:06 *** antimatroidl has quit IRC (Ping timeout: 252 seconds) 2012-09-07T22:02:24 *** thestinger has quit IRC (Quit: WeeChat 0.3.9-rc1) 2012-09-07T22:02:38 *** thestinger has joined #aichallenge 2012-09-07T22:42:32 *** replore has joined #aichallenge 2012-09-07T23:01:34 *** replore has quit IRC (Remote host closed the connection) 2012-09-07T23:07:58 *** replore has joined #aichallenge 2012-09-07T23:27:43 *** replore has quit IRC (Remote host closed the connection) 2012-09-07T23:36:02 *** antimatroidl has joined #aichallenge