top | item 39205020

Infinite Craft

1177 points| kretaceous | 2 years ago |neal.fun

675 comments

order
[+] procparam|2 years ago|reply
My friends and I have played so much already that the list of elements on the sidebar is unwieldy. You can paste this little js snippet into the console to add a basic search feature

  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)
[+] starshadowx2|2 years ago|reply
This is really cool, thanks. I was just using ctrl+f to find things. I've got like 1200+ words right now so I totally understand the unwieldy-ness.
[+] cooper_ganglia|2 years ago|reply
Thanks for this! I ended up hitting refresh because of how long my list eventually got, I wish I'd seen this comment 10 minutes sooner!

Oh well, I guess now I'm forced to sink in another half-hour this evening! ;)

[+] smarkov|2 years ago|reply
I couldn't find any information but does this use some kind of LLM to derive the combinations from? It makes a request to the backend every time you combine items which sometimes takes >500ms, and also supports some really wild combinations that I highly doubt someone has taken the time to come up with. It would also explain why the icons are emoji's, it would be fairly trivial to ask ChatGPT to give you the result of Fire + Water and an accompanying emoji.
[+] Calavar|2 years ago|reply
An LLM seems like overkill for a project like this. Why not word2vec?
[+] Jaxan|2 years ago|reply
This might explain how I got “Super volcano” and “Supervolcano”
[+] iwontberude|2 years ago|reply
The dumbness of the LLM inference ruined this for me. Fossil + Fire = Dinosaur? Okay.
[+] polysoma|2 years ago|reply
Wouldnt it be worth caching the results? For the first couple of million combinations at least. I suppose that would take away some level of serendipity. But I imagine it would make this a lot cheaper, considering its popularity.
[+] leroman|2 years ago|reply
I thought they were using some kind of vector space searches like embedding.. no idea if that's the case
[+] brap|2 years ago|reply
I knew this was powered by an LLM once I crafted both "seahorse" and "sea horse"
[+] tibbon|2 years ago|reply
I don't get it; maybe it's broken in my browser. I can drag 4 types of items to a floating grid that connects them but then nothing happens.

EDIT: Ah, you drag items on top of each other for them to change. Instructions unclear, and I am dumb.

[+] crazygringo|2 years ago|reply
> Instructions unclear, and I am dumb.

You're not dumb -- it's not only unclear, but the interface actively suggests the opposite of what you're supposed to do.

One of the best lessons I ever learned was from Don Norman's famous book, The Design of Everyday Things. Which basically teaches you that the user is almost never dumb, but rather human. And that the responsibility of understanding how to interact with an object, or program, always lies with the creator of that object or program. The designer. It's their job to design something so that it teaches you how to use it. (His most quoted example involves how a plate on a door invites you to push it, while a handle invites you to pull -- and this way you'll never try to pull a door that needs to be pushed open, or vice-versa.)

In this case, the interface invites you to drag things among the various pre-existing points, to continue the "constellation". It does nothing whatsoever to suggest that it would make any sense to drag the labels on top of each other. Indeed, previous experience suggests that this would simply lead to overlapping and obscured labels, so we actively avoid it. And the lines that get drawn between nearby points and labels goes even further to suggest that this is a game or experience about connecting things in a graph-like way -- which, once again, overlapping does not fit into conceptually.

I would never have thought to drag things on top of each other if I hadn't come here to the comments.

[+] hinkley|2 years ago|reply
The lines are misdirection and need to be removed.

What's with all the lines to the little moving dots? Haven't figured out what those do yet.

[+] cjauvin|2 years ago|reply
You are not dumb at all, I think it's not terribly clear indeed.
[+] neogodless|2 years ago|reply
Thank you! Yes the instructions were missing, and it's hard not to assume that Firefox isn't supported. I was having the same (bad) experience as you.
[+] nottorp|2 years ago|reply
Yep, at first i tried to make geometric arrangements out of multiple items too.

Water surrounded by 5 fire in a circle - ish - did absolutely nothing.

Only by checking the HN comments i figured out you have to combine items.

[+] mrjh|2 years ago|reply
Not dumb at all. It's bad UI.
[+] alluro2|2 years ago|reply
You can just click / tap on 2 items consecutively, without drag and drop.
[+] LonelyWolfe|2 years ago|reply
On mobile it's just tapping, no drag and drop required.
[+] bagels|2 years ago|reply
Yes, it'd be better if you could just tap two items, and they filled the useless central pane instead.
[+] csteinbe|2 years ago|reply
[+] ehsankia|2 years ago|reply
I was very confused at first too, and didn't understand the difference. As the other comments in the thread allude to though, this instead an LLM to allow for a much much larger number of combinations, which is the "neal.fun" twist on it.

I do wish it was a bit better stated on the page itself.

[+] Xeyz0r|2 years ago|reply
Exactly, and I just couldn't remember what it reminded me of! How much time have I spent on Little Alchemy
[+] ninjahatori|2 years ago|reply
This was one of my favorite online games in childhood. Came here for commenting the same!
[+] nikeee|2 years ago|reply
Doodle God was also a very popular one.
[+] Brajeshwar|2 years ago|reply
My team and I were ghost developers to many companies, developers, and book authors in the hay days of Macromedia/Adobe Flash.

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.

[+] duderific|2 years ago|reply
I miss Flash and all the cool capabilities it had. At a previous company, we built a tool that would allow a teacher to record a video review of a student's animation work, while showing, scrubbing and annotating that work simultaneously. On playback, the annotations would be synced with the video. Good luck pulling that off with Javascript.
[+] promiseofbeans|2 years ago|reply
The game state clears on reload, so here's a wee console snippet to export your list of elements:

    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.
[+] LonelyWolfe|2 years ago|reply
Lemme know if there's another way to press every combination:

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 delay
[+] NAR8789|2 years ago|reply
I think you can reduce state. Rather than tracking maxElementReached per-element, maintain a single maxElementReached for the first n elements. March the first n elements forward in lockstep, and grow n by 1 whenever you exhaust all available combinations for that set

  1. Combine the first element with every next element until exhausted.
  2. Catch up the second element to where the first element got to.
  3. Combine the first two elements with every next element, until exhausted.
  4. Catch up the third element.
  5. Combine the first three elements with every next element
  6. etc.
In pseudocode...

  n = 1
  maxElementReached = -1
  
  while(n < totalElements()) {
    while(maxElementReached + 1 < totalElements()) {
      maxElementReached = maxElementReached + 1
      Combine each of the first n elements with element[maxElementReached]
    }

    // we've exhausted all possible combinations for the first n elements.
    // increase n by 1 and catch up the new element to keep going
    Combine element[n] with each element from n to maxElementReached
    n = n + 1
  }
[+] saintradon|2 years ago|reply
minified version courtesy of GPT-4 (disclaimer I have no clue how this works)

let m={},t=0,f=0,s=0;setInterval(function(){document.getElementsByClassName('mobile-item')[f].getElementsByClassName('item')[0].click();document.getElementsByClassName('mobile-item')[s].getElementsByClassName('item')[0].click();t=document.getElementsByClassName('mobile-item').length;s=(s+1)%t;if(s==0){m[f]=t;if(Object.keys(m).some(i=>m[i]<t)){let p=Object.keys(m).find(i=>m[i]<t);f=p;s=m[p];}else{f=(f+1)%t;s=f;}}document.title=f+'+'+s+'|'+t;},500);

[+] thunderrabbit|2 years ago|reply
Thank you! I've let your script run for near 20 hours. It has discovered 3000 items including

`One Does Not Simply Walk Into Mordor`

[+] crazygringo|2 years ago|reply
I wish this were an actual game!

Like 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...)

[+] TheGlav|2 years ago|reply
Some of my First Discoveries:

* 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

[+] whats_a_quasar|2 years ago|reply
I went down a Kaiju rabbithole. Here are the monsters I created

- 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.

[+] gloosx|2 years ago|reply
This shows quite well that AI has zero common sense whatsoever, the results of most combinations I made are just nonsense. The associations are really vague and to me it is not interesting at all to look at random pictures and words appearing out of totally unrelated stuff. I really like man-made alchemy games though where all combinations are pre-defined and actually feel right.
[+] nedt|2 years ago|reply
I just don't have enough time to do it manually. Writing a little script that automates crafting was quicker for me. It found me "Star Trek: The Rockapocalypse"

    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();
[+] jordemort|2 years ago|reply
Got really obsessed with this, need to close the tab now. Some notes:

- 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"

[+] Cieric|2 years ago|reply
Apparently I made 2 first discoveries, Meteorism and Rap God. Seems interesting, but after a while of things not combining it gets a little stale. I agree with others I kind of would like to see the lineage of the elements. I know of this video where Carykh graphed is own combination game, but all new element names were user provided. https://www.youtube.com/watch?v=rQWwfYSUckY
[+] Cieric|2 years ago|reply
Well I guess I wasn't doing weird enough combinations before, I now have (Hip hop + Crusade) Crusade Hop, T-Pain, (T-Pain + Painting) T-Painting, Haikupoid, Rapping, Slim Shady and the others already mentioned. I do like that I can convince it to make completely new concepts as long as the 2 inputs are weird enough.
[+] f1nlay|2 years ago|reply
Was working on the very same idea alongside a friend of mine, we happened to launch a few weeks ago. Quite a lot more fleshed out than Neal's version, if anyone wants to check it out!

https://allchemy.io/

Edit: sorry if anyone is bumping into errors! We're running into bottlenecks with our supposedly auto-scaling database - working on it

[+] iandanforth|2 years ago|reply
Frankly I want to watch an animation of all the combinations as they are discovered/created over time from their backend. Seeing a growing 'tech tree' from the exploration and imaginations of users would be delightful.
[+] jerbear4328|2 years ago|reply
I got some funny ones, like:

- 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)

[+] dgrin91|2 years ago|reply
Its fun, but annoying that you have to do a lot of mouse dragging. Some more click-based interface would be better.

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.

[+] nopeynone76|2 years ago|reply
sharknado + time travel=sharknado2 + time travel = sharknado3 +time travel=Sharknado 3 Oh Hell No!+ time travel= sharknado4 The 4th Awakens +time travel =sharknado5 Global Swarming+ time travel = sharknado6: the last sharknado: It's about time. black hole+ wormhole = time travel wind + wind = tornado water + water =lake lake + water = ocean ocean+ water = fish fish + fish = shark shark +tornado = sharknado