|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
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!
|Nice Video! What would be great is a in depth Tutorial on how to set this up and make it work for yourself.|
|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?
|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.|
|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!|
|I think so, maybe without an attractive image! Thanks for watching :)|
|Nice! Thanks for the update.
|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.|
|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.|
|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.|
|Great, please do! :)|
|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!|
|Any idea where I might find the reference to localhost in the code?|
|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!|
|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! :)|
|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.|
|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++!|
|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?
|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.
|I have read the paper.|
|You're amazingly sick. I salute your genius.|
|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...
Thank you very much, andrea. :)
|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.
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.
|Any possibility of setting LfPf onto some classic Kung Fu action? Really impressive results from your efforts; enjoying the updates.|
|Totally love this PlayFun stuff!! Loved watching the videos!|
|Still awesome, even months later.|
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. :)
|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?|
|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
|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 :)|
|Have you ever tried making this for snes or sega genesis games?|
|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...|