Posts for Amaraticando


1 2
9 10 11
26 27
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
A nice problem from the brazillian mathematical olympiad (2016, senior and junior). Let ABC be a triangle. The line r is the bisector of ∠ABC and line s is the bisector of ∠ACB. D is onto r and AD||s. E is onto s and AE||r. The lines BE and CD meet at point F. I is the incenter of ABC. Prove that F, A and I are collinear if, and only if, AB = AC.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Good idea! Edited the post.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I think it's the best that can be done:
Language: lua

-- use 100 and %.2d if you wanna display only centiseconds local function frames_to_time(frame, fps) local floor = math.floor local total = floor(0.5 + 1000*frame/fps) -- rounds to the nearest integer local hours = floor(total/(1000*60*60)) local mins = floor(total/(1000*60) % 60) local secs = floor(total/(1000) % 60) local ms = total % 1000 return hours == 0 and string.format("%.2d:%.2d.%.3d", mins, secs, ms) or string.format("%d:%.2d:%.2d.%.3d", hours, mins, secs, ms) end
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
hidaigai wrote:
>Masterjun Thanks. I will try 102% TAS.
I was thinking of making the same thing. Do you wanna collab? If yes, what's the best way to exchange messages?
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Thanks, Gladian00b! I've finally been able to compile the emulator. As I was using Linux Mint, I had two issues. 1) the compilation fails if one uses lua5.3 instead of lua5.2; So I changed to 5.2. 2) the command patch -p1 < ../bsnes-patches/v085/0022-Support-DMA-tracing.patch gives an error for file bsnes/snes/cpu/cpu.hpp, but one can edit the diff by hand. By the way, it's possible to skip all the patches' phase (for bsnes 85), because it's hosted here. Just extract the contents of this zip inside folder bsnes.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
In my script, I use something similar to this, but taking into account PAL and NTSC framerates.
Language: lua

local FRAMERATE = 60 -- Returns a string in the format hh:mm:ss.mmm -- hh only appears if non-zero -- mmm is the miliseconds local function framecount_to_time(frame) local floor = math.floor local total_seconds = frame/FRAMERATE local hours = floor(total_seconds/3600) local tmp = total_seconds - 3600*hours local minutes = floor(tmp/60) tmp = tmp - 60*minutes local seconds = floor(tmp) local miliseconds = 1000* (total_seconds%1) if hours == 0 then hours = "" else hours = string.format("%d:", hours) end local str = string.format("%s%.2d:%.2d.%03.0f", hours, minutes, seconds, miliseconds) return str end
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
This is a lsnes movie that I made playing in real time just to test whether my run could be sync on console. I'm making a translation to see if your run can be verified. I'm trying to make it by hand and, if possible, I'll ask this dude to run on console.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
lsnes is version 85 (can be compiled with other versions) and BizHawk is 87. I'm not sure why this happens.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
It seems very likely that a complete any% run could be verified on console. To do this, one would have to manually add extra frames where BizHawk eats them. This is falseable (at least it was in world 1). Do you want something like that? https://www.youtube.com/watch?v=hqvMrGhdcZ4
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I'm curious about the encode of this. The music is discordant in some places (like the castle levels) and porting it to lsnes (where the sound is not glitched) isn't trivial, because every level transition (and sometimes inside the level) there's lag divergence. The total time would be like 2 seconds longer, but the gameplay is expected to sync.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
event.oninputpoll is not working in version 1.11.8.2 for the SNES. The following script, for instance, doesn't print anything.
Language: lua

local poll_count = 0 local function foo() poll_count = poll_count + 1 print("poll count: ", poll_count) end event.oninputpoll(foo)
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I was waiting to vote yes. Nice work! I didn't know there're more players involved.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
"Notice p can not be any of p1, p2, ..., pr, otherwise p would divide 1" Suppose p is some of the listed p's and p is a divisor of p1p2...pr+1. That means that p*A = p1p2... * p * ...pr+1 p*A - p1p2... * p * ...pr = 1 p*(A - B) = 1 p*k = 1 (impossible)
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
It's not trivial, unless you know a good bit of arithmetic. If one wants to be rigorous, they will need to use the principle of mathematical induction, some basic divisibility theorems and then the fundamental theorem of arithmetic. There're obviously some advanced tricks that would prove this statement as well, but I don't think they count. For instance: if there're only finitely many primes, the sum of the inverse of all primes would not diverge. But it does diverge. Therefore, there're infinitel many primes.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
thatguy wrote:
A cute problem I came across recently - I believe I have a proof, which took me about an hour so some of the guys on here will easily get it in a coffee break. It concerns a remarkable but little-known property of the golden ratio, phi.
I was trying to solve it, when I came across those links, which show that this property is known: https://oeis.org/A000201 https://en.wikipedia.org/wiki/Beatty_sequence
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Some emulators save a backup file (the overwritten state) in the same folder.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
fantastic troll
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Please, don't call it any%. Call it credits warp or something. It's something I would vote straight to vault.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
This game is broken beyond hope. Unavoidable yes vote!
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
RainbowSprinklez wrote:
What am I doing wrong here?
function savestate.registerload(function LoadStateCallback) 
This syntax doesn't make sense, for 3 reasons: 1) savestate.registerload returns the previous function registered (or nil). You can't use function before, because that's the way to declare it. 2) you already declared LoadStateCallback before. Using function inside the parenthesis is only for anonymous ones. 3) The vararg is ... without quotes. Not sure why you need that in the first place.
Language: lua

local function LoadStateCallback(...) -- you don't need ... frames = 0 end local PreviousFunction = savestate.registerload(LoadStateCallback) -- you don't need PreviousFunction, do you?
or
Language: lua

savestate.registerload(function() frames = 0 end)
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Supposing the player has a precision within + or - 0.1 seconds, the probability to press jump at the correct time is (1/60)/0.2 = 1/12. With proper training, you can diminish this error time and increase the chance of pressing at the correct time.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
This hack would be accepted here, I think. The problem is to find someone to beat the 121 exits. I'll do at most 120 (SDW :) )
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Correct! At a first glance, the problem looks trivial to solve. After not getting anything new, only a bunch of redundancies, it looks impossible, but the drawing makes it clear that the angle is determined by the given values.
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I made this cute geometry problem for you 😛😈 Can you find the value of this angle (DAB)?
Amaraticando
It/Its
Editor, Experienced Forum User, Published Author, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Well, this could be caused by N factors, maybe RNG. A basic set of RAM search, tests and scripting is needed to make a good run. Since the game is 2D, it's not that hard to figure out a bunch of things.
1 2
9 10 11
26 27