Posts for flagitious

1 2 3
20 21
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Time is up. If anyone cares the fastest method I found was a basic counting sort into 2024 buckets, and after that an insertion sort to clean up, this had a sum of 0.45 seconds for 50k trials.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Hmm I think it is pretty precise (results vary by 2% for 1 second long test), but you are right the round off could lead to inaccurate times. I will look into this more. Does anyone know how to get more accurate timing (in c)? One way if there is no more accurate function is to generate all random arrays first, sort them all, then check them all, but I rather avoid this as it might reduce cache hits. To get things started my best method so far results in 0.86 seconds (sum of 50k trials). I think there are some methods that can beat it, but that should be hard to beat, I've already put alot of effort into it. Edit: here is a sample version that times it all at once to avoid possible inaccuracy. Time was still 0.86 for my sort though.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Post subject: Sorting Optimization Challenge
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
The challenge is to see how fast of a sort you can make. Theoretically sorting is not an interesting problem, as the proven lower bounds (O(n*lg(n)) for comparison and O(n) for integer sorts) have been achieved numerous ways. However in practice there are wide ranges of speeds. I believe I know the fastest way to sort large amounts of integers (flash sort) and small amount of integers (insertion sort), but it seems there are alot of potential methods for medium amount of numbers. So this challenge is to see how fast of a program you can write to sort 1000 uniformly random integers from 0 to 2**30-1. To make it easier to measure, perform it 50000 times and report the sum of time. So that we can all run code on the same computer use http://golf.shinh.org/checker.html the performance checker for shinh's code golf server (accepts like 60+ languages). You can use this c code to generate the numbers, measure the time, and check the validity of your sort (it has a slow version of quicksort included). You can use whatever language and testing script you like. You can pass your sort either a linked list or an array (so long as its returns the same data type). Also it can be inplace or not. Let's say the competition ends in two weeks, march 23. In the meantime please only post times and not the actual algorithm. After this time we can collaborate and combine methods etc. Also this challenge idea is kind of made up without any idea what to expect, so if you have any ideas to change it or suggestions please feel free to post them.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
"hi" edit: damn too slow
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Warp wrote:
Is it possible to construct a die with an odd number of faces so that each face is planar (in other words, the die is a polyhedron), each face has a number on it, and getting any of the numbers (by throwing the die normally) has equal probability? (If it's not, why not?)
I would still consider that not clear, because it dependent on the surface. For irregular shaped dice, it is possible to make them equal with probabilities by just tweaking some lengths, but this would be very difficult to do and prove (probably surface dependent due to bounce etc). For example consider a pyramid, you can just tweak the height until the square side has equal probabilities to the others (shorten to increase, heighten to decrease).
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Post subject: Mario AI Competition
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
http://julian.togelius.com/mariocompetition2009/ It is a competition where your program is given the level data, and your AI bot must beat the level. I haven't read in full detail about it yet, apologies if I have over summarized. This looks like such a perfect competition for this site and there is a top prize of 500 USD. Teams are allowed. I haven't decided if I will participate yet, but I feel I should post this now to allow maximal time for anyone here interested to work / organize a team.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Blublu wrote:
You can disable all the dialog for finished levels in the options. All the delays are removed, including all dialog and mini-cutscenes. The game is very very speedrun-friendly. Edit: Alternatively, you can press enter to instantly skip the current dialog/cutscene.
I noticed you have some good scores (no idea how to get under 2:03 in lvl iv for example), although it looks like mara retook lvl xx. I haven't quite beaten the game yet (on lvl 29), but I'll post mine when I complete it. Edit: figured out your trick for lvl xx. That is really clever but the super low time makes it easier to figure out since there are only so many things you can do in that time. If you really wanted to boggle there mind you could have made it purposefully like 30 seconds slower :) Also submitted my scores. I have only tried to get good times on the early levels so far, and some I have no idea how to improve that much, like Pling's recent level III. It has to be something weird/bug since any normal improvement would improve time by about increments of 30 seconds due timing of lift.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
I just started Temporal, and I must say it is one of the most well made free games I have ever seen. I haven't gotten that far yet, but its originality and game mechanic have a lot of potential for some cool puzzles that I look forward to solving.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
I think my idea is being misinterpreted, I meant for the speed of light to be greatly lowered, not mario's speed increased. Also I thought the high point would be the feel and mastering movement in such an environment, not graphical effects and how they appear (although they should still be as accurate as possible). Color change did not occur to me, but it would be best if colors were left the same, also for sound I would pretend it is just the same as light. This is what I had in mind as a challenge that would require mastering to become good at the game: as mario speeds up, time would seem to slow down for him, thus from his perspective, everything would be happening really fast, the timer would go down fast, the walls would approach faster, etc. This would be really hard to control, and I am sure there are other effects that might also add challenge, but which I am not aware of or do not understand yet (maybe general relativity effecting gravity?).
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
I am aware that relativity does not only affect where things appear to be, and it would be best if the game implements everything accurately, for example from mario's point of view level time and music would speed up as he speeds up (both views should be available). I guess it should use the Lorentz' equations, thank you for pointing that out. I do not have immediate plans to make this game (I am not an expert at either relativity or game making). However I created this topic to spark interesting, hoping someone else would! Haha I know that is lazy, and I am sorry. I may do it, but I make no promises. If I do start to work on it at least I will have a good place to go for help.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
It would be cool to make a video game where the speed of light is on the same order of speed as things that move in the game, and to implement relativity accurately. Some game types that come to mind are mario (platformers), pinball, space shootems. Point of view would be from mario's perspective, but possibly with an option of viewing it from the level's perspective (which I don't think would be that different than normal). When I say point of view, I mean keep the same 2d display, but updates would be lagged and positionally skewed based on the time light takes to travel from that point to the mario. This game would be cool for at least one reason, it should help make understanding relativity intuitive. I would hope that the game play would also be exciting and fun, although I cannot predict if it will be. Does anyone know of any open source mario or similar implementations for a starting point? Edit: maybe this simulator might be of use, haven't checked it out yet though: http://realtimerelativity.org/index.html
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
sixofour wrote:
It means exactly as it says, an infinite number of events cannot have occured before June 16th 2009.
Time is not discrete, so actually there have been an infinite number of events. However all you are attempting to prove from this statement is that time had a beginning, which science already gives you for free. Note, this is the ask Bisqwit thread, not the debate religion thread.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Here is a video of SlayerS`Boxer (one of the best starcraft players of all time) playing blind folded against a blind person. http://www.youtube.com/watch?v=5AR_ZMlPoVs The blind person is impressively good, so after losing half his base, boxer removes his blind fold and struggles to survive.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
This run is very well done. I never thought I'd see myself beat by this much. Thanks Tompa for making me remember to keep an open mind to what is possible.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
You might want to edit into the title that the plugin is harmful, at first I saw title and thought, who cares?
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Really nice damage boost and tricks in the ice palace. Looking forward to seeing the whole thing (especially ganon's tower).
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
None come to mind immediately for your run, but for the ganon kill with exploration glitches, it looks like the one you use to cut from the smithy shop in dark world over to the pyramid would save time getting into hyrule castle. It seems like there is alot of potential for other things too.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Whoa, those are nice glitches
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
I would definitely not start over for 2 seconds saved over 40 minutes, especially when you are so many minutes ahead of published TAS. I was not aware of any errors in the first 2 screens, but its good that you found a couple frames which I guess resulted in more savings due to not having to wait for rupee drops with the bushes (they go on and off every 8 frames). However at this point I am more concerned with route changes or new glitches (for example radblast's discovery of no silver arrows, saved like 30 minutes from my first attempt at a bug run a couple years ago). And also if that last hit on ganon WIP I posted could save 15 frames it would save 6 seconds (assuming 4 hits on next light too).
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
not really
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Warp wrote:
OmnipotentEntity wrote:
Because of general outcry, feeling bad about rejected otherwise functional code, and having read over the rules at codegolf.com regarding this, I'm removing the requirement to not have trailing whitespace.
I have to say that it feels a bit unfair. I put a rather decent amount of work into getting rid of that trailing whitespace in the minimum amount of code, and now it all goes to waste. Also, I made a post in another forum about this compo, and a couple of people made good submissions (eg. one python submission in 112 bytes), which I intended to forward to you. Now I'll have to go back and tell them that the rules have changed and that they will have to start over. I don't think they'll do it. If the specification was clear and unambiguous (md5-sum of the result and all), why does it have to be changed now? Because people don't want to go through the trouble of getting rid of that trailing whitespace in their code? What's next? Allow also "1" to be skipped because, you know, some mathematicians still think it *is* a prime number. And, you know, it makes the code easier when you don't have to take that value into account as a special case of the generic prime testing algorithm. Arbitrary rule changes in the middle of a compo are irritating.
I concur, it is bad to allow trailing spaces because it changes the challenge. But I do sympathize with languages where it is difficult to avoid not putting a newline at the end. I propose to ignore only newlines at end.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Hey, a tip for pythoners, it seems you can't use print, but you can output to stdout shortly using input()
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
dezbeast wrote:
Really enjoyed your WIP, Flag. I may take a crack at Ganon, but I don't think I'll have any better luck.
Back, well good luck if you do. Here is some information that may help (although you might want to not read this until after you have tried for a while because it could cause you to run into the same [possibly false] assumptions). It is basically just making ganon's teleports as short in time as possible, although the lamp could have been lit 4 frames later, giving you 4 frames longer to get the 4th hit in (but I needed more than 4). I think I have the shortest warps in distance possible, but there might be randomness that affects the time the warp takes even if same length, this I haven't checked yet. I will hold off on my attempts for about a week then I'll try again some more if it hasn't been done yet and submit regardless if I can get the 4th hit in.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Tompa, I would like see a WIP as soon as there is a difference from the original. You got the new arrow route planned pretty fast it seems. Dezbeast, I have planned out and executed the route, it is going to be about 9:10 long. It would have been done yesterday but can't quite get 4 hits in per light on ganon (about 15 frames too slow), and if I could it would save about 6 seconds. Leaving on vacation tomorrow so won't have it done for a while. Here is the WIP: http://golfscript.com/temp/bug3.smv If anyone is up for it, feel free to try and do it and it can be a joint submission. As a first iteration for this route I don't think the execution is as frame perfect as tompa's, but it should be close. I figure a run like this is more likely to benefit from a new glitch or major route change (there are many many routes through exploration zone), so that is where most of my effort has gone. PS the reason for exiting the cave and reentering is because wrapping around the edge of exploration zone removes monsters but I need them because the armos knights are needed to modify memory at 7e0b20, which for some reason or another stops the old man bug (bug where game hangs when you try to get the mirror while it is still raining).
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
For rupees a couple things to try are the money making game in lost woods, archery thing in dark world town (if you hit all last gives 99). Another route to consider is doing 2nd crystal palace early since it doesn't save time to end up near the bomb shop, but it is on the way to the flute, this would require getting earlier flippers and earlier rupees (maybe from 300 in sewers). I would guess that current rupee route is going to be the fastest but those are just some other things to consider. For arrows, don't forget to factor in that you no longer need 4 for the ganon fight :) (sorry if you did already, didn't see it anywhere). Also for Lanmolas I think a spin attack would be faster if you can hit them all twice with same swing. Possibly some sort of herding + spin attack could be fast for armos knights battle too. I don't really remember all the places arrows are needed for regular enemies, but one thing comes to mind and that is I think some can be hit into spikes maybe to kill them fast without arrows.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
1 2 3
20 21