2013-03-31T00:39:13 *** ermau has quit IRC (Remote host closed the connection) 2013-03-31T00:39:13 *** mattswe has quit IRC (Remote host closed the connection) 2013-03-31T03:11:14 *** amstan has quit IRC (Ping timeout: 272 seconds) 2013-03-31T03:18:17 *** thestinger has quit IRC (Quit: sleep) 2013-03-31T03:36:00 *** Uvs has joined #aichallenge 2013-03-31T04:03:45 *** sigh has quit IRC (Remote host closed the connection) 2013-03-31T04:05:06 *** sigh_ has joined #aichallenge 2013-03-31T04:05:43 *** sigh_ has joined #aichallenge 2013-03-31T04:10:05 *** sigh_ has quit IRC (Ping timeout: 246 seconds) 2013-03-31T04:37:58 *** kilae has joined #aichallenge 2013-03-31T04:50:42 *** thestinger has joined #aichallenge 2013-03-31T05:17:30 *** sigh has joined #aichallenge 2013-03-31T05:51:50 *** thestinger has quit IRC (Quit: WeeChat 0.4.0) 2013-03-31T06:06:29 *** ermau has joined #aichallenge 2013-03-31T06:19:20 *** mcstar has joined #aichallenge 2013-03-31T06:19:53 *** ermau has quit IRC (Remote host closed the connection) 2013-03-31T07:07:21 *** ermau has joined #aichallenge 2013-03-31T07:26:05 *** ermau has quit IRC (Remote host closed the connection) 2013-03-31T07:44:30 plan9's p is very primitive 2013-03-31T07:44:44 i think i will just write a pager in urwid 2013-03-31T07:48:51 easy as py 2013-03-31T07:49:09 i dont understand, why isnt this the motto of python 2013-03-31T07:57:14 *** ermau has joined #aichallenge 2013-03-31T07:58:21 isnt this cool http://i.imgur.com/poiYsyx.png 2013-03-31T07:58:58 it generates the fibonacci numbers as you page through them 2013-03-31T08:01:31 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T08:01:46 *** loglog has joined #aichallenge 2013-03-31T08:54:45 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T08:54:59 *** loglog has joined #aichallenge 2013-03-31T08:55:44 xterm is fast, but a real terminal is faster 2013-03-31T08:55:52 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T08:56:07 *** loglog has joined #aichallenge 2013-03-31T08:56:12 bhasker, fix youir loglog 2013-03-31T08:57:17 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T08:57:34 *** loglog has joined #aichallenge 2013-03-31T08:58:41 *** loglog has joined #aichallenge 2013-03-31T09:17:11 *** mattswe has joined #aichallenge 2013-03-31T09:38:12 *** coeus_ has quit IRC (Ping timeout: 258 seconds) 2013-03-31T09:46:31 mcstar: what do you mean by "a real terminal"? 2013-03-31T09:46:55 kernel framebuffer terminal 2013-03-31T09:47:11 the one without X 2013-03-31T09:47:11 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T09:47:28 *** loglog has joined #aichallenge 2013-03-31T09:47:29 maybe it is not a real real terminal 2013-03-31T09:47:31 framebuffers are typically quite slow relative to a decent terminal emulator in my experiences 2013-03-31T09:47:40 but more real than an X terminal emulator 2013-03-31T09:47:41 *X terminal emulator 2013-03-31T09:47:42 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T09:47:56 *** loglog has joined #aichallenge 2013-03-31T09:48:01 well, i was scrolling curses text, and it was pretty damn fast 2013-03-31T09:48:08 xterm was not bad either 2013-03-31T09:48:15 konsole was noticeably slower 2013-03-31T09:48:21 i've not found anything that scrolls faster than rxvt 2013-03-31T09:48:22 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T09:48:38 *** loglog has joined #aichallenge 2013-03-31T09:48:59 the main thing is to avoid xft 2013-03-31T09:49:22 i cant, for my main terminal 2013-03-31T09:49:32 i want smooth fonts on this fullhd monitor 2013-03-31T09:49:33 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T09:49:45 then that's going to be the main bottleneck 2013-03-31T09:49:48 *** loglog has joined #aichallenge 2013-03-31T09:49:49 previously, i used bitmap fonts, xft would not mattered there 2013-03-31T09:49:55 right 2013-03-31T09:49:59 jmcarthur: not like it is really slow...\ 2013-03-31T09:50:03 it is fast 2013-03-31T09:50:11 but some things are faster 2013-03-31T09:50:11 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T09:50:26 *** loglog has joined #aichallenge 2013-03-31T09:50:27 just noticed it, im not bothered by it 2013-03-31T09:50:43 the times are long gone, when i had to wait for text to scroll 2013-03-31T09:51:57 i never feel like i'm suffering from something being slow until i get used to it being fast 2013-03-31T09:53:37 and then you are forced to work on someone else's system 2013-03-31T09:53:50 and you go wtf? how can you live with that? 2013-03-31T09:54:06 jesus, are you really using the mouse for that? 2013-03-31T09:54:16 i could go on... 2013-03-31T09:54:16 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T09:54:30 *** loglog has joined #aichallenge 2013-03-31T09:54:44 jmcarthur: it is extremely easy to write a pager in urwid 2013-03-31T09:54:54 i just modified a sample program slightly.. 2013-03-31T09:54:55 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T09:55:09 *** loglog has joined #aichallenge 2013-03-31T09:55:09 its like 50 lines 2013-03-31T09:55:40 (urwid is an abstraction on top of curses in python) 2013-03-31T10:00:06 ugh, first thing i see when i look up the documentation... MainLoop 2013-03-31T10:00:25 i hate it when toolkits take a fill-in-the-blank approach 2013-03-31T10:00:42 what does that mean? 2013-03-31T10:00:42 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:00:55 *** loglog has joined #aichallenge 2013-03-31T10:00:56 oh, it's optional, that makes me happier at least 2013-03-31T10:01:06 it needs an eventloop 2013-03-31T10:01:06 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:01:20 *** loglog has joined #aichallenge 2013-03-31T10:01:21 i just mean i prefer to be in control of the context my code is running in. i prefer libraries to be just libraries, not "frameworks" 2013-03-31T10:01:56 well, it does have a model, sort of like a gui programming model, i dont think it is bad 2013-03-31T10:02:02 i know i could only do worse 2013-03-31T10:02:29 i know why people do this 2013-03-31T10:02:30 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:02:45 *** loglog has joined #aichallenge 2013-03-31T10:02:47 it's because they think the only alternative is synchronous IO 2013-03-31T10:02:47 if you want a plain library there curses for that, but this one is more high level, and imo great 2013-03-31T10:03:24 or an explicitly asynchrounous API 2013-03-31T10:03:48 jmcarthur: do you have a conceptual program with an eventloop? 2013-03-31T10:03:52 problem* 2013-03-31T10:03:53 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:04:08 *** loglog has joined #aichallenge 2013-03-31T10:04:13 i think ocaml standard lib implements one too 2013-03-31T10:05:14 i am not aware of one in the ocaml standard lib 2013-03-31T10:05:25 but i don't use the standard lib very often 2013-03-31T10:05:25 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:05:26 whats the name of the TK doc tool? 2013-03-31T10:05:38 * jmcarthur shrugs 2013-03-31T10:05:41 *** loglog has joined #aichallenge 2013-03-31T10:06:04 my problem with event loops is that you can only have one, so if you want to use more than on library that wants to runs your program for you, you're screwed 2013-03-31T10:06:13 that's my main problem, at least 2013-03-31T10:06:20 they are entirely uncomposable 2013-03-31T10:06:20 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:06:27 *more than one 2013-03-31T10:06:38 *** loglog has joined #aichallenge 2013-03-31T10:06:54 i think most of python eventloops have a common interface 2013-03-31T10:07:06 so you can plug the desired event loop in 2013-03-31T10:07:12 that doesn't mean you can use more than one at a time 2013-03-31T10:07:18 you dont need to 2013-03-31T10:07:19 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:07:32 oh so these are more like IO managers 2013-03-31T10:07:32 *** loglog has joined #aichallenge 2013-03-31T10:07:35 and you can start multiple ones on multiple processes 2013-03-31T10:07:38 generic ones 2013-03-31T10:08:00 there was a command `ocamlbrowse` that i cant find 2013-03-31T10:08:00 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:08:15 *** loglog has joined #aichallenge 2013-03-31T10:09:34 i meant this http://caml.inria.fr/pub/docs/manual-ocaml/libref/Event.html 2013-03-31T10:10:02 i guess this needs a scheduler 2013-03-31T10:10:11 yeah i've never used that 2013-03-31T10:10:11 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:10:16 it also doesn't look like an event loop 2013-03-31T10:10:28 *** loglog has joined #aichallenge 2013-03-31T10:10:45 http://caml.inria.fr/pub/docs/manual-ocaml/libref/Thread.html 2013-03-31T10:10:47 Event is an awful name for it 2013-03-31T10:10:55 with this and a couple of lines, i think thats an event loop :) 2013-03-31T10:10:56 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:11:08 no, it's a collection of synchronous threads and message passing 2013-03-31T10:11:14 a much saner model 2013-03-31T10:11:14 *** loglog has joined #aichallenge 2013-03-31T10:11:52 well, then we dont need Event, thats some kind of communication channel 2013-03-31T10:11:59 right 2013-03-31T10:12:05 the message passing part 2013-03-31T10:12:05 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:12:16 but we need some kind of tokens, to signal requests from the scheduler 2013-03-31T10:12:19 *** loglog has joined #aichallenge 2013-03-31T10:12:20 threads are kind of the antithesis of an event loop though 2013-03-31T10:12:55 well, a thread is an independent point of execution 2013-03-31T10:13:16 so, you can change between them with a scheduler, all runs in one process 2013-03-31T10:13:16 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:13:24 thats how i understand it 2013-03-31T10:13:31 yes 2013-03-31T10:13:31 *** loglog has joined #aichallenge 2013-03-31T10:13:39 at least, that is an implementation 2013-03-31T10:14:04 atm i use coroutines in python for this 2013-03-31T10:14:04 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:14:18 if a scheduler for threads is about continuations then an event loop is about callbacks 2013-03-31T10:14:19 *** loglog has joined #aichallenge 2013-03-31T10:14:41 well, i dont like callbacks if i can choose continuations 2013-03-31T10:15:12 right 2013-03-31T10:15:18 but i havent seen any UI library or framework that uses coroutines 2013-03-31T10:15:19 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:15:36 *** loglog has joined #aichallenge 2013-03-31T10:16:22 i'm curious what python coroutines are like 2013-03-31T10:16:25 jmcarthur: yesterday you asked something like: "should i be frightened by that python code?" i wonder, what did you mean? i really dont understand 2013-03-31T10:17:05 it was a rather ignorant statement on my part 2013-03-31T10:17:19 mostly just a reaction to a lot of stuff i didn't understand 2013-03-31T10:17:19 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:17:36 *** loglog has joined #aichallenge 2013-03-31T10:18:40 this is a comprehensive resource for this stuff in python 2013-03-31T10:18:40 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:18:42 http://dabeaz.com/coroutines/ 2013-03-31T10:18:56 *** loglog has joined #aichallenge 2013-03-31T10:19:08 i'm more interested in an overview since i already understand various forms of coroutines 2013-03-31T10:19:10 look at http://dabeaz.com/coroutines/pyos6.py for example 2013-03-31T10:19:13 thanks 2013-03-31T10:19:45 the overview is that python has an advanced 'yield' now 2013-03-31T10:20:06 advanced 2013-03-31T10:20:07 if a function has a yield in it, it will become a generator 2013-03-31T10:20:15 i'm guessing it can have return values now? 2013-03-31T10:20:15 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:20:19 multi-purpose if you will 2013-03-31T10:20:25 yes 2013-03-31T10:20:31 *** loglog has joined #aichallenge 2013-03-31T10:21:00 basically a yield is the break point in a cooperative context 2013-03-31T10:21:04 data Coroutine o i a = Return a | Yield o (i -> Coroutine o i a) 2013-03-31T10:21:07 tada! 2013-03-31T10:21:08 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:21:09 you can pull values from it, or push them 2013-03-31T10:21:21 *** loglog has joined #aichallenge 2013-03-31T10:21:44 ill read up on the topic in haskell in due time 2013-03-31T10:21:55 i have it opened in the browser believe it or not 2013-03-31T10:22:02 if you want to read up on the coolest similar thing you should read about delimited continuations 2013-03-31T10:22:22 the problem is that in haskell the typesystem gets in the way 2013-03-31T10:22:26 ? 2013-03-31T10:22:31 what do you mean in the way? 2013-03-31T10:22:31 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:22:37 im not saying in a bad way 2013-03-31T10:22:46 you said it was a problem 2013-03-31T10:22:48 but it makes first understanding difficult 2013-03-31T10:22:48 *** loglog has joined #aichallenge 2013-03-31T10:22:56 weird 2013-03-31T10:23:03 i have the exact opposite reaction to types 2013-03-31T10:23:25 using this stuff in python or scheme is much easier without even a deep undestanding of what happens 2013-03-31T10:23:51 anyway, ill have a better informed view when i actually read that article on haskell continuations 2013-03-31T10:23:51 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:24:01 that's a pretty big claim to make without having done it in haskell it 2013-03-31T10:24:06 *** loglog has joined #aichallenge 2013-03-31T10:24:08 -it 2013-03-31T10:24:08 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:24:21 *** loglog has joined #aichallenge 2013-03-31T10:24:21 i looked at it, and said wth, im not yet up to it 2013-03-31T10:24:27 so the claim is substantiated 2013-03-31T10:24:38 i wish i could /ignore somebody's reconnect loop without inadvertantly forgetting about them 2013-03-31T10:25:11 i dont see joins/parts 2013-03-31T10:25:12 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:25:26 *** loglog has joined #aichallenge 2013-03-31T10:25:28 or quites 2013-03-31T10:25:30 quits 2013-03-31T10:25:50 if i really want to see it i just press alt+= 2013-03-31T10:26:01 thats how it works in weechat 2013-03-31T10:26:01 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:26:19 *** loglog has joined #aichallenge 2013-03-31T10:26:19 you don't need to understand the implementation any more in haskell than you do in any other language. just treat it as the same magic if you want, and it's no worse as far as i can tell 2013-03-31T10:26:37 i'm also using weechat. trying it 2013-03-31T10:26:37 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:26:41 didn't do anything :( 2013-03-31T10:26:50 i had to set something first to not show it 2013-03-31T10:26:51 *** loglog has joined #aichallenge 2013-03-31T10:26:52 ah 2013-03-31T10:26:53 let me find it 2013-03-31T10:26:57 it's okay 2013-03-31T10:27:05 i've had that setting before. didn't realize it was togglable 2013-03-31T10:27:05 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:27:20 *** loglog has joined #aichallenge 2013-03-31T10:28:40 mcstar: here. i've intentionally hidden implementation details for this abstraction. just look at the yields: http://hpaste.org/84917 2013-03-31T10:29:40 i think a filter needs to be set 2013-03-31T10:30:59 jmcarthur: yeah i have axman's blog open 2013-03-31T10:31:31 what can 'yield' take? 2013-03-31T10:31:31 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:31:37 can it take another coroutine? 2013-03-31T10:31:46 *** loglog has joined #aichallenge 2013-03-31T10:32:13 Yield o (i -> Coroutine o i a) 2013-03-31T10:32:20 so 'o' is a string 2013-03-31T10:32:20 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:32:31 and yield gives a continuation 2013-03-31T10:32:35 *** loglog has joined #aichallenge 2013-03-31T10:33:15 but if 'o' is a continuation already, can it compose it with the one it would return? 2013-03-31T10:33:56 sure it can take another coroutine, but i'm not sure i understand the use case you have in mind 2013-03-31T10:34:55 to start multiple coroutines independently 2013-03-31T10:35:01 o is the type of values you can "output" (the input for yield). i is the type of values you can "input" (the return type for yield) 2013-03-31T10:35:35 what happens when IO enters the picture? 2013-03-31T10:35:35 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:35:36 i don't understand. coroutines are cooperative 2013-03-31T10:35:44 IO is fine 2013-03-31T10:35:50 *** loglog has joined #aichallenge 2013-03-31T10:35:57 i dont even dealt with monad transformers... 2013-03-31T10:35:58 the CoroutineT in that blog post is a monad transformer 2013-03-31T10:36:08 you can use IO with it 2013-03-31T10:36:12 gotta go sorry 2013-03-31T10:36:13 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T10:36:25 np 2013-03-31T10:36:28 *** loglog has joined #aichallenge 2013-03-31T10:37:50 mcstar: nevermind, i have another five minutes 2013-03-31T10:39:24 you can lift any IO action into CoroutineT i o IO a using liftIO 2013-03-31T10:40:05 for most monads you don't even have to do that, but IO doesn't have an associated type class (there are reasons for this, but it still makes it more awkward than the norm) 2013-03-31T10:42:40 dont miss your transportation because of me :_ 2013-03-31T10:42:42 :) 2013-03-31T10:46:36 *** Uvs has quit IRC (Ping timeout: 256 seconds) 2013-03-31T11:01:37 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T11:01:51 *** loglog has joined #aichallenge 2013-03-31T11:04:05 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T11:04:19 *** loglog has joined #aichallenge 2013-03-31T11:05:59 *** loglog has joined #aichallenge 2013-03-31T11:07:16 nah i wasn't in danger of missing transportation 2013-03-31T11:07:20 just breakfast 2013-03-31T11:07:20 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T11:07:29 (kind of late breakfast) 2013-03-31T11:07:33 *** loglog has joined #aichallenge 2013-03-31T11:11:14 *** Uvs has joined #aichallenge 2013-03-31T11:56:05 *** sigh has quit IRC (Remote host closed the connection) 2013-03-31T11:56:37 *** sigh has joined #aichallenge 2013-03-31T12:01:11 *** sigh has quit IRC (Ping timeout: 260 seconds) 2013-03-31T12:15:01 *** Uvs has quit IRC (Ping timeout: 256 seconds) 2013-03-31T12:21:31 *** smiley1983 has quit IRC (Ping timeout: 264 seconds) 2013-03-31T12:32:46 *** Uvs has joined #aichallenge 2013-03-31T12:38:36 *** NoxiaZ^ has joined #aichallenge 2013-03-31T12:39:20 *** Accoun has quit IRC (Ping timeout: 255 seconds) 2013-03-31T12:44:37 *** Accoun has joined #aichallenge 2013-03-31T12:50:44 *** KokaKiwi has quit IRC (Remote host closed the connection) 2013-03-31T12:51:19 *** KokaKiwi has joined #aichallenge 2013-03-31T12:51:48 *** epicmonkey has joined #aichallenge 2013-03-31T13:54:40 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T13:55:53 *** loglog has joined #aichallenge 2013-03-31T14:33:57 *** epicmonkey has quit IRC (Read error: No route to host) 2013-03-31T14:34:16 *** epicmonkey has joined #aichallenge 2013-03-31T14:34:46 *** epicmonkey has joined #aichallenge 2013-03-31T14:40:15 *** epicmonkey has quit IRC (Remote host closed the connection) 2013-03-31T14:41:36 *** epicmonkey has joined #aichallenge 2013-03-31T14:59:52 *** NoxiaZ^ has quit IRC () 2013-03-31T15:04:12 *** thestinger has joined #aichallenge 2013-03-31T15:20:37 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:20:50 *** loglog has joined #aichallenge 2013-03-31T15:26:37 f this 2013-03-31T15:26:50 i can pickle a list proxy object 2013-03-31T15:27:17 but when my object that i put in a list proxy has a property that is a list proxy, it gets converted to a list somehow 2013-03-31T15:27:35 'i put' -> 'is' 2013-03-31T15:27:35 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:27:48 *** loglog has joined #aichallenge 2013-03-31T15:27:53 argh 2013-03-31T15:27:57 not quite but f 2013-03-31T15:33:41 thestinger: wth http://sprunge.us/jKjV 2013-03-31T15:34:23 but i checked by hand, that pickle.loads(pickle.dumps(c)) does the correct thing 2013-03-31T15:34:40 so this multiprocessign Manager shit doesnt do what i believe would be correct 2013-03-31T15:35:19 but i dont see __getstate__ or __setstate__ methods on the ListProxy, so i dont understand how Manager change the pickling behavior 2013-03-31T15:35:32 how can* 2013-03-31T15:37:51 that message is colorful 2013-03-31T15:37:59 wth is wrong with richi 2013-03-31T15:38:48 heheh 2013-03-31T15:38:48 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:39:05 *** loglog has joined #aichallenge 2013-03-31T15:41:55 mcstar: *shrug* :P 2013-03-31T15:41:56 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:42:01 mcstar: I don't understand the problem 2013-03-31T15:42:08 you can see it yourself 2013-03-31T15:42:13 *** loglog has joined #aichallenge 2013-03-31T15:42:50 thestinger: the type should be multiprocessing.managers.ListProxy 2013-03-31T15:42:54 but it is builtin.list 2013-03-31T15:43:21 thestinger: i have an object, c(C), that is put in a list, managed by the multiprocessing manager 2013-03-31T15:43:32 it's only a proxy from the other process 2013-03-31T15:43:34 and it has a property or member that is another list proxy 2013-03-31T15:43:35 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:43:46 it is always a proxy 2013-03-31T15:43:49 *** loglog has joined #aichallenge 2013-03-31T15:43:54 otherwise it were no good 2013-03-31T15:44:12 * thestinger shrugs again 2013-03-31T15:44:20 which part is not clear? 2013-03-31T15:44:28 I understand now 2013-03-31T15:44:29 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:44:32 ok 2013-03-31T15:44:32 I don't know why it happens 2013-03-31T15:44:37 me neither 2013-03-31T15:44:43 *** loglog has joined #aichallenge 2013-03-31T15:45:26 "An important feature of proxy objects is that they are picklable so they can be passed between processes. Note, however, that if a proxy is sent to the corresponding manager’s process then unpickling it will produce the referent itself. This means, for example, that one shared object can contain a second:" 2013-03-31T15:45:42 thats the undesired behavior 2013-03-31T15:45:50 so i need a way to override it 2013-03-31T15:45:51 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:46:06 *** loglog has joined #aichallenge 2013-03-31T15:46:19 but this behavior is not the default, that simple pickling would lead to 2013-03-31T15:46:32 so i guess they must have overriden the mechanism 2013-03-31T15:46:33 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:46:43 but i dont see the __getstate__ methods 2013-03-31T15:46:48 *** loglog has joined #aichallenge 2013-03-31T15:48:37 AttributeError: method '__getstate__' of object is not in exposed={'count', '__delitem__', 'sort', 'insert', '__mul__', '__add__', '__reversed__', '__contains__', '__getitem__', 'remove', '__setitem__', 'pop', '__len__', 'append', 'index', '__rmul__', '__imul__', 'reverse', 'extend'} 2013-03-31T15:48:56 ooh wth why class 'list' 2013-03-31T15:48:56 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:49:13 *** loglog has joined #aichallenge 2013-03-31T15:49:42 ah ok, _callmethod work on the referent 2013-03-31T15:49:43 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:49:56 *** loglog has joined #aichallenge 2013-03-31T15:51:20 yay dynamic magic 2013-03-31T15:51:31 :P 2013-03-31T15:51:47 * thestinger has to figure out which object file doesn't get a GNU-stack section 2013-03-31T15:52:01 ipython btw has a lot of dynamic methods... 2013-03-31T15:52:01 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T15:52:19 *** loglog has joined #aichallenge 2013-03-31T15:52:20 thestinger: i dont even know what that means 2013-03-31T15:52:27 which object where? 2013-03-31T15:54:45 *** AlliedEnvy has quit IRC (Ping timeout: 248 seconds) 2013-03-31T15:55:35 thestinger: oooh it work with a dict 2013-03-31T15:55:41 works* 2013-03-31T15:56:20 if i put my instance in a proxydict, i can access the instance's proxy list 2013-03-31T16:01:35 *** AlliedEnvy has joined #aichallenge 2013-03-31T16:04:48 *** Scooper has joined #aichallenge 2013-03-31T16:16:18 thestinger: great, now it work as i believe is the correct way :) 2013-03-31T16:16:23 works**** 2013-03-31T16:16:26 :) 2013-03-31T16:16:27 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T16:16:33 i just have to make my pager follow the output 2013-03-31T16:16:39 *** loglog has joined #aichallenge 2013-03-31T16:16:44 mcstar: so what was the problem? 2013-03-31T16:17:05 it didnt work if i put the class that had a list proxy in a list proxy 2013-03-31T16:17:15 but it works if i put the class that has a list proxy in a dict proxy 2013-03-31T16:17:31 anyway, it made my code clearer, dicts are better for storing jobs than lists 2013-03-31T16:17:35 as it turned out... 2013-03-31T16:17:36 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T16:17:50 *** loglog has joined #aichallenge 2013-03-31T16:20:18 *** AlliedEnvy has quit IRC (Ping timeout: 258 seconds) 2013-03-31T16:26:15 mcstar: https://github.com/mozilla/rust/pull/5647 my problem was surprisingly easy to fix ;p 2013-03-31T16:26:30 *** AlliedEnvy has joined #aichallenge 2013-03-31T16:27:03 - str sp, [r0, #52] 2013-03-31T16:27:06 + str sp, [r0, #52] 2013-03-31T16:27:13 trailing whitespace. 2013-03-31T16:27:13 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T16:27:16 yeah :) 2013-03-31T16:27:17 the tidy script only checks .rs files 2013-03-31T16:27:25 I should fix that too but... lazy 2013-03-31T16:27:27 *** loglog has joined #aichallenge 2013-03-31T16:27:57 so you added some compiler meta data? 2013-03-31T16:28:06 linker :) 2013-03-31T16:28:16 to tell it to stawp with the executable stack crap 2013-03-31T16:28:16 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T16:28:32 *** loglog has joined #aichallenge 2013-03-31T16:28:32 * thestinger thought it would involve real work 2013-03-31T16:33:29 *** ermau has quit IRC (Remote host closed the connection) 2013-03-31T16:37:57 *** ermau has joined #aichallenge 2013-03-31T16:49:33 *** epicmonkey has quit IRC (Ping timeout: 240 seconds) 2013-03-31T16:56:18 *** kilae has quit IRC (Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]) 2013-03-31T16:58:29 *** amstan has joined #aichallenge 2013-03-31T16:58:29 *** ChanServ sets mode: +o amstan 2013-03-31T17:33:27 *** Uvs has quit IRC (Ping timeout: 260 seconds) 2013-03-31T17:38:25 *** ermau has quit IRC (Remote host closed the connection) 2013-03-31T17:39:06 *** mattswe has quit IRC (Remote host closed the connection) 2013-03-31T17:52:55 *** sigh has joined #aichallenge 2013-03-31T18:07:11 *** ermau has joined #aichallenge 2013-03-31T18:29:42 *** mcstar has quit IRC (Quit: mcstar) 2013-03-31T18:38:45 *** sigh has quit IRC (Remote host closed the connection) 2013-03-31T18:39:18 *** sigh has joined #aichallenge 2013-03-31T18:43:44 *** sigh has quit IRC (Ping timeout: 256 seconds) 2013-03-31T19:11:26 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T19:11:42 *** loglog has joined #aichallenge 2013-03-31T19:12:06 *** loglog has joined #aichallenge 2013-03-31T20:03:55 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:04:10 *** loglog has joined #aichallenge 2013-03-31T20:06:35 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:06:51 *** loglog has joined #aichallenge 2013-03-31T20:16:29 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:16:45 *** loglog has joined #aichallenge 2013-03-31T20:24:22 *** sigh has joined #aichallenge 2013-03-31T20:25:56 sigh: are you around? 2013-03-31T20:26:03 yup 2013-03-31T20:26:03 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:26:12 i have a puzzle for you :D 2013-03-31T20:26:19 *** loglog has joined #aichallenge 2013-03-31T20:26:31 go on 2013-03-31T20:26:41 http://www.reddit.com/r/AskReddit/comments/1bd2gy/dear_redditors_what_are_your_favorite_riddles/c95tc23?context=3 2013-03-31T20:26:48 i posted that before, and the solution for 2 people is easy enough 2013-03-31T20:26:55 i've been trying to work out the solution with 3 people 2013-03-31T20:26:56 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:27:09 if you haven't seen it before feel free to play with it with no spoilers for a while 2013-03-31T20:27:10 *** loglog has joined #aichallenge 2013-03-31T20:27:10 I'll take a look 2013-03-31T20:27:57 http://www.reddit.com/r/AskReddit/comments/1bd2gy/dear_redditors_what_are_your_favorite_riddles/c95ylfh that's some discussion specific to the n=3 case 2013-03-31T20:27:59 oh I know this... it has applications in CS 2013-03-31T20:28:46 *** mattswe has joined #aichallenge 2013-03-31T20:29:01 yes i heard it from people at my uni previously 2013-03-31T20:29:07 that are programmers 2013-03-31T20:31:16 oh, hang on, this is slightly easier than the one I was thinking of 2013-03-31T20:31:31 there's a much more evil one I know along the same lines 2013-03-31T20:31:52 ORLY, go on after :P 2013-03-31T20:31:52 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:32:03 but serially, what's the solution for n=3? 2013-03-31T20:32:09 *** loglog has joined #aichallenge 2013-03-31T20:32:18 (i've been awake for hours, excuse my 13ness) 2013-03-31T20:33:16 antimatriod: you want to know the solution 2013-03-31T20:33:36 ? 2013-03-31T20:34:03 i do, i'm lazy :P 2013-03-31T20:34:03 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:34:05 and tired 2013-03-31T20:34:17 *** loglog has joined #aichallenge 2013-03-31T20:36:34 hang on, it's slightly different to what I thought... I should be able to reason through this though 2013-03-31T20:37:29 heh, does this mean there's 3 distinct problems? 2013-03-31T20:37:29 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:37:34 i'm curious what these other two are too 2013-03-31T20:37:44 *** loglog has joined #aichallenge 2013-03-31T20:38:26 the easier one is where the numbers are distinct... that's easy you just guess the sum of the numbers mod n 2013-03-31T20:38:34 sum of the numbers you can see 2013-03-31T20:39:22 oh so everyone has to guess their number correctly? 2013-03-31T20:39:37 ah yes 2013-03-31T20:39:49 what was the other one that you mistook it for? 2013-03-31T20:42:31 If you have 3 prisoners, 2 numbers... at least one person has to guess right, but no one can guess wrong (you may abstain)... this one you just have to do better than 50% 2013-03-31T20:42:31 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:42:44 *** loglog has joined #aichallenge 2013-03-31T20:42:52 (works for any n=2^k-1) 2013-03-31T20:43:12 I'm trying to modify the solution to the latter :P 2013-03-31T20:46:30 ah okay 2013-03-31T20:46:30 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:46:41 i thought i remembered correctly that 7 was the original problem i heard 2013-03-31T20:46:44 *** loglog has joined #aichallenge 2013-03-31T20:46:54 which would make sense with the n=2^(k-1) requirement 2013-03-31T20:55:03 antimatroid: I got the solution 2013-03-31T20:56:28 shoot :P 2013-03-31T20:56:35 antimatroid: number everyone from 0 to 1 - n. Person i assumes that the total sum is equal to (i mod n). They guess the number on hteir back based on that 2013-03-31T20:56:39 someone will be right 2013-03-31T20:56:39 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:56:43 lol 1-n 2013-03-31T20:56:53 0 to n -1 :p 2013-03-31T20:56:57 *** loglog has joined #aichallenge 2013-03-31T20:57:01 the solution works right? 2013-03-31T20:57:18 let me think for a min 2013-03-31T20:58:15 so person 0 assumes the sum is 0, and if it's 0 they say? and if it's not 1 or 2 they say? 2013-03-31T20:58:23 the equivalence class 2013-03-31T20:59:03 they guess (total - i) mod n 2013-03-31T20:59:03 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T20:59:14 where total is the sum of all the numbers they can see 2013-03-31T20:59:18 *** loglog has joined #aichallenge 2013-03-31T20:59:21 yep okay, hmmm 2013-03-31T21:00:08 i might as well first confirm this.. 2013-03-31T21:01:01 how are you confirming? 2013-03-31T21:01:18 i was about to say 2013-03-31T21:01:27 i'll need non-standard c++ mod wont i? 2013-03-31T21:01:28 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:01:39 ie. 1+1-3 2013-03-31T21:01:44 *** loglog has joined #aichallenge 2013-03-31T21:01:57 i meant for n=3 too 2013-03-31T21:01:57 just add n to the number before modding 2013-03-31T21:02:11 derp :P 2013-03-31T21:02:16 i haven't programmed much lately 2013-03-31T21:02:16 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:02:33 *** loglog has joined #aichallenge 2013-03-31T21:03:19 http://codepad.org/fH483Cnm 2013-03-31T21:03:19 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:03:33 *** loglog has joined #aichallenge 2013-03-31T21:03:34 suggests it didn't work 2013-03-31T21:03:36 by a mile 2013-03-31T21:03:54 unless i wrote the program wrong 2013-03-31T21:04:44 derp 2013-03-31T21:04:45 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:04:52 this strategy isn't possible 2013-03-31T21:04:58 oh wait 2013-03-31T21:04:59 *** loglog has joined #aichallenge 2013-03-31T21:04:59 i'm retarded 2013-03-31T21:05:01 hang on 2013-03-31T21:05:08 hang on, you've got an off by one error somewhere 2013-03-31T21:05:37 aha 2013-03-31T21:05:37 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:05:46 yeah i started at 1 before because of people i was talking too 2013-03-31T21:05:50 *** loglog has joined #aichallenge 2013-03-31T21:06:04 yeah, I need numbers for [0, n-1] not [1, n] 2013-03-31T21:06:08 http://codepad.org/9jlnkA9C 2013-03-31T21:06:08 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:06:16 still a problem? 2013-03-31T21:06:22 *** loglog has joined #aichallenge 2013-03-31T21:06:26 i was subtracting off the wrong amount from the total before too 2013-03-31T21:08:17 http://codepad.org/JQxwUeNp that's the closest i got before, 2 counterexamples :( 2013-03-31T21:08:17 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:08:30 *** loglog has joined #aichallenge 2013-03-31T21:09:36 hang on, let me play with this 2013-03-31T21:09:36 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:09:53 *** loglog has joined #aichallenge 2013-03-31T21:09:55 sigh: you poor bastard http://www.reddit.com/r/askphilosophy/comments/16moca/how_can_we_say_something_like_math_is_a_priori/c7zpu0k?context=3 all that effort and nobody ever responded :P 2013-03-31T21:09:59 so you guys still haven't solved the original (n=3) problem? or are you on something else? 2013-03-31T21:10:07 still n=3 2013-03-31T21:10:19 unless i'm still getting that program wrong sigh's solution is wrong 2013-03-31T21:10:19 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:10:30 antimatroid: haha 2013-03-31T21:10:35 *** loglog has joined #aichallenge 2013-03-31T21:10:43 antimatroid: I'm sure it's right, I'll check your program 2013-03-31T21:10:43 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:10:57 *** loglog has joined #aichallenge 2013-03-31T21:10:57 i'm not sure i understand the goal. is it for at least one of the three people to guess correctly? 2013-03-31T21:11:43 yes 2013-03-31T21:11:56 you can start with 2 people 2013-03-31T21:13:16 i already know the 2-person solution 2013-03-31T21:19:27 antimatroid: working code: http://codepad.org/Hjcq5DV2 2013-03-31T21:19:52 I messed up a sign too, in my original description, so I'll fix that 2013-03-31T21:21:13 So the solution is: Number everyone from 0 to n - 1. Each person calculates the sum of all the numbers they can see (the sum of the numbers on the other people's backs), call this s. Then person i guesses (i - s) mod n. 2013-03-31T21:21:39 is there an intuitive explanation for why this works? :P 2013-03-31T21:21:47 and is this for any n? 2013-03-31T21:21:55 Call the total sum *S*. Since *S mod n* must lie between *0* and *n - 1*, and each person *i* assumes that the *S* is equal to *i*, exactly one of them will be right. 2013-03-31T21:21:55 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:22:09 *** loglog has joined #aichallenge 2013-03-31T21:23:07 "and each person *i* assumes that the *S* is equal to *i*" not quite getting that? 2013-03-31T21:23:38 *** floWenoL_ has joined #aichallenge 2013-03-31T21:23:39 If I tell you (S mod n) you can guess your own number, right? 2013-03-31T21:23:39 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:23:53 *** loglog has joined #aichallenge 2013-03-31T21:23:55 yes 2013-03-31T21:24:18 (S mod n) can only be in [0, n-1], right? 2013-03-31T21:24:18 *** Scooper has quit IRC (Quit: Leaving) 2013-03-31T21:24:18 okay 2013-03-31T21:24:21 i think i see 2013-03-31T21:24:21 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:24:36 *** loglog has joined #aichallenge 2013-03-31T21:24:43 so a assumes (S = 0 mod n), b assumes (S = 1 mod n) 2013-03-31T21:24:46 etc. 2013-03-31T21:24:46 each person assumes it's each of the possible answers then works out their i from there 2013-03-31T21:24:50 that would be a good way to explain it 2013-03-31T21:24:51 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:25:03 sorry, their number 2013-03-31T21:25:07 *** loglog has joined #aichallenge 2013-03-31T21:25:08 their i is assigned before 2013-03-31T21:25:21 yes, you assign them a number before hand 2013-03-31T21:25:21 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:25:35 and this works for all n yes? 2013-03-31T21:25:38 *** loglog has joined #aichallenge 2013-03-31T21:25:49 yup, for any n > 0 2013-03-31T21:25:51 :P 2013-03-31T21:26:13 the n=2 case is equivalent to the solution you had 2013-03-31T21:26:34 do you want to update your reddit post or shall i add a comment explaining that a bit better? 2013-03-31T21:26:43 i don't think they'll understand what you've written :P 2013-03-31T21:26:45 I'll update 2013-03-31T21:26:57 *** floWenoL has quit IRC (Ping timeout: 252 seconds) 2013-03-31T21:26:58 i'll link the two who are probably interested 2013-03-31T21:26:58 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:27:12 *** loglog has joined #aichallenge 2013-03-31T21:27:16 meh 2013-03-31T21:27:37 i made a pointed effort to avoid reading sigh's explanation from earlier, but not i don't care :OP 2013-03-31T21:27:40 * :P 2013-03-31T21:27:44 *now 2013-03-31T21:28:06 :P 2013-03-31T21:28:06 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:28:21 my reddit submission for the day http://www.reddit.com/r/videos/comments/1bdv0e/the_miracle_of_wtf/ 2013-03-31T21:28:24 *** loglog has joined #aichallenge 2013-03-31T21:28:57 tagged as jmcarthur 2013-03-31T21:30:01 also, that would hurt 2013-03-31T21:31:39 there was a reddit thread around that time i made that video. the thread was on the original (forward) video, and somebody remarked that it would be weird in reverse. 2013-03-31T21:31:45 so i had to 2013-03-31T21:31:45 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:31:59 *** loglog has joined #aichallenge 2013-03-31T21:33:15 antimatroid: is this better: http://www.reddit.com/r/AskReddit/comments/1bd2gy/dear_redditors_what_are_your_favorite_riddles/c960sej 2013-03-31T21:33:18 we also did this to our cat today http://www.youtube.com/watch?v=kzVSoscj73c 2013-03-31T21:33:43 If not, let me know what part is unclear 2013-03-31T21:34:16 sigh: the proof seem straightforward to me 2013-03-31T21:34:30 sigh: although "Each person assumes that the total S is the number they assigned themselves beforehand." seems wrong. i think you mean S mod n 2013-03-31T21:35:08 "S mod n = s + n_i, then n_i = S - s mod n" 2013-03-31T21:35:24 shouldn't that be n_i = (S mod n) - s? 2013-03-31T21:35:41 where S mod n = i 2013-03-31T21:35:41 ? 2013-03-31T21:35:41 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:35:55 *** loglog has joined #aichallenge 2013-03-31T21:36:09 technically ((S mod n) - s) mod n) 2013-03-31T21:36:17 is (S - s) mod n clear enough? 2013-03-31T21:36:56 possibly, though i doubt redditors will understand that 2013-03-31T21:37:23 have it, but i would stress that given the assumption of what S is (which at least one of them is right about) they can calculate what their number n_i is 2013-03-31T21:37:39 i doubt they'll understand that it can be done, so better to explicitly point that out 2013-03-31T21:37:40 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:37:58 *** loglog has joined #aichallenge 2013-03-31T21:38:44 i'm gonna go have a shower now, but thanks and hope you liked the problem :P 2013-03-31T21:42:24 antimatroid: ok, cleaned it up and put the math at the end: http://www.reddit.com/r/AskReddit/comments/1bd2gy/dear_redditors_what_are_your_favorite_riddles/c960sej 2013-03-31T21:42:24 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T21:42:42 *** loglog has joined #aichallenge 2013-03-31T21:42:47 but honestly, if they don't understand modular arithmetic, they won't understand the solution 2013-03-31T22:02:01 yeah i know, but if they understand the intuitive stuff without the modular arithmetic it might still be possible to accept that a solution exists 2013-03-31T22:02:44 haha 2013-03-31T22:04:03 yeah i might be kidding myself :P 2013-03-31T22:04:09 You could probably explicitly give the solution for 3 without using modular arithmetic and still be intuitive, but it would be a bit tedious 2013-03-31T22:05:26 anyway, i'm off to buy lunch supplies 2013-03-31T22:05:42 is anything open today o_O 2013-03-31T22:06:38 supermarket better be 2013-03-31T22:06:46 they were closed friday but i think it said they're open today 2013-03-31T22:06:46 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T22:07:01 *** loglog has joined #aichallenge 2013-03-31T22:07:01 ah 2013-03-31T22:14:12 *** sigh_ has joined #aichallenge 2013-03-31T22:21:46 *** mattswe has quit IRC (*.net *.split) 2013-03-31T22:21:46 *** sigh has quit IRC (*.net *.split) 2013-03-31T22:24:45 *** JamesMG has joined #aichallenge 2013-03-31T22:25:02 *** aerique_ has joined #aichallenge 2013-03-31T22:25:19 *** JamesMG_ has quit IRC (Remote host closed the connection) 2013-03-31T22:25:19 *** aerique has quit IRC (Write error: Broken pipe) 2013-03-31T22:38:50 *** mattswe has joined #aichallenge 2013-03-31T22:42:55 *** bqf_ has joined #aichallenge 2013-03-31T22:49:32 *** bqf has quit IRC (*.net *.split) 2013-03-31T23:02:49 antimatroid: I wrote an explanation without using modular arithmetic: http://www.reddit.com/r/AskReddit/comments/1bd2gy/dear_redditors_what_are_your_favorite_riddles/c9638wc?context=2 2013-03-31T23:03:28 *** sigh_ is now known as sigh 2013-03-31T23:12:32 sigh: :D 2013-03-31T23:12:38 just finished cooking myself a parmy 2013-03-31T23:12:44 nice 2013-03-31T23:12:44 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:13:02 *** loglog has joined #aichallenge 2013-03-31T23:13:13 that problem is pretty cool 2013-03-31T23:15:58 if you like that, then solve this: 3 people, each with 1 or 0 on their back. Each may guess or abstain. If anyone guesses wrong or if everyone abstains they all lose. Can you have a strategy that has a survival rate better than 50%? 2013-03-31T23:15:58 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:16:12 *** loglog has joined #aichallenge 2013-03-31T23:16:31 i will play with it later 2013-03-31T23:16:36 antimatroid: and if you can do that then solve 2^k-1 in general :P 2013-03-31T23:16:55 was about to say, if that other problem was a discrete maths exam for everyone to pass, you wouldn't want to be the one to fuck up the arithmetic calculation at the end 2013-03-31T23:17:28 I got the sign wrong initially :P 2013-03-31T23:19:23 everyone fails! 2013-03-31T23:36:56 sigh: "a bit cleverer" :P 2013-03-31T23:37:12 antimatroid: what's wrong with that? :) 2013-03-31T23:37:12 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:37:26 *** loglog has joined #aichallenge 2013-03-31T23:38:35 i would say a bit more clever 2013-03-31T23:38:43 not sure if yours is actually correct? 2013-03-31T23:38:59 also personally I would write "but using multiples for n" as "but using multiples of n" 2013-03-31T23:39:00 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:39:15 *** loglog has joined #aichallenge 2013-03-31T23:39:18 what part is not correct? 2013-03-31T23:39:24 cleverer? 2013-03-31T23:40:01 cleverer is a word 2013-03-31T23:41:07 there are a few things I could tidy up with my posts, but I can't be bothered now 2013-03-31T23:41:17 fair enough 2013-03-31T23:41:24 i've never really seen cleverer before 2013-03-31T23:41:50 explaining things that require modular arithmetic without using it is tedious :P 2013-03-31T23:41:50 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:42:05 *** loglog has joined #aichallenge 2013-03-31T23:42:40 darn, i already know this one 2013-03-31T23:42:53 i wish i could forget some of these so i can solve them again 2013-03-31T23:42:53 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:43:06 jmcarthur: which one? 2013-03-31T23:43:09 *** loglog has joined #aichallenge 2013-03-31T23:44:37 i'm not actually sure why the general one you mentioned is 2^k-1. doesn't it just work with any n? or maybe i don't know what k is 2013-03-31T23:45:20 oh, actually, i misunderstood the question 2013-03-31T23:45:29 i related it to one i do know, but i don't know this one 2013-03-31T23:45:29 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:45:38 what's the one you know? 2013-03-31T23:45:44 *** loglog has joined #aichallenge 2013-03-31T23:45:51 i was thinking this one seemed similar to: 2013-03-31T23:49:20 there are 100 people, each of which is wearing either a black hat or a white hat, but nobody knows their own hat color. they are put in a single file line and are only allowed to face forward so they can only see the people in front of them. starting from the back, people have to guess their own hat colors. everybody can hear. if you guess wrong, you die. what is the best plan to save the largest number 2013-03-31T23:49:22 of people? 2013-03-31T23:49:48 it's pretty easy relative to most in this class of problems, really 2013-03-31T23:50:03 it can also be generalized to any number of hat colors 2013-03-31T23:50:03 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:50:18 *** loglog has joined #aichallenge 2013-03-31T23:50:25 *** dvladim has joined #aichallenge 2013-03-31T23:50:37 ah yup, with that one you can guarantee the lives of n-1 people 2013-03-31T23:50:42 right 2013-03-31T23:51:21 what got me confused about your question was the "survival rate of better than 50%" bit 2013-03-31T23:51:21 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:51:31 alright, now i'll think about it 2013-03-31T23:51:36 *** loglog has joined #aichallenge 2013-03-31T23:51:46 my one doesn't allow you to guarantee anyone's life, so the best you can do is a probabilistic solution 2013-03-31T23:52:06 the simplest one is for everyone to abstain except for one person who guesses randomly 2013-03-31T23:52:14 that wins 50% of the time 2013-03-31T23:52:18 wait wait 2013-03-31T23:52:18 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:52:36 *** loglog has joined #aichallenge 2013-03-31T23:52:57 the problem is to find something better 2013-03-31T23:53:01 ah 2013-03-31T23:53:03 okay 2013-03-31T23:53:03 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:53:21 *** loglog has joined #aichallenge 2013-03-31T23:53:28 well i could borrow the trick from the problem i said 2013-03-31T23:54:16 everyone guesses simultaneously 2013-03-31T23:54:22 oh 2013-03-31T23:54:43 sorry, I was riding off the back of antimatroid's problem which was also simultaneous :P 2013-03-31T23:54:47 yeah 2013-03-31T23:54:47 *** loglog has quit IRC (Remote host closed the connection) 2013-03-31T23:54:58 my association of it with my problem completely threw me off :P 2013-03-31T23:55:01 *** loglog has joined #aichallenge 2013-03-31T23:55:11 :) 2013-03-31T23:56:08 it's a tricky one to figure out, but the solution for n=3 is easy to explain, and not that hard to explain either