Infinite Craft
neal.fun
neal.fun
items = () => [...document.querySelectorAll('.items div.item')]
show = (elt) => elt.style.display=''
hide = (elt) => elt.style.display='none'
search = (text) => (items().forEach(show), items().filter(e => !e.innerText.toLowerCase().includes(text.toLowerCase())).forEach(hide))
inputElt = document.createElement('input'); inputElt.type='text';
document.querySelector('.sidebar').prepend(inputElt)
function handle(e) { search(e.target.value) }
inputElt.addEventListener('input', handle)EDIT: Ah, you drag items on top of each other for them to change. Instructions unclear, and I am dumb.
We were approached to build a bunch of learning lessons for teachers to teach kids - primarily focusing on human anatomy. Instead of building separate lessons, we built a generator tool for the teachers to drag and drop various combinations and permutations that produce almost infinite lesson variations.
The end customer was Pearson Publishing, and I heard they won awards and stuff. Our client was a good person and even paid us extra for doing the better version of the product they had in mind.
That tool was like this and a few others, as mentioned in the comments. But all in ActionScript Flash, complete with sounds, laughter tracks, and ever-expanding sprites of body parts. It was one fun and fulfiling product.
console.log(JSON.stringify({discoveries: window.$nuxt.$root.$children[2].$children[0].$children[0]._data.discoveries, elements:window.$nuxt.$root.$children[2].$children[0].$children[0]._data.elements}))
I'll figure out how to re-import the state later, but it's past midnight for me now.let maxElementReachedForElement = {}; let totalElements = 0; let firstElement = 0; let secondElement = 0;
setInterval(function() {
document.getElementsByClassName('mobile-item')[firstElement].getElementsByClassName('item')[0].click();
document.getElementsByClassName('mobile-item')[secondElement].getElementsByClassName('item')[0].click();
totalElements = document.getElementsByClassName('mobile-item').length;
secondElement = (secondElement + 1) % totalElements;
if (secondElement == 0) {
maxElementReachedForElement[firstElement] = totalElements;
if (Object.keys(maxElementReachedForElement).some(item => maxElementReachedForElement[item] < totalElements)) {
let prevStart = Object.keys(maxElementReachedForElement).find(item => maxElementReachedForElement[item] < totalElements);
firstElement = prevStart;
secondElement = maxElementReachedForElement[prevStart]; // Start from previous end
} else {
firstElement = (firstElement + 1) % totalElements;
secondElement = firstElement; // No need to repeat the previous combinations.
}
}
document.title = firstElement + '+' + secondElement + '|' + totalElements;
}, 500); // TODO : Find a way other than delayLike keep showing me a desired item to craft, that requires crafting 2 or 3 items to get to -- e.g. combine 2 existing things, then with a third existing thing. Or combine 2 existing things, another 2 existing things, and then combine those.
And obviously it keeps getting more complex the more items I acquire along the way.
And each time I play it's randomized.
(And let me play entirely with the keyboard by autocompleting each item as I type... dragging gets old real quick on a touchpad...)
* Frankenstein + angel = Angelstein. (Then Angelstein + Baby = Angelina Jolie.)
* something + Something from Michael Jackson = Dangerous.
* Dangerous + Sherlock Holmes = Moriarty.
* Multiverse + White => Dark Multiverse + Law => Dark Law.
* Dark Law + us Constitution => Dark Constitution.
* Quark + Ocean -> Neutreno
* Thor + Guardian -> Heimdall
* Batman + vet => Batvet
* Avengers + Multiverse => Endgame + Dark Multiverse => Dark Engame
* Iron man + Star Lord -> Iron-lord
* Wandavision + Groot -> I Am Groot
* Cleanest + Terminator -> Cleaninator.
* A series of werepigeon, Space Pigeon, Mars Golem, Werehand, Icepigeon, Werechristmas Tree, Dust pigeon, Snow pigeon, Dust mosquito.
Some fun ones:
* us America + hole = Donut + hole => Doughnut
* Money Water -> Vodka + Casino => Roulette + Vodka -> Russian Roulette + Certainty -> Suicide.
* Toxic Waste + batman -> The Joker.
* Divorce + Ex-wife => Splitting headache.
* Lake + Batman -> Aquaman + Batman => Justice League
* Captain America + Thor -> Avengers
* Avengers + Justice League -> Superheroes + Galaxy -> Marvel + Galaxy -> Guardians of the Galaxy
* Guardians of the Galaxy + Guardian -> Groot
* Guardians of the galaxy + Nebula -> Gamora
* Guardians of the galaxy + Gamora -> Star Lord
* Time Travel + Iron Man -> Terminator.
* Government + Terminator -> Robocop.
* Terminator + Divorce -> Arnold Schwartzenegger.
Confusing ones:
* Darth vader + Toxic Waste => Superman?
* Pirate + Superman => Captain America
- Dragon + Lazer = Dragonzord
- Dragonzord + Sandpunk = Sandzord
- Dragon-Rex + Hippopotamus = Hippodragon
- Mega Dragonzord (didn't see recipe)
- Hippodragon + Mega Dragonzord = Mega Hippodragonzord
- Mega Hippodragonzord + Flying Circus = Mega Flying Circus Hippodragonzord
- Zombie + Mega Dragonzord = Zombie Dragonzord
- Swan + Megazord = Swan Megazord
- Sandzord
- Steam Dragonzord
- Swan Dragonzombie Megazord
- Mega Swan Dragonzord Megazord
The more ridiculous this gets the more fun I'm having! Everything after dragonzord was a first discovery.
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
let elements = [
' Water',
' Fire',
' Wind',
' Earth'
];
let pairs = {};
async function getResponse(left, right) {
const url = `https://neal.fun/api/infinite-craft/pair?first=${left}&second=${right}`;
return await (await fetch(url)).json();
}
function getRandom() {
return elements[Math.floor(Math.random() * elements.length)];
}
async function run() {
while (true) {
let left = getRandom();
let right = getRandom();
if (pairs[`${left} + ${right}`]) {
continue;
}
let result = await getResponse(left.split(' ').slice(1).join(' '), right.split(' ').slice(1).join(' '));
if (result.isNew) {
console.log('‼ new one ‼');
}
result = `${result.emoji} ${result.result}`;
console.log(`${left} + ${right} = ${result}`);
if (result != ' Nothing') {
pairs[`${left} + ${right}`] = result;
elements.push(result);
}
await sleep(1000);
}
}
run();- In general, play the game as if you are asking an 11 year old, "what do you get when you combine X and Y?" The LLM likes rhymes and similar-sounding syllables, i.e. The Godfather + Goth => Gothfather.
- Some concepts seem to be "weightier" than others; "Dracula" usually becomes "Vampire" and vice-versa, no matter what you combine it with. "Chtulhu" is also difficult to combine with other things; it tends to remain "Cthulhu". "Darth Vader" is good for generating lots of "Darth" things but tends to revert to "Darth Vader" at the slightest provocation. "Santa / Santa Claus / Christmas" is also weighty and tends to cycle. Similarly, the Mario characters all tend to turn into Mario eventually.
- The longer your token gets, the harder it is to get it to combine with other things. "Bumblefrostycatpocalypse" + most things => "Bumblefrostycatpocalypse"
- The LLM knows lots of movie titles, and these are good for generating super long tokens, especially if you can goad it into inserting a colon, i.e. "The Fall of Star Wars: The Flying Crabster"
- Once your token gets too long, the game won't even try to combine it with anything else. I'd like to keep going with "Freddy Mercury vs. Jason + Jedi Mind Trick" but it won't let me.
Finally, a few of my favorite first discoveries: "Super Evil Jackie Chan", "The Best Halloween Costume Ever", "Postpornmodernism"
Edit: sorry if anyone is bumping into errors! We're running into bottlenecks with our supposedly auto-scaling database - working on it
- Bread + Bread = Toast, + Fire = Burnt Toast, + Fire = Ash
- Toast + Disaster = Pop Tart, + Fire = Hot Pocket, + Coffee = Coffee Pocket (First Discovery)
- Hot Pocket + Cappuccino = Cappuccino Pocket (First Discovery), + Pop Tart = Cappuccino Pop Tart (First Discovery)
- Coffee Pocket + Disaster = Coffee Spill (First Discovery), + Pop Art (sic) = Jackson Pollock
- Jackson Pollock + Megadisaster = Jackson Pollock
- Artist + Disaster = Picasso
Apparently nobody else was insane enough to combine Coffee, Hot Pockets, and Pop Tarts. The AI is just confusing sometimes, though:
- Pompeii + Kaleidoscope = Mosaic?
- Burnt Toast + Water = Coffee, + Cake = Breakfast, + Mosaic = Cereal?
- Coffee Pocket + Broken Window = Coffee? (though idk what I expected)
Edit: some measure of progress would also be good. I cant know how much I missed
Edit2: Megalodon + Cemetery seems to break the system, spits back nothing.
Just as an example, I put in "Protestant" and "Spiritual Experiences" and it gave "Pentecostal" which is exactly right, and I didn't expect it to know that. Now I have to find how to get that in the game.
This little game is too entertaining. I hope the author open sources it, or writes a technical blog post on how it's implemented.
Everything that’s combined with Steam Punk ends up being stupid and boring.
Steam Punk + Zombie = “Steam Zombie”
Steam Punk + Hacker = “Steam Hacker”
Steam Punk + UFO, which you’d think would be “Zeppelin” or something, is instead “Steam UFO”.
Steam Punk + Illusion is, bafflingly, “Steampunk”, all one word, and with a different emoji!
Surely some things are weird and are to be expected from the usage of AI, for example, I managed to somehow create Neon Genesis Evangelion (try to!) but I can't seem to replicate any more animes, mangas or shows.
I think some of the recipes don’t make sense and it would be a lot better if each thing only had one recipe to create it.
Also, ashes + water = soup. I need to try some more recipes
I'm still having a problem where after you import the save, you can no longer search in any way LOL. I tried both neal's search feature that he added a few days ago, and also procparam's script (he posted here 5 days ago)
Other "problem" i encountered is that in order to save the merged stuff, you have to craft one new element. After you do that, it autosaves and there is no further problems.
For example, Castle + Fortress = Castle?
City + Town = Castle. Castle + Wall = City?
Metropolis + City = Megalopolis. Ok we're getting somewhere cool here, let's see how big it gets: Megalopolis + City = Metropolis?!
Finally, it just failed to combine War + Tunnel. It blinks for a minute and then gives up. I would have said "Sappers"? Edit: There are actually many such failures for higher-order combinations which is strictly not infinite. Other combinations described above might technically fit the bill but ceasing functionality does not : /
It's fine to clone existing games as a gamedev exercise and/or to iterate meaningfully on the design, and to be fair, maybe this game does the latter. However, it is good to pay respects to the shoulders you build on. Little Alchemy is not so well known that this is like making a game called Tetrizz.
(Can someone make Tetrizz please?)
I had some other interesting discoveries as well, including the "Abominable Crocodile", "Abominable Orc", and whatever the hell a "Pterodump" is.
He made a video to visualize some of the final data though: https://youtu.be/rQWwfYSUckY
Also I vaguely remember a game with basically the same premise but the goal was to create life.
Literally unplayable.
EDIT: apparently I'm the first to discover "Captain Tokyo"?
EDIT: and "Captain Tiamat". Had no idea those are even things.
Seems like I'm the designated captain discoverer. More to the list:
- Captain Penguin Universe
- Captain Penguin Planet
- Captain Penguin Multiverse
- Captain Poseidon Multiverse
- Captain Jack Poseidon
- Captain Jack Tiamat
- Captain Everything Jack Sparrow (which can't combine with anything, apparently)
- Captain Penguin Zombee
- Captain Penguin Zombee Universe (also can't combine with anything)
Kinda got tired at Slaughterhouse One Hundred Thousand.
At any rate, the first 1000 or so that a quick python script found: https://gist.github.com/Q726kbXuN/6620a12ade4b77dacce93d1c96...
Check it out - AlchemicAI:
https://play.google.com/store/apps/details?id=com.hostelguys...
https://apps.apple.com/us/app/alchemic-ai-infinity-mix/id646...
ETA: also the Cinderham and Louis Prime
Fun little game and pretty silly, thanks
I'm seeing tons of slowdown when I try to merge things like "Sagitarius" and "Archer" and "Storm" and "Centaur". I guess this is the nature of the build, but I'm at least a little surprised it's hitting this kind of performance issue after only tens of objects.
Anyway, all of that aside, I'm having a lot of fun seeing what emerges from the combinations and I love that the wackier the merge result, the more fun it is to try it against all of the previous objects. Quite an addicting little loop! Great job!
1) progress is saved locally so you can reload browser (helpful on iOS) 2) search bar added to discovered items list
One of the more interesting ones is "Ant-smoke"?
Edit: Another interesting one is combing "Batman" and "Robin" to make "Dynamic Duo"
Edit 2: I've now managed to turn the game into a number generator and by combining numbers together I've ended up creating some very large numbers. Doesn't seem to be a limit to the size either
Some of my first discoveries:
- Meteor Pot
- Meteor Soup
- Meteor Shower Soup
- Meteor Fish Soup
- Jabba The Soup-zeus
- Sith zeus
- Jabba The Slimer
- Sonic Chip
- Cheech The Hedgehog
- Darth Shrubber
- Chewbuster
- Darth Vader Fish Soup
I may have got heavily involved in combining Star Wars items :PEdit: and it's given up at Darth Maul 1310720000 combining no longer goes higher
Dragon + Black Hole = Dragon Ball
Moonwalk + Truth = Michael Jackson
Then I don't even remember what I did to get super saiyan, but I managed to get to Super Saiyan 8192
Vegeta (I forgot how to get him or Goku) + Time Paradox = Trunks
Steamboat + TV = Steamboat Willie
Also I have Squidward and Patrick too
Currently i have 'Wind farm' and I'd wish i could try going to 'farm' by removing 'wind' from it.
Apocalypse + 2016 = 2017
Apocalypse + 2017 = 2018
Apocalypse + 2018 = 2019
Apocalypse + 2019 = 2020
...
but ... Apocalypse + 2030 = 2030
Uh-oh!Open source LLM's exist at the Family Feud brain stage (instinctive first pass human verbal intuition) so its depth is limited by that.
If I could only store the state, maybe download a JSON file which I could later drop into the editor again to restore, that would be great.
What model is being used for the backend?
super volcano + man = super human
but then it breaks if you mix further:
super human + giraffe = super giraffe ?
Sailor Moon + Sashimi = Sailor Mercury
I managed to make a "Captain Jack Ahab + Draculawhalezilla" that seems to refuse to combine with anything. Maybe because it has a + in it already?
I was able to get to Dandelion after many combos! Hoping it gets to human soon.
Will try to extract the full tree from the code :)
Angel + crocodile = Angelina Jolie
are different apparently, maybe add some logic to merge these
Tutankhamun + Captain Jack Sparrow = Pirate King
Pirate King + Mountain = One Piece
One Piece + Pirate King = Luffy
*perfect
Fun stuff. I wonder what the codebase looks like
Not kidding!
This is weird without hard rules.
This is another awesome Neal.fun experience!!!
Tornado + Fish = Sharknado
and Terminator, Dark Fate, Mad Hatter... but I forgot how.
I just got a "first discovery": Garlic + Vampire = Dinner | Darth Vader + Dinner = Dark Dinner (whatever that means)
And I don't know how, but how did I get from fire/earth/water to "racist"? How is that even a thing?
Batman vs. Prince of space sushi vampires
Darth Paper Strikes Back + Vampire
Rainbow + Rainbow doesn't do anything
No double rainbow? Literally unplayable.
Darth Vader+Postman=Darth MailerPretty addictive
Lots of other funny combinations: Burger King + Business = McDonalds Disney + Motive = Money Princess + Cleavage = Disney
Plenty of political ones: President + Dictator = Trump White House + Flame = Trump Trump + Bribe = Impeachment Trump + Impeachment = ??? (literally three question marks) Obama + Home = Change
And a few questionable: Slave + Plant = Cannabis Jamaica + Garden = Marijuana
This is actually great fun. I wish I could sort the words alphabetically. I also wish there was a save feature. Oh, and that first discoveries were highlighted in the word list.
“One of the hardest ones to get”
I was able to get some things like "Were-jesus-pope-hamster-crusader", "Trump-jesus-trump", "Pope Impaler", "Trump Impaler", "Vlad the Werehamster", "Richest were-genghis Khan", and also "Were-were-werewolf"!
I think the willingness of the language model to make up character names like this is a bit of a defect in this context, but maybe it's useful for brainstorming movie sequels. :-)
Prithvi/Bhumi, Apas/Varuna/Jala, Agni, Vayu, Akasha/Dyaus
now I can't stop thinking about apple pie with seafood
Poop truck, space poop truck, poop train, poop martini, fartdiana jones, fartman, poopacat
And my favorite:
poopacabra (from chupacabra)
Also got some interesting failure modes:
Got "Fartacus Jones + Fire Poop Train", "" (galaxy emoji) and "???" (galaxy emoji) all of which refuse to combine with anything else.
EDIT: Got chicken titty, nuclear porn, and pooporn
Also:
priest + diarrhea = holy shit
holy shit + diarrhea = holy diarrhea
holy diarrhea + sweet and sour = chinese food
Future + Time = Present (with a gift icon) Present + Present = Gift
(So it's using the words not the concepts)
Paradox + Snowman = Yeti
(Makes sense)
Arnold Schwarzenegger + Narwhal = Shwarzenwhaler
(Shwarzenwhaler has 0 hits on Google, it made it up)
Shwarzenwhaler + Time Machine = Hitler (with a crown icon)
(I kid you not!)
Unicorn + Hitler = Unihitler
(I continue to kid you not!)
plant + air = dandelion
dandelion + plant = weed
wind + fire = smoke
smoke + weed = high
high + president = bush
Gold
Resort + Empire -> Disney
Obesity + Empire -> America
America + China -> War
China + Japan -> War
America + Japan -> Anime
America + Junk -> Trump
Nice!