Cooljay
He/Him
Active player (397)
Joined: 5/1/2012
Posts: 468
Location: Canada
Thank you for you for reply Bisqwit, I was actually talking about the FCEU bot. It's interesting watching feos' encode of it playing Super Mario Bros. Always wondered what goes on the bot's mind and how he sees the world code wise. Overall I still was interested how the other bots work. It's amazing how to see how they interpret incoming information to logically react to it. The parsing part does sound difficult. It always seems very challenging for a bot reacting to the context of a sentence. To get the right reaction. It typically takes knowing the person that is talking to make general sentences that could work in subject to that certain person. Another issue is lack of opinion as well typically too. For example someone could mention they might like a certain game, movie or song. The bot won't say a negative or positive thing about it. Like their "favorite" boss in Mega Man if someone mentions Mega Man. I do appreciate that you took the time out of your day to explain how it all works out. I find they do have some good potential of doing some amazing things all in all. They do save some time doing tedious work.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Cooljay wrote:
Thank you for you for reply Bisqwit, I was actually talking about the FCEU bot. It's interesting watching feos' encode of it playing Super Mario Bros. Always wondered what goes on the bot's mind and how he sees the world code wise.
Oh. Well, like so: 10 Play 70 frames with random input. 20 Evaluate progress 30 If progress was better than the last time, remember this input 40 Load savestate 50 Repeat 10-50, some 100000 times 60 Play the first 20 frames of the chosen (remembered) input 70 Make savestate 80 Goto 10 That was pretty much the core of all of my bots. The number of frames and the number of retries and the definition of "random input" and the means for evaluating progress varied depending on task/game. In SMB1, progress would be defined by the difference of Mario's X coordinate to his X coordinate when the save was made, and to lesser degree, the number of points, and to bigger degree, whether Mario died. In Rockman1, it would be defined by the framecount where the desired bonus item appears, among other things, or in the case of the Wily2 glitch navigator, same as above. Random input would generally contain a small array of possible inputs (left, right, left+a, right+a, right+b+a, and so on), and it would pick an input from that array, stick to that choice for a few frames (generally 1-20), then choose another. Or, every frame, it would have some 10% chance of toggling some button.
Cooljay wrote:
Another issue is lack of opinion as well typically too.
I found out that a simple coin toss between "rulez" and "sux" worked very well (rigged such that the chance for dissing was only about 10 %). Of course, it would be random and worthless, but the idea was not really that the bot had a personality and opinion. It was just for the fun of it.
Editor, Experienced player (570)
Joined: 11/8/2010
Posts: 4036
Bisqwit, I'm impressed by the way your bot plays through the levels of Super Mario Bros. It even did some tricks in 1-3 with collision detection that a human would have trouble pulling off. How does BisqBot know to enter pipes to save time? Is D-Pad down part of the "random input" the bot uses on top of a pipe?
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
CoolKirby wrote:
How does BisqBot know to enter pipes to save time? Is D-Pad down part of the "random input" the bot uses on top of a pipe?
The pipe entry event (among a few others, such as grabbing a mushroom) was given a high reward score in the evaluation, and yes, it tried the down-button once in a while (though I may have manually inserted the button into its list of buttons combinations for a moment).
Language: C++

/* GAME MONITORING */ /* A, X, Y, PC correspond to the values of the CPU registers. */ if(PC == 0x8082) { unsigned MarioXPos = RAM[0x86]; unsigned MarioYPos = RAM[0xCE]; unsigned ScrollBegin = RAM[0x73F]; state.MarioY = MarioYPos; unsigned MarioScreenX = (unsigned char)(MarioXPos-ScrollBegin+256); unsigned MarioX = MarioXPos; if(state.NFrames++ > 0) { //fprintf(stderr, "MarioX = %u\n", MarioX); state.MarioMovement += (signed char)(MarioX - state.PrevMarioX); } state.PrevMarioX = MarioX; } if(PC == 0xB04C) // magic_jT9+2 { //fprintf(stderr, "JT9 with A=%02X\n", A); switch(A) { case 1: // auto climb case 2: // enter horiz pipe case 3: // enter vert pipe case 4: // slide flagpole down case 5: // victory case 9: // eat mushroom case 12: // eat flower state.Entry.Set(A); break; case 10:// eat damage case 11:// eat death state.Damage.Set(A); fprintf(stderr, "Pit (a=%u)\n", A); state.Pit=1; break; case 0: // regen level case 7: // start level { state.Pit = 0; state.MarioY = 128; break; } case 8: // normal level activity { state.Active = 1; int MarioYPos = state.MarioY; if(!state.Pit && MarioYPos >= 0xF0 && MarioYPos <= 0xFF) { state.Pit = -1; // ignore, it's screen top } else if(state.Pit < 0 && MarioYPos < 0x60) state.Pit = 0; else if(!state.Pit && MarioYPos > 0xC0 && MarioYPos < 0xFF) { state.Pit=1; fprintf(stderr, "Pit (y=%u)\n", MarioYPos); } break; } } } if(PC == 0xCFEC) { state.Entry.Set(15); // Killed koopa } .... unsigned long long BisqBotEvaluate(unsigned FrameNo) { //fprintf(stderr, "Joypad=%02X\n", RAM[0x6FC]); /* fprintf(stderr, "Evaluate %u, movement=%d, %u frames, nextchange=%u\n", FrameNo, state.MarioMovement, state.NFrames, NextChange); */ if(!state.Active) return 912*1000000ULL; state.Active = 0; if(state.Pit > 0) return 0; // dead unsigned score1 = 0; /* for(unsigned a=0; a<6; ++a) score1 = score1*10 + RAM[0x7DD+a]; //fprintf(stderr, "score1: %u\n", score1); */ unsigned movescore = state.MarioMovement + 512; unsigned goalscore = state.Entry.Count() * 2048; return (movescore + goalscore) * 1000000ULL + score1; } unsigned char BisqBotInput(unsigned FrameNo) { if(state.Entry.Count()) return 0; //if(FrameNo >= 4) return K_A + K_B + K_R; static const unsigned char InputTable[] = { K_R, K_R, K_R, K_R,/* K_R, K_R, K_R, K_R, K_R,*/ K_L, 0 }; static unsigned LastInput = 0; static unsigned A_State = 0; static unsigned B_State = K_B; unsigned char Input = 0x00; if(!NextChange) { LastInput = InputTable[ GetRnd<sizeof(InputTable)>() ]; NextChange = GetRnd<10>(); } else --NextChange; /*B_State = K_B;*/ /* if(B_State) { if(GetRnd<100>() < 1) B_State=0; } else { if(GetRnd<100>() < 95) B_State=K_B; } */ if(GetRnd<30>() == 0) B_State = K_B; else B_State = 0; if(GetRnd<20>() == 0) Input |= K_U; if(GetRnd<20>() == 0) Input |= K_D; /* if(!GetRnd<20>()) { Input |= K_D; if(GetRnd<5>()) Input &= ~(K_R | K_L); } */ if(!state.JumpRemain) { if(!NextJump) { state.JumpRemain = GetRnd(1+GetRnd<6>()); NextJump = GetRnd<10>() + 1; } else --NextJump; } Input |= LastInput; if(state.JumpRemain) Input |= K_A; Input |= B_State; return Input; }
Editor, Experienced player (570)
Joined: 11/8/2010
Posts: 4036
Oh, that makes sense. I assumed the random input was unweighted, but that approach wouldn't have made a good run with this game. Why does the bot get hung up on the stairs in 2-3 for so long? I watched the controller input graphic and it looked like the jump button was not pressed for a long period of time. Mario's X-position was barely changing or not changing at all, and he was running left and right into an immovable object.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
CoolKirby wrote:
Why does the bot get hung up on the stairs in 2-3 for so long?
I don't have the video here at my hand, but there were a few situations like that where no matter what it did, it ended up suffering a way or another. The randomness just did not produce good enough input to survive an incoming monster or a pit. So instead, it kept choosing input that is safe or inches Mario forward by a subpixel. Remember it did not evaluate just the input that you see in the movie; it evaluated the following 240 frames. In order for a small number of frames of input to be chosen, it would have to not die during the whole 70 or 240 frames of input it had randomly generated. This mechanism was to ensure that it won't i.e. greedily accelerate into a pit or a monster with no chance of stopping in time. It tried to anticipate upcoming situations. However there were situations where it was next to impossible to come up entirely randomly with input that makes Mario survive for the whole upcoming 70-240 frames. That's where you see the dithering phenomenon.
Editor, Experienced player (570)
Joined: 11/8/2010
Posts: 4036
The encode I watched was this one, which shows from 1-1 to the beginning of 4-1. The part I was talking about starts at 5:04. It looks like the bot moves the screen about a pixel or two forward about every 70 frames, which is what it's supposed to do.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
CoolKirby wrote:
The encode I watched was this one, which shows from 1-1 to the beginning of 4-1. The part I was talking about starts at 5:04. It looks like the bot moves the screen about a pixel or two forward about every 70 frames, which is what it's supposed to do.
I see. I have no idea what kind of hazard it was predicting in that situation. Possibly the left button was given too high chance in that situation, and consequently whenever it did try jumping it made negative progress. I can't remember. EDIT: Or, that may have been before I created the special if-condition seen above that distinguishes disappearing to the top of the screen from disappearing into a pit, and it thought it was dying whenever it jumps too high.
Joined: 8/3/2008
Posts: 254
Can anyone give me tips on how to get 100 coins in Dire Dire docks?
Guernsey Adams Pierre
Cooljay
He/Him
Active player (397)
Joined: 5/1/2012
Posts: 468
Location: Canada
Guernsey wrote:
Can anyone give me tips on how to get 100 coins in Dire Dire docks?
This is a Q&A topic between users and Bisqwit not a help topic *sigh* anyways http://www.gamefaqs.com/n64/198848-super-mario-64/faqs/39039 CTRL F 9.07
WST
She/Her
Active player (489)
Joined: 10/6/2011
Posts: 1697
Location: RU · ID · AM
Congratulations on having exactly 3333 subscribers on Youtube right at this moment :-p
S3&A [Amy amy%] improvement (with Evil_3D & kaan55) — currently in SPZ2 my TAS channel · If I ever come into your dream, I’ll be riding an eggship :)
Editor, Expert player (2330)
Joined: 5/15/2007
Posts: 3933
Location: Germany
Dear Bisqwit, I have watched a video of yours about a NAO bot. Apparently that video is already over 1 year old? I was wondering if you did anything interesting with your bot.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
WST wrote:
Congratulations on having exactly 3333 subscribers on Youtube right at this moment :-p
Thank you! Hmm, I had planned to celebrate that number somehow, but I missed it. (Can't make a worthwhile video from scratch in just a day.) Oh well.
MUGG wrote:
I have watched a video of yours about a NAO bot. Apparently that video is already over 1 year old? I was wondering if you did anything interesting with your bot.
Yes, I uploaded it soon after recording it, but I published it only a year later, when I had published another video that features the robot in a minor role. In that video I merely used it as a stative, holding a flashlight. It also recorded video, but the video ended up being unusable for the most part. I haven't done much with the robot yet. Time and priorities and stuff. I am currently programming some computer vision to it, attempting to recognize a Go board.
WST
She/Her
Active player (489)
Joined: 10/6/2011
Posts: 1697
Location: RU · ID · AM
Bisqwit wrote:
WST wrote:
Congratulations on having exactly 3333 subscribers on Youtube right at this moment :-p
Thank you! Hmm, I had planned to celebrate that number somehow, but I missed it. (Can't make a worthwhile video from scratch in just a day.) Oh well.
Don’t worry, your chances to not miss your 7777th post to the forum are still good :)
S3&A [Amy amy%] improvement (with Evil_3D & kaan55) — currently in SPZ2 my TAS channel · If I ever come into your dream, I’ll be riding an eggship :)
Experienced player (690)
Joined: 11/23/2013
Posts: 2233
Location: Guatemala
Excuse me Mr. Bisqwit... Do you like cookies? Also, what does precursor mean?
Here, my YouTube channel: http://www.youtube.com/user/dekutony
WST
She/Her
Active player (489)
Joined: 10/6/2011
Posts: 1697
Location: RU · ID · AM
Kurabupengin wrote:
Also, what does precursor mean?
Google Translate
S3&A [Amy amy%] improvement (with Evil_3D & kaan55) — currently in SPZ2 my TAS channel · If I ever come into your dream, I’ll be riding an eggship :)
Noxxa
They/Them
Moderator, Expert player (4125)
Joined: 8/14/2009
Posts: 4090
Location: The Netherlands
WST wrote:
Kurabupengin wrote:
Also, what does precursor mean?
Google Translate
"Precursor" in English translates to "Precursor" in Spanish. Who'd have thought? Precursor means "something that happens before something else", or in this case, "the person who owned/administrated this site before the current owners/admins". Bisqwit is after all the site's founder and its administrator for its first five years.
http://www.youtube.com/Noxxa <dwangoAC> This is a TAS (...). Not suitable for all audiences. May cause undesirable side-effects. May contain emulator abuse. Emulator may be abusive. This product contains glitches known to the state of California to cause egg defects. <Masterjun> I'm just a guy arranging bits in a sequence which could potentially amuse other people looking at these bits <adelikat> In Oregon Trail, I sacrificed my own family to save time. In Star trek, I killed helpless comrades in escape pods to save time. Here, I kill my allies to save time. I think I need help.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Kurabupengin wrote:
Excuse me Mr. Bisqwit... Do you like cookies?
Sure why not. As much as anyone really, I believe. Now in Finland, the "cookie" would be understood to mean either gingerbread, or then those factory-made crackers that contain wheat, water, sugar and half-dozen E-codes. In Finland (and other Nordic countries), gingerbread cookies are often made on Christmas time, and they are thin and brittle, and often decorated with glaze. I'm not particularly fond of them.
Joined: 8/3/2008
Posts: 254
Can anyone show me how to do the water skip in DKC3?
Guernsey Adams Pierre
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Guernsey wrote:
Can anyone show me how to do the water skip in DKC3?
Maybe they can, maybe they cannot. Since your question is addressed to Anyone, maybe you meant to ask in the Ask Anyone thread instead!
Joined: 10/23/2009
Posts: 545
Location: Where?
Dear Bisqwit, I've discovered that you've done a disassembly of Megaman. I'm curious! I'd like to know what extent is your knowledge about megaman. :) Is it close to like Fusoya with Super Mario World... Or Giangurgolo with Super Mario RPG?
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
niamek wrote:
I've discovered that you've done a disassembly of Megaman. I'm curious! I'd like to know what extent is your knowledge about megaman. :) Is it close to like Fusoya with Super Mario World... Or Giangurgolo with Super Mario RPG?
Probably not up to the level of knowledge of Fusoya re: SMW. I do not know about this Giangurgolo guy. But I probably do know or have the resources to acquire the knowledge about most that there is to know about that game. Some little details, like most of the code in bank 6, is rather uncharted. And I can't remember why the split-screen phenomenon happens after a certain glitch state.
Editor, Skilled player (1440)
Joined: 3/31/2010
Posts: 2109
Bisqwit, your predictions for the world cup?
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
scrimpeh wrote:
Bisqwit, your predictions for the world cup?
I don't even know who are playing. Sports is kind of modern day idolatry... Which makes sense, considering where the origins of sports phenomenon is (Greek, Hellenism).
Editor, Expert player (2479)
Joined: 4/8/2005
Posts: 1573
Location: Gone for a year, just for varietyyyyyyyyy!!
Bisqwit wrote:
Sports is kind of modern day idolatry...
Could you elaborate? Does this apply to speedrunning and Go too? Isn't pretty much every aspect of human culture "kind of" idolatry?