Re: [Haskell] Announce: hback - dual n-back memory game (0.0.2)
On 2008.05.30 19:44:32 +0200, Norbert Wojtowicz <wojtowicz.norbert@gmail.com> scribbled 0.7K characters: I'm pleased to publically announce a little project I've worked on. Based on a recent research paper [0] that claims fluid intelligence could be improved by training working memory, I wrote up a dual n-back test memory game in Haskell and gtk2hs. This is still essentially an alpha release: all comments are most welcome.
Original post (includes gameplay instructions): http://pithyless.com/blog/2008/05/18/hback-haskell-n-back-memory-game/
Updated version (overhaul of game with some feature updates): http://pithyless.com/blog/2008/05/30/hback-0_0_2/
Cabal file can be found on hackage: http://hackage.haskell.org/packages/archive/hback/0.0.2/hback-0.0.2.tar.gz
This looks fairly interesting, but I think there are a few improvements you could make: * hback does not seem to work with GHC 6.8.x/split-base - I had to add some build-depends like time,random,unix,directory to build. * hback seems to need to be run in its source directory. For example, I installed and went to try it out: hback hback b n b is the number of tests [default=20] n determines the starting n-back test [default=1] (hback:24854): libglade-WARNING **: could not find glade file 'hback.glade' hback: Can't find the glade file "hback.glade" in the current directory It worked when I cded into ~/hback though. There is a nice way to handle this problem with Cabal, FWIW (I used it when packaging Nymphaea which had the same problem with glade files): <http://neilmitchell.blogspot.com/2008/02/adding-data-files-using-cabal.html>. -- gwern Bletchley al-Askari erco AG. Bletchley DJC RG codes Operation Meta-hackers
I've been busy with school the last few days. There are some issues with the current release that have surfaced after the release: 1. Yes, this is meant to be a proper implementation as based on the paper. No, it's not quite there yet. Joseph emailed me off-list and pointed out where the program strays from the paper (both in stimuli presentation and score algorithms). Do be sure these changes will be incorporated into the next release. 2. hback v 0.0.1 used Neil Mitchell's idea and then something went wrong with the second release and my darcs repo. :) There were other issues with the cabal setup (eg. the mentioned dependency issues). Overall, I'm afraid 0.0.2 version was just a shoddy release and totally my fault. I intend to right these wrongs with the next release and can only hope that I haven't scared away future users. ;-) 3. One issue is the choosing algorithm, which is now just blatantly wrong. I've attached a patch I made: if you actually use this app as-is, you will definitely want to apply it to get a - playable - version of the game (it now correctly keeps track of scoring, etc). The next release will offer a different choice and scoring algorithm based on the paper proper. I really did enjoy playing with gtk2hs to get this working, it's a really nice toolkit. Only two issues I have not yet resolved are the cross-platform sound dependencies (looking into SDL bindings) and the timer hack. I call it a timer hack because of this layout: main = do ... tmHandle <- timeoutAdd( newGame ... ) 500 newGame = do ... when ( finished_with_current_game) ( tmHandle <- timeoutAdd ( newGame ... ) 500 return False) so, basically the timer needs to initiate the next game, because once you start the timeouts, all you can do is eventually kill it. It would be nicer if I could poll the tmHandle and in case it finished, start a new game (that way the main could control future games, not the timer itself). All things considered, my public release was just a little premature. Due to school, my time is a little stretched at the moment, but do expect the next release to be a cleaner version of this one that follows the Paper protocol and builds correctly. :-) Thanks for the feedback, Norbert
participants (2)
-
Gwern Branwen -
Norbert Wojtowicz