Posts for Gunty


1 2 3
6 7
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
I couldn't find any accurate enemy or weapon stats, so I made some lists myself. It's possible there are still some errors left, but I'm pretty sure it's the best you can get at the moment: Enemy Stats Weapon Stats I also made a short SMV completing Tower 1 some time ago: http://dehacked.2y.net/microstorage.php/info/153245825/terranigma_tas_demo.smv It contains the following timesavers that may be useful:
  • Faster method of climbing chains (or vines in different levels)
  • Levelling up while the door at the top of the tower is opening
The last one saves 119 compared to a normal level up, so it may or may not be worth it depending on your luck manipulation in the Red Huball fight.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
Derakon wrote:
The only thing I can think of is that collecting the EnbuPike would probably make it easier to kill enemies en route to GuardRobot. Aren't there several required fights, not to mention some really big (HP-wise) monsters, in that segment?
Actually, the strategy using the NeoFang does more damage than using the EnbuPike, so this point favors the NeoFang scenario. However, I realized the assumption that 1 level is gained in Beruga's Lab doesn't make much sense: going from 24 to 25 requires 1040 more experience than going from 20 to 21. Getting this experience in GLC actually adds about 29 seconds to Scenario #1, so maybe getting the EnbuPike CAN be helpful. I suppose the effects of the points I raised in the conclusion section should be quantified in order to make a more accurate prediction.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
@klmz: If you cannot make any assumptions on input strings, then you're right, my solution fails. But in that case your solution also fails at input bGbY for example. In any case, the Malevolence Engine seems to only check inputs having 1 Green label and no Yellow labels, so I think it's irrelevant.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
I've been doing some research on long term planning of a Terranigma TAS and I wanted to share some of my findings: RedArmor Consideration The RedArmor increases STR by 13 which is roughly equivalent to 2.5 additional levelups. As a benchmark I will consider 2 scenarios for fighting the final boss:
  • At level 28 with HeroPike and RedArmor, average damage done is 20.
  • At level 30 with HeroPike but without RedArmor, average damage done is 15.
Now let's have a look time investments needed for both scenarios: RedArmor Time Investment needed Gem Collecting:
Location        Source  #Gems #Frames Speed
-------------------------------------------
Norfest         Chest    389     142  137.0
Mush            Chest    500     204  122.5
C. Indonesia    Chest    378     150  126.0
NW. Africa      Chests  1706     854   99.9
Greenland Cave  Chest    961     672   71.5
S. Indonesia    Chest   1403    1331   52.7
Louran          Grave    500     632   39.6
Deserted Ruins  Chest    378     485   39.0
Sylvain         Chest    651     843   38.6
Total 6867 Gems in 5313 Frames Buying & Equipping RedArmor: 1310 Frames Total time investment: 132s, 23f Grinding 2 Additional Levels: Best grinding spot: Neotokio sewers @ 61.9 exp/second Total experience needed: 10565 Level up text duration: 2x 9s Total time investment: 188s, 34f Conclusion: Getting the RedArmor requires a smaller time investment than grinding 2 additional levels and yields superior damage output. Therefore, getting the RedArmor is the superior option.
EnbuPike Consideration The EnbuPike can used during 2 bossfights:
  • Hitoderon in Great Lake Cavern (GLC)
  • GuardRobot in Beruga's Lab
To be able to determine the benefit of using the EnbuPike against these bosses, the estimated number of hits per time unit against these bosses is needed. I timed these based on the SDA speedrun:
Hitoderon:    3x 222 Life, 18 Sliders in 44 Seconds
GuardRobot:   1x 650 Life, 16 Slicers in 18 Seconds
The GuardRobot actually has 3 legs with 650 Life each, but I assumed each slicer can hit all 3. EnbuPike Time Investment needed
                      #Frames
Ressurecting Mu:       2337
Collecting before GLC: 4323
Collecting after GLC:  2419
Total (before GLC): 133 Seconds Total (after GLC): 95 Seconds The final information needed to get an accurate estimate of the benefits of using the EnbuPike is the grinding speed before and after both bosses. The optimal grinding spot before the bosses is the small room with 3 fishes in Great Lake Cavern, and after the bosses again the Neotokio Sewers: GLC Grinding: 36.2 exp/second Sewer Grinding: 61.9 exp/second I also assume that 1 level is gained in between both bosses by killing monsters on the way through Beruga's Lab. Now let's define semi-realistic boundary conditions for the TAS:
Start:  Level 20 in Great Lake Caverns
End:    Level 26 in Neotokio Sewers
And a few possible scenarios:
Scenario #1:  NeoFang against both bosses
Scenario #2:  NeoFang against Hitoderon, EnbuPike against GuardRobot
Scenario #3:  EnbuPike against both bosses
I calculated the optimal grinding strategy for all scenarios and found the following strategies: Scenario #1:
Grind in GLC to level 24           360s
Fight Hitoderon  (Lvl 24, 66 Dmg)   25s
Fight GuardRobot (Lvl 25, 25 Dmg)   29s
Grind in Sewers to level 26         68s +
                                  ------
Total:                             482s
Scenario #2
Grind in GLC to level 23           260s
Fight Hitoderon  (Lvl 23, 34 Dmg)   48s
Acquire EnbuPike                    95s
Fight GuardRobot (Lvl 24, 89 Dmg)    8s
Grind in Sewers to level 26        131s +
                                  ------
Total:                             542s
Scenario #3
Acquire EnbuPike                   133s
Fight Hitoderon  (Lvl 20, 69 Dmg)   24s
Fight GuardRobot (Lvl 21, 20 Dmg)   35s
Grind in Sewers to level 26        292s +
                                  ------
Total:                             484s
Conclusion: Skipping the EnbuPike (Scenario #1) is estimated to be only 2 seconds faster than using it against both bosses (Scenario #3). However, I believe in practice the difference will be larger in favor of skipping the EnbuPike due to the following reasons:
  • Equipping the EnbuPike was not taken into account and takes a few additional seconds
  • Collecting the EnbuPike interferes with the Gem (and possibly STR potion) collecting, causing another delay
  • The assumed grinding speed in Neotokio is a best-case estimate, and in practice can be as low as 49.5 exp/second. A smaller difference in grinding speed favors early grinding which is the case when skipping the EnbuPike (Scenario #1)
Therefore I believe skipping the EnbuPike entirely and using the NeoFang is the superior option. The SDA speedrun collects the 3PartRod instead, but doing this takes almost as long (85 seconds) getting the EnbuPike (95 seconds) and yields inferior damage. Using the GeoStaff is not worth it either, since both bosses have a 75% Earth resistance.
If someone wants to challenge the conclusions drawn above, I would be happy to defend them. It's also possible I made some calculation errors along the way: let me know if you find any!
Post subject: Re: Fails detected on multiple records
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
Bisqwit wrote:
Seraphim Least parts: 21 (Gunty)
Fails on bbGb
Oops. Nothing a quick and dirty fix can't handle though. Seraphim, 21 parts: ?lvl=29&code=p12:6f7;c12:5f3;c12:4f3;c12:11f3;g12:3f3;p10:6f6;p14:6f0;r14:7f1;b10:5f3;b14:5f3;r10:7f1;p11:4f5;p13:4f5;g11:5f1;g13:5f1;q13:6f2;q11:6f4;q12:7f0;c12:10f3;c12:9f3;q12:8f0;
Post subject: Re: Teachers!, Academics!, Engineers!
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
I have two more solutions optimized for least number of parts: Engineers in 1:47, 23 parts: ?lvl=24&code=c12:5f3;c12:6f3;c12:7f3;c12:8f3;c12:9f3;c12:10f3;c12:11f3;c12:12f3;p12:4f7;g12:2f3;c12:3f3;c14:4f1;q11:4f4;c10:4f1;i11:3f4;p11:2f5;r11:1f3;r10:3f2;p13:2f5;b13:1f3;b14:3f0;i13:3f0;q13:4f2; Seraphim in 0:36, 21 parts: ?lvl=29&code=p12:6f7;c12:5f3;c12:4f3;c12:7f3;c12:8f3;c12:9f3;c12:10f3;c12:11f3;g12:3f3;p10:6f6;p14:6f0;r14:7f1;b10:5f3;b14:5f3;r10:7f1;p11:4f5;p13:4f5;g11:5f1;g13:5f1;q13:6f2;q11:6f4; EDIT: Also Police! with a (silly) minor optimization: Police! in 2:43, 34 parts: ?lvl=19&code=g12:3f3;y12:2f3;y12:6f3;c12:4f3;c12:5f3;b11:8f2;r13:8f0;c12:8f3;p12:9f3;q11:9f5;q13:9f1;c14:5f0;c15:9f1;r15:8f1;p15:7f0;c14:6f1;b15:6f3;b13:6f0;r13:4f0;p13:5f4;y10:9f1;b10:8f1;c10:7f2;c11:7f2;i12:7f7;c13:7f2;q14:7f6;g14:8f1;y14:9f2;q12:10f2;p12:11f3;b11:11f2;r13:11f0;q12:12f0;
Post subject: Re: Generals! And Robotanks, Robospies. And Police!, Judiciary
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
Bisqwit wrote:
I got 3:07, 42 parts, on "Police!". I admit that my algorithm, too, is very basic. It just does its stuff. And it's got plenty of repeaters.
I improved my solution to "Police!" to 2:50, using 35 parts. I think it uses the same algorithm as your solution, in a more compact layout: ?lvl=19&code=c12:11f3;g12:3f3;y12:2f3;y12:6f3;c12:4f3;c12:5f3;b11:8f2;r13:8f0;c12:8f3;p12:9f3;q11:9f5;q13:9f1;c12:10f3;c14:5f0;c15:9f1;r15:8f1;p15:7f0;c14:6f1;b15:6f3;b13:6f0;r13:4f0;p13:5f4;y10:9f1;b10:8f1;c10:7f2;c11:7f2;i12:7f7;c13:7f2;q14:7f6;g14:8f1;y14:9f2;q12:12f6;p13:12f4;r13:11f3;b13:13f1;
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
I realized I don't actually have any proper notes on Lufia II, so the next best thing I can provide is the code of two iterations of my Camu Simulator. I added the code in the relevant post. The first simulator aimed at simulating the entire fight without any simplifications and should contain most information on battle mechanics. The simplified simulator only predicts the outcome of the Boss AI, so it's probably less interesting to you.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
Nice WIP. It's refreshing to see this game played without the massive amounts of random encounters you'd normally get. I was wondering though, did you know you could achieve faster luck manipulation by spending some idle time in battle as well, instead of just before battle? Maybe you're deliberately not doing this since it's a test run, but I thought should mention just in case.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
Nitrodon wrote:
Rocket Planes in 1:37 using 19 parts: ?lvl=27&code=g12:4f3;c11:9f3;c11:10f3;q11:11f3;r10:8f2;c11:7f3;p11:8f7;p12:6f7;c12:7f0;b13:6f0;c12:5f3;c12:8f2;c14:8f1;r13:9f1;p13:8f6;b13:7f3;q14:6f1;g14:7f1;r11:6f3;
Interesting strategy, which actually allows for another optimization: Rocket Planes in 1:35 using 17 parts: ?lvl=27&code=g12:4f3;c11:7f3;p12:6f7;b13:6f0;c12:5f3;c14:8f1;r13:9f1;p13:8f6;b13:7f3;q14:6f1;g14:7f1;c11:6f3;p12:8f7;r11:8f2;q12:10f6;c12:9f3;c12:7f3;
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
Does anyone have an elegant solution for "Police!"? The best I got is 3:14 using 51 parts, but I have a feeling that's not very optimal. On another note: Rocket Planes in 3:09 using 19 parts: ?lvl=27&code=c12:6f3;p12:7f3;r13:8f1;c12:10f3;p13:7f6;c14:8f3;b11:7f2;b13:6f2;r14:6f1;p14:5f0;b14:4f3;c12:4f3;g12:5f3;c14:9f0;c13:9f0;q12:9f0;q13:5f1;r14:7f3;c12:8f3;
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
I tested it in Super Metroid and this Lua script seems to behave the way you described:
previousInput = joypad.read(1)

while true do
	currentInput = joypad.read(1)
	if currentInput["X"] and previousInput["X"] then
		currentInput["X"] = nil
	else 
		currentInput["X"] = true
	end
	
	joypad.set(1, currentInput)
	previousInput = currentInput
	
	snes9x.frameadvance()
end
You can change "X" to whatever button you want.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
Here is a graph I made of the performance of the estimator you mentioned, based on the previous 3 coin tosses: [URL=http://img40.imageshack.us/img40/193/cointosses.png][/URL] As you can see, it approaches 0.5 as the number of estimations grows. It shows similar results for window sizes larger than 3.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
I have never noticed this before, but in this context track00 suddenly shows a great (and somewhat disturbing) resemblance to Robo's theme :)
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
I just finished the optimization of world's most difficult trick, which is 40 frames faster than currently published TAS. http://dehacked.2y.net/microstorage.php/info/30661533/WMDT.smv While the solution in the currently published TAS is optimal with respect to number of block moves, it fails to account for switching block selection, and thus the internal block indices. Including these aspects in the statespace of the puzzle did increase the calculation time a fair bit however :p.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
Given the initial stats of the party, the odds of the battle happening this way were about 1/8000. Luckily Maxim doesn't need to brought to 1 HP to have enough IP for the Camu battle though.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
Dammit wrote:
So the 8nnnnn range is in the ROM data?
I believe the Lufia ROM data is located at 808000-CFFFFF. Anyways, I completed another boss battle example; the Regal Goblin. This strategy saves up to 479 frames compared to the current speedrun, and gives Maxim a full IP bar to fight Camu. http://dehacked.2y.net/microstorage.php/info/1804455304/regal_goblin_example.smv I'm probably skipping the Witch ring since it's resulting damage increase will probably not be worth it this time. Not grabbing the Witch ring will save another 766 frames.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
Is there a way write savestates generated by a Lua to the RAM instead of the hard disk? The reason I ask is because I noticed that the savestate creation and loading seems to be the bottleneck for most of the automation scripts I created. Handling savestates from the RAM would yield a significant speed increase I would think. EDIT: I tried setting the savestate folder to a RAM disk, but that didn't result in any significant performance gain. I also tried created a custom pseudo savestate functions, using the memory.readword/memory.writeword functions, but that wasn't much faster either and resulted in game freezes when called during lag frames (which was to be expected). Is there anything else I can do to try and speed up savestate handling? Perhaps disabling savestate compression?
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
http://dehacked.2y.net/microstorage.php/info/59169167/camuPreview.smv That's a small preview of what the Camu fight could be like. This example takes about 59 seconds and is 18 seconds faster than the original Camu fight in the currently published TAS.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
I recently completed my Camu simulator, but when I started building a brute-force backtracking framework around it, I realized it would become too slow to actually use it. Therefore I think it's best to first come up with the theoretically fastest possible fight, and then searching for the initial RNG state and party stats which allows for this particular strategy to work. The perfect strategy would include performing the Kukri's Thunder Blast IP attack every round and Camu not performing Break Attack, or calling companions. Whether Maxim or Guy should have the Kukri is something I'm no quite sure of yet. In other words, any progress on this is going to take a while :) EDIT:
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
It's that time of the year again, and I started picking TASing Lufia II again. This time I started an improvement of the normal-mode TAS. The goal I set when I started recording was to defeat the Catfish in 4 rounds without healing, while keeping the number of frames lost due to luck manipulation below the amount of frames it would take to extend the Catfish fight by 1 round; 355 frames. The total amount of frames lost due to luck manipulation is 188 frames, which means I succeeded :). http://dehacked.2y.net/microstorage.php/info/834441994/lufia2-tas-v2.smv This WIP is 1634 frames (27s 14f) faster than the currently published TAS and I think the total completion time could turn out to be sub 3 hour. This TAS was recorded using the snes9x v1.43+ lua 0.06 version. About 30 different Lua scripts were used to luck manipulate floor transitions and delaying frames in town. Both the Lizardman and Catfish fights were simulated and optimized in Java. The next milestone of the TAS is going to be Camu, and will probably take an even longer time to optimize than the Catfish battle. So don't expect any progress any time soon :p.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
That was the second infinite recursion in my script indeed. When properly unregistering the functions, the script no longer displays any error messages and executes much faster. Thanks for the help. I suppose this behaviour of registered functions could come in handy, and it isn't too much trouble preventing infinite recursions by properly unregistering functions. So in my opinon you should keep this feature and maybe explicitly mention its behaviour in the API section.
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
DeHackEd wrote:
Can you send me the script you're using? Nothing in Lua should blow the C stack, unless you do something like infinite recursion via the various "register" functions.
Are the registered functions called when the memory is written by the memory.writebyte functions? Is so, that could cause an infinite recursion in my script. EDIT: I tried to prevent possible recursion but the error messages are still appearing. Here is the script I used, plus a savestate to trigger it (walk up into the teleporter).
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
I wrote a Lua script involving writing large chunks of data into the memory (7045 and 26208 bytes), but next to it being very slow, it also pops up C stack overflow error messages. Is there a way to improve the memory writing speed for large amounts of data? I currently use the memory.writebyte function in a loop, where the data to be written is declared in the lua script itself. If not, is there a way to prevent the C stack overflow messages from appearing?
Experienced Forum User, Published Author, Player (198)
Joined: 12/3/2006
Posts: 151
I'm not sure if this is known, but the actual name in the Microstorage URL can be anything you want as long as it has the right extension: http://65.93.101.29/microstorage.php/info/1459389776/randomname.vbm Good to know when dealing with broken URLs ;)
1 2 3
6 7