there are two RNGs ($0017 and $0018) so the maximum number of possible seeds is 256²=65536
i tested some cases and it went between 46 and 62
i actually count 10 line-clear animations...
Warning: Might glitch to creditsI will finish this ACE soon as possible
(or will I?)
Recent projects: SMB warpless TAS (2018), SMB warpless walkathon (2019), SMB something never done before (2019), Extra Mario Bros. (best ending) (2020).
Must have miscounted.
What influences these RNGs? Are they just timers? If you have to wait 65536 frames to get to the 65536th initial garbage state, then there is no use for the vaste majority of initial states for such a short TAS. Every frame that is spent manipulating must be gained again due to the better randomness.
What influences these RNGs? Are they just timers? If you have to wait 65536 frames to get to the 65536th initial garbage state, then there is no use for the vaste majority of initial states for such a short TAS. Every frame that is spent manipulating must be gained again due to the better randomness.
so this shifts both $0017 and $0018 right and uses bit 0(of $0017) as bit 7 in $0018
like:
11111001 00001100 ($0017, $0018; #$F9, #$0C)
next frame will be
01111100 10000110 (#$7C, #$86)
but there is another thing in the routine, if bit 1 of $0017 and $0018 are different, then the bit 7 of $0017 will be set
so in the example:
01111100 10000110 (#$7C, #$86)
next frame will be
10111110 01000011 (#$BE, #$43)
but sometimes the RNGs will be called 2 times in one frame, so its not that easy...
EDIT: so i wrote a program and I can say that there are exactly 32767 possible different seeds. they have a fixed order, so, for example, you have to wait a long time to get the last seed (which is #$13, #$11)
Warning: Might glitch to creditsI will finish this ACE soon as possible
(or will I?)
Well, now I also think that the current run is improvable.
25 lines to clear. 12 lines filled with garbage. 7 line clear animations required.
We need to manipulate a "good" garbage pattern. We require garbageblocks mod 4 == 2, and as much garbageblocks as possible. manipulating 4 additional blocks should take no more than 30 to 60 frames, manipulating 8 blocks shouldn't take more than 60 to 120 frames (exact numbers need to be tested). Also, as much garbage as possible should be at the bottom (less pieces need to be dropped down deep.)
The current solution requires 10 line clear animations, which takes a known amount of frames (something around 30 frames, you know it better than me).
Lets assume that we know the solution for every seed with the lowest amount of line clears. So we need to check at worst all earlier seeds and the next 30*(10-7)*2 = 180 seeds if they allow solutions with less than 10 line clears. (Well, if the current seed allows a solution with less than 10 line clears, it will almost definitely be improvable.) I would guess that only one out of four of the solutions satisfies garbageblocks mod 4 == 2, so that would only be ~45 seeds to check.
On average, we need to clear 2 lines of garbage, and 2 extra lines. If we can manipulate a garbage pattern which allows 3 or even 4 garbage lines to be cleared at once, that would be nice. This would increase chances for a solution with 7 line clears.
Clearing more than 2 lines of garbage at once is most likely impossible. We can afford to clear only 3 lines exactly 3 times. We can also afford to combine 1 line of garbage with 2 or 3 extra lines.
If we have can choose where we do the extra lines, then they should be done as early as possible.
Well, and one thing which makes all of this more complicated If the blocks don't need to be dropped that deep, we require less time until the next block starts. It might be well worth the time to do the extra lines very early and do an extra line clear later on. Doing line clears at the top requires less time than doing them at the bottom. If N is the number of frames it takes to get a block down one line, we may save ~2,5*N frames for clearing a line one position more at the top.
Let's build a formula for exactly calculating the time.
One more idea At the end, manipulate garbage and build the bottom in a way which allows input to be ended before the last pieces are dropped.
No, seriously, if you really want to get just 7 line clear animations you have to "manipulate"(or wait for) a PERFECT pattern. You can be really happy if it is possible to solve the seed in 9 line animations.
I tested a seed until I realized that I could only single the last 6 rows and that happens really often, because its... well... garbage!
Warning: Might glitch to creditsI will finish this ACE soon as possible
(or will I?)
Joined: 10/16/2012
Posts: 233
Location: Milwaukee, WI
Can I make one that plays past level 29? I heard it gets all glitched up after 29!
If I could have a tool-assisted real life, I'd...
Being a novice, I'd probably load the wrong state, have the IRS AI bankrupt me, and eventually make me want to kill myself and redo 11 years of hard work.
That wouldn't be entertaining at all because it would take very long to go where it is glitched. Also, what would be the goal? "fastest glitched graphics"? I think that wouldn't make any sense at all...
Warning: Might glitch to creditsI will finish this ACE soon as possible
(or will I?)
Joined: 10/16/2012
Posts: 233
Location: Milwaukee, WI
I saw the videos linked to by OmnipotentEntity, and it starts to get glitched as soon as you reach level 30! If you look closely, you will notice that it shows up as 00, and it goes on from there.
If I could have a tool-assisted real life, I'd...
Being a novice, I'd probably load the wrong state, have the IRS AI bankrupt me, and eventually make me want to kill myself and redo 11 years of hard work.
Joined: 10/16/2012
Posts: 233
Location: Milwaukee, WI
Masterjun, my goal would have to be "fastest level 100", or something similar.
If I could have a tool-assisted real life, I'd...
Being a novice, I'd probably load the wrong state, have the IRS AI bankrupt me, and eventually make me want to kill myself and redo 11 years of hard work.
Joined: 8/14/2009
Posts: 4090
Location: The Netherlands
JWinslow23 wrote:
Masterjun, my goal would have to be "fastest level 100", or something similar.
A better category would be "fastest level overflow", to the point where the game returns to level 00. That's less arbitrary than "level 100".
That said, such a category wouldn't be publishable material anyway, because the run would be quite long, several times longer than "fastest 999999", and it wouldn't add that much to the existing published material.
It would, however, still be quite an interesting run, if you do decide to make it.
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.
I saw the videos linked to by OmnipotentEntity, and it starts to get glitched as soon as you reach level 30! If you look closely, you will notice that it shows up as 00, and it goes on from there.
That's not the true level "0", since the speed remains high. The last video in the playlist shows it goes up to 329 to actually loop back to "0". Good luck TASing 329 levels of tetris.
Joined: 10/16/2012
Posts: 233
Location: Milwaukee, WI
Mothrayas wrote:
A better category would be "fastest level overflow", to the point where the game returns to level 00. That's less arbitrary than "level 100".
That said, such a category wouldn't be publishable material anyway, because the run...wouldn't add that much to the existing published material.
It would, however, still be quite an interesting run, if you do decide to make it.
I agree. However, can I work on it, even if it doesn't get published?
If I could have a tool-assisted real life, I'd...
Being a novice, I'd probably load the wrong state, have the IRS AI bankrupt me, and eventually make me want to kill myself and redo 11 years of hard work.
I am new to TAS and I have decided to attempt to beat the mode B 19-5 run.
My first attempt I did blind without looking anything up. It resulted in 2775 frames or 46.25 seconds as compared to the record at 2331 frames or 38.85 seconds. Considering it was my first TAS I don't think it was too bad. I realized upon review that I wasted a lot of time with single line clears.
Then I decided to do a little research when I stumbled upon this thread. I have read the discussion of testing seeds to find a good garbage pattern. Although I am new to TAS, I have a little of experience with assembly. So I have been poking through the disassembled code in the hopes of creating a program to find the best seeds.
I will post more as I figure out more but for now I believe I have located the code that generates the garbage patterns if anyone is interested to try for themselves.
00:87E3:A9 0C LDA #$0C ;initialize values
00:87E5:85 A8 STA $00A8
00:87E7:A5 A8 LDA $00A8 ;loops here for next row
00:87E9:F0 5F BEQ $884A
00:87EB:A9 14 LDA #$14
00:87ED:38 SEC
00:87EE:E5 A8 SBC $00A8
00:87F0:85 A9 STA $00A9
00:87F2:A9 00 LDA #$00
00:87F4:85 69 STA $0069
00:87F6:85 89 STA $0089
00:87F8:A9 09 LDA #$09
00:87FA:85 AA STA $00AA
00:87FC:A2 17 LDX #$17 ;loop here for next column
00:87FE:A0 02 LDY #$02
00:8800:20 47 AB JSR $AB47 ;generate next random value
00:8803:A5 17 LDA $0017
00:8805:29 07 AND #$07
00:8807:A8 TAY
00:8808:B9 7C 88 LDA $887C,Y ;get a random tile
00:880B:85 AB STA $00AB
00:880D:A6 A9 LDX $00A9
00:880F:BD D6 96 LDA $96D6,X ;get row offset
00:8812:18 CLC
00:8813:65 AA ADC $00AA
00:8815:A8 TAY
00:8816:A5 AB LDA $00AB
00:8818:99 00 04 STA $0400,Y ;store tile in memory
00:881B:A5 AA LDA $00AA
00:881D:F0 05 BEQ $8824
00:881F:C6 AA DEC $00AA
00:8821:4C FC 87 JMP $87FC ;loop until row is finished
00:8824:A2 17 LDX #$17
00:8826:A0 02 LDY #$02
00:8828:20 47 AB JSR $AB47 ;generate next random value
00:882B:A5 17 LDA $0017
00:882D:29 0F AND #$0F
00:882F:C9 0A CMP #$0A
00:8831:10 F1 BPL $8824 ;loop until (rand & #$0F) < #$0A
00:8833:85 AC STA $00AC
00:8835:A6 A9 LDX $00A9
00:8837:BD D6 96 LDA $96D6,X
00:883A:18 CLC
00:883B:65 AC ADC $00AC
00:883D:A8 TAY
00:883E:A9 EF LDA #$EF
00:8840:99 00 04 STA $0400,Y ;set random block in row to an empty tile
00:8843:20 2F AA JSR $AA2F
00:8846:C6 A8 DEC $00A8
00:8848:D0 9D BNE $87E7 ;loop until all rows are done
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.
I have finished my program and I found out a few things in the process.
It turns out that there is a bug in the original tetris code where it is impossible for there to be a garbage tile in the upper left corner in mode B.
It is not possible to use every seed after the first available one. This is because the code does not call its random function evenly. To solve this I ran a lua script that found all possible seeds waiting a maximum of 100 frames.
I then took these seeds and put them in a java program to generate the garbage pattern. I took all the seeds where (tiles % 4 == 2) and analyzed them for how many line clears it would take to clear the garbage pattern. My algorithm is not perfect (I didn't spend much time on it) and will not generate totally accurate numbers, but they usually are correct. Here are my results:
Seed=8e2d wait frames=0 # of tiles=46 clear anim=11
Seed=21eb wait frames=10 # of tiles=58 clear anim=11
Seed=9948 wait frames=12 # of tiles=54 clear anim=10
Seed=2652 wait frames=13 # of tiles=54 clear anim=10
Seed=a265 wait frames=14 # of tiles=54 clear anim=11
Seed=3a26 wait frames=15 # of tiles=54 clear anim=10
Seed=c744 wait frames=16 # of tiles=50 clear anim=10
Seed=1a0e wait frames=19 # of tiles=54 clear anim=11
Seed=4341 wait frames=20 # of tiles=54 clear anim=10
Seed=2028 wait frames=23 # of tiles=50 clear anim=10
Seed=840 wait frames=25 # of tiles=54 clear anim=10
Seed=9021 wait frames=27 # of tiles=54 clear anim=10
Seed=1e64 wait frames=34 # of tiles=50 clear anim=10
Seed=8f32 wait frames=35 # of tiles=54 clear anim=10
Seed=4b4f wait frames=42 # of tiles=54 clear anim=10
Seed=bdc4 wait frames=53 # of tiles=50 clear anim=9
Seed=2f71 wait frames=54 # of tiles=50 clear anim=9
Seed=e00b wait frames=57 # of tiles=58 clear anim=11
Seed=bd78 wait frames=60 # of tiles=62 clear anim=12
Seed=fe2b wait frames=62 # of tiles=54 clear anim=10
Seed=6773 wait frames=74 # of tiles=62 clear anim=12
Seed=14ce wait frames=75 # of tiles=50 clear anim=12
Seed=d14c wait frames=76 # of tiles=50 clear anim=12
Seed=e768 wait frames=79 # of tiles=58 clear anim=12
Seed=8c37 wait frames=86 # of tiles=50 clear anim=11
Seed=a376 wait frames=90 # of tiles=50 clear anim=11
Seed=d546 wait frames=91 # of tiles=54 clear anim=12
Seed=724e wait frames=94 # of tiles=54 clear anim=11
Seed=ce49 wait frames=95 # of tiles=54 clear anim=12
Seed=79c9 wait frames=96 # of tiles=50 clear anim=11
Seed=c3ce wait frames=97 # of tiles=54 clear anim=11
Note that the 2652 seed was that seed that baxter used for his TAS.
Seed=8e2d wait frames=0 # of tiles=46 clear anim=11 benefits=Has zero wait frames
Seed=21eb wait frames=10 # of tiles=58 clear anim=11 benefits=Starts with 58 garbage tiles
Seed=9948 wait frames=12 # of tiles=54 clear anim=10 benefits=Has 10 line animations and low wait frames
Seed=2652 wait frames=13 # of tiles=54 clear anim=10 benefits=Has 10 line animations and low wait frames
Seed=bdc4 wait frames=53 # of tiles=50 clear anim=9 benefits=Has 9 line animations but more wait frames
Seed=2f71 wait frames=54 # of tiles=50 clear anim=9 benefits=Has 9 line animations but more wait frames
These are probably the fastest six.
I have also made the java program display an image of what it would look like. Here are the six seeds above with the lowest wait frames first:
EDIT: Here is my java code for generating the garbage pattern. It isn't written the best but it works.
Joined: 4/17/2010
Posts: 11480
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Please put spaces between the pictures so that the site could break the line. Otherwise, great effort!
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.
There is a hack called Tetris Zer0 and we could do 2 players.
If both players land their pieces at the same time opens up a glitch which replaces player 2's piece dealt out with player 1's next piece.