Posts for tom_mai78101
1 2 3 4 5 6 7
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
Samsara wrote:
So, I decided to look into the Reputation system to see what was happening with it.
WOW! We finally have some new data to work with. I never knew that the reputation is split into total accumulative reputation and current area reputation. No wonder I couldn't find where the reputation is at in the RAM, because I assumed the reputation score is calculated as is and assumed it's stored in 1 place. This is definitely going to be helpful, and I'll definitely improve my run next time. And here, I thought we wouldn't be able to get a sub-10 minutes TAS run... Now I think it might be possible.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
River City Ransom Director & Miracle Kidz President Passes Away https://www.nintendolife.com/news/2022/09/river-city-ransom-director-and-miracle-kidz-president-passes-away Might be relevant to this thread. I don't know.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
Darkman425 wrote:
Huh. Today I learned that the Japanese version of RCR EX had a semi-official update patch. Wonder what got changed in it. https://twitter.com/gosokkyu/status/1565965970669473792 https://twitter.com/gosokkyu/status/1565966510312783872
This is the 2007 Special version of River City Ransom EX mod (also known as the River City Ransom EX 2007). Gameplay here: Link to video All special techniques (as well as the soundtracks) in this mod: Link to video It plays completely different from what the original RCR EX GBA version was like. New special moves, new special bosses, more cutscenes, boss-only fight modes, etc.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
An update to the random number generation counter (RNG counter, or RNG for short). When observing the RAM Watch, you tend to notice that, depending on what is displayed on the screen, the decrementing speed varies. The best option to go for when attempting to optimize the Lotto Tix winnings, so you get the winnings earlier, is by utilizing how many AI enemies and your ally on the screen at this point of stage. Ideally, you want all 5 NPCs on the screen. Each NPC action will decrement the RNG by 1. If you have 5 NPCs on the screen, it will decrement by a factor of 5 or more, if the actions it chooses to do branches off immediately on the next frame. However, skipping some decremented RNG values have a side effect where you would lose your winnings if not carefully managed.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
tom_mai78101 wrote:
Samsara wrote:
I'm having trouble figuring out why this run was submitted. It's the same category as #7569: Chamale's GBA River City Ransom EX "alternate final boss" in 10:09.75, but nearly 20 seconds slower. The strategy change, while interesting, does not make up for the time loss in terms of how we judge submissions. Is there a possibility that this strategy could be optimized further and become the fastest run for this category? If so, is that being worked on in any way?
Currently working on this one to improve it faster.
Hello, As mentioned previously, I can finally let you know that I now have an improved version of this run, still using warps and a much faster RNG manipulation. New time: 10:07.11. Used the same ROM, same core and BIOS. User movie #637953535457794582 Link to video I shall wait for the judge to update my submission.
arkiandruski wrote:
What is the "Secret Events" mentioned in the submission text?
Requesting for my new TAS run to replace the current submission, please.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
Updated the bot v0.1.4 to allow anyone to modify the mutation rates. Also, I made some changes to explain how the mutation rates and the input weighted values work together. Tomorrow is the deadline for me to pause development on the bot. Xenoblade Chronicles 3 comes out, and I'll be spending more time focused on that game. Until I see big upstream changes requiring me to fix this bot, I probably won't come back to work on the bot, until I beat XB3.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
slamo wrote:
I've tested this a bit and it does indeed save the correct attempt! I'll play around with this more in depth and see what I can come up with, thank you for your efforts. I'm not sure if you know about this or if it looks normal for you, but the GUI looks fairly messed up to me: Some of the objects are on top of each other. It's still completely usable though.
I decided to use my work computer which is running Windows 11, and see if I can fix the UI layout on that machine. But I didn't see anything strange, nor change anything in the code. Please check the release for v0.1.3, and see if the build I posted there helps solve the UI issue you're facing. Let me know if anything. There are 2 builds, one is built on Windows 10 (denoted as "win10"), and the other is built on Windows 11 (denoted as "win11").
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
New build.
  • Fixed issue where you can't do negative values to do comparison checks.
  • Added upstream fixes with loading BOT files for wrong games.
  • Use unsigned long integers (unsigned 64-bit integers) for address values.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
UPDATE: Apparently, it was partially my fault for not explaining how the bot keeps track of the best attempts during the botting process. I'll be adding this info to the OP shortly.
New build is released. Some notes:
  • The bot is not backwards-compatible with BizHawk v2.8 stable release and below, because of a change to services loader to skip loading services, if conditions aren't satisfied. (TASEmulators/BizHawk@d796210)
    • Unless this fix is backported to BizHawk v2.8, the bot is exclusive to the development builds and BizHawk v2.9 for the foreseeable future.
  • It is possible the issue you may be having with < and <= not evaluating correctly is due to this same Github issue mentioned earlier.
    • The configuration file stores the information of what data types you use when you attempt to bot your recordings. With no bugfix, the configuration file will always be corrupted, and therefore all saved user preferences will be reverted to the default settings. By default, the bot will assume you are looking at the address values of size 1 byte, and will always do comparison checks with that data size. You may need to manually (re)set the data size back to 2 or 4 bytes, and also toggle whether to use Little Endian or Big Endian, when doing comparison checks where the numbers are going to be higher than 128 or lower than -128.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
slamo wrote:
Still having some problems with the GUI. I forgot to mention last time that I've gotten this error ever since it got ported to an external tool: Here's the full contents of the error window: https://pastebin.com/ZwEZ97cE The GUI issue may be related to this, not sure. I can press continue and get a window identical to the one I posted yesterday - notice how it also has the wrong title on the window. Stretching the window out doesn't help. Maybe this is a Windows 11 problem. I'm also still not getting any best results when I start with a cleared state and use < or <=. The value option works now, though.
According to YoshiRulz,
OpposingDirPolicy
is a property that doesn't exist in 2.8 stable, and was added to 2.9 dev builds. (Which I also didn't know until now myself.) I can make a new build for 2.8 stable, and will add it to the OP later on.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
Adelikat proposed an A/B Test, using the Basic Bot to compete with my GA Bot. The simple goal is to get Mario move/jump the farthest from its starting position within 30 frames, in Super Mario Bros. NES of World 1-1, using core NESHawk, with the following bot parameters: Each test took around 15 minutes to do. Each test only checks the Main Value set to the address of 0x0086, using the comparison type >=. The test stops exactly at 30,000 frames. A/B Test Results: Basic Bot: Genetic Algorithm Bot: Thus far, I think this benchmark is the first bot comparison baseline. My bot moved Mario more than the Basic Bot by 5 more pixels to the right. I think it looks promising. On an unrelated note, I found 3 UI bugs, so I gotta go fix those.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
UI fixes will come in the next build. If the tweaks aren't working, you might have to increase the window's width and height (or maximize it). OP is updated.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
UPDATE 1: New build is out. Please see OP, and disregard the contents below.
Update on the progress. I believed I have finished porting the bot code over to a new project as an external tool. As mentioned before, I gutted the genetic algorithm library completely from the bot, because it runs multithreaded tasks in the background to calculate the fitness values, and you know what they say how multithreading things can introduce desynchronizations in the TAS recording. Thus, this external tool is single-threaded. The current progress is pushed to this repository here: https://github.com/tommai78101/Bizhawk-GeneticAlgorithmBot There are only 2 things to tackle, that are outside of my abilities: 1) Loading an external tool and being able to debug code requires the memory domains be loaded upon initialization. (Github issue here) 2) There seems to be an issue regarding saving the configuration files for the external tools. (Github issue here) The first point is important, because it can help me troubleshoot some of the fitness evaluations and code logic bugs that aren't detected by the compiler's build errors. The second point is important because it is a requirement for external tools when the tool opens and loads ROMs into the emulator. I'll try to figure out any alternatives to test the latest external tool build if any opportunities arise.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
feos wrote:
tom_mai78101 wrote:
I believed this has entertainment value to it, unlike the other submission, so I'm submitting this run based on entertainment.
I watched both side by side and I can't agree that there's 0 entertainment in the other submission but non-0 here. Without knowing in advance what exactly to look for, they both feel somewhat similar to someone who doesn't know the game. What should we be looking for when comparing the entertainment value of the 2 runs?
I will explain in a bit more detail regarding the focus of the "entertainment" portion, which is also mentioned in the submission page under the "Speed / Entertainment Trade-offs" section. There are 2 main points for this category: Lottery Tickets Lottery tickets, or "Lotto Tix", is a shop item you can purchase from the in-game's secret shop, called "Merlin's Secret". At any point in time under normal gameplay, the player can pause the game, enter the "Items" inventory menu, and select to use the "Lotto Tix". The game will then determine which prize you have won upon using the item. There are a total of 6 types of lottery ticket winnings, and they are all determined through an RNG calculation.
    - 1st Prize - $100,000.00 - 2nd Prize - $10,000.00 - 3rd Prize - $1,000.00 - 4th Prize - $100.00 - 5th Prize - $1.00 - No Prize - No winnings.
RNG calculations for this game is poorly understood, and it's still is to this day. The only known information about the RNG is that it updates once per a range of frames, be it 1 frame, or a couple of frames. To a normal human player without using emulators, they would have very little chance of encountering a 4th Prize, let alone a 3rd Prize. The lottery ticket winnings are based off of the determinant generated by the RNG counter, and updates whenever the RNG counter decrements by 1. I've done a bit of research on what makes lottery ticket winnings be determined, by relying on brute-forcing each and every possible generated determinants, which may or may not update per frame depending on how many NPCs there are on the screen. Meaning, if I wanted to reach a specific determinant, I need to quickly bring down the RNG counter by forcing the NPCs to make their choices for retaliation. In short, NPC manipulation is tied to lottery ticket winnings. The calculation is then determined upon using the item, by passing the determinant to a function that returns 1 of the 6 possible winnings listed above. It's pretty rare to use the Lotto Tix item and receive 3rd Prize, let alone making it useful during a TAS run to be able to obtain the convenience of new special techniques and stats-boosting items in the game. Skaterz This is the bulk of the entertaining portions of the run. Skaterz is a rare item in the secret shop, that that allows you to warp to the nearest enemy and attack them from behind. When you initiate an attack, it will immediately trigger. If the player has set the "Restock" option to "Every" (meaning, the shop listings will be updated frequently), for the item to appear in the shop menu, it requires the player to check on the shop every 8 to 9 frames. And the RNG needs to line up, so that "you can get the lottery ticket winnings with enough money to buy Skaterz". What makes this item important for entertainment, is a list of criterias that a normal player would encounter:
    1. Under normal gameplay and without consulting a guide, the player would first need to discover a hidden secret item shop. 2. After discovering the shop, and without any knowledge of the available shop items, the player needs to frequently visit the shop, in order to see it. 3. The player then needs to have at least $500.00 to be able to purchase it, upon seeing the item and knowing the price tag. 4. The player needs to grind for money to earn $500.00 by defeating many gang members and recurring bosses. Playing the Lotto Tix is unfeasible, because of the RNG calculations mentioned above.
Due to its ability to warp to nearby enemies, it has so many potentials for doing a TAS run. With various special techniques in the game, a player can quickly assault the gangs with minimal actions other than attacking. When an enemy is defeated, a new enemy is spawned on the opposite side of where the player is at, only after when the enemy's dropped money is picked up or despawned. This means, with Skaterz, there is no need to run, and thus no need to spend frames on moving from 1 end of the area to the opposite side of the area if the enemies don't rush into battle, or they are focusing on your ally / allies who are playing standoffs with each other most of the times. Not only that, viewers watching the TAS run would be entertained, for it is the nature of the TAS run to show the possibilities of "being able to warp around" and attacking foes left and right. Being able to see what future TASers can do with this ability, is what makes the run enjoyable to watch and give TASers many possible routes to tackle. Thus, considering the item's rarity and potentials, please consider the conditions of "Being able to win 3rd Prize twice in a row", "Buying Skaterz", and "Warping everywhere" all within a TAS run, as part of the submission's entertainment values.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
slamo wrote:
It's behaving kind of strangely. If I clear the previous best, run the bot for one attempt, and then try to play back that "best" attempt, it looks completely different, often making up an attempt that I've never seen before.
I'm now starting to think it's not a good idea to use a genetic algorithm library that's usually used in academic studies and research papers. Yesterday (more like early this morning in the 1AM ~ 2AM range), I did check and examined each line of code, line by line, trying to figure out how the genetic algorithm library I'm using determines the fitnesses and how it evaluates each input recording. To my amazement, and possibly an oversight on my part, is it evaluates "immediately" whenever I start or resume the genetic algorithm library. This library doesn't support "delayed evaluations" (in other words, it does not "let me evaluate the fitness of this chromosome at a later point in time"), and the library code doesn't even check to see whether we have obtained the final RAM address values. The library itself doesn't really have good information on how to really customize the data types it is using to do the number crunching, even though it's one of the more popular genetic algorithm libraries in C#. (It's called GeneticSharp, for those curious.) I'm in the process of converting this genetic algorithm bot to an external tool, and in the process, completely gut the original genetic algorithm library I was using. I have the source code for the genetic algorithm library, so I can make some modifications to allow "delayed evaluations", and then include that new library as part of the external tool. This should allow more customizations for me, as well as making it more flexible enough so that it's more stable and less agonizing for everyone. I probably will need to get some help from adelikat, CasualPokePlayer, and YoshiRulez for some API Hawk modifications. Sorry for lowering your expectations. I'll be commiting the external tool's source code to this repository here: https://github.com/tommai78101/Bizhawk-GeneticAlgorithmBot But I wanted to clean up some things I messed up in the Basic Bot and the Genetic Algorithm Bot code base in my forked experimental build, before making my commits.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
Made a new build. EDIT: Nevermind.... just found the "Play back best attempt recording not syncing up" bug still persisted even after I thought it was fixed... Gah... I can't believe it occurred after more than 20 tries. Then again, I was clicking on "Run" pretty quickly. EDIT 2: Someone mentioned it might have been caused by bad save states, since the Genetic Algorithm Bot is using the latest dev builds, and not a stable release build.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
Samsara wrote:
I'm having trouble figuring out why this run was submitted. It's the same category as #7569: Chamale's GBA River City Ransom EX "alternate final boss" in 10:09.75, but nearly 20 seconds slower. The strategy change, while interesting, does not make up for the time loss in terms of how we judge submissions. Is there a possibility that this strategy could be optimized further and become the fastest run for this category? If so, is that being worked on in any way?
Currently working on this one to improve it faster. But my plan involves me writing a genetic algorithm bot to help me to find a better optimal path, so I can manipulate the RNG in the shop menu items and the lotto ticket winnings RNG values to get me to that place. Right now, I'm 1700 frames at the Armstrong Thruway (where the Merlin's Secrets shop is at) and I'm earlier than this run's, and possibly even earlier than the other submission's run. However, I can't seem to get the teleporting item to appear, so this is where I'm stuck with right now. Also, this submission includes footages of the potential possibilities that the other run laid bare the questions on what paths to take. There may be potential routes unlocked if I can get the optimal RNG. I believed this has entertainment value to it, unlike the other submission, so I'm submitting this run based on entertainment.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
New build uploaded. I still need to fix the off-by-one error (records up to 199 out of 200 frames, if you set the frame length to 200).
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
arkiandruski wrote:
What is the "Secret Events" mentioned in the submission text?
Secret Events mentioned are: 1. Recruiting IVAN as your ally. -> Need to defeat all Zombies (bosses in red student uniforms) -> Need to meet Shel (first time) - Girl with blonde hair appears very briefly near the edge of the right side of the screen at Oak Hill Mall. -> Need to meet Shel (second time) - Same girl appears very briefly near the edge of the left side of the screen at Flatiron Mall. -> Need to meet Abby Popov (secret event unlocked) - Girl with dark purple hair appears very briefly near the edge of the left side of the screen at Oak Hill Mall. 2. Defeat SLICK, DRAGON TWIN, and OTIS. -> Need to have 4 allies -> Need to not hit SLICK until he finishes talking.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
slamo wrote:
It's not just short by 1 for me, it's short by a lot. And I just figured something out - it only plays back the current attempt, even if it's not finished. That's why it's stopping short.
Oh that sounds bad. I'll look into this.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
I'm aware of the off-by-one issue with the frame numbers. (Like, if you set it to 200 frames, it will only log up to 199 frames). I'm trying to investigate how to solve this, and whether if it's better to just append "+ 1" when creating the frames. I'm wondering if that is related to what you're seeing where the recording stops short of it. I'll aim to try to fix the recording for the next build. Great to see you are seeing some interesting things with it.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
slamo wrote:
I tried this out for a little bit but it doesn't seem to want to work correctly. I'm somewhat familiar with Basic Bot so I don't think I did anything too stupid, like I remembered to turn on recording mode. The problem is that the bot only writes an input on only one random frame, no matter what you set the # of frames to. It also doesn't adhere to the input probabilities you can set; if I have R set to 100%, it still only presses it for one frame. I'm trying this with Pac-In-Time for the GB, if that helps.
Updated the bot. It's in the OP. Please check it out and see if you still encounter issues. Thanks for using the bot!
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
Yay, a feedback! I'll look into this a bit more.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
I might have to create an external tool build instead of a Bizhawk integrated bot instead. I am starting to notice some inefficiencies with the GeneticSharp library I am using for this Genetic Algorithm Bot, especially where are multiple threads running concurrently and deadlocking itself, pausing/halting the Bizhawk emulator entirely without warning, and not having total control over the mutations.
tom_mai78101
He/Him
Experienced Forum User, Published Author, Player (101)
Joined: 3/16/2015
Posts: 160
adelikat wrote:
Pretty neat idea, but why not make it an external tool? then it wouldn't need to be an experimental build
I have no idea what it means "to make an external tool". Also, I have no concrete picture of what an external tool should be like. I know there are external projects, external core projects, and external tool projects in the Bizhawk source code, but I'm not that familiar with any of those.
1 2 3 4 5 6 7