Posts for Bobo_the_King

1 2
10 11 12 34 35
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
arflech wrote:
Samsara wrote:
to see other people accepting who they are without questioning them
/srg/ and Reddit are where the hate concentrates nowadays.
Funny you should mention Reddit, since despite all its problems, I've been consistently impressed by how accepting they are to trans-people. I'm not sure I've ever seen a disparaging comment there upvoted and, more than anything else, I perceive people there are just curious about what life is like for transgendered people. Any counterexamples that I've overlooked?
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
I wouldn't want to have anything to do with optimizing Lorenzo's Soil. Well done, indeed!
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
I know we should be talking about the run (it was okay) but can I instead say that I'm really impressed by the speech playback in this game? I've seen a few NES games attempt it and it's usually a crackly mess. (Skate or Die 2 anyone?) The audio here was pretty clear. Does anyone know if they used any special hardware or techniques to record it, or is this just one of those things where the quality you get out is proportional to the time and effort you put in?
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Mothrayas wrote:
ars4326: While you've received a variety of responses to this topic, some more or less on-topic than others and some more or less civil than others, I note you've only selected specific posters to answer to (both of which were more in the negative direction) and left aside a few (imo) interesting, and rational/scientific discussion points like e.g this and this. Do you have any interest in discussing with posts like these? So far, I've seen you just post out links and decry a few people's posts, but for this topic to have any value, I think some actual discussion would be nice.
Mothrayas, it sounds like you're considering locking the thread. I'm actually going to jump in to ars4326's defense in this instance. While I've made it clear I think his third-hand, centuries old evidence is ridiculous, I don't see the point in locking this thread. TASVideos has done far worse in its discussions (please don't make me look up examples...) and I believe locking the thread only serves to stifle the mostly free speech enjoyed on the forum. The guy believes in giants, so let him publicly believe in giants as long as discussion is civil and not disrupting conversations elsewhere in the forum due to spamming. Maybe if we continue the current line of discussion between ars4326 and Warp back and forth for three vacuous pages it'll be time to put the thread to rest, but for now, I think it's just a little harmless fun on everyone's part. Anyway, it's your call. I don't think the forum will suddenly fall to pieces if you lock the thread.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Warp wrote:
Why would you want to believe in fantasy when reality can be so much more exciting and interesting? Why would you want to believe some hoax, when you can find out things that we can actually corroborate via observation, measurement and testing? Why would you want to believe in imaginary tales, when reality is wondrous and weird all in itself? Cast aside those fantasies. Educate yourself on how the universe really works. That's a much more interesting and productive subject.
Totally agreed. I assure anyone reading this thread that quantum mechanics is orders of magnitude more strange and interesting than "OMG! Really big people!"
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Ever heard of Piltdown Man? You shouldn't believe in everything dug out of the ground, especially during the late 1800s' paleontology craze. Heed the quote in the Cardiff Giant link: There's a sucker born every minute.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
I second Moozooh's post, specifically regarding the obsoletion chain. Neat? Yes. Very much so. Publishable? No no no no, hell no, no, never. This opens up an ugly can of snakes worms where people keep programming their favorite game with ever-so-slight variations and then TASing them. Someone programs Snake with walls, someone else programs Snake with speedup, someone else programs Snake without wraparound, etc. We need to work with games that have some kind of standardized code. The only way I can see a TAS like this being publishable is if there were a standard version of the game that we could compare the code to. I know that there are several versions of Snake for the TI-83, so you would need to pick one of them, duplicate the program (or just have it pre-loaded), and then TAS that. I liked this run, I enjoyed the novelty of it, and I don't ever want to see it published because it will bog down the site with hundreds of crappy customized calculator games.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Hophoolio wrote:
Therefore my opinion is that emulator inaccuracies shouldn't be able to reduce A-press counts for Super Mario 64. If we were to accept emulator only tricks, we might aswell develop/modify an emulator to allow us to beat the game with 0 A-presses.
But such an emulator would be less accurate and therefore would not obsolete the current effort, made on a more accurate emulator. To rephrase my argument above, emulator accuracy is of primary importance, speed is secondary. To use the fancy notion of Lexicographical order, the ordered pair looks roughly like this: (emulator choice, speed) So suppose we have a run on SNES9x v. 1.43 in 12345 frames. We then have (BizHawk, 12000) > (BizHawk, 12400) > (SNES9x, 12000) > (SNES9x,12345) where > denotes the preferred movie to be published is on the left. A run that can be console-verified would trump all, but if it can't be console-verified, what's important is that we used the best emulation we had available. Truth be told, I think the actual situation is far more complicated because a terrible run on a superior emulator is still a terrible run. I also think entertainment should be a factor, but that's a whole separate issue entirely.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
I'll briefly weigh in with what I've said in the past: the emulator is an intrinsic part of the TAS. It's not about what can be accomplished on the console, it's about what can be accomplished on the emulator. In addition, the best and most preferred emulator offers the closest emulation of the console, so we will inevitably drift toward TASes that are more console-accurate, even if today's TASes aren't. So I say let emulator-specific glitches stand. To do otherwise invites a slippery slope argument towards invalidating any TAS that can't be console-verified. After all, if a run desyncs on the console, that means the emulator "glitched" in a way that the console didn't. (Also, get back to TASing, Personman!)
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
I'll say one thing briefly because I think it is crucial to any discussion of faith and atheism. What atheism (or absence of faith or whatever you want to call it) has that religion lacks is falsifiability. If anyone wants to elaborate on that point, be my guest. As for me, I hope I'm done with this thread.
Post subject: Re: Ask An Atheist
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Aqfaq wrote:
If you have any questions about atheism, ask here and let the atheist forum users kindly answer your questions.
I'm an atheist but why do we need this thread? "You still don't believe in God?" "That's right." "Dude..."
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Cirno wrote:
It's a fun game, but I think it'd make for a horribly dull TAS. The only places where time can be saved are by clearing the screen of all zombies right before boss waves or right at the end of levels. The rest of the time it'd just look like a normal player was playing it, only with superhuman plant-placing speeds and optimum strategies.
I'm not sure whether a TAS would be impressive or not, but your bolded statement is not true (at least in the PC version). The game uses adaptive difficulty. Just a little bit of testing shows that when you kill zombies faster, they come out faster and the level ends sooner. To test this, start a new game+ and buy plants like (off the top of my head) sunflowers, garlic, wall nuts, and cherry bombs. Plant four long rows of garlic, leaving the center lane open but with a wall nut or two at the end. The zombies will stagger back and forth until they find the center lane. You'll find that the zombies enter much more slowly and the level lasts much longer when played this way. I'd be surprised if the DS version is different in that regard.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Mister wrote:
Bobo the King wrote:
Note that this proof doesn't require a base case for induction or rely on the continuity of the sqrt and log functions. As long as we accept that the sqrt and log functions are definable and positive for all real numbers greater than 1, no matter our starting point, the function blows up to infinity for arbitrarily large x.
I don't think the continuity of f (or whatever like that) is superfluous; there seems to be a slight gap. First we see from the above proof that f(100*x)/f(x) = 10*log(x)/(2+log(x)) = 10-20/(2+log(x)) < 10, hence f(100^n*x) < 10^n*f(x) for any n. Assume we could choose infinitely many a(i), such that (1) 1<a(i)<a(i+1)<100>10*f(a(i+1)) for all positive integers i. Then we could show that for any M>0, there exists an x>M such that f(x)<f(a(1)), which would prevent f from diverging to infinity. The proof goes as follows: choose a positive integer n such that M<10^n, and put x := 10^n*a(n+2), so that M<x. Then we conclude that f(x) = f(100^n*a(n+2)) < 10^n*f(a(n+2)) < 10^n*10^(-n-1)*f(a(1)) = f(a(1))/10 < f(a(1)), as desired. Roughly, if there were a sequence a(i) in an interval of finite length such that f(a(i)) tends to zero, we could no longer expect f to diverge to infinity in the strict sense. We can avoid this trouble by assuming the continuity of f, as we have accepted f is strictly positive on the entire interval (1,inf). In my opinion, it is basically impossible to discuss a transcendental property by using only algebraic properties, which is why it is transcendental! :P
It took me a while to comprehend your post and the point you make is very subtle, but at first glance, I agree that you may have a point. I'm a bit busy at the moment, but would anyone else care to read over our two proofs and determine whether mine is valid? I can see why, with a pathological sequence ai, the limit definition might fail to show divergence. On the other hand, I'm satisfied that I've shown that if we start with "seed values" of x between 1 and 100, log(y) can be written as log(100^n*x) for some integer n and some value of x in (1, 100] and as n increases, this tends to infinity, regardless of the value of x as long as log(x)>0. All the reals are represented and they all tend towards infinity, even though they might bounce up and down in the interval (1,100], (100, 10000], and so on. Perhaps I'm overconfident, but I really thought the thrust of my proof was ironclad. I'll brush up on my real analysis in the meantime. Edit: Now that I have the time to do so, I've looked over Mister's post in more detail and I now see that he is correct. Rather than bat about arbitrary series and subtle arguments, I'll work with a more concrete example. Let sqrt(x) be any function on the interval (1, 100], with the only constraint being that it be positive in that domain. On the interval (100, inf), let sqrt(100*x) = 10*sqrt(x). Let log(x) be likewise arbitrary but positive on (1, 100], while log(100*x) = log(x) + 2 on the interval (100, inf). Using these facts, we can show that if f(x) = sqrt(x)/log(x), then f(100*x)/f(x) = 10*log(x)/(2+log(x)). Since both sqrt(x) and log(x) are arbitrary on (1, 100], I'll choose them such that f(x) linearly decreases from 1 to 0 on (1, 100) while f(100) = 5. If you were to graph this function, it would fall down, infinitesimally close to the x-axis as x approaches 100, then spring back up for x>100. It then crashes down in a similar manner as x approaches 10,000, springs back up, and crashes down once again as x approaches 1,000,000 and so on. Clearly, this function does not approach zero as x approaches infinity because it keeps dipping back down arbitrarily close to the x-axis. The problem is that even though the function is strictly positive, its infimum is zero. One simple way to fix this is to put in just one more requirement that inf(f(x)) be some number greater than zero over the interval (1, 100]. For the actual sqrt and log functions, f(x) never approaches zero because the limit as x approaches 1 of f(x) is infinity. I believe adding this last requirement fixes my proof, but now it doesn't seem nearly so elegant. It is not so easy to accept that f(x)>C because we are forced to deal with a zero over zero limit and this limit is best handled with L'Hopital's rule, which uses derivatives and my proof was not supposed to use any calculus. Having said all this, I'm still a little confused about why my proof doesn't work. Surely, I've shown that for any x in (1, 100], f(x)>0, and based on the recursive definition of f(x), f(100^n*x) grows arbitrarily large. I can accept that my original proof was incorrect, but I wonder if I've instead proven some weaker property. Oh well. Edit 2: As a minor addition to this post, this reminds me of the discussion of convergence in my first real analysis class. We considered some function defined piecewise as fn(x) = n - n^2*x on [0, 1/n] and fn(x) = 0 on [1/n, 1] Our professor then stated that this function converges to zero on the interval (0, 1] as n approaches infinity. This elicited some protest from students because the left "leg" clearly blows up. He was right, though, and that function was the lead-in to our discussion of uniform convergence, with uniform convergence being more powerful than the garden-variety type. Perhaps the concept of uniform convergence somehow applies here. Maybe my proof says that f(x) diverges but does not do so uniformally (although I have a feeling I'm abusing terminology to invoke "uniform divergence").
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
I'm a little late to the party, but here's a sketch of the proof that requires no calculus and relies on just one fact (aside from the algebraic properties of the log and sqrt functions): that both log(x) and sqrt(x) are positive for x>1. I'll be working in base 10 for convenience, but the proof is essentially identical in any base. Consider the function f(x) = sqrt(x)/log(x), restricted to the domain (1,inf). Both the numerator and denominator are greater than zero, so this is clearly positive. We wish to show that this fraction tends to infinity as x approaches infinity. We know sqrt(100*x) = 10*sqrt(x) and also log(100*x) = 2*log(x). Edit: *Gasp!* What am I doing? That should be log(100*x) = 2+log(x). I've edited the rest of the proof accordingly. So f(100*x)/f(x) = 10*log(x)/(2+log(x)), which we can show tends to 10 as x approaches infinity using the definition of the limit. We can now inductively chain things along, finding ever larger values of f(x) for corresponding large values of x, effectively completing the proof. Note that this proof doesn't require a base case for induction or rely on the continuity of the sqrt and log functions. As long as we accept that the sqrt and log functions are definable and positive for all real numbers greater than 1, no matter our starting point, the function blows up to infinity for arbitrarily large x. I stumbled over this proof for a bit because I realized I did not know what properties of the log function we are "allowed" to use. In my real analysis textbook (by Kenneth A. Ross), the log function is defined in the last section of the book.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Tangent wrote:
But the quest to change the question is a long and futile one.
Agreed...
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
OmnipotentEntity wrote:
I have a rather specific and dumb question about physics. I'm currently taking Physics II which is mostly just Electromagnitism. We're currently going over the electric field due to uniformly charged rods. Are uniformly charged rods made from conductors realistic? As in, I would intuitively imagine the charge density to be greater near the edges than the center, due to the potential required to bring a charge to that point from infinity.
Boy do I have just the video for you: Link to video For the TL;DW version, the charge distribution within an object tends to uniformity as it approaches a 1-D configuration. It's actually a pretty surprising result because symmetry arguments suggest that the system should not be in equilibrium with a uniform charge distribution.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Some updates. I hacked* my script to incorporate touchscreen inputs, but I apparently don't have a version of DeSmuME that is Lua-compatible, so I can't test it. I have the 64-bit version of DeSmuME 0.9.10. When I try to run Lua, I get the following error: "Lua51.dll not found. Please get it into your PATH or in the same directory as desmume.exe". Of course, I tried moving Lua51.dll there, but that didn't fix it. I also did a quick online search for this error and I noticed that the official fix is to switch to the 32-bit version of DeSmuME. I'd rather not... As for BizHawk, I'm using version 1.9.1. I wrote a little Lua script to find the keys of the emu table:
Language: lua

for k in pairs(emu) do print(k) end
The output was this:
setrenderplanes
framecount
yield
limitframerate
getregister
frameadvance
minimizeframeskip
displayvsync
setregister
lagcount
islagged
getdisplaytype
getsystemid
getregisters
So no speedmode. Any suggestions on how to proceed? --- *Not computer hacking, more like hacking with an axe...
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Anty-Lemon wrote:
Bobo the King wrote:
Download bruteforce.lua
Language: lua

local function getframeadvancefunction() if FCEU or bizstring then return emu.frameadvance elseif gens then return gens.emulateframeinvisible else print("Unrecognized emulator.") end end
Desmume has emulateframeinvisible as well. Psxjin, FCEU(X), Snes9x, MAME, Mupen, Bizhawk, and possibly others have emu.speedmode (not to be confused with Bizhawk's client.speedmode). Using emu.speedmode("maximum") will cause frameadvance to act similarly to emulateframeinvisible.
Sorry it's taken me so long to reply. I've been busy, as usual. I wasn't able to incorporate emu.speedmode with Bizhawk. I think that function has been obsoleted. I was able to use client.speedmode, but could not set the speed any higher than I could otherwise-- it did not act like emulateframeinvisible. Am I missing something? I'll throw in emulateframeinvisible support for other emulators.
xy2_ wrote:
How would you go about making this script work with touchscreen inputs in DeSmuME?
Anty-Lemon is right. If you're talking about testing many different touchscreen inputs, the parameter space gets really frickin' huge. On the other hand, if all you want to do is touch a specific spot... well, it looks like my script can't do that yet. I'll get right on it. This script is useful when the buttons are reasonably well known and their timings is not (known space, unknown time). Based on your suggestion, I may drum up a script that tests touchscreen inputs when the timing is known but where to press is not (known time, unknown space). This would need to be a separate script because of the aforementioned problems with the parameter space ballooning out of control.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Encode title of the year.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Ask and ye shall receive!
CoolKirby wrote:
Bobo the King wrote:
But I'm supremely flattered that users remain interested in this script. I seriously had no idea that anyone cared at this point.
I meant to post this a few days ago, but I wanted to chime in and say thank you so much for the script! I've found it highly useful in optimizing an NES TAS I'm working on. In one instance of 2221 iterations (less than a half hour!) of aiming for a certain value, it did 6 frames better than I could do by hand. I hope to be able to use this for future projects too (especially once the BizHawk port is out).
Thanks, CoolKirby! I'm overjoyed to hear that at least one person has put this script to practical use. Let me know how the TAS goes in the long run.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Here is an updated version of my script. I've tested it in both FCEUX and BizHawk and it remains compatible in both. I'm concerned that it's rather bloated and inefficient. I can actually think of one glaring inefficiency. It should create savestates at intermediate points to cut down on execution time. For example, there's no need to re-execute all of the button-presses from the start if nothing has changed in the first frames. I know more or less how to fix this, but I'm a bit burned out at the moment. Anyway, enjoy! Download bruteforce.lua
Language: lua

-- * * * PARAMETERS * * * -- By default, ThisAddress just returns the value of a single address. However, you can have it return any function of any number of addresses. local function ThisAddress() return memory.readbyte() end IWant=ThisAddress ToBe='' --{'minimized','maximized','equal to','less than','greater than','at least','at most'} -- If ToBe in {'minimized','maximized'}... AndTheBestIveDoneIs= InThisManyFrames= -- Elseif ToBe in {'equal to','less than','greater than','at least','at most'} ThisValue= AndTheFastestIveDoneItIs=-- frames UsingTheseButtons={{}} -- * * * FUNCTIONS * * * local function tablecopy(t1) local t2={} if not(type(t1)=='table') then t2=t1 return t2 end for k,v in pairs(t1) do if type(v)=='table' then t2[k]=tablecopy(v) else t2[k]=v end end return t2 end local function getframeadvancefunction() if FCEU or bizstring then return emu.frameadvance elseif gens then return gens.emulateframeinvisible else print("Unrecognized emulator.") end end local function jpset(player, buttons) if FCEU or gens then joypad.set(player, buttons) elseif bizstring then -- BizHawk's joypad.set convention is "backwards". WTF, BizHawk? joypad.set(buttons,player) else print("Unrecognized emulator.") end end -- Takes a character code (from a string) and returns true if it corresponds to a numeral. local function isnumeral(charcode) return (charcode>=0x30 and charcode<=0x39) end -- Extracts the first number from a string. For example, running this function on the string "event48blah19" will return 48. local function getnumber(str) local numstart=nil local numend=nil for i=1,string.len(str) do if isnumeral(string.byte(str,i)) then if not(numstart) then numstart=i numend=numstart local j=i+1 while isnumeral(string.byte(str,j)) do numend=j j=j+1 end end end end if not(numstart) then error('No number found!') end local valuetext=string.sub(str,numstart,numend) local value = tonumber(valuetext) return value end -- Parses one of the bounds in an interval, returning the frame value. You would run this function on, say, "(event2+10," to return index[2]+10+1. -- It isn't necessary to type "event", "start", or "finish" in full, it just looks for the first match. Watch out, though, because parsebound('[safe+2,') will return index[2]+2, not 2. local function parsebound(str,index,maxframes) local value=-1 if string.find(str,'e') then --Bound defined relative to event. value=index[getnumber(str)] local plus=string.find(str,'+') if plus then local plusthis=string.sub(str,plus) value=value+getnumber(plusthis) end elseif string.find(str,'f') then --Bound defined relative to finish. value=maxframes local minus=string.find(str,'-') if minus then local minusthis=string.sub(str,minus) value=value+getnumber(minusthis) end elseif string.find(str,'s') then --Bound defined relative to start. Note that because of the elseif statement above, this won't be triggered by "finiSh". value=0 local plus=string.find(str,'+') if plus then local plusthis=string.sub(str,plus) value=value+getnumber(plusthis) end else --Bound defined by number. "+" not allowed! value=getnumber(str) end if string.sub(str,1,1)=='(' then value=value+1 end if string.sub(str,-1)==')' then value=value-1 end return value end -- Parses interval notation into start and finish times. local function parseinterval(UsingTheseButtons,index,depth,maxframes) interval = UsingTheseButtons[depth][4] if type(interval)=='number' then --If interval is just a number, then low and high are both equal to that number. low=interval high=interval elseif string.sub(interval,1,1)=='[' or string.sub(interval,1,1)=='(' then --The interval is explicitly defined in this case. local comma=string.find(interval,',') if not comma then error('Expected comma to define interval.') else local lowerbound=string.sub(interval,1,comma) local upperbound=string.sub(interval,comma) low=parsebound(lowerbound,index,maxframes) high=parsebound(upperbound,index,maxframes) end else --If no interval is explicitly defined, then the interval is taken to be implicit and both low and high are set equal to the output of parsebound acting on interval in its entirety. low=parsebound(interval,index,maxframes) high=low end --This is a little forgiving to the user. Perhaps their interval was defined improperly, such that the lower bound surpassed the upper bound. if high<low then high=low end return low,high end -- Compares IWant with Value according to function specified by ToBe local function check(IWant,ToBe,Value) if not(Value) then return nil end if ToBe=='minimized' then return (IWant()<Value) elseif ToBe=='maximized' then return (IWant()>Value) elseif ToBe=='equal to' then return (IWant()==Value) elseif ToBe=='less than' then return (IWant()<Value) elseif ToBe=='greater than' then return (IWant()>Value) elseif ToBe=='at least' then return (IWant()>=Value) elseif ToBe=='at most' then return (IWant()<=Value) else error('Invalid string for ToBe.') end end -- IWant refers only to the current frame, which isn't useful when checking nodes with branches. Therefore, this function directly compares an old value with a new value, based on ToBe. local function check2(newvalue,ToBe,oldvalue) if not(newvalue) then return nil end if ToBe=='minimized' then return (newvalue<oldvalue) elseif ToBe=='maximized' then return (newvalue>oldvalue) elseif ToBe=='equal to' then return (newvalue==oldvalue) elseif ToBe=='less than' then return (newvalue<oldvalue) elseif ToBe=='greater than' then return (newvalue>oldvalue) elseif ToBe=='at least' then return (newvalue>=oldvalue) elseif ToBe=='at most' then return (newvalue<=oldvalue) else error('Invalid string for ToBe.') end end -- Executes the actual button presses and checks if it is superior to previous attempts. -- The output of this function depends on the string in ToBe. If the string is "minimized" or "maximized", it returns the value. If the string is something else, it returns the number of frames. -- If it doesn't beat the current record, the output is nil. local function attempt(presses,IWant,ToBe,Value,maxframes,frameadvance) if ToBe=='maximized' or ToBe=='minimized' then for frame=0,#presses do for player=1,2 do --Edited for BizHawk support. Try to come up with a solution for all emulators. jpset(player, presses[frame][player]) end frameadvance() end if check(IWant,ToBe,Value) then return IWant() end else for frame=0,#presses do if frame<maxframes then if check(IWant,ToBe,Value) then return frame end end for player=1,2 do jpset(player, presses[frame][player]) end frameadvance() end end return nil end -- Uses UsingTheseButtons and index to construct a table of button presses, then passes that table to the attempt function to execute them. -- presses[frame][player][button]. local function pressbuttons(IWant,ToBe,Value,maxframes,UsingTheseButtons,index,state,frameadvance) local presses={} for frame=0,maxframes do presses[frame]={} for player=1,2 do --Edit the number of players here. presses[frame][player]={} end for i=1,#index do if frame>=index[i] then local OnOrOff = (UsingTheseButtons[i][3]=='on') --Set button if "on", reset otherwise. presses[frame][UsingTheseButtons[i][1]][UsingTheseButtons[i][2]]=OnOrOff end end end output=attempt(presses,IWant,ToBe,Value,maxframes,frameadvance) savestate.load(state) return presses,output end -- local function DepthFirstSearch(IWant,ToBe,Value,maxframes,UsingTheseButtons,index,depth,state,frameadvance) depth=depth+1 local bestpresses,attemptframes,attemptValue,presses low,high=parseinterval(UsingTheseButtons,index,depth,maxframes) if depth==#UsingTheseButtons then for i=low,high do --if i>maxframes then return end --Any input after maxframes is irrelevant and shouldn't be checked. index[depth]=i if ToBe=='minimized' or ToBe=='maximized' then presses,attemptValue=pressbuttons(IWant,ToBe,Value,maxframes,UsingTheseButtons,index,state,frameadvance) if attemptValue then Value=attemptValue bestpresses=tablecopy(presses) end else presses,attemptframes=pressbuttons(IWant,ToBe,Value,maxframes,UsingTheseButtons,index,state,frameadvance) if attemptframes then maxframes=attemptframes bestpresses=tablecopy(presses) end end end else for i=low,high do --if i>maxframes then return end --Any input after maxframes is irrelevant and shouldn't be checked. index[depth]=i if ToBe=='minimized' or ToBe=='maximized' then presses,attemptValue=DepthFirstSearch(IWant,ToBe,Value,maxframes,UsingTheseButtons,index,depth,state,frameadvance) if check2(attemptValue,ToBe,Value) then Value=attemptValue bestpresses=tablecopy(presses) end else presses,attemptframes=DepthFirstSearch(IWant,ToBe,Value,maxframes,UsingTheseButtons,index,depth,state,frameadvance) if attemptframes<maxframes then maxframes=attemptframes bestpresses=tablecopy(presses) end end end end if ToBe=='minimized' or ToBe=='maximized' then return bestpresses,Value else return bestpresses,maxframes end end -- * * * BASE CODE * * * if ToBe == 'minimized' or ToBe == 'maximized' then Value=AndTheBestIveDoneIs maxframes=InThisManyFrames else Value=ThisValue maxframes=AndTheFastestIveDoneItIs end frameadvance=getframeadvancefunction() depth=0 index={} if bizstring then state1="state1" else state1=savestate.create() end savestate.save(state1) presses,best=DepthFirstSearch(IWant,ToBe,Value,maxframes,UsingTheseButtons,index,depth,state1,frameadvance) if presses then for frame=0,#presses do print('Frame: '..frame) for player=1,2 do print('Player ' .. player .. ' buttons: ',presses[frame][player]) jpset(player, presses[frame][player]) end frameadvance() end if ToBe=='minimized' or ToBe=='maximized' then print('Best value: ' .. best) else print('Fewest frames: ' .. best) end else print('No improvement found!') end if FCEU or gens then emu.pause() elseif bizstring then client.pause() end --This function works. It will serve as a template for the final function. --[=[ local function DFS(G,index,depth) depth=depth+1 if G[depth][1] == 'abs' then low=G[depth][2] high=G[depth][3] elseif G[depth][1] == 'rel' then low=index[G[depth][2]] + G[depth][3] high=index[G[depth][2]] + G[depth][4] end if depth==#G then for i=low,high do index[depth]=i for j=1,#index do print(index[j]) end print('Next!') end else for i=low,high do index[depth]=i DFS(G,index,depth) end end end G={{'abs',0,5},{'rel',1,6,16},{'rel',2,8,20}} --G={{'abs',0,1},{'rel',1,10,11},{'rel',2,100,101}} depth=0 index={} DFS(G,index,depth) ]=]-- --[[ {{,,'[start,start+20]'}, {,,'[event1,event1+5]'}, {,,'[event2+10,event2+20]'}} for i=0,20 do for j=i,i+5 do for k=j+10,j+20 do end end end index={} function makeloops(events,index,depth) if depth==#events then for else depth=depth+1 end end Wikipedia pseudocode: procedure DFS(G,v): label v as discovered for all edges from v to w in G.adjacentEdges(v) do if vertex w is not labeled as discovered then recursively call DFS(G,w) ]]-- --[[ UsingTheseButtons has elements with the structure {player,button,'on'/'off',timing} where timing is a string based solely on PREVIOUS events in the UsingTheseButtons vector as well as the start frame (0) and end frame (InThisManyFrames/AndTheFastestIveDoneItIs). Examples of timing: '[start,finish]' -- Test all frames. '[start,37]' -- Test all frames from start to frame 37, inclusive. '(start,37)' -- Test all frames from start to frame 37, exclusive. '[15,37]' -- Any frame from 15 to 37, inclusive. '[event 2,finish]' -- Any frame after event 2 has begun, where event 2 is the second element of the UsingTheseButtons vector. This can be used to force, for example, shooting only after jumping. '[event 2+37,finish]' -- No, that doesn't mean event 39. It means wait at least 37 frames after event 2 has finished. ('[event 2-37,finish]') -- I'm not sure I want to program this, since each event's timing is supposed to depend on PRIOR events. It should always be possible to put them in order. In total, the UsingTheseButtons table might look like this: UsingTheseButtons={{1,'A','on','[start,finish]'}, {1,'A','off','(event 1, finish]'}, {1,'right','on','[37,60]'}, {1,'up','on','[event 3+2,event 3+2]'}, {1,'right','off','[40,finish]'} } which means try pressing A on any frame, hold it for any interval (release A any time AFTER pressing it), hold right beginning sometime between frames 37 and 60, hold up beginning exactly 2 frames after holding right, and release right sometime between frame 40 and the end of input. Up will be held until the end of input. Later events override conflicting earlier events. Generally, it's a good idea to define the timing of 'off' commands with respect to their earlier 'on' counterparts. ]]--
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Several users wrote:
Update this script for BizHawk, plz?
Errr... wow. First of all, I'm sorry I missed the bump to this thread back in April. I was a little busy at the time and it must have slipped past me. But I'm supremely flattered that users remain interested in this script. I seriously had no idea that anyone cared at this point. I'll work on it in the near future, following Warepire's suggestions, and submit an official updated version. I may also take the time to consider further changes to the script, including making an iterator function, which I've never done in Lua. By the way, I recently thought about using this script on that Mario 64 glitch in Tick Tock Clock. It might be an easy way to collect the $1000 bounty. The problems are that I haven't touched the script in ages, I don't have the Mario 64 ROM, and the script isn't set up for N64 games. Even so, I thought I would throw that out there if anyone else would like to collect on the bounty.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
I think this is a fine idea and it sounds like you've already laid out the rules, but may I make a suggestion? If possible, have an unassisted runner play the game, either live or pre-recorded for comparison. It seems to me that half the purpose of doing such a demonstration is to show off tricks that cannot be feasibly replicated unassisted. If an unassisted human completes the game in 10 minutes and a TAS completes it in 6 minutes while abusing collision detection, zipping, and other glitches, that would be very impressive. Give the audience a benchmark for comparison. I understand if you don't have the luxury to set aside extra time for a human-TAS race.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Guga: Sounds like you're back on the right track! Dropping out of therapy can be risky, but it sounds like it paid off. Besides, sometimes therapy (or a particular therapist) isn't right for someone. While I don't know about the specifics of your case, I was always pretty awkward as a kid. I'm still awkward as an adult, but what I think has changed is other people's attitude toward me. The same kind of behavior that got me mercilessly picked on in 6th grade is now just seen as, "One of Bobo's quirks..." I try to give back to people when I can, but I certainly depend to some extent on others' warmth. As far as your situation, I hope you also discover that people around you enjoy your company for who you are. And if they don't, screw 'em. I think that anyone who doesn't have a debilitating personality disorder can find at least a handful of people who love and respect them regardless of who they are as long as they search hard enough for them. CGF95: I found nothing in your post to anger anyone and it's your decision what, if anything, you want to open up about-- heck, I wouldn't feel comfortable discussing my life on here. I'm a very private person as well. If you think it will help, remember this: You are not what was done to you. Because you were bullied and abused as a child, I hope you realize there is little if anything you could have done to prevent or alter your tormentors' behavior. Don't be shackled by the untrue notion that they have sent your life irrevocably down an alternate course. Claim ownership of your own personality, acknowledge the good, and try to work on what you perceive as weaknesses in yourself. In time, you will look back on your treatment like pages in a book, as something that happened to you and not who you are. I also frequently berate myself and although I'm not happy about it, I have come to realize that it's relatively common and benign. I suggest you let yourself say things like, "GOD! I'm such an IDIOT!" and then take a few deep breaths, reflect on it, and remind yourself that whatever you did is not so unforgivable that you need to verbally tear yourself down for it. Verbally castigating yourself only becomes a danger if you let it get out of hand and begin to think of self-harming. I know that a lot of the things I'm embarrassed about are so trivial that I doubt people even remember them. You don't need to push yourself out of your comfort zone, but I don't think you need to feel anxious here. I know of a handful of posters (myself included) who occasionally or frequently embarrass themselves and I think you'll find it hard to stand out above them in terms of irritating people.
1 2
10 11 12 34 35