Posts for flagitious


1 2
14 15 16
20 21
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Warp wrote:
I have cancelled kicks on purpose (after starting a wrong kick by mistake) even in record submissions. Others have done that too. It's not like it's a completely useless and irrational feature. (Whether it's the best way to handle it is another question, but it's not a completely useless feature.)
Alright forget it kicks, should stay the way they are. But I really think it should keep a record for who discovered the current fastest path first. This is the last I will speak of such topic, because I'm just distracting from what looks like a good discussion of coding techniques.
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:
As I have already saíd several times, it's a question of whether we want to compete on who has the most skill on playing this game requiring reflexes and good timing and finding the optimal path for a level, or do we want to compete simply on who can find the optimal path first.
Complaints are useless without suggested improvement, so here's both: To me it makes more sense to base it more on who can figure out the optimal path first. As it is now, if you are good at kicking all you have to do to steal a record is beat some level using the worst path in the world then you can look how the record holder does it then you can just copy it exactly but kick slightly better. Then whoever figured out the smart path gets no credit. So like you said it is a question of timing versus thinking, but I choose thinking. Besides I would consider this a fault in the controls, its not intuitive and why would you ever want to cancel a kick? Good games have good controls, you do not see Link canceling his sword swing if you move too soon. If this were the case, probably none of us would have ever heard the world Zelda. I am just a big believer in good controls, I feel the challenge should come from the design of the levels and monsters and stuff not from the controller. It probably should stay the way it is though, since this has been here a while and people have spent good time optimizing with these controls it would be terribly mean to void all their work. Perhaps in the high scores, list who discovered currently known theoretical fastest path first? Theoretical fastest time for a path can be calculated pretty easily right?
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 noticed this topic so I'm a little behind current affairs, only up to level 5-1, but very fun so far. I have only noticed two bad/annoying things, sorry if they are mentioned as I didn't read pages 4-9: When you kick a box pressing a direction interrupts this, this is really annoying if you are trying to go fast. When I press space bar to undo, for some reason some of the time instead of undo it just restarts the level. This basically just makes be careful because I can never rely on an undo. I am using the browser Camino which is like firefox for mac. Safari didn't work. The optimal solver program is interesting, I am tempted to try and write my own, but it looks like yours is pretty good already so I might just be wasting my time.
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
Ah where did you hear about this new glitch. I guess it is time I reveal it since it has been a several months since and I have not made any progress in redoing the run with it. I'll do that soon. Anyways very nice run, congratulations. I admit my lack of knowledge about this game prevents me from making any intelligent critique. Infact I feel guilty for not having played this game through because it looks very good.
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
Holy crap, a submission for this, I somehow missed all progress on it, sorry for not being up to date, I'll watch it now :)
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 more efficient algorithm for solving it, it can solve past 100 dice with 100 sides instantly. It doesn't work much past that due to overflow, however you can fix this by changing the type of v, sum, total to a big integer or big decimal. Here is the java code, you can download compiled version at http://wam.umd.edu/~darreon/dice To run, download and at the command line go to its directory and type java dice2 8 6 4 (for n = 8, s = 6, r = 4). BTW does anyone know of any open jobs doing this kind of programming? I need a job and this stuff is fun :)
public class dice2 {
	public static void main(String [] args) {
		System.out.println(solver(atoi(args[0]), atoi(args[1]), atoi(args[2])));
	}
	static double solver(int n, int s, int r) {
		double v = 1, sum = 0, total = 0;
		int t = n, t2 = n * s;
		for(int i=1; t<t2; i++, t++, t2--) {
			sum += (reduce(t, r) + reduce(t2, r)) * v;
			total += 2 * v;
			v = v / i * t;
		}
		if(t == t2) { sum += reduce(t, r) * v; total += v; }
		return (double)sum/total;
	}
	static int reduce(int x, int r) { return x < r ? 0 : x - r; }
	static int atoi(String s) { return (int) (Long.decode(s)).longValue(); }
}
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
ah, i was doing it after each dice, but after rereading the problem i guess he wanted after the sum
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
N*((S+1)/2 - (S - R) / S * R - R / S * (1+R) / 2) assuming 1 <= R <= S, whole numbers explanation: (S - R) / S = probability that S - R > 0 so multiply that by reduction R / S = probability that S - R <= 0 (1+R)/2 = average reduction if bounded by 0 this can probably simplified a little, and if you redfine it so the problem of dice is 0 to S instead of 1 to S that might simplify it more too edit: simplified version n * (r - s) * (r - s - 1) / (2 * s)
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
edit im retarded, lemme refigure out
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
N*(S+1)/2 - R / (S + 1) * (R - 1) / 2
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
Spacecow wrote:
If you don't mind spending a few bucks on something decent and reliable, if you sign up on http://www.dreamhost.com/ with the "crazy domain insane" package (under the "managed web hosting") and enter promo code 777 after you fill out your basic information, you get a year of hosting and a domain name for $10. I signed up a few months ago and have had no problems with them at all. I recommend 'em.
This place seems pretty good, shell/cgi/php access, so I went and followed your instructions with the 777, that waives the setup fee, but it says its 10$ per month, not 10$ for year. Is this your mistake or is this a different deal? 10$ a month not bad 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;}
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Oh, I guess if the free dictionary service doesn't rake in much than this site wouldn't either. I was getting these figures from alexa.com ranking, 50000, but a little less than half of that is to the nesvideos site I think. I like the Tshirt idea, I would buy one :)
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: Making money off the site
Experienced Forum User, Published Author, Player (201)
Joined: 7/6/2004
Posts: 511
Bisqwit, I have noticed that recently there has been bandwidth problems, and that your traffic rank is abouth 50,000th. This is a very high rank and if you wanted to you could probably make over 10,000$ a year with a rather small amount of ads on each page. This may go against your principles, and might piss some people off, but I believe you deserve it, to at least pay your expenses for the site. I bring this up because I recently had a job that was programming for an affiliate marketting company/ search engine optimization company / google ads. So I saw how much money some of sites make and it was really surprising. Anyways I quit that job because I hate web programming, but oh wells.
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
Congradulations. This is very impressive and I don't even know anything about megaman.
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
Cool movie! Very fast paced and tricky manuevers make it interesting and impressive.
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
doh.
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
Ah tricky. if 1. c7+ Ka7 2. Ra6+ Kb7! then 3. Bf3+ gxf3 (all King moves lead to draw quickly) 4. Rg6 Qxg6 5. c8Q+ now white can perpetually check black until he captures queen, making stalemate. if 4. ... Qxc7 5. Rg7 if 4. ... any other move 5. c8Q and you can chase check around until black is forced to capture your rook and queen or lose material. pretty funny scenario
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
1. c7+ Kb7 2. c8Q+ Kxc8 3. Bxg4+ Kb8 4. Rd8+ Kc7 5. Rd7+ Qxd7 6. Bxd7 (position is drawn) if 1. ... Ka7 then 2. Ra6+ Kxa6 3. c8Q+ ... 4. Qxg4 (position is drawn or better) if 1. ... Ka6 or Kb6 then keep checking him with rook until game is drawn or he moves into 7th row (use already shown sequence that leads to draw) or cth column. Then ... c8Q ... Qxg4 (position is drawn or better). if he moves into 3rd row where your roock cannot check him anymore, then your rook is already on 4th row so you can play c8Q without fear of Qe4++. (position drawn or better) Maybe there is a better answer that leads to a forced draw instead of just a drawn position?
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
Sorry didn't see post about asking to use this topic yeah its fine, best place to do it. I couldn't watch the whole thing because VLC kept crashing, this is the only video i've had the problem with. I don't know if its my fault or its though. Anyways keep up the good work! Are you going to submit when you are finished?
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
Aside from minor errors already mentioned it is good. I only see one major improvement which is in the castle. When you first fly up to that secret area, you lose your running state because you hit the wall on the right losing all your speed. It is possible to not lose running state if you press to the left a little, this is much faster. Also in the next room same thing, go to the left more so that you can be moving the right already. Also on that long stretch running to that door after you do the secret in the first place you can fly and this will save a small amount of time. BTW I have only played this game a little and I didn't know about that secret, now I can never discover it for myself grrrr! Good luck and keep up the good work.
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
Good improvement. Ut oh when I have voted for my own submissions I didn't download it first kekeke.
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 enjoy writing the stuff for mario tricks super mario world sometime. In the meantime I'll just try and explain real quick: When you are flying and you press forward you accelerate. However once you reach top speed you speed varies slightly, repeating every 5 frames. So you want to stop pressing forward when you are at the fastest of this oscillation. To find which is the fastest just try all 5 and see how far you get by a given frame.
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 always wondered why there was no time attack for this game... now I know, its only 2 levels. Anyways nicely done. I don't know crap about this game so my only question is: you manipulated luck to avoid jumping over stuff, but there was once you did, was this unavoidable?
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 said I would post the algorithm along time ago and forgot so here it is. Kinda messy, sorry.
#include "utils.h"
#include <math.h>
#include <stdlib.h>

#define TTNB 9
#define LCUT 4
#define HCUT 9
#define BEST 7.55
#define BCUT 10
#define RMX 31

struct _node {
	int d;
	struct _node *n;
};
typedef struct _node ll;

void bucket1k(int *a, int *e, int max) {
	int shift = max - TTNB, nb = (1 << TTNB);
	int *i, *w, d;
	ll *c, **j;
	ll **bucket = (ll **)calloc(nb, sizeof(ll *));
	ll *water = (ll *)malloc((e - a) * sizeof(ll));
	for(i = a, c = water; i < e; i++) {
		//vec_dst(i + 4, 0x04080000, 1);
		j = bucket + (*i >> shift & ((1 << TTNB) - 1));
		c->n = *j;
		c->d = *i;
		*j = c++;
	}
	for(j = bucket, i = a; j < bucket + nb; j++)
		for(c = *j; c; c = c->n) { 
//			*(i++) = c->d;
			d = c->d;
			for(w = i++ - 1; *w > d; w--) w[1] = *w;
			w[1] = d;
		}
	free(bucket);
	free(water);
}

void count1bit(int *a, int *e, int shift, int times) {
	int *i, *j, temp, mask;
	i = a - 1; j = e, mask = 1 << shift - 1;
	while(1) {
		while(!(*++i & mask));
		while(*--j & mask);
		if (j < i) break;
		SWAP(*i, *j);
	}
	if(times > 1) {
		count1bit(a, i, shift - 1, times - 1);
		count1bit(i, e, shift - 1, times - 1);
	}
	else {
		bucket1k(a, i, shift - 1);
		bucket1k(i, e, shift - 1);
	}
}

int pickshift(int r) {
	int v = r / BEST + 0.5;
	if(v == 0) v = r;
	else v = ceil((float)r / v);
	if(v > HCUT) v = HCUT;
	return v;
}

#define F(x) ((x) >> shift & mask)

void countess(int *a, int *e, int max, int remains) {
	int i, shift, k, temp, v, j, m, mask, *s, *c, *p;
	v = pickshift(remains);
	k = 1 << v;
	mask = k - 1;
	shift = max - v;
	c = (int *)calloc(k, sizeof(int));
	s = (int *)malloc((k + 1) * sizeof(int));
	//for(i = 0; i < k; i+= 8) vec_dst(c + i, 0x04080000, 0);
	for(p = a; p < e; p++) {
		vec_dst(p + 8, 0x04080000, 1);
		c[F(*p)]++;
	}
	for(i = 1, *s = 0, s[k] = e - a; i < k; i++) c[i] += s[i] = c[i-1];
	for(m = 0; m < k; m++) {
		if(s[m] == c[m]) continue;
		i = s[m];
		v = a[i];
		do {
			j = --c[F(v)];
			SWAP(a[j], v);
			vec_dst(a + j - 1, 0x04010000, 0);
		} while(j != i);
	}
	free(c);
	v = remains - max + shift;
	if(v >= LCUT) for(i = 0; i < k; i++)
		countess(a + s[i], a + s[i + 1], shift, v);
	else if(v == 0) for(i = 0; i < k; i++) 
		bucket1k(a + s[i], a + s[i + 1], shift);
	else for(i = 0; i < k; i++)
		count1bit(a + s[i], a + s[i + 1], shift, v);
	free(s);
}

void darren(int *a, int *e) {
	int lgn = log10(e - a) / log10(2) + 0.5 - BCUT;
	if(lgn <= 0) bucket1k(a, e, RMX);
	else if(lgn < LCUT) count1bit(a, e, RMX, lgn);
	else countess(a, e, RMX, lgn);
//	countess(a, a + n, RMX, 31);
}
If you're not using mac comment out the vec_dst, it just prefetches data, I don't know the other operating systems equivalent. Basically the function 'countess' is the only important one, it is like counting sort but without extra memory usuage.
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
Mortal Kombat 3 desyncs a ton. I doubt it is worth fixing just for this game, but this game might help you debug as it desyncs so often it would be easier to test stuff or something. http://tasvideos.org/forum/viewtopic.php?t=2403
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
14 15 16
20 21