Post subject: TAS bot at AGDQ 2015 - Final Fantasy
Ambassador, Experienced player (709)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
I think Final Fantasy (the original on NES) would be a good game for NESbot at AGDQ. Because of its RNG and length an unassisted run would not be good at a marathon. A TAS tames the randomness and gets the time down to 70 minutes. It also shows off some luck manipulation strategies that are not feasible in real time. I have developed some ways around the problems with getting Final Fantasy to sync on a TASbot setup. There are several issues:
  • TASbot currently can't do hard or soft resets. I know true and maybe others are looking at this but for stability and convenience I'll make a run that doesn't need to do this. I've done some planning and it should only add a minute or two.
  • The initial RAM state matters, but true's erase cart can take care of that.
  • The battle RNG is in SRAM, so it doesn't get cleared even if the RAM is fully cleared! The solution is a little procedure at the start to determine what the value was. The counter increments every other frame in battle, so a short wait can resync once we know the wait. This means that we need a way to find the value and a way to tell it to the bot. We can find the value by getting into the first battle and holding the A button. Someone puts some info (your guy's hp after the fight and maybe some other stuff) into a web page and it tells you the number you need to know. That can get to the bot pretty easily and the bot can fix the input to compensate. The time window to get the information to the bot is at least 20 seconds depending on how that fight goes, plenty of time.
  • After the first procedure, my guys have varying hp. So depending on what shape they are in there are three different ways the first boss fight can go. After that they run from some random fights and visit an inn to get to a known state.
  • The time the fight takes varies and that affects a counter used for randomizing NPC movement. This increments every frame in the outer world, towns and dungeons. If in an area where there are NPCs then there is another part of the RNG that gets altered. So I let the counter cycle to a particular value before entering the Temple of Fiends.
  • At the first boss I add some wait frames to resync the battle RNG. After that fight the RNG is the same in every case and the input can be the same the rest of the way through.
http://s000.tinyupload.com/index.php?file_id=18013980956528089469 To demonstrate and test I've set up some lua. In this case the lua is taking the place of the fm2 and providing the input. (To make this I recorded fm2s and then parsed and converted them to lua.) In this zip file there is a dir with a bunch of lua files. You'll need them all in the same directory. Load up Final Fantasy in FCEUX and run FinalFantasy-anySramNoResets.lua. If the lua interface is the same then BizHawk should work too. What this does is hit the power button, randomize the seed and then plays through to Marsh Cave. Right now it may desync after pirates, I need to fix that fight. The other folder has the code for the web page that lets you figure out the RNG. The lua code just manages it automatically but you can see how it would work if you run the page. If we go through with this DwangoAC will help get the hardware set up but not present. I'd be willing to present but I'd like to have someone else there to help. While I can easily talk about Final Fantasy for the length of the run another person could keep me more organized and we could talk about other TAS activity. The AGDQ submission window is open until Sept. 3. Who is interested in helping out? Edit: Replaced demo package with updated code and fixed the description to match. Edit: Another demo package with a more convenient python script and an explanatory readme.
Personman
Other
Joined: 4/20/2008
Posts: 465
I really doubt they're going to give us 70 minutes.
A warb degombs the brangy. Your gitch zanks and leils the warb.
Editor, Expert player (2479)
Joined: 4/8/2005
Posts: 1573
Location: Gone for a year, just for varietyyyyyyyyy!!
How about organizing a TAS-bot charity event?
Ambassador, Experienced player (709)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
About the time, I would have have to ask for more like 80 minutes to include a little setup time. I don't think it's too long. A lot of games take that long or longer. For another thing, concentrating on one game means that there is something going on the whole time rather than messing with getting another run started and synced. It's definitely a different sort of block than last year's but I think it would be pretty neat. Having our own little event would be interesting but it is a lot of work. A separate thread would be a good way to start the discussion...
Active player (476)
Joined: 2/1/2014
Posts: 928
I think it would be cool to have incentives to have the TAS play side by side with the speedrunners for each different game
Ambassador, Experienced player (709)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Race vs TASbot would be cool. Not possible here because like I said, a real-time FF run would be terrible for a marathon. I am quite impressed by the realtime Crystalis runs and it would be a blast to watch a realtime runner race my Crystalis run. That game is way too laggy to sync on a bot though. As far as donation incentives, we can do names for starters. I already have an input generator that makes the input for any name and then the names don't affect timing. Another possibility is for me to make a white mage run and switch to that on a bidding war or incentive. Now that I think of it, another area I could use some help is an encoder to make a hype video.
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
If only you could tell people what's going on, and what it took to set everything up, an PRG run that takes fourth the unassisted time will be good. However people may get disappointed there isn't a new groundbreaking present like SMW ACE. Or is there?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Editor, Skilled player (1536)
Joined: 7/9/2010
Posts: 1319
At ESA2014 Tompa showed a WIP of a ACE playaround of SMB3 by Lordtom. If the final TAS is done just in time, we could show this one.
Favorite animal: STOCK Gt(ROSA)26Sortm1.1(rtTA,EGFP)Nagy Grm7Tg(SMN2)89Ahmb Smn1tm1Msd Tg(SMN2*delta7)4299Ahmb Tg(tetO-SMN2,-luc)#aAhmb/J YouTube Twitch
Editor, Player (69)
Joined: 1/18/2008
Posts: 663
I don't think NESbot will ever be capable of running this. Let's not confuse names please. That said, I think the run is too long for marathon to hope you don't get a desync because of EMI or some other factor.
true on twitch - lsnes windows builds 20230425 - the date this site is buried
Chamale
He/Him
Player (182)
Joined: 10/20/2006
Posts: 1355
Location: Canada
The NES seems less reliable with TASbot than other consoles, particularly because the hardware is more variable than later Nintendo systems. If you'd like to show off a long run, I think it would be much better to choose a game on the SNES or N64 to have a better chance of synchronization.
Ambassador, Experienced player (709)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Doesn't look like anyone checked out the demo I posted. I don't know all the differences between the bots, but Final Fantasy has very simple and consistent timing. We can account for every controller polling. EMI could still be a problem but we can experiment to see how it does. The method to adapt to the unknown initial state is pretty neat as is setting the names on demand. We could also start up Final Fantasy and leave it playing on the side while we do SMB3, ACE playaround or something on SNES. If it is still running we can go back to it between runs and at the end. This would work really well with a white mage FF run where there are a lot of slow parts before a really awesome ending. As for whether the time is too long or not, we can put several games in the submission or make multiple submissions and work with the organizers on what they think.
Player (146)
Joined: 7/16/2009
Posts: 686
TheAxeMan wrote:
The method to adapt to the unknown initial state is pretty neat as is setting the names on demand.
Unless you (magically manage to create a movie file that sets the state to a known one, regardless of starting state, this is unlikely to ever work. Sure, you can figure out what the initial state is at some point, but that doesn't help. You'd have to adjust the entire movie file, load the new one into the bot and then reboot the console, at which point you're more than likely to have a completely different state already. Also, seventy minutes is simply too long. Gradius should have synced too (hell, it did in the tests), but during the marathon there's simply too much electronics around. EMI will mess stuff up. Disclaimer: This is what I think is true. It's quite possibly plain wrong, but I didn't want to write "I think" every sentence. Though this disclaimer was probably just as much work. Oh well.
Ambassador, Experienced player (709)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
Scepheo wrote:
You'd have to adjust the entire movie file, load the new one into the bot...
This assumes that you need to play from a movie file. We can change the bot to run from a different program that changes based on the value set in the startup procedure. Running the lua scripts I posted earlier can get you in the mindset of thinking about more than just one movie file driving a run. The bot setups I have seen, particularly last year's AGDQ, don't seem to have thought about EMI at all. Putting the bot board in a metal enclosure and shortening the controller wires to a minimum should make a huge difference.
Joined: 7/2/2007
Posts: 3960
I'm gonna have to agree with the people saying that, technical feasibility aside, FF1 is too long to show off at AGDQ. I'm sure there'd be a decent number of people present who would enjoy seeing the game get blitzed down by a low-level warrior, but we're still talking 70 minutes of slow dungeon crawling punctuated by frequent pointless battles and the occasional basically-predictable boss fight. In other words, FF1 is one of those games where, even when you TAS it, the results don't look impressive to the uneducated eye. Consider that the purpose of the TAS block of AGDQ ought to be a combination of entertainment and education about what TASes can do. Thus the games chosen should be, well, denser than FF1 is. More obviously TASed, more action, more variety in what TASing accomplishes, and over sooner so another game can be shown off.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Post subject: EMI can be overcome but not length; concurrency is likely
Moderator, Senior Ambassador, Experienced player (907)
Joined: 9/14/2008
Posts: 1014
I'd like to chime in on a couple of points. As noted, we definitely ran into interference during the Gradius run. There were a lot of factors that went into that but I think the biggest issue is that the microphone wires were draped over the top of the controller cable and we weren't on any kind of "safe" surface at all (ROB was sitting on a flimsy stool). During the bonus stream we put everything on a rolling metal cart and while the cart was way too large it served the purpose very well. We had no issues syncing Zelda II and I'm confident we can overcome the EMI problems, or at least test for them in different environments prior to the marathon to know what to expect. I hope to get a FF1 cart this week to start initial testing. Regarding the run length, when TheAxeMan and I started discussing this run the submission window had not yet opened but seeing what's going on with arguments over Final Fantasy Tactics getting in I'm now a little less convinced that *any* Final Fantasy game will make it in this year. I now feel that the only way to present this properly is as part of a larger block where we kick this off on one screen and let it play while we move on to something else and come back to it at the end. For that purpose, perhaps the white mage run / a run with the boss punchline would be more suitable. I will be making a separate post to discuss overall TASVideos involvement at AGDQ2015 as well as my own involvement at the marathon (or lack thereof depending on available funds and whether I decide to try doing fundraising, but I digress). I'd love to see Final Fantasy make it in but I want to make sure we offer Mike and team a reasonable selection of TAS options to pick from depending on how full the schedule ends up being by September 3rd. Thanks for the feedback everyone, A.C. ******
I was laid off in May 2023 and became too ill to work this year and could use support via Patreon or onetime donations as work on TASBot Re: and TASBot HD is stalled. I'm dwangoAC, TASVideos Senior Ambassador and BDFL of the TASBot community; when healthy, I post TAS content on YouTube.com/dwangoAC based on livestreams from Twitch.tv/dwangoAC.
Ambassador, Experienced player (709)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
I'd like to thank everyone for their feedback. A TAS on Final Fantasy is probably more of a conceptual work of art that is more entertaining to create than watch. So when dwangoAC asked if I'd be interested I was excited about having an excuse to hack into FF again and do some interesting scripting in three different languages. I have to admit that I often have trouble watching my runs play back without falling asleep. I'd still be willing to attend and help present or whatever and I hope there's a place somewhere for a TAS at Final Fantasy. We have almost two weeks of submission window left so we can discuss other options when dwangoAC starts his thread.
Editor, Player (69)
Joined: 1/18/2008
Posts: 663
Chamale wrote:
The NES seems less reliable with TASbot than other consoles, particularly because the hardware is more variable than later Nintendo systems
I'm sorry; what? If you know something about my bots (that everyone calls TASbot now) that I don't I'd like to know?
TheAxeMan wrote:
The bot setups I have seen, particularly last year's AGDQ, don't seem to have thought about EMI at all. Putting the bot board in a metal enclosure and shortening the controller wires to a minimum should make a huge difference.
Yeah, should be enough really. My MultiReplay bot may be more susceptible to EMI than the old bot (or maybe not) but if the old one is manipulated to do this run, it should work well with shorter cables.
true on twitch - lsnes windows builds 20230425 - the date this site is buried
Chamale
He/Him
Player (182)
Joined: 10/20/2006
Posts: 1355
Location: Canada
True wrote:
Chamale wrote:
The NES seems less reliable with TASbot than other consoles, particularly because the hardware is more variable than later Nintendo systems
I'm sorry; what? If you know something about my bots (that everyone calls TASbot now) that I don't I'd like to know?.
I think it's an issue with the console and not the bots. NES consoles are older and have more variation between individual units, and TASbot had more synchronization problems at AGDQ with the NES than with the other consoles. I've also heard there are more issues with runs that sync on one NES failing to sync on models that should be identical, but as the others pointed out EMI may be the cause of the problems at AGDQ.
Editor, Player (69)
Joined: 1/18/2008
Posts: 663
Chamale wrote:
True wrote:
Chamale wrote:
The NES seems less reliable with TASbot than other consoles, particularly because the hardware is more variable than later Nintendo systems
I'm sorry; what? If you know something about my bots (that everyone calls TASbot now) that I don't I'd like to know?.
I think it's an issue with the console and not the bots. NES consoles are older and have more variation between individual units, and TASbot had more synchronization problems at AGDQ with the NES than with the other consoles. I've also heard there are more issues with runs that sync on one NES failing to sync on models that should be identical, but as the others pointed out EMI may be the cause of the problems at AGDQ.
You are misinformed and working on hearsay. Additionally, your thoughts on this subject are wrong. Perhaps the mentioning of differences of console on-screen is confusing you, because it confused them too - if an NES run syncs on a production NES, it will sync on any production NES. My original replay device (which is not called TASbot by the way and is not limited to playing back TAS) only plays NES and SNES. The reason there were more NES problems, and specifically on only one game, are possibly because there was more screen time for NES so more chance to run into problems. The problem was not related to console variation.
true on twitch - lsnes windows builds 20230425 - the date this site is buried
Post subject: I'm now convinced TASBot isn't a thing - TASBot is a person.
Moderator, Senior Ambassador, Experienced player (907)
Joined: 9/14/2008
Posts: 1014
I may have propagated the idea that the console itself was at fault as we tried Gradius on a top-loading NES first and it failed at which point I stated that it may have been the console as I had only tested with front-loading consoles. We later swapped to the front-loading NES and it failed there as well. With as much testing as I've done since AGDQ 2014 I'm fairly convinced that it had way more to do with the interference from everything else around the controller cables, the console, the Raspberry Pi, and the replay board itself. Regarding the name, I had a discussion with several people on IRC about this. When true released his board he called it true's NES / SNES Replay Device. I subsequently hacked together a Lego case and put it on ROB and dubbed it ROBBerry Pi. Then, due to being frazzled because of last-minute issues and being in front of 60,000 people I proceeded to do an absolutely horrible job of introducing who TASVideos was, who I was, and what the name of the bot was. Later, GDQMonitor and Masterjun's SMW executes arbitrary code submission both referred to the combination of true's replay board, the Pi, and ROB as "TASBot". (As an aside, there was previously an unrelated project named TASBOT but no new development appears to have happened on it in over a year.) TASBot as a "person" has become something far larger than I ever imagined. There's fanfic out there about GDQMonitor (apparently a girl) and TASBot having an ongoing relationship. The SDA community seems to refer to TASBot about the same way the Nico Nico Douga community references TAS-san (TASさん, known as "Mr. TAS"). I know true has never particularly felt comfortable with calling his board "TASBot" and at this point I think the name transcends any particular replay device. I've come to think of TASBot as the combination of ROB holding a controller or board and participating in his favorite pastime, playing games perfectly in front of a TV and a loving audience. What could be better? A.C. ******
I was laid off in May 2023 and became too ill to work this year and could use support via Patreon or onetime donations as work on TASBot Re: and TASBot HD is stalled. I'm dwangoAC, TASVideos Senior Ambassador and BDFL of the TASBot community; when healthy, I post TAS content on YouTube.com/dwangoAC based on livestreams from Twitch.tv/dwangoAC.
Post subject: Re: TAS bot at AGDQ 2015 - Final Fantasy
Editor, Player (69)
Joined: 1/18/2008
Posts: 663
Warp the Post Deleter Supreme wrote:
TheAxeMan wrote:
TASbot currently can't do hard or soft resets.
Just keep it that way. No need to ruin yet another cool project.
I don't understand this "ruination" part? My new replay device has aux IO for specifically doing things like this. It even supports its own voltage rail if desired (up to 6V). Here are my ideas for hard/soft reset:
  • Hard reset is simply an output signal that goes high/low depending on if the run is running. Basically I already have this with the "RUN" LED which is lit while running and off when done. So what would happen would be any run with hard reset / power cycle would be split into multiple runs, and the run segment would end by immediately signaling this output, which can then control a relay or other device to turn the console off. In the case of NES, one would need to wipe console memory before loading the next portion of the movie. I made a cart to do just that.
  • Soft reset is trickier. The way I am proposing is using an actuator to actually hit the button as it involves no additional wires to the console and for a casual observer it looks more impressive. This is again simply an aux output.
How would supporting this "ruin" my project?
dwangoAC wrote:
TASBot as a "person" has become something far larger than I ever imagined.
While I don't fully agree in the case of this thread, in general I understand and agree with you.
true on twitch - lsnes windows builds 20230425 - the date this site is buried
Experienced player (608)
Joined: 10/23/2004
Posts: 706
dwangoAC. I was discussing with Micro500 an idea I had for Mario Kart 64. the idea is to do a four player run where I setup a very difficult scenario on Choco Mountain and then hand the controllers over to some human players to see how well they fare. I would move the three boulders so that they are bouncing around on the main course and then lay bananas / shells all over the place. I think it would be a good demonstration of the relationship between TAS and speedrunning. How does that sound?
Current Project: - Mario Kart 64
Skilled player (1741)
Joined: 9/17/2009
Posts: 4981
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Even if this may not get accepted for the event, can a proof of concept of sorts video still be done? It would be amazing seeing the white mage TAS on console. :)
Editor, Player (69)
Joined: 1/18/2008
Posts: 663
Because of time constraints the one on the site likely wouldn't be there; a modified run without hard/soft resets is being worked on by TheAxeMan it seems. We're trying to get it to run. The concept itself really shows how far TAS can go though. Using a script to generate input based on a battle in the game in order to get it to sync with console. Pretty cool...
true on twitch - lsnes windows builds 20230425 - the date this site is buried
Ambassador, Experienced player (709)
Joined: 7/17/2004
Posts: 985
Location: The FLOATING CASTLE
http://s000.tinyupload.com/index.php?file_id=18013980956528089469 There is an updated pack of code for the next time we want to try. I included a python version of the script that figures out the rng based on battle results and there are some instructions. Anyone else with a bot and Final Fantasy please feel free to try.