Player (120)
Joined: 2/11/2007
Posts: 1522
I actually worked on this a bit more too and changed to something similar to what you describe. It still has a tendency to die when the ball is moving faster than the paddle can since it gets outrun. I was thinking about writing something that would instead of trying to stay under the ball, predict where the ball will be when it comes back down. Given the bricks, enemies and walls that gets super complicated. For the simplest case though where the ball is falling and will not contact anything, you can calculate this with something like: desired x location for paddle = current ball x position +- (distance left to fall)/(y speed)*(x speed)) I have memory addresses for all those values, but writing that formula in basicbot speak is giving me a headache... and this is the simplest case. throw in the other variables and it gets evil ;)
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
Player (120)
Joined: 2/11/2007
Posts: 1522
Pinball movie ... as suggested by FODA (again) Sorry to flood the forums but I'm having fun :) This one was pretty simple; check to see if the ball needs to be launched and do so when it does, then flip the flipper when the ball is close. (that's pretty much how I play too...) To play at home: A: ((mem(x7)>145)*(mem(x7)<175))?((mem(x9)>189)*(mem(x9)<226)):0 B: (mem(x7)=225)*(mem(x9)=154)*(mem(x125)!=4) Up: ((mem(x7)>110)*(mem(x7)<138))?((mem(x9)>189)*(mem(x9)<226)):0 End when: frame=1000 For A and Up, the ball's x position is x7 and y is x9, so playing with the contstants those are compared with changes the "hit box" for the flippers. If you wanted to get really fancy you could in theory turn the box into a more complex shape, but yeah, it's pinball, I think this is about as good as it gets ;)
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: 3/15/2007
Posts: 131
These are really, really cool Alden. I'd love to see more games played like this
nesrocks
He/Him
Player (241)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
I watched the pinball one. nice what about urban champion? :)
Player (120)
Joined: 2/11/2007
Posts: 1522
Thanks y'all, glad I'm amusing someone besides myself ;)
FODA wrote:
what about urban champion? :)
Wow, that's a really weird game. Never heard of it before. For those like me, it is a street fighting game (but from 1986). You have a quick punch and a heavy punch, and you can punch high or low. You can also dodge high and low. My current strategy is to run towards the opponent, when in range throw quick punches at the opposite of the where the opponent is currently blocking. In other words, if the opponent is up, punch down, and vice versa. Of course the opponent can change while I'm punching but it usually doesn't (esp early on). If the opponent punches, I try to block. BasicBot code: A: ((mem(x263)-mem(x2A3))<=17)&(mem(x321)=1) A is quick punch. Basically, the first part sees how close to the enemy I am, and the seond sees if I can throw a punch successfully. Up: (((mem(x263)-mem(x2A3))<=17)&(mem(x321)=1)&(mem(x314)=1))+(mem(x313)=3)&(mem(x312)=4) The first part, before the +, is similar to A. It checks to see if enemy is in range, if punch can be thrown, then if the opponent is "down". If it is down, then the bot holds up to punch "up"... The second part is for blocking -- essentially if the opponent is punching high and is in the part of the swing where you need to hold up to block, it does so. Down: (((mem(x263)-mem(x2A3))<=17)&(mem(x321)=1))&(mem(x314)=0))+(mem(x313)=4)&(mem(x312)=4) The opposite of Up, really. Right: (mem(x263)-mem(x2A3))>17 Moves right if you are too far away :) End when: frame=1000 as usual This bot does really well initially, then starts getting challenged, and finally dies in round 17 (I think the game is endless and stops counting at 99?) http://dehacked.2y.net/microstorage.php/info/5738/UrbnChmpBot.fcm With better strategy and some fine tuning I'm sure this bot could set a time record or some sort (though it's an incredibly boring game :( ) This game is 2 player--someone could program controller 2 with another bot and we could fight ;)
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
nesrocks
He/Him
Player (241)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
alden wrote:
This game is 2 player--someone could program controller 2 with another bot and we could fight ;)
that's an AWESOME idea!!! bot vs bot! it's like those "build your fighting bot and destroy each other", except it's just the programming :) i love it, the challenge is set hehe ps.: i can't do it :P How about then for a vs competition, the game street fighter 3 (pirate, NES)? that'd be great.
Player (120)
Joined: 2/11/2007
Posts: 1522
Yeah, street fighter 3 would probably be better for that, I think urban champion would be a block-fest ... Any other game ideas? I was working on space invaders before uc, have it so that it runs back and forth and shoots randomly, having trouble with a formula to shoot only when an invader is in range. Also dodging incoming bullets. The memory addresses seem really hacky in that game :(
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: 10/24/2005
Posts: 1080
Location: San Jose
Gradius? I know boss fights would be very tough, but it might be fun to see if you can escape enemy attacks, grab power ups, while spamming the shoot button.
<agill> banana banana banana terracotta pie! <Shinryuu> ho-la terracotta barba-ra anal-o~
Player (120)
Joined: 2/11/2007
Posts: 1522
Yeah, thought about Gradius... would be tricky with all the stuff to track on screen, but do-able (theoretically). Are there any "simpler" shooters?
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
Chamale
He/Him
Player (178)
Joined: 10/20/2006
Posts: 1352
Location: Canada
IIRC, the Mac version of Crystal Quest had a bot for the demo mode. It fired at the fastest speed possible and moved in a straight line to the nearest crystal. It had trouble getting past mines, though.
Player (120)
Joined: 2/11/2007
Posts: 1522
Mach Rider! This game is hilarious. Early NES motorcycle racing/shooting game. I picked it for the "solo" course with no other motorcycles. Here's the movie of the first track He wins but just barely ... he's trying to go 22 km before the timer runs out, and does so with 2 time units left ;) I chose to ride on the left side of the road as there were fewer oil slicks to run over, but he still hits a couple of explosive barrels. BasicBot code: A: 1000 Hold A to go fast! Up: (frame%20)=10 Up shifts up gears; this is a simple way to do it at the beginning and after the crashes. Left: ((mem(x9)>=0)&(mem(x9)<150))+(mem(x9)>204) The x location of the cycle is annoying; dead center is 0, and increases going to the right. At a certain point the number wraps around, and it increases to 255 which is just left of center... Basically this line moves left if it is to the right of where I want to be (riding the left rail) Right: (mem(x9)>150)&(mem(x9)<204) Move to the right if need be End when: frame=1000 Couldn't figure out how to find the oil slicks in memory, and gear shifting could be much better probably... I want to work on this again at some point as I think it would really cool at top speed dodging stuff, but for right now this one's frustrating me! I'm also getting distracted by other games... Thanks for watching again :)
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: 8/27/2006
Posts: 883
Maybe Q*Bert could be something you could try. Tetris could be fun too, and it would be hard to implement every strategy.
Player (120)
Joined: 2/11/2007
Posts: 1522
Yeah, Tetris hurts my brain even thinking about ;) I had briefly considered Q*Bert but your post spurred me on. Here's what I know so far: Q's position is not a traditional x/y pair of memory address, but one address that holds a different value for each cube he stands on. The top one is 4, the second to top one on the left is 11, and the one to the right is 12. For each descending row, the leftmost cube's value increases at intervals alternating 7 and 8; the 3rd row is 19, the 4th 26, and so on. Each cube to the right of these increments by 1, so the third row is 19, 20 and 21. So right there you have a pretty complex pattern for telling where Q to go... for example, what is the method of getting from location 4 to say, 52? It's doable though. The good thing is that the enemy locations are stored using the same values, so it is fairly easy to write something like "as long as the enemy is not where you are about to move, go ahead and move. otherwise, try somewhere else" The other cool thing about this is the way the game stores whether the cube has been stepped on (you have to change the colors of every cube by stepping on it). Starting with a base value of x700, if you add the value of Q's location you have the address for whether it has been stepped on. So for the top cube, look at x704. Anyone have a general strategy for completing the levels as fast as possible? My idea was to run down one edge (either one), and then go along the bottom, then work my way back to the top. I want to come back to this but I'm working on a different game right now that has my attention... Keep those ideas coming, and let me know if you want to know more about how these are done! The judicious use of bots can be helpful in any TAS in my opinion (for what that counts ;)
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: 5/2/2006
Posts: 1020
Location: Boulder, CO
Bot fighting could be interesting enough to warrant its own section. this could turn out to be a lot of fun.
Has never colored a dinosaur.
Former player
Joined: 3/23/2006
Posts: 211
hehe, bot vs bot in a fighting game could be pretty funny to watch. If you could make it run real time, playing against it might be a fun challenge for those who can complete the game too easily, too.
do not forget to *ENJOY THE SAUCE*
Player (120)
Joined: 2/11/2007
Posts: 1522
Yeah, Man vs Machine, the eternal struggle... lol won't work though (yet)... fceu allows only normal input or bot input, not both at once :( plus bot input only goes at super fast turbo mode maybe the next release ;)
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
Bisqwit and I did a few tests on Lunar Ball (before figuring out, the bonus would eventually kill us). http://tasvideos.org/forum/viewtopic.php?t=1578 I ran some tests while developing my botcode on The 3-D Battles of World Runner http://tasvideos.org/forum/viewtopic.php?t=4191&highlight=
qfox.nl
Joined: 4/30/2006
Posts: 480
Location: the secret cow level
Huffers wrote:
hehe, bot vs bot in a fighting game could be pretty funny to watch.
There was a game, one of the Virtua Fighters, I think, where you could do that... you would train an AI by fighting against it, so it could learn your techniques, style, etc., then these AIs could be made to fight against other people, or other people's AIs.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Well, just in case anyone else wants it... http://files-upload.com/265817/FCEU1.9.9BB0.3.4a.last.zip.html My last version of the BasicBot in FCEU. Works well except for segmented computation (it desyncs, so don't bother). I'm going to rewrite it from scratch after the summervacation. Note that it's compiled with an alpha-version of FCEU, in fact it was the SF project at the time of compilation (not much have changed there since then, unfortunatly).
qfox.nl
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Oh ps: the file is below the USA greencard spam, it's a Dutch site.
qfox.nl
Joined: 12/17/2006
Posts: 16
Location: New, Jersey
Titus Kwok wrote:
Huffers wrote:
hehe, bot vs bot in a fighting game could be pretty funny to watch.
There was a game, one of the Virtua Fighters, I think, where you could do that... you would train an AI by fighting against it, so it could learn your techniques, style, etc., then these AIs could be made to fight against other people, or other people's AIs.
IAMP (Immaterial and Missing Power) has something like this. PC only 2d fighting game Some group wrote a program that allowed netplay (caster) and later added a separate program (booster) that watched any matches and replays that were played while it ran in the background. You could challenge this AI as well. Someone made it watch a couple of Japanese tournaments in their entirety and released the data. Still nothing like fighting a human but orders of magnitude above the default AI and it manages to do some pretty impressive combos. actually, the source (C code) is publicly available here http://njm4558.run.buttobi.net/ its in japanese, but the link is under the header th075Booster th075Booster061205_src.zip haven't looked at it myself but someone may find that interesting. youtube has a few videos of it if you search for "IAMP booster". Being a spinoff game of a Japanese bullet hell shmup, its not that well known but quite an impressing 2d fighting game.
Joined: 8/27/2006
Posts: 883
What about a competition, like two person program their own bot to play a fighting game, and then you run the two players, and based on the memory address, it would be a fight to death :P That would be interesting.
Former player
Joined: 10/1/2006
Posts: 1102
Location: boot_camp
Sorry for the bump, but with the announcement that checkers is solved it got me wondering whether it would be a harder task for a computer (without any human assistance like narrowing the search) to find the fastest route through SMB1 or solving chess, since chess is at least 10^20 times more complex than checkers. Obviously 3D games cannot be considered at the moment because they have infinitely more routes than 2d sidescrollers.
Borg Collective wrote:
Negotiation is irrelevant. Self-determination is irrelevant. You will be assimilated.
Chamale
He/Him
Player (178)
Joined: 10/20/2006
Posts: 1352
Location: Canada
Well, if you assume you should always press right+B, and start, select, and up are unnecessary (you would need to start from a state, just after pressing start), then you have 8 possibilities per frame. That's a total of 8^17996 possibilities. Or, 2^53988. The number of possibilities is about 1 followed by 1,6500. Checkers has 500 quintillion, which is a 5 followed by 20 zeroes. Way less possibilities. Anyway, I suspect Mario would be improved by mere frames anyway. I'd rather see a bot of RCR's final boss. However, that's more than a little complex too. For each player, up, right, left, down, A, and B are necessary. That's 4096 possibilities/turn. 4096^1381 possibilities. Or, 2^16572. That's way less than Mario, but it's still a lot. 1, followed by 5000 zeroes. Maybe something really short, like NES monopoly. 256 possibilities, assuming all buttons affect luck-manipulation, or 2^3600. That number of possibilities is a 1 followed by 1080 zeroes. This all goes to show how complex a TAS is. The simplest thing has over a google google google google google google google google google google possibilities. EDIT: Now that I think about it, all improvements would probably come from the last part, thanks to the 21-frame rule. So, maybe, 6 improvable seconds. However, that's still like 1 followed by 300 zeroes. We'll have to wait years before we can bot anything, IMO.
Joined: 11/11/2006
Posts: 1235
Location: United Kingdom
Chamale wrote:
This all goes to show how complex a TAS is. The simplest thing has over a google google google google google google google google google google possibilities.
I hate to nitpick but its googol. Apart from that I found this post very... eerily informative.
<adelikat> I am annoyed at my irc statements ending up in forums & sigs