Matt Parker's "Share the Power" Puzzle by Allison James

In response to Matt Parker's "Share the Power" puzzle video: https://www.youtube.com/watch?v=E5-pgBnGyzw

The problem is as follows: Sort integers 0 through 31 into two sets of 16 numbers so that each pile, when totalled, results in the same value. Not just for the base numbers, though. They also have to result in the same total if you power every number by 2, 3, and 4. (Watch the video, because Matt Parker's entertaining!)I like mathematics. So I watched this video, and decided I was going to solve it the best way possible: by making a program that randomly checks answers to the problem until it finds the correct solution. Because nothing I do makes sense.

Here is my program. It's made in GameMaker 7, because retro. Here's the entire code, found in one object:

Create event:

//Initialise a list holding values 0 through 31
global.Checklist=ds_list_create();
for(i=0; i<=31; i+=1) ds_list_add(global.Checklist,i);

//Initialise five "report" lists:
//0 = the string of numbers being tested on a given iteration;
//1-4 = the true or false status of the total of n to that power
for(i=0; i<=4; i+=1) {global.Testlist[i]=ds_list_create(); Found[i]=0;}
Iteration=0;

//Turns true if an answer is found
Ended=false;

Step event:

//Stop testing if we found the answer
if( Ended ) exit;

repeat( 200 ){Iteration+=1;

//Clears the top value of the reports when there's over 10 of them
if( ds_list_size(global.Testlist[1])>=10 ){for(j=0; j<=4; j+=1)

//Shuffle the values so we're trying a new one
ds_list_shuffle(global.Checklist);

//Report the actual values from group 1 that we're checking
var str; str="";for(i=0; i<=30; i+=2){str+=string(ds_list_find_value(global.Checklist,i));if( i<30 ) str+=", ";}ds_list_add(global.Testlist[0],str);

//Check the totals for each of n^1 to n^4
p[0]=true; p[1]=true; p[2]=true; p[3]=true; p[4]=true;

for(j=1; j<=4; j+=1) {var pile1; pile1=0; var pile2; pile2=0;for(i=0; i<=30; i+=2)if( pile1!=pile2 ) p[j]=false;

var str;str="FALSE";
if( p[j] ) {str="TRUE"; Found[j]+=1}ds_list_add(global.Testlist[j],str);}

//Terminate the checking next step if we've found the answer

if( p[1]==true && p[2]==true && p[3]==true && p[4]==true )

Draw event:

draw_set_font(font0);
draw_set_halign(fa_left);
draw_set_valign(fa_top);
draw_set_color(c_black);

//Draw the results
for(i=0; i<ds_list_size(global.Testlist[0]); i+=1){draw_text(20,10+(i*50),ds_list_find_value(global.Testlist[0],i));for(j=1; j<=4; j+=1)

draw_text(20+(120),10+(11*50) ,"Iteration")draw_text(20+(120),10+(11*50)+20,string(Iteration))

for(j=1; j<=4; j+=1)
{draw_text(20+((j-1)*120),10+(12*50) ,"n^"+string(j)+" Found")
draw_text(20+((j-1)*120),10+(12*50)+20,string(Found[j]))}

Untitled-25.fw.png

Untitled-25.fw.png

 And that's it! 200 times per step (should be 12,000 per second but it lags because it's compiled with an old GameMaker) it shuffles the numbers into two piles, checks each of n^1 through n^4, and if all four return true for a single set of numbers, bam! Winner!

Well, it would have been if I hadn't, impatiently waiting for my program to spit out the answer in mere minutes, I hadn't googled 32 factorial. If there is only one ordering of the numbers that results in a pass in all four categories and my program was doing one check per second, turns out I'd be sitting here for a few quadrillion millennia  waiting for my mythical answer.

So I altered the code a bit to up the count to 5,000 60 times per second (which is laggy, but y'know...), with it dropping that number if the FPS is too low (which it is).

And as I sit here writing this, the new program is on iteration 5,500,000. It has found a total of 83,000 combinations that work for n^1, but only 8 for n^4. And of course, none that work for all four.Optimisation time!

First, I made the code early-out if any of the tests fail. I then reversed the testing order, so n^4 goes first - since n^4 fails significantly more often, it means less redundant code is run.

And then I realised there was another nice optimisation I'd entirely ignored.If each of the two half-piles of numbers have to total the same, then the total of BOTH piles would be twice that. And since all of the numbers in both piles are set, I could work out this total! So I chucked Excel open and found that:

0^1 through 31^1 = 496;
0^2 through 31^2 = 10416;
0^3 through 31^3 = 246016;
0^4 through 31^4 = 6197520.

So for a valid solution, I only have to check one of the two piles for half of the above values (248, 5208, 123008, 3098760).

By now, the new program is checking over 100 iterations in the time it takes the original to check 1. I was figuring this might be my special way of solving a problem - turns out the profoundly lazy way is also the ridiculously lengthy way!

While it's running, I decide to rewatch the video just in case something lurches out at me. It's at this point I see this:In both of Matt's previous examples, for each eight numbers, the first, fourth, sixth and seventh go into pile one; the other four go into pile two.

Please don't let it be this easy.

I repeated the pattern... n^1 passed, n^2 passed... but n^3 and n^4 were slightly off.That was doing: unnuunnu (assuming in the screen caps above, the upper is "un" and the lower is "unnu"). uunnnnuu made n^3 pass as well, but n^4 still failed.

A real mathematician, at this point, would probably be laughing in my face. I should probably be working this out for real.

But then I found unnunuun.

And all the numbers aligned.

So Matt Parker, if you happen to be reading this,

Set 1: 0, 3, 5, 6, 9, 10, 12, 15, 17, 18, 20, 23, 24, 27, 29, 30
Set 2: 1, 2, 4, 7, 8, 11, 13, 14, 16, 19, 21, 22, 25, 26, 28, 31.

I didn't see the pattern you laid out in plain sight. And as a result, I made a piece of software. A piece of software that is both ridiculous and redundant. A piece of software that has gone through 47 million iterations checking random groups of numbers for a solution, and has yet to find a group that satisfies n^4 and n^3, let alone n^2 and n^1.Thank you.And damn you.

ADDENDUM!

I'm still looking at this trying to work out what's going on. I did notice one thing though:

unnunuun

The Us are in positions 0, 3, 5 and 6, and the Ns are in positions 1, 2, 4 and 7, in the final "pattern".

This is exactly the same as the alignment of numbers in the sets themselves. Which is pretty... FRACTAL

Maybe for 0-127 and n^1 to n^6, the answer is unnunuun, where every U is itself an unnunuun and every N is an nuununnu?

My brain hurts.

How to Make a Clickbait Blog Post About How to Market Your Indie Game by Allison James

So you've decided to write a post about how to market your indie game. It might be on your own website, or on a gaming website that accepts guest articles and has a far-from-rigorous quality control. Great, the world needs so many more of these articles! Here's a how to.

Step 1: Make a game of dubious quality

Let's face it, the reason you're writing your marketing article is that you think that writing an article on how to market your indie game is an efficient and effective form of marketing your indie game. And you might be right! If you can bullshit enough tactics into it and really hammer home some arbitrary percentages on the ratio of developing to marketing you should be aiming for (and how going for 1% less than that is indie suicide), it's bound to get you at least 10 yesses on your game's Greenlight page. Or if your game is already through Greenlight, maybe someone will buy it once!

Step 2: Oh, but while you're at it, you should be tweeting pictures, GIFs, and videos of it

Lead by example! And then your pictures, GIFs and videos can get another round of attention when you cite/embed them into your article! You should also have an IndieDB page for both yourself/your company and your game, and keep churning out long and picture-heavy news articles about the development of your game on it - IndieDB will frontpage news articles only if they are informative and actually fucking interesting.

Step 3: Also, social media

USE TWITTERLOTSAnd, like, make sure you've got a growing follower list on it.And then do that for all the other popular social shit that everyone's got nowadays. Instachat, Snapgram, Facespace, Pinterflickr, everything. Even if you just use the wonderfully free and freely wonderful IFTTT to carbon copy your content from one social network to all the other ones, that's better than not having a presence on them at all.

So there's two ways you can go about improving your follower count. Well, three, but if you do #3 and just go and buy them, none of your followers are going to actually have any interest in your content (making them useless) and anyone that looks through your followers on Twitter are going to see that you're the sort of dick that goes around giving shady companies money because you're self-conscious about the low size of certain numbers pertaining to you.

Numero uno: "I'd rather take my time than be a knob". Pump out those GIFs of your game! Make them good! So good, that your 10 followers retweet it! And then two of those 10 followers' followers become YOUR followers! Rinse, and repeat. Basically, make content engaging. How do you make content engaging? Yeah, GIFs are great - they're that halfway point between screenshots (everyone will see it but it's static) and videos (it's interesting but only 10% of people might watch it), whereby it's a pared-down video of your game but people will still see it.

By the way, to make gifs, a lot of bastards swear by GifCam, a program that directly and easily records footage to a GIF, but I find it's a bit buggy - the footage it captured of Innoquous 5 was corrupt and the filesizes were astronomical even for short GIFs. The longer method is essentially to capture a video of it then use something like GfyCat to convert it to a gif.

Numero twono: "I'd rather be a knob than take my time". If you actually care about your Twitter timeline, start by making a list of people you currently follow. The tweets in that list are your new timeline, get used to it! Now, create a free account on Crowdfire and use it to help you start culling people you're following that are inactive, or the people you followed at the earliest time that aren't following you back. Meanwhile in Keyword Follow, search for #gamedev or #indiedev and start whacking that Follow button on people, particularly those with more following than followers.

While you'll receive less engagement (in general) from followers generated with this method than you would people following you because they saw and enjoyed your tweeted content, they will still be actual, active Twitter users that have at least some interest in indie games (because they were using #gamedev or #indiedev).

One thing to note: Crowdfire's free accounts impose a limit of 25 people you can freshly follow and 100 people you can unfollow using them per day. It's worth actually sticking to this, I've never run into problems but Twitter isn't keen on you literally just following people with their potential follow-back in mind, and then unfollowing them when you don't receive it. So unless you hit Twitter's variable limit on number of people you can follow at once (starts at 2,000, increases the more followers you have), don't unfollow people you followed with this method.

Oh, and one other thing. Crowdfire also has an option to automatically DM new followers. I'd recommend avoiding it, it's spammy and horrid. But yeah, use it daily to follow 25 fresh faces and grow your audience!

Step 4: Also, when the game is complete and tested but not out yet, start pumping out your own marketing

You need to actually follow someone else's shitty blogpost on how to market your indie game to market your indie game before you can make your own shitty blogpost on how to market your indie game. To market your indie game, you'll basically want to:

  1. Set a launch day for your game. Work out when the game will be done, then add some time after it for extra QA. And then add some more time after that, because it's going to go wrong in some surprising way. And then add some more time if that launch day clashes with a big release from some other indie or even a big AAA game. You'll clash with something, better it's a game your own game utterly outclasses

  2. Write a press release with an informative but attention grabbing title, and a few paragraphs of copy text explaining your game with both accuracy and attractiveness

  3. Link to a place where the game can be downloaded DRM-free for free, on every available platform

  4. Embed a couple screenshots. Good ones

  5. Link to the best trailer you or your friendly neighbourhood motion artist can produce that you've upload to YouTube, even if it's Unlisted for now

  6. On your website, get an extended presskit with a lovely .zip file containing all the copy text, screenshots, gifs etc of the game. Make them interesting as well as representative of your game. Make it clear they're freely usable. Just use Rami Ismail's presskit() for fuck's sake

  7. Link to that in the release as well

  8. Don't have a website? Make one, you prick

  9. Link to your website in the press release as well

  10. Okay, now email that bastard out. Lots. And lots.

So email it to who? Here's a comprehensive list of YouTubers, possibly the best way in 2015 to generate your press. Also, basically, do everything else on PixelProspector's marketing page.

"But NAL," you exclaim with whimsical delight, "that page is just full of everything I was going to include in my blog post on how to market your indie game, along with other things I had entirely forgotten about or wasn't going to bother doing because it felt redundant and my game's so fucking good who cares - the first gullible bugger to buy it is going to cry their eyes out in the first 5 seconds of playing and immediately do all my marketing for me!"

Well, yes! Blog posts about how to market your indie game are all essentially just that PixelProspector article, with some vague, wandering mentions, as well as stealthy links of advertisement, of their own game, as well as "how they got on" written like it was the sort of thing your school made you do in essay form after two weeks of work experience.

And for fuck's sake, don't just email press people - social media it up! Make sure that your tweets and posts are still engaging, nobody wants to see the same link to the same game in their timeline 100 times - and with one gentle smack of the Unfollow button, they don't have to. Keep booting out new screenshots, GIFs, and even the occasional video, and attach a unique one to each mention of your game. That way, even if someone's seeing it for the Nth time, they're still seeing fresh content along with it.

Step 5: Upload it to all the stores

Is it done? Sweet. Upload it to all the stores you're targeting with plenty of time remaining. Where possible, go through the buying/downloading process while the game is still private and make sure you didn't fluff the upload. Cool, that step was relatively easy, unless you're like me with a 425MB game on your hands and an internet connection that rivals dialup for shittitude.

ALTHOUGH, if something does go wrong, there's a silver lining to this thundersnow cloud - your game might suffer a loss of sales, but it makes for some great content to blab about in the mandatory "Mistakes I Made" section of your blog post about how to market your indie game!

By the way, if a store allows HTML tags (or similar) in the description, for god's sake doll it up - pictures as headers for each section. And if you're doing your game's itch.io page, customise it!

Step 6: Now release the bastard

Hey look, release day! Assuming you've reached it smoothly (and if not, why not, you gimboid), all the stores it's on should unlock its content! Great! MOAR TWEETS. Again, if shit goes wrong here - your game doesn't work on any Nvidia cards because you've been a tit and only tested it on AMD ones - you've got content for your blog post about how to market your indie game.

Step 7: Give it a few months

Keep tweeting new content. Retweet, or tweet to, YouTube videos and articles that cover your game. meanwhile, start on your new game. You'll need to reference this in your blog post about how to market your indie game.

There are things you can do post-release to help market your game as well. Give away free one-time use codes to the game. Turn it into a game - stick a ? in place of one of the code's letters/numbers - this also serves the purpose of stopping code-grabbing reseller bots from registering it in place of an actual interested person. If your game includes a level editor, do a little competition on who can make the best level. Or competitions for first person to complete the game, or best score, or quickest completion of a particular level. Make it so that people tweet their entries, so their followers see it and possibly get interested in the game and shit!I mean, you could even pull the age-old crap where you give something to a random person that follows you and retweets a specific competition tweet during a set amount of time!

Just remember everything you're doing, it's crucial that you tell other people to do that exact same thing in your blog post about how to market your indie game. So maybe write it all down for the ultimate in blog postage.While this is happening, prepare a load of graphs. They don't really have to be relevant to much, but then in your blog post about how to market your indie game, you can point at all the anomalies and speculate aimlessly about what caused those bits of your graph to not be in the right place. You can also take your mandatory Sales by Week graph with its inevitable downward trend, and point that out, as if nobody ever realised that games become less popular as time progresses.

Step 8: Fuck me, it's time for your blog post about how to market your indie game

You've got your game that performed below expectations probably, because very few games perform above them. You've got your three months of wisdom. You've got graphs, GIFs, and gumpf. Time to do your article.

Go back to PixelProspector's marketing page. Like every other bastard on the planet that's written a blog post about how to market their indie games, basically paraphrase it. But for each thing that that page recommends, slot in how you went about that thing for your game, with examples embedded and sources linked.

There are extra things you'll need to do for your article. For starters, make up a good figure for the aforementioned ratio of developing to marketing you should be aiming for. Don't go for 50/50, everyone goes for 50/50. Do like 57% marketing, 43% developing or some breakthrough shit. Really blow some fledgeling indie minds as to how goddamn important marketing is. Keep using the word marketing, even long after you've written the entire article and are now attending your grandmother's marketing. Chisel marketing into her tombstone. And fuck it, the two percentages don't even need to add up to 100. Make them add up to 107%, that way you can tell people that it's the extra 7% that makes a game successful. That way, your readers think they've just opened Pandora's Box and found it to be full of fivers.

Another one you absolutely must do, as has also been mentioned, is your Mistakes section. Come up with some mistakes you made, because you were an inexperienced dildo when you started but now you're the fucking indie second coming of Christ. These mistakes should be silly oversights - "whoops, forgot to make a game lol!" isn't going to suffice here. Show how you learnt from those mistakes. If you didn't make any mistakes, your mistake was thinking that a 56,277th article on how to market your indie game was a productive use of your time. It is only a productive use of your time if you made a more successful game than anyone who has ever previously written about how to market your indie game.

But here's the most important thing you need for your article on how to market your indie game. You need a hook. A hook, unique to your article and your article alone. A singular piece of advice that the entire article revolves around. Don't make it "you need to make the game for yourself", that's bullshit. Maybe "you make the game for your mother". Or "you only program after you've downed a bottle of Jack Daniels". Or "every 20 minutes, you take a small break to writhe around on your floor naked pretending you're a wriggly worm". Something.

Personally, I went for "make it seem like the article on how to market your indie game is taking the piss out of itself".

PIXELPROSPECTOR'S MARKETING GUIDE