[ back to Tom 7 Radar ]

p
e
r
s
o
n
a
l
The adventures of learnfun and playfun, episode 3 (20 Jan 2014 at 12:11)
It took an awful long time to finish, but I finally posted the third in my series of videos about my software that learns to play Nintendo games:

The adventures of learnfun & playfun episode 3
The adventures of learnfun & playfun episode 3


This one doesn't have too much technical materials, as it's the exact same program playing a bunch more games: Color A Dinosaur, Cliffhanger, Pro Wrestling, Pinball, Mega Man 2, Gradius, Double Dare, Arkanoid. There are also some new results for Super Mario Bros. It's a bit lengthy, but I tried hard to keep it dense and filled with entertainment.

I'm currently working on different projects for SIGBOVIK this year, but I also have some more ideas for the NES AI stuff. All we need is more time!
c
o
m
m
e
n
t
Anonym (37.138.91.241) – 01.21.14 13:52:50
Nice Video! What would be great is a in depth Tutorial on how to set this up and make it work for yourself.
c
o
m
m
e
n
t
Frynge (97-124-255-70.hlrn.qwest.net) – 01.22.14 01:56:11
I've just downloaded the binaries. This is a brilliant concept, and I'd like to make use of it. I'm something of an AI hobbyist and retro gamer. I'd rather like to use Playfun for a series of experiments pitting human players against it in games I find it good at, as well as a series of related events for a local convention.

Would this be alright with you?
c
o
m
m
e
n
t
Tom 7 (c-67-186-7-254.hsd1.pa.comcast.net) – 01.22.14 20:09:27
Sure, if you can figure out how to run it and everything, then you can do some experiments and show off the results. It's open-source. It won't work for two-player simultaneous human vs compute play, though, as it needs to be able to emulate the game into the future.
c
o
m
m
e
n
t
Scott F (ool-18bad697.dyn.optonline.net) – 01.24.14 00:38:06
Weird, I missed episode 2 entirely. Did you mention it on this here radar thingy and/or Twitter? Cuz it seems like I would have seen that. Scratching my head intensely right now, but happy to have these two new episodes to watch regardless!
c
o
m
m
e
n
t
Tom 7 (c-67-186-7-254.hsd1.pa.comcast.net) – 01.24.14 00:49:19
I think so, maybe without an attractive image! Thanks for watching :)
c
o
m
m
e
n
t
jonas (catv-89-132-197-38.catv.broadband.hu) – 01.24.14 06:53:11
Nice! Thanks for the update.
c
o
m
m
e
n
t
furrysalamander (63-248-66-35.static.slcl0105.digis.net) – 02.04.14 18:41:25
At my school, I have permission to use an entire computer lab full of nice computers as a server farm for rendering, and anything else I want. Is there any way to run playfun on a network to distribute the load? Total it's 64+ i5 cores and 128+ gigs of RAM. I'm not as good at coding as you are, and I think it would make for some really interesting possibilities.
c
o
m
m
e
n
t
Tom 7 (c-67-186-7-254.hsd1.pa.comcast.net) – 02.04.14 23:32:36
Yes, I think that would work since it just uses TCP/IP to communicate. I've never tried it, though. I think that it's hard-coded to connect to localhost (127.0.0.1) so you would probably need to change the code to connect to a list of port/ip pairs rather than just ports, but I think that'd be straightforward. (Maybe you could just run proxies on the local machine that redirected the ports to other machines, and then you wouldn't need to recompile.) Other downsides would be: It currently aborts if any of the helpers die, which is reasonable on a single computer, but basically if any of the machines go off or can't connect, the whole computation would abort. Finally, the protocol it uses is totally insecure, so you'd want to make sure that others didn't have access to the open ports.
c
o
m
m
e
n
t
furrysalamander (google-proxy-66-249-84-128.google.com) – 02.05.14 00:59:37
Excellent, I'll give it a try. Hopefully I can get it to work with a proxy, because I was having a hard time compiling it. Good to know that my suspicions about how the program works were correct. I'll have to let you know how it goes.
c
o
m
m
e
n
t
Tom 7 (c-67-186-7-254.hsd1.pa.comcast.net) – 02.05.14 21:21:10
Great, please do! :)
c
o
m
m
e
n
t
furrysalamander (nobody.nebo.edu) – 02.06.14 10:37:05
Ah, my bad. It's been a while since I read your paper that goes along with it. A lot of it's still over my head (10th grade for you), but I now see the part where you mentioned that as a possibility. I'm not too worried about the lack of redundancy since it'll be in a lab. I'll probably be ready with my side of things to try it on Monday. I'll have to write a program to generate all the helper starter files automatically otherwise I'll be repeating it for ages. Thanks for all the help!
c
o
m
m
e
n
t
furrysalamander (nobody.nebo.edu) – 02.06.14 11:18:31
Any idea where I might find the reference to localhost in the code?
c
o
m
m
e
n
t
andrea (mail.bracesheels.com) – 02.14.14 19:23:33
Brilliant. I wrote a stupid thing to beat Bank Panic on Mame years ago - no idea of how you implemented playfun - Bank Panic was quite simple to beat on a functional level but what about understanding the playfield? I basically quickly scanned the screen for some pre-stored patterns (a gun, a coin back, the red dot you're supposed to aim at... etc.) and then acted accordingly. GO MACHINES!
c
o
m
m
e
n
t
Tom 7 (c-67-186-7-254.hsd1.pa.comcast.net) – 02.15.14 08:53:22
This one is attempting to be generic, so it has to learn what to do just from watching me play. The paper at tom7.org/mario explains everything! :)
c
o
m
m
e
n
t
Tom 7 (c-67-186-7-254.hsd1.pa.comcast.net) – 02.15.14 08:55:09
furrysalamander: GetAnswers::FetchWork in netutil.h calls ConnectLocal. Should be reasonably straightforward to add a ConnectRemote function and call it there instead, especially if you're just hard-coding some address constant.
c
o
m
m
e
n
t
furrysalamander (174-23-29-1.slkc.qwest.net) – 02.15.14 13:46:48
Alright, I'll see what I can do, and I'll be sure to contact you once I have some results. Time to learn some C++!
c
o
m
m
e
n
t
zerothis (c75-111-92-243.amrlcmta01.tx.dh.suddenlink.net) – 02.15.14 23:12:26
Why not add a 'bad' training session to teach playfun behaviors to avoid? I realise it probably can't be done with one training. But you could pause a long time, pause and unpause repeatedly, get hit a few times (for some games), engage in some other time wasting activities, before dying. Then playfun would have data about subtracting from the objective function and therefore, hopefully, try to avoid such subtractions.

And why not try it on real the wall street by feeding it actual stock market ticker data, rather than an 8-bit simulation?
c
o
m
m
e
n
t
Jared Ashe (pool-173-51-180-184.lsanca.fios.verizon.net) – 02.15.14 23:22:49
So I was looking for a font for a game I have been working on. I found one and it referred me to your site which referred me to this blog. I have to say This is a very interesting concept.

I got the programming bug when I started my CIS degree and found I loved C++, C, .NET, C#, Object C... Sadly I never got to finish my CS degree though I did get my CIS degree.

In all my years of programming I have learned a few things: All programming languages are about the same, arrays are nasty the more dimension you add to them, and programming auto configuring arrays is the worst.

I mostly make silly games for the iOS and Android devices.

When I read this and watched the video I was reminded about how I thinking about doing something like this some years back...

Computers are operationally driven. I mean as they do one thing then the next. Humans seem to be pattern recognition driven. I not certain I have a full grasp of what you are doing but I think you are scanning the memory and the software generates the understanding of what to do on a pattern as it sees you playing to learn objectives. Is that accurate?

I Thought about using Linux and modifying some chat AI software in conjunction with visual pattern recognition software and usb hook ups and a video capture card to play something as complex as an mmo that comes from another computer.

when you boil it down the rules in an mmo are simple. find it > do function > return.
The key would be figuring out how to utilize recognition software and alter aspects, which to be honest I don't think I have to know how to do, to make in find the right kind of patterns on screen or screen input.

The reasoning I have for this is after spending many a night playing such video games I true believe with out scanning the memory and using pattern recognition software one could make a computer to function on par or even better than a human player.

Nice project and it looks really cool.
c
o
m
m
e
n
t
andrea (210.13.83.18) – 02.17.14 03:24:32
I have read the paper.
c
o
m
m
e
n
t
andrea (210.13.83.18) – 02.17.14 03:25:17
You're amazingly sick. I salute your genius.
c
o
m
m
e
n
t
Tom 7 (c-67-186-7-254.hsd1.pa.comcast.net) – 02.17.14 16:19:40
zerothis: Yes, I think that's a straightforward way to improve it, though it would require some significant manual work to tell it "this was the part that was bad". I wanted to see how far I could get with only positive evidence. It's impossible to use playfun on the stock market unless I have a way of simulating the future, in which case much simpler approaches would suffice. :) If you have one let me know...

jared: Recognizing video output is pretty hard, though some people have had some success with it for simple games. I think the hardest part of MMO-like games would be learning a high-level strategy. Current techniques don't work at all here, at least not in the general case. BTW, I don't agree that all languages are pretty much the same. Maybe the ones you listed. But I'd say that C++, JavaScript, Standard ML, and Prolog are all very different, and learning to be a good programmer in lots of very different languages will expand your mind.

Thank you very much, andrea. :)
c
o
m
m
e
n
t
Jared Ashe (pool-173-51-180-184.lsanca.fios.verizon.net) – 02.17.14 16:59:40
Tom 7: I Never I thought of myself as a good programmer, in fact I will try to go out of my way not to use lots of math formulas in my programs. Sadly when I realized I need fluid or organic movements I realized I need to start using quadratic formulas with a set of variables to generate that.

I was referring to most languages using similar syntax such as if statements and variables. Granted they way many langues deploy this seems different. I know java is almost the same as C or c++ when it comes to syntax. I don't know about javascript though. My meaning is when you know one language well it can get you in the door of figuring out another language fairly easy. Now that said I am sure there are some languages that are very different. This has been true in my experiences though, That said I do only know really know languages that are based off of one another so things like Delphi I don't know if it would be that way or not. I have heard Prolog is just different in general.

Thanks for your time and advice, just an FYI if you want to see what game I used your font int, it I should have it done it a week or two from now and would be happy to send you a copy. It will be meant for iOS or Android but I could make you a Windows or Linux executable.
c
o
m
m
e
n
t
the.AC (adsl-98-74-156-10.ilm.bellsouth.net) – 05.03.14 22:07:36
Any possibility of setting LfPf onto some classic Kung Fu action? Really impressive results from your efforts; enjoying the updates.
c
o
m
m
e
n
t
Laurens (d54c61691.access.telenet.be) – 05.07.14 16:45:10
Totally love this PlayFun stuff!! Loved watching the videos!
c
o
m
m
e
n
t
Greg (p18020-ipngn100102fukui.fukui.ocn.ne.jp) – 05.08.14 21:54:09
Still awesome, even months later.
c
o
m
m
e
n
t
Tom 7 (c-67-186-7-254.hsd1.pa.comcast.net) – 05.08.14 23:46:01
Thanks folks!

AC: I think I skipped Kung Fu because if I remember correctly the player moves to the left and I was worried that would be a decreasing value. Maybe not, though. Worth trying in the next round, after some updates. :)
c
o
m
m
e
n
t
Michael (75.157.21.223) – 03.08.15 13:51:39
this software is great. I'm trying to teach my computer how to speedrun using it. Who knows, it might be better! Just having some trouble setting it up. Can you help me a bit please?
c
o
m
m
e
n
t
Harry (131.252.200.81) – 03.09.15 21:22:06
Hi Tom, Likely you know you are featured in a video about human extinction, by Michael Stevens, on his YouTube channel, Vsauce. Reference begins 6 minutes in.
[hypertext transfer protocol here]//youtu.be/qXXZLoq2zFc

Cheers!
c
o
m
m
e
n
t
Tom 7 (74.125.59.145) – 03.10.15 14:08:58
Yes, when I see an uptick in weird messages I know to check what's going on! I like his videos and it was an honor to be included :)
c
o
m
m
e
n
t
Anonymous (cpe-69-204-84-46.buffalo.res.rr.com) – 10.03.15 11:27:27
Have you ever tried making this for snes or sega genesis games?
c
o
m
m
e
n
t
Tom 7 (pool-74-98-229-167.pitbpa.fios.verizon.net) – 11.28.16 00:04:17
I have tried some experiments emulating with GPUs, but so far it has been much slower that way. The GPU isn't naively well-suited to emulation because of all the branching, unfortunately. I have a few more ideas so maybe something will work out...
p
o
s
t

a

c
o
m
m
e
n
t
Please enter the code, unless you are spammer!!
[ Tom 7 Radar  •  Tom 7 on Google+  •  on Twitter  •  on Facebook ]