Replicate-You by loveapplegames

[raw]
made by loveapplegames for Ludum Dare 55 (JAM)

Replicate-You: an experimental neural net based "programming by example" game. Since neural nets are a sort of modern equivalent of black magic, I think this is quite appropriate for the "summoning" theme.

Your goal is to summon a replica that plays a simple "pick up the coins and avoid the enemies" game as well as possible. To achieve this, you have to play the game yourself for some time, then you can summon a replica that copies the player's behaviour. Every time you let the replica play a level, the game gathers stats on its performance.

Use cursor keys or WSAD to move.

Note, you don't have to finish the levels to gather behavioural data: each move counts. What matters is that you make moves that optimise the behaviour of the replica. If you only play a particular level, you can expect the replica to be best at that level.

You can summon a working replica with as little as 50 moves, more for the higher levels. Plan your moves so the replica doesn't get stuck or hit too many enemies. If it doesn't work, try adding more moves and summon again.

Summoning will train a Tensorflow neural net that copies the behaviour of the player. Each time you move a step, a data point is created. Its input is a 9x9 map context area, its output is the move the player makes (left, right, up, down). The neural net consists of 2 convolution layers and 2 dense layers, and has only about 6,000 parameters, to keep training times tractable. Note that training is quite processor intensive, and requires GPU acceleration, and can make your browser stutter and lag. Training should take about 5-30 sec on a modern PC, depending on the size of the data set.

screenshot3-sm.jpg

Ratings

Overall 1045th 3.119⭐ 23🧑‍⚖️
Fun 1036th 2.929⭐ 23🧑‍⚖️
Innovation 28th 4.273⭐ 24🧑‍⚖️
Theme 892th 3.238⭐ 23🧑‍⚖️
Graphics 944th 3.071⭐ 23🧑‍⚖️
Audio 756th 2.395⭐ 21🧑‍⚖️
Humor 1018th 2.111⭐ 20🧑‍⚖️
Mood 1173th 2.395⭐ 21🧑‍⚖️
Given 27🗳️ 30🗨️

Feedback

jk5000
16. Apr 2024 · 07:27 UTC
The idea is fun. The visuals is fine. The gameplay feels a bit unfinished, and don't totally understand the idea with letting the computer playing the game.
quasilyte
16. Apr 2024 · 08:48 UTC
It's funny that the game's URL is Replicate-Me, but the title says Replicate-You. :D

I "trained" two replicas:
1. A good-playing replica that played by the book
2. A bad-playing replica that only cared about catching blue enemy things

And it kinda worked. I was wondering if it would replicate that behavior or not.
This is probably a game where player needs to treat a computer playing as their baby. :D
"I have nothing more to teach you"

At first, I thought you're mining crypto on my computer, because "summoning" the replica makes everything stutter. :) Also, the site hosting the game is not HTTPS and it felt very unsafe.

I recorded a video if anyone is curious:
https://www.youtube.com/watch?v=gDZgDlrXJ7c
LDJam user 383763
19. Apr 2024 · 20:13 UTC
Because nothing can actually kill you I just ran through all obstacles, took coins and then created a super confused replica :D
elemel
19. Apr 2024 · 20:21 UTC
Liked the idea of summoning something that learned from your play style. It didn't seem like there was a way to lose. I didn't see any health when receiving damage, and never died. It would have been cool if the "copy" was like a pet, that you could co-op with. Incremental training while playing would also be nice.
Papaver
19. Apr 2024 · 21:08 UTC
Hehe, so you created both a little game ánd a replicator! Very original idea, fun to play with.


I liked the graphics of when the replica was being calculated. I really noticed that the more steps it had to process, the longer it took. The Menu button was sometimes covering a coin.

I tested making different replicas. One that only walked in tiny circles, and the replica indeed copied it! And one that avoided all coins. Haha, I had fun!
frederikja163
20. Apr 2024 · 16:12 UTC
Visuals and audio is really nice. The controls feel a bit unresponsive at times, i think it is because the game is not listening for events while in the middle of two tiles. The gameplay loop is original and fun, but it also doesnt really make sense to me. What do i get after completing a level? What is the purpose of the replicator? How do i deal with the enemies? I have a sword but can i use it? If you have thought about these questions a tutorial would be great, otherwise thinking about them would be a good idea.
Gametrodon
20. Apr 2024 · 17:38 UTC
I like the idea, the controls feel a bit wonky at times. Sometimes I would want to move only 1 tile, and it would move me two, or vice versa. I wished there was a way to delete the data gathered, and reset, or to not count a run if I had a bad one.
Bytomancer
20. Apr 2024 · 17:39 UTC
![Screenshot from 2024-04-20 13-35-51.png](///raw/53b/52/z/648f4.png)

For some reason, my game freezes when training the neural net. I've given it around 300 moves to train on.

In case it's relevant, my PC is beefy (Ryzen 7800X3D, RTX 3080), running firefox with hardware acceleration, on linux.
Wouter52
20. Apr 2024 · 17:40 UTC
Visuals and sound effects feel solid, the loading screen for generating the replica could use some epic battle music of something. Is this replica based on the player's playstyle? For me the gameplay felt a bit dull, I'm sorry :-( The idea is cool though! I can imagine you had lots of fun creating it

Edit, I saw the comment from quasilyte and was like "hey... he hosted it on his own site?" And went to take a look, I see it's a .nl site! Jij komt dus ook uit Nederland? ;p I think quasilyte is right to tell you about the http. You should enable that for security reasons :-)
VaustXIII
20. Apr 2024 · 18:02 UTC
Quite interesting concept! Makes me think of dystopian future where computers will replace us at playing videogames, while humans still have to work :D

Although the idea is innovative and interesting, I don't think it lends itself very well to being an actual game. Maybe adding some goals for the "summoned" replica would help? Like: "make sure you train a replica that finishes each level in under 30 seconds" or "create a replica that has less than 3 collisions in total" or something like that.

But as a proof of concept this is very well done! If you're planning to expand on this idea, I'd be interested in what you will achieve.
🎤 loveapplegames
20. Apr 2024 · 18:10 UTC
@bytomancer The summon screen may freeze for a few seconds before training begins, but I developed this on a rtx2060 laptop in Firefox, and had no such long wait times. So, I guess it must be a bug. Maybe have a look in the Javascript console?

@wouter52, yes I am Dutch! Almost every site is https now, but there is no secure info, like passwords, sent either way, so I don't see the point of installing a certificate.
Wouter52
20. Apr 2024 · 18:20 UTC
@loveapplegames good point :smile:
Caveman54
20. Apr 2024 · 19:29 UTC
This is a very cool idea, I played for a little while but got stuck when I played level 2 and it did not finish after I collected the coins. Seems to have a few bugs but the overall idea is very cool and was fun to mess with.
🎤 loveapplegames
20. Apr 2024 · 19:38 UTC
@caveman54 I think this happens when a coin is hidden behind the menu button. Anyway the goal is not to win the levels, but to create a replica that plays the game well.
🎤 loveapplegames
21. Apr 2024 · 09:27 UTC
@vaustxiii haha, I had the same thought, in a dystopian future even games are played by AIs, and there's nothing fun left for humans to do!
ZungryWare
26. Apr 2024 · 00:25 UTC
What a cool idea! With some more work, this could make for a fun playground to teach people about reinforcement learning algorithms. It would be cool to give further tools to experiment like editing training data to remove mistakes, saving and combining different sets of training data, and adjusting the amount of training that gets done as well as other hyperparameters of the network. It would also be important to have more complex tasks that require higher order decision-making.

I think there may be a bit of a disconnect between the training environment and the test environment though. I don't think the AI has any concept of waiting. I tested this by training the AI to only ever move right and just try to get to the right edge of the level while waiting to dodge enemies. But the AI just zoomed to the right at full speed and then turned back around again upon reaching the other side of the board. I tried to account for this lack of a wait action by training the AI to walk in circles until the path is clear of enemies, but that just got it stuck wandering around in the same corner forever:
![stuckincorner.png](///raw/01d/a4/z/64cde.png)
🎤 loveapplegames
26. Apr 2024 · 20:46 UTC
@zungryware Thanks for the feedback! You are right, the game does not count the player standing still as a move. Although this is possible, I chose not to do this because the AI will get stuck more easily when standing still is also an option.
DzejPi
27. Apr 2024 · 08:00 UTC
Interesting concept, I haven't seen any game with neural network in LD yet! Other than what has already been said, I think that with some extra bit of work, you could make an interesting game out of this. I can imagine some game where you have to "cooperate" with your replica in order to finish the level and solve some more complex issues. Well done, interesting entry!
Wuppos
28. Apr 2024 · 03:15 UTC
This was a really cool idea! I always wondered if neural networks could be used to learn from player gameplay, but I always assumed that the amount of data a single player will generate would never be enough to actually learn a neurel network. It seems I was wrong!
It would be neat if you could use neural networks somehow to learn player behaviour and use that to create enemies that are specifically hard for that players playstyle.

This was really interesting! Thanks for this submission :D
TheLastSlowpoke
30. Apr 2024 · 15:49 UTC
That's so cool, definitely one of those different entries. More of a simulation/demo than a game, but I like what it simulates/demonstrates ^^ Good job tuning it so it works that well.
The mechanics seem frame-dependent, it works super fast on my computer - it's difficult to take a single step and not overshoot, but I've seen the gameplay recording in the comments and it's a lot lot slower.
Thanks for the experience!
Shess
03. May 2024 · 19:34 UTC
What is this :eyes:
This is something I never hoped to come across! I agree that right now, it's more of a tech demo than a game, but there are SO many fun ways to gamefy it! I'm honestly a little excited because even the few replicas I trained seemed to be having their own "personalities", and it was unexpectedly cute :3