Joined: 4/25/2004
Posts: 615
Location: The Netherlands
At this point I think Lua has been embedded enough to warrant a contest. Why don't we hold Lua scripting contests? Create a script that plays a certain game, aiming for speed or points, with no human interaction. Two Four simple rules I'm thinking about would be: - no manual human input allowed (not even to start up) - no memory writing, period - all games start at powerup - no feeding a moviefile (exception: you may hardcode starting a game from powerup) -- edit: I'll add rules as they emerge in the topic
qfox.nl
Post subject: Re: Lua contest
Banned User, Former player
Joined: 3/10/2004
Posts: 7698
Location: Finland
qFox wrote:
Two simple rules I'm thinking about would be: - manual human input allowed (not even to start up)
Don't you mean "not allowed"?
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Um, yes :(
qfox.nl
Player (120)
Joined: 2/11/2007
Posts: 1522
Also, you can't just have it feed straight up input from a movie file :D
I make a comic with no image files and you should read it. While there is a lower class, I am in it, and while there is a criminal element I am of it, and while there is a soul in prison, I am not free. -Eugene Debs
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
No, but it is allowed to get into the game. There's no glory to be gained trying to get through the startup by training a neural network (although that would reaallly impress me ;)
qfox.nl
Joined: 7/2/2007
Posts: 3960
Hasn't Bisqwit already done this with Lunarball? I think the easiest game to play programmatically (without trying for optimal play) would be Arkanoid -- track the ball's current position and velocity, and even if you only account for wall bounces, you should be able to get the paddle under the ball most of the time. Then you just let the bot run until it lucks into removing the last brick. Powerups can all be ignored. Much more complicated would be a game like Mario, where even basic terrain navigation is tricky -- you have to recognize enemies and pits and jump the right distance over both; time the piranha plants, and eventually, learn to swim.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Lunarball, afaik, was no contest... And arkanoid can't be controlled by Lua :p special paddle input. But you'd be amazed at what creative people can do. I've managed to get mario to the end of level one by a mere jump script, completely finishing that level out of context (eg. not actually playing, but finishing anyways). And that's just one way... But there certainly are games that are better suited for this type of contest than others, but it'll be nice (at some point) to throw in harder games.
qfox.nl
Banned User, Former player
Joined: 12/23/2004
Posts: 1850
qFox wrote:
And arkanoid can't be controlled by Lua :p special paddle input.
Arkanoid can be controlled with the controller, you doofus :P How do you think the movie here was made?
Perma-banned
mz
Player (79)
Joined: 10/26/2007
Posts: 693
Those scrolling beat 'em up like Teenage Mutant Ninja Turtles 2/3 for the NES should be kind of easy too, I think. I'd love to see some multiplayer games played by different bots. I think it would be really entertaining if each one of us could code a different bot for any of the Bomberman games for the SNES and then make a multiplayer tournament or something to see which one is the best.
You're just fucking stupid, everyone hates you, sorry to tell you the truth. no one likes you, you're someone pretentious and TASes only to be on speed game, but don't have any hope, you won't get there.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Xkeeper wrote:
qFox wrote:
And arkanoid can't be controlled by Lua :p special paddle input.
Arkanoid can be controlled with the controller, you doofus :P How do you think the movie here was made?
Have you tried from Lua? I tried, failed, moved on.
qfox.nl
Player (120)
Joined: 2/11/2007
Posts: 1522
I have a Breakout and a Super Arkanoid script somewhere... haven't tried original Arkanoid again though. Also: Are savestates allowed?
I make a comic with no image files and you should read it. While there is a lower class, I am in it, and while there is a criminal element I am of it, and while there is a soul in prison, I am not free. -Eugene Debs
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
That's an interesting question. Savestates allow for less accurate control but also less awesome/stable scripts. On the other hand, savestates make life a whole lot easier and allow for certain techniques otherwise impossible.
qfox.nl
Player (120)
Joined: 2/11/2007
Posts: 1522
Maybe have two divisions, one that's purely deterministic and one that allows for testing via savestates. Tetris might be interesting (well, and I already made one :D)
I make a comic with no image files and you should read it. While there is a lower class, I am in it, and while there is a criminal element I am of it, and while there is a soul in prison, I am not free. -Eugene Debs
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I think there are plenty of bots to play games like tetris and arkanoid. Not so much for games like mario or zelda though. Don't forget this also includes snes games. Basically any emu that supports Lua is fine with me... :) But games that have a port for any platform (particulary pc) and have more than enough AI will don't seem too interesting to me. I'd like to see two bots play mario against eachother, to see who reaches the flagpole first... :)
qfox.nl
Banned User, Former player
Joined: 3/10/2004
Posts: 7698
Location: Finland
If the script is allowed to search a path by using savestates to rewind, this introduces a conceptual problem: Typically you would create the script so that you enter some kind of checkpoint. In other words "run this heuristic and search for a path until the character is at this location". After it has succeeded in that, it would then try to find a path to the next checkpoint, and so on. Obviously the farther away the checkpoints are from each other, the longer it will take for the script to find a path to it, no matter what heuristics it uses. Conversely, the closer the checkpoints are to each other, the faster the script can find paths between them. Are these checkpoints, which are hard-coded into the script, allowed? If yes, where do you put the limit on the amount of checkpoints used? In the extreme, the coder could, in theory, put a checkpoint at each frame. Or if we put that in other words: He will be able to hard-code a movie-file into the script and basically make the script just run it. Ok, so no direct movie files are allowed. But where do you put the limit? What if the author just hard-codes each second frame of the movie into the script and then uses a simple heuristic to make the script find the keypresses for the in-between frames? Still not good. What if he hard-codes each 10th frame? Each 50th frame? Basically these hard-coded frames are checkpoints. Where is the limit where checkpoints become ok?
Banned User, Former player
Joined: 12/23/2004
Posts: 1850
I think it would be easier to simply have a bot run until it either dies or completes the mission, no savestates. Otherwise, you might as well just write a random input generator and leave it running forever.
Perma-banned
Player (120)
Joined: 2/11/2007
Posts: 1522
What would be impressive in my mind is have people make a general Mario bot (or some other game) but run the competition on a specially made hack of the game that wouldn't be known before hand.
I make a comic with no image files and you should read it. While there is a lower class, I am in it, and while there is a criminal element I am of it, and while there is a soul in prison, I am not free. -Eugene Debs
Banned User, Former player
Joined: 3/10/2004
Posts: 7698
Location: Finland
One idea which could deter scripts having hard-coded data on the run they will be performing: Demand that the script must wait for a random amount of time immediately after resetting, and that it must not "remember" in any way how much time it was (ie. after it has waited for the random amount of time, it must completely forget how much time it was, ie. it must not store it anywhere). This random amount of time could be something short, like 0-60 frames. This way the script cannot rely on the game behaving always the same way, so it must complete the game purely by heuristics rather than hard-coded data.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Yeah, I like both idea's. We can easily work around this direct playback problem without loopholed rules :)
qfox.nl
Player (120)
Joined: 2/11/2007
Posts: 1522
Random delay would be easier :) Though on some games it wouldn't matter. (So just choose one where it works.)
I make a comic with no image files and you should read it. While there is a lower class, I am in it, and while there is a criminal element I am of it, and while there is a soul in prison, I am not free. -Eugene Debs
Banned User, Former player
Joined: 12/23/2004
Posts: 1850
alden wrote:
What would be impressive in my mind is have people make a general Mario bot (or some other game) but run the competition on a specially made hack of the game that wouldn't be known before hand.
Hm, interesting. :P This gives me an idea, even...
Perma-banned
Joined: 3/7/2006
Posts: 720
Location: UK
The Bomberman AI contest thing appeals highly to me.
Voted NO for NO reason
Active player (354)
Joined: 1/16/2008
Posts: 358
Location: The Netherlands
I love the bomberman tourny idea! there's going to be some rules needed though I'd like to add to the 'what is and what isnt allowed' discussion the option to simulate a (part of) a game without using actual savestates... in theory one could simulate an entire game and thus find an optimal strategy (my) conclusion: we need either a very very tight ruleset.... or simply some judges and a few guidelines (for both the judges and the players/scripters) in the end, I guess it'll all come down to someone putting some effort to getting this thing on the road (and note, it wont be me :P sorry)
TASes: [URL=http://tasvideos.org/Movies-298up-Obs.html]Mr. Nutz (SNES), Young Merlin 100% (SNES), Animaniacs 100% (SNES)[/URL]
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I think judges to determine the validity of some code (using common sense) are a must anyways. I'm thinking about prefixing a script (customized per game) that will start a game for you. That way you eliminate both the trouble of starting a game and possibibly somehow using cheats, and you can prevent any kind of speedrun movie playback emulation. I also like using (normal, not extreme) hacks of known games to prevent using an existing run for it. Or possibly just start with a savestate in a next world. The scripts needs to be generic for a game and we'll supply the required environment it needs to survive in. Game-specific rules and exception cases can't be avoided anyways. Are there any basic rules, aside from the four I've listed, that you guys think are missing? I don't mind putting up and hosting a simple website and submit system for it, but I won't have he time for it untill at least next week (probably the week after that).
qfox.nl
Editor, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
LagDotCom wrote:
The Bomberman AI contest thing appeals highly to me.
It sounds very interesting to me, too. EDIT: And not to become a "me too" post, I'll elaborate: a Bomberman bot needs to exercise many algorithmic challenges, most notably involving pathfinding.