Hero Must Die

by 222464
Overall★★★★★★★★★★3.76
Fun★★★★★★★★★★3.61
Innovation★★★★★★★★★★4.01
Theme★★★★★★★★★★3.90
Graphics★★★★★★★★★★2.73
Audio★★★★★★★★★★2.36
Humor★★★★★★★★★★2.76
Mood★★★★★★★★★★2.93
Coolness★★★★★★★★★★100%
Stop the side-scroller hero from rescuing the princess!
The "player" is an AI that uses neural networks trained with the Neuro-Evolution of Augmenting Toplogies (NEAT) algorithm: http://en.sfml-dev.org/forums/index.php?topic=9897.0

You need to have the VS2010 redistributable package installed to run the game.

Select the items you want to use to prevent the player from making it to the princess, place them appropriately, and then hit "play" so that the AI can try to beat the level. If it finds a solution before it reaches 100%, you lose!

EDIT: I had to perform a post-compo bug fix, since the screen just turned black for some people, making it unplayable. It should work now.

Comments54

Connors
Connors18 Dec 2012, 02:45
awwww Windows
Trigun7000
Trigun700018 Dec 2012, 04:25
This was a pretty cool game concept. I wish there were more levels, because I'm a villainous bastard.
OU GDA18 Dec 2012, 04:35
when i run it all i get is a solid black window :(
Team Tibbles18 Dec 2012, 04:36
Fits the theme perfectly! The Hero Must Die, says it all! Loved it!
xandy18 Dec 2012, 04:39
everything except some dots is black :(
aneeslol18 Dec 2012, 04:58
Really fun game!
CireNeikual18 Dec 2012, 05:03
@OU GDA and @xandy: Hmmm, that's very strange. Could you try updating your graphics drivers?
Edocentrique
Edocentrique18 Dec 2012, 12:01
Well done concept ! Sometimes the hero is cheating he's trying to go through walls but other than that no problem it's good !
Crimsoneer
Crimsoneer18 Dec 2012, 15:25
Great! Clean, cute, fun. Doesn't feel very villainous, but I like it :)
zenmumbler
zenmumbler18 Dec 2012, 15:35
Fun game. The AI sometimes got stuck in a tile but that was when it was UTTERLY DEFEATED anyway. BWUHAHA!! Simple but correct sound effects. Cool use of AI as a protagonist.
Dadeyemi18 Dec 2012, 15:39
Nice graphics
Eelfroth18 Dec 2012, 15:45
Good work on the AI! It can be quite difficult to trick sometimes.
dreamwalker
dreamwalker18 Dec 2012, 16:17
> OU GDA says ...
> Dec 18, 2012 @ 4:35am
> when i run it all i get is a solid black window :(
That happened to me too. I run a Win8-x64 system.
BarrensZeppelin18 Dec 2012, 16:21
Really really cool game, I love the planning aspect ;) The game lacks a really complex level though!
tumoxep18 Dec 2012, 16:43
Awesome idea.
As I understand I can only complete 7th level by cheating.
CireNeikual18 Dec 2012, 16:52
@tumoxep: Thanks for playing! How were you able to cheat? The last level can be done with only one item, since I made the spikes a bit too wide accidentally. But, it can also be beaten the way it was intended :)
Swofl18 Dec 2012, 16:53
Pretty entertaining. It would be nice if the hero actually died though.
BlockBrains18 Dec 2012, 17:13
Awesome puzzle game, challenging, and the graphics are simple but work perfectly, congrats!
CireNeikual18 Dec 2012, 17:13
@Swolf: He dies if you make him hit the spikes! Sometimes they will evolve to just give up though.
MaTX
MaTX18 Dec 2012, 17:41
Neat idea!
Sim18 Dec 2012, 17:49
Very cool use of NNs. I'll check out the paper at some point, but a comment/blog post about how you implemented this in the game would be great - what type of NN did you use and how was it structured? What did you use for inputs/outputs? How did you decide a sensible direction to move the weights, rather than "you died, try something else"?

The game itself is pretty fun, although the other aspects are nothing special - it's the technology that stands out here.
CireNeikual18 Dec 2012, 18:18
@Sim: The neural networks have 27 inputs. 2 of them are the x and y distances from the goal (signed), and the remaining 25 form a 5 by 5 grid around the bot that tell it what the tile types are (sort of like vision). There are 3 outputs: move left, move right, and jump. They are all boolean (true if neuron output > 0.5, false otherwise). The networks are recurrent. The structure is evolved as well, so it varies depending on the task. The weights are perturbed by a random amount in a random direction. The bots are evaluated based on how close they got to the princess. Death is not a cost. The version I uploaded ran for only 30 generations, although I should have probably made it go for longer. I was at first concerned about performance, but when I took it out of the IDE it ended up being pretty fast anyways. I chose a average species populations size of 40.
Sim18 Dec 2012, 18:28
@CireNeikual: That's really helpful, I can understand what's happening now. Thanks a lot!
barigorokarl
barigorokarl18 Dec 2012, 18:34
Really cool idea with very solid realization! :-)
Mythalore18 Dec 2012, 21:07
Awesome graphics and good AI!
Kuulog
Kuulog18 Dec 2012, 21:11
I'm just getting a black window when I try to run this (I'm using Windows 8)
Master0010
Master001018 Dec 2012, 21:11
:) nice game, i want more :D (more levels with more powers)
sev_inf18 Dec 2012, 21:14
Very cool idea and a very cool game.
HeXoT18 Dec 2012, 21:16
I... I can't say how much I love this game.

It is so simple, but the AI make it so complicated and you can make so many puzzles with it...
zompi18 Dec 2012, 21:17
Fantastic AI, I'm always impressed when someone can make good AI, it's really difficult. Thanks to this idea can work and... Well, just a really good game!
Blodyavenger
Blodyavenger18 Dec 2012, 21:19
Noooo...Princes was not saved :( Well played CireNeikual! Nice puzzle concept, I had fun. Graphics could use some tweaks - less visible grid and some tile variations, but that's just a minor complain. Good game, I would gladly play longer version of it.
Beerman18 Dec 2012, 21:42
That was way better than the screenshots make it look. I was expecting Yet Another Platformer, but this is really clever :)
More levels please!
Meep19 Dec 2012, 01:29
I really like this! Neural networks are my favorite model for machine learning applications. :P Very well implemented into this theme-appropriate game. Great work!
EatenAlive3
EatenAlive319 Dec 2012, 02:27
Awesome use of AI! Some of the levels were a little too obvious, but it was pretty cool to see how the AI handled situations. It might be cool to have more blocks and see how the AI handles perhaps 6 different obstacle types.
Faust19 Dec 2012, 07:29
Really cool idea, the AI is somehow slow, but still worth playing.
Muu? (lanoiadimuu)
Muu? (lanoiadimuu)19 Dec 2012, 13:54
The AI plays its role really well, awesome. I had to think and retry a lot during some levels.

You could have named your zip/exe same as the entry, I got troubles finding it again through LD search.
Starspell
Starspell19 Dec 2012, 16:07
Unfortunately I get a black screen as well. Shame because I've worked with NNs before and I'm really interested in how you used them in this game.

I'll try again on a different computer when I can.
shaneshanekavanagh
shaneshanekavanagh19 Dec 2012, 18:23
It works well. It does raise the discussion that there is never a bad guy, only level designers.
calzoneman19 Dec 2012, 19:54
I really like the concept! I was disappointed when I beat it because I wished there were more levels.
Husky
Husky20 Dec 2012, 02:12
Wow! Good idea.
A Puzzle game with cool AI!
It's fun to play, and I am still trying to pass the level 5 lol.
Good job!
Flai20 Dec 2012, 16:37
Wow, this is probably the best I have played on this LD so far! Great job!
radmars
radmars21 Dec 2012, 20:50
Nice graphical style, too hard though T.T
ethankennerly
ethankennerly22 Dec 2012, 05:57
I'd like to play, but I also receive a black screen on M11x AlienWare.
goerp22 Dec 2012, 12:18
This is an original gametype! And its fun as well.
Its a shame that when you have the right solution right away, you don't see the AI trying all these different tactics in vain. But I understand that just watching the AI for hours on end wouldn't be very fun.
Norgg
Norgg22 Dec 2012, 12:34
This is really cool, love the neural network use.

I ended up finding a one tile solution to the final level too, in a way that seems to have tricked the AI, but would otherwise be really easy to solve. SPOILER HERE: http://imgur.com/6MNhy
CireNeikual22 Dec 2012, 12:42
@ethankennerly That's really weird, I thought I fixed this problem. I will have to look into it further I guess.

@Norgg Yup, I found this one too after I submitted the game! The hit box for the spikes are a bit too large, and the AI has no sense of velocity, leading it to die there. Both of these things are fixed in the post-compo version though, check it out!
cwilloughby22 Dec 2012, 22:59
Very cool. Love that the AI tries to figure it out. Interesting approach to gameplay. Level start sound was pretty grating.
BlackBulletIV25 Dec 2012, 07:02
Wow, the AI was really good! I had a tonne of fun trying to outwit it.

On the negative side, the sound and graphics weren't very good, but the excellent AI makes up for it. I would've loved more levels too.

Overall, great job!
Tom 7
Tom 725 Dec 2012, 19:26
This was great! This idea only works with a good AI, and yours was quite adequate. The only level that I found to be a puzzle was #5, but every one was fun. Gameplay wise, this is one of my favorite games of the compo so far.
Van Merwan
Van Merwan27 Dec 2012, 20:21
Very very fun, too bad the challenging levels are post compo.
ahm99
ahm991 Jan 2013, 19:40
That was pretty fun! You did a great job!
Gungnir
Gungnir5 Jan 2013, 20:15
Interesting but I found it frustating to play.

Other games by @222464

Found a bug?
Tell us on Discord