To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/TheCodingSloth. You’ll also get 20% off an annual premium subscription. Happy New Year Everyone! UPDATE: I've decided not to share the code because it'll ruin the game for regular players. HOWEVER, join the Infinite Craft Discord if you want help making your own version. discord.gg/NSMut3Wx3Y
@@aIwaysorangefunction simulateDragAndDrop(element, startX, startY, targetX, targetY, steps = 10) { function triggerMouseEvent(target, eventType, clientX, clientY) { const event = new MouseEvent(eventType, { bubbles: true, cancelable: true, clientX, clientY, view: window, }); target.dispatchEvent(event); } console.log(`Start: (${startX}, ${startY}), Target: (${targetX}, ${targetY})`); // Start dragging triggerMouseEvent(element, "mousedown", startX, startY); // Gradual movement let currentX = startX; let currentY = startY; const deltaX = (targetX - startX) / steps; const deltaY = (targetY - startY) / steps; return new Promise((resolve) => { function moveMouse() { currentX += deltaX; currentY += deltaY; triggerMouseEvent(document, "mousemove", currentX, currentY); if ( Math.abs(currentX - targetX) < Math.abs(deltaX) || Math.abs(currentY - targetY) < Math.abs(deltaY) ) { // Drop the item at the target triggerMouseEvent(document, "mouseup", targetX, targetY); console.log("Drag-and-drop completed."); // Force final alignment element.style.position = "absolute"; element.style.left = `${targetX}px`; element.style.top = `${targetY}px`; resolve(); } else { requestAnimationFrame(moveMouse); } } requestAnimationFrame(moveMouse); }); } async function test() { const itemsRows = document.getElementsByClassName("items-row"); for (const row of itemsRows) { const items = row.getElementsByClassName("item"); const processedPairs = new Set(); // Reset on each test for (let i = 0; i < items.length; i++) { for (let j = 0; j < items.length; j++) { if (i !== j && !processedPairs.has(`${i}-${j}`)) { processedPairs.add(`${i}-${j}`); // Track processed pairs locally await processCombination(items[i], items[j], 500, 100); // Fixed target position } } } } } async function clickClearButton() { const clearBtn = document.getElementsByClassName("clear")[0]; if (clearBtn) { clearBtn.click(); console.log("Clear button clicked."); await new Promise((resolve) => setTimeout(resolve, 500)); // Wait for DOM to update } else { console.error("Clear button not found."); } } async function processCombination(firstItem, secondItem, targetX, targetY) { const firstRect = firstItem.getBoundingClientRect(); const secondRect = secondItem.getBoundingClientRect(); const firstStartX = firstRect.x + firstRect.width / 2; const firstStartY = firstRect.y + firstRect.height / 2; const secondStartX = secondRect.x + secondRect.width / 2; const secondStartY = secondRect.y + secondRect.height / 2; await simulateDragAndDrop(firstItem, firstStartX, firstStartY, targetX, targetY); await simulateDragAndDrop(secondItem, secondStartX, secondStartY, targetX, targetY);
// Delay before clicking the clear button, to allow for any UI updates await new Promise((resolve) => setTimeout(resolve, 500)); await clickClearButton(); } // Run the test function await test();
@FluffyBloxYT-z5c dude doesnt know any js basic checks to do upfront. Hes only a science dev who has never worked in this job. No experience in solving real world problems
Possible next steps: 1. Run it skipping any items containing numbers, since you don't consider things like "Shrek 728" to be novel items. 2. Try clearing after every 30 combinations or so instead of every combination to see if that makes it run faster.
This is such a good showcase of the limitations of AI to code. It works at first but as soon as you have to do anything more complicated it sucks and you have to either completely rewrite or understand the code and modify it to your needs anyway. Most of the time I've learned to just do it myself from the start.
If you can't understand the code AI gave you then you absolutely should either learn how it works or write your own code. That's a big IF though and it kinda shows a skill issue on your part. Because if you can understand AI code then you should have no problems either properly prompting AI to modify it or just quickly doing it yourself.
@ You either prompted it to do some task that requires "invention of a function" or it created mocks of functions to simplify the solution for you. In the second case you can prompt the AI to explain. Tl;dr still skill issue on your part
Could probably track for each item the index of the last item you tried to combine it with & keep incrementing index of item 2 until the number of items doesn’t increase & index of item 1 is 1 less than item2. Record index 2. Then increase index of item 1 by 1. Repeat until you are at end of combinations. Reset item 1 to 0 and set item 2 to that items max item 2 + 1. Keep repeating until no you iterate item 1 without increasing number of items
As a programmer for 4 lazy years myself in JS, Python, and other programming languages, I detect a common skill issue here that we both have. Jokes aside that somehow helped me with my "own" code too and it was a good time watching so thanks man!
Time is finite. Computers require time to combine items in Infitite Craft. Therefore, the number of items possible is limited by time. Checkmate Neil. 😎 /hj or whatever
You did all that work trying to code dragging and dropping ui elements when you could just make network requests directly for any of the matches you want.
You do realise sending exceesive requests costs neal money, right? What are you even gonna do it with - mindlessly run it for hours on end with no purpose?
I'm assuming there is a character length limit for the item names. Combined with the fact that there are a limited number of possible characters, this limits all the character combinations in the names which would limit the amount of items. So it indeed isn't infinite.
oh wait. according to a stack overflow answer, javascript does seem to have some kind of maximum string size. of which is at least around 2^30 characters for most browsers
There is a limit, IIRC it's 32 characters, maybe bit less. Don't remember how it counts emojis or other non-standard characters. If the output would be longer than these, the elements just don't combine.
@@tipoima Elements **longer** than 30 characters dont combine anymore. Also it's theoretically possible to get 319 characters in an element, but the record I know of is 305 characters (an element is maximum 20 llama 2 tokens)
if you had used a table to collect all previous combinations which is I think easy to do (I dont use that programming language so sorry if im wrong) you whouldnt have had a loop that repeatedly tried already used connections.
hi, i'm from brazil, and because you enabled "AI translated audio" to brazilian portuguese, it also enabled the translation of the title of the video. the problem is, the translation is usually google translated (bad). As it is auto enabled by default, i'm warning you in case you haven't noticed. this video here talks about this ruclips.net/video/Pk63QMSyg7k/видео.html
How I list this title 1. My programming "skills": both creative and unoriginal 2. "My" programming skills: shows of coping, and not your code 3. My "programming" skills: wtf dose that means, SLAVERY????????
Okay, do it again, but run it where it checks all combinations its done before and puts it in a saved list, til eventually you still dont win and its just infinity lmao
To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/TheCodingSloth. You’ll also get 20% off an annual premium subscription. Happy New Year Everyone!
UPDATE: I've decided not to share the code because it'll ruin the game for regular players.
HOWEVER, join the Infinite Craft Discord if you want help making your own version. discord.gg/NSMut3Wx3Y
@@kevinramy9463 there are plenty of free coding courses for beginners, don’t waste your money on a paid one
@@kevinramy9463 womp womp
no
@@aIwaysorangefunction simulateDragAndDrop(element, startX, startY, targetX, targetY, steps = 10) {
function triggerMouseEvent(target, eventType, clientX, clientY) {
const event = new MouseEvent(eventType, {
bubbles: true,
cancelable: true,
clientX,
clientY,
view: window,
});
target.dispatchEvent(event);
}
console.log(`Start: (${startX}, ${startY}), Target: (${targetX}, ${targetY})`);
// Start dragging
triggerMouseEvent(element, "mousedown", startX, startY);
// Gradual movement
let currentX = startX;
let currentY = startY;
const deltaX = (targetX - startX) / steps;
const deltaY = (targetY - startY) / steps;
return new Promise((resolve) => {
function moveMouse() {
currentX += deltaX;
currentY += deltaY;
triggerMouseEvent(document, "mousemove", currentX, currentY);
if (
Math.abs(currentX - targetX) < Math.abs(deltaX) ||
Math.abs(currentY - targetY) < Math.abs(deltaY)
) {
// Drop the item at the target
triggerMouseEvent(document, "mouseup", targetX, targetY);
console.log("Drag-and-drop completed.");
// Force final alignment
element.style.position = "absolute";
element.style.left = `${targetX}px`;
element.style.top = `${targetY}px`;
resolve();
} else {
requestAnimationFrame(moveMouse);
}
}
requestAnimationFrame(moveMouse);
});
}
async function test() {
const itemsRows = document.getElementsByClassName("items-row");
for (const row of itemsRows) {
const items = row.getElementsByClassName("item");
const processedPairs = new Set(); // Reset on each test
for (let i = 0; i < items.length; i++) {
for (let j = 0; j < items.length; j++) {
if (i !== j && !processedPairs.has(`${i}-${j}`)) {
processedPairs.add(`${i}-${j}`); // Track processed pairs locally
await processCombination(items[i], items[j], 500, 100); // Fixed target position
}
}
}
}
}
async function clickClearButton() {
const clearBtn = document.getElementsByClassName("clear")[0];
if (clearBtn) {
clearBtn.click();
console.log("Clear button clicked.");
await new Promise((resolve) => setTimeout(resolve, 500)); // Wait for DOM to update
} else {
console.error("Clear button not found.");
}
}
async function processCombination(firstItem, secondItem, targetX, targetY) {
const firstRect = firstItem.getBoundingClientRect();
const secondRect = secondItem.getBoundingClientRect();
const firstStartX = firstRect.x + firstRect.width / 2;
const firstStartY = firstRect.y + firstRect.height / 2;
const secondStartX = secondRect.x + secondRect.width / 2;
const secondStartY = secondRect.y + secondRect.height / 2;
await simulateDragAndDrop(firstItem, firstStartX, firstStartY, targetX, targetY);
await simulateDragAndDrop(secondItem, secondStartX, secondStartY, targetX, targetY);
// Delay before clicking the clear button, to allow for any UI updates
await new Promise((resolve) => setTimeout(resolve, 500));
await clickClearButton();
}
// Run the test function
await test();
the invite is invalid
This is why I can’t get any new discoveries in infinite craft
I managed to get about 80 ND because I kept adding numbers to Pirates of the Caribbean
I got Space Cotgasm and Crasm a few days ago
my discoverys are dramaupahntoaum and the ent urn games revenge of the jedi
@@scientiaestpotentia2007 i got goku orgasm, Sexy Chicken, Fortnite Shitter, and Gorlock the orgasm
Just do decimal crafts
Should've named "finite craft"
im pretty sure non native english speakers dont even know what that word means. m e t o o
@@watercatॱit means not infinite
@@watercatॱit means possessing any classification of limitation to possess an culmination, a extremity.
@@user-universalmaster. its a joke😭
Agreed.
4 years of computer science, turns to AI.
Pretty sad...
to be fair he do fix up some parts ai couldn't
@FluffyBloxYT-z5c 💀right...
Yeah well thanks to ai i can also re create it >:)
@FluffyBloxYT-z5c dude doesnt know any js basic checks to do upfront. Hes only a science dev who has never worked in this job. No experience in solving real world problems
Seeing a programmer use AI to beat a game made using AI makes me think the Unabomber was right
Dead internet theory
I like the mind of the Unabomber. Wish I could meet him 😵💫🪰
Well if you want to meet him you have to become him first @@luzianamejia5535
And because of this code, making a first discovery is 100 times more difficult
Omg you’re right 😭😭😭
lekelamega jumpscare
Bro just combine a bunch of random numbers together
I was wondering why "My" was in quotations 😭
It do be accurate, though!
Possible next steps:
1. Run it skipping any items containing numbers, since you don't consider things like "Shrek 728" to be novel items.
2. Try clearing after every 30 combinations or so instead of every combination to see if that makes it run faster.
3. Use cheat engine to make faster cycles.
sick now we have "limited craft"
finite craft
@@Nann1006 Fine craft
@@lightning_11 mine craft
10:10 "Pteracornicornicornicornicornicornicornicorn" 🗣🗣
nicornicornicor… hold up a minute 😭
@jonqthqnWAAAA
Chocolate santa clawsosarus rex!?!?!?!?!??!?!
I think the favourite 2 lines of all programmers are : "And guess what? I didnt even use AI" and "Ok, i think i fixed it now".
0:50 i prefer "Finite Craft"
C R A F T
im thinking of “limited craft”
Copied coment ahh
This is such a good showcase of the limitations of AI to code. It works at first but as soon as you have to do anything more complicated it sucks and you have to either completely rewrite or understand the code and modify it to your needs anyway. Most of the time I've learned to just do it myself from the start.
If you can't understand the code AI gave you then you absolutely should either learn how it works or write your own code. That's a big IF though and it kinda shows a skill issue on your part. Because if you can understand AI code then you should have no problems either properly prompting AI to modify it or just quickly doing it yourself.
@@_gameforceryeah if you know how to code then you tell it each line or two properly and that'll still save a lot of time with accuracy
@@_gameforcerI can't understand AI code because it invents functions that don't exist
@ You either prompted it to do some task that requires "invention of a function" or it created mocks of functions to simplify the solution for you. In the second case you can prompt the AI to explain.
Tl;dr still skill issue on your part
@@_gameforcer ru high? if gpt doesn't know how to do something it just guesses random functions that don't exist, "game:GetSkinColorAsync()" type shit
The reason why progress slows down is probably because it keeps crafting old combinations that already have results
Yeah that’s why there are bunch of cathulhu and other mess lmao
Could probably track for each item the index of the last item you tried to combine it with & keep incrementing index of item 2 until the number of items doesn’t increase & index of item 1 is 1 less than item2. Record index 2.
Then increase index of item 1 by 1. Repeat until you are at end of combinations. Reset item 1 to 0 and set item 2 to that items max item 2 + 1. Keep repeating until no you iterate item 1 without increasing number of items
bro uprooted every single new discovery in the game💀💀
Plottwist, he found all items at day 7, but decided to remove this and say that he closed browser.
I am so glad it took you 2h to write the Code! I feel much better now 😊
12:27 do it for a whole month
*Using my 4 years of computer science*
attempts to use chatgpt on first probleme
so relatable
No way he asked Big Daddy Raga to adapt to his bad code😂
Normal people: Kicking rocks all day*
The Coding SLoth trying to get 3 million items in infinite craft in 1 week
Finally subscribed you Sir are a descendant of my humor 🧑🏾🍳
Balatro is a perfectly fine excuse to be unproductive!
3:42 Water still? STILL WATER??? MANGO MANGO MANGO
I love this guy he inspired me to learn coding
Why is the process so relatable 😂
Please correct the title to IA used her skills as she did 95% of the work
0:15 America moment
Or canada. Or the UK. Or SAE. Or Mexico. Or Brazil.... I think you get the idea.
@ it’s especially true for the just elected president, if ykyk
@dylan_1313 trump is good. What do you mean?
@dylan_1313 not accurate at all.
@@veqxh explain why (Challenge: without being racist)
As a programmer for 4 lazy years myself in JS, Python, and other programming languages, I detect a common skill issue here that we both have. Jokes aside that somehow helped me with my "own" code too and it was a good time watching so thanks man!
9:31 I read some of the results of the creations and I died
Optimize the code to not use already used combinations, speed it up and keep it going for a month
5:18 I KNEW IT WAS A FUCKING RICKROLL LMAOOO
i was thinking, that didn´t anyone else notice it
@valentinosiurua o alr
A new year with new errors
Fine I'll watch the sponsor segment. You got me. You deserve it.
Balatro is a great game, nice plug
Great video it was very entertaining to watch
😂😂the ad placement was so good I let it play, no skipping.
EVEN CODING ALOTH IS ADDICTED TO BALATRO 😭
Bro said no memes one sec later:i understand it now 7:36
Why didn't you save all the things already combined so it only tries new combination wouldnt that make it way faster
Cthulhu 78473 when I discover Clothing 78474: 💀
Happy new year everyone 🎉🎉
Infinite craft 🚫
A small portion of the set of real numbers is the amount of possible items you can craft in Infinite Craft ✅️
Instantly liked and subscribed when I heard the god of war reference to ZEUUSS!
Time is finite. Computers require time to combine items in Infitite Craft. Therefore, the number of items possible is limited by time. Checkmate Neil. 😎
/hj or whatever
Thanks for showing how many issues you ran into that’s realistic and entertaining
You did all that work trying to code dragging and dropping ui elements when you could just make network requests directly for any of the matches you want.
But would that be visually appealing?
@anjanavabiswas8835 If it were me, I'd make my own UI for it. It'd probably be faster
Nice video! Keep up the good work and happy new year!
I imagine Neal watching this video
there goes the amount of new discoveries
Well, there goes all my first discoveries lol
This video warms my cold withered heart.
"Children" being a coding term will always make questionable sentences.
You have given me a life of suffering due to you not giving me the code
You do realise sending exceesive requests costs neal money, right? What are you even gonna do it with - mindlessly run it for hours on end with no purpose?
*HAPPY NEW YEAR!!!!!* 🎊🎊🎊🎊🎊🎊🎊🎊
gotta say, those 4 years of learning how to code didn't go to waste :P
i didnt expect for first discoveries getting industrialised
I skipped through like 80% of the video and instantly was blasted with "SCOTLAAND FOREVERRRRRRRRRR " 11:27
Happy new year
I'm assuming there is a character length limit for the item names. Combined with the fact that there are a limited number of possible characters, this limits all the character combinations in the names which would limit the amount of items. So it indeed isn't infinite.
why would there be a limit to the number of characters in an item name?
oh wait. according to a stack overflow answer, javascript does seem to have some kind of maximum string size. of which is at least around 2^30 characters for most browsers
There is a limit, IIRC it's 32 characters, maybe bit less. Don't remember how it counts emojis or other non-standard characters.
If the output would be longer than these, the elements just don't combine.
@@tipoima Elements **longer** than 30 characters dont combine anymore. Also it's theoretically possible to get 319 characters in an element, but the record I know of is 305 characters (an element is maximum 20 llama 2 tokens)
"limited craft" should be fire
Little upset that I cant get any new discoverys because of this but GGs
First thought logically it's not infinite because Neal's servers aren't infinite to fit everything
This vid was so funny please make more like it
Duuuude, the sponsor spot 😂😂
Im not a coder but I think the reason some things were going to the top left is because thats where (0 , 0) is on a monitor (i think)
yes, yes that is where 0,0 is
The ad was reallly realllllly smooooooth
it's just like that rock paper scissors AI game, it constantly develops, it's like trying to find the limit of AI
Ai stopped at cthulhu and started making every possible 25k combinations of it
if you had used a table to collect all previous combinations which is I think easy to do (I dont use that programming language so sorry if im wrong) you whouldnt have had a loop that repeatedly tried already used connections.
Do more of these coding videos I really like them
Balatro is actually so fun bro
This guy is the reason getting a first discovery is hard
0:32 greg heffly board president patrick star college president 😂😂
hi, i'm from brazil, and because you enabled "AI translated audio" to brazilian portuguese, it also enabled the translation of the title of the video. the problem is, the translation is usually google translated (bad). As it is auto enabled by default, i'm warning you in case you haven't noticed. this video here talks about this
ruclips.net/video/Pk63QMSyg7k/видео.html
Theoretically it's finite. It would be interesting to run this program on an 1 exaflops supercomputer
Bro, I spent 6h just getting a [titanic ship {Number}] funniest part is that all of them were new discoveries
How I list this title
1. My programming "skills": both creative and unoriginal
2. "My" programming skills: shows of coping, and not your code
3. My "programming" skills: wtf dose that means, SLAVERY????????
5:43 jjk reference i smell
KEEP GOING!!
Next we gonna have infinite craft speed running
9:53 shaqtopus prime
prime
minos prime
PREPARE THYSELF
My Pony senses were tingling once I saw this video on my recommended. Glad to see Twilight Sparkle and PiratePony ship made the cut lol.
5:10 hahahaahah.. I had one ASMR integrated computer like yours once.. :D
9:00
Me when i play this at the airport on full volume
Maybe add something that helps it remember combinations so that there aren’t as much repeats?
Okay, do it again, but run it where it checks all combinations its done before and puts it in a saved list, til eventually you still dont win and its just infinity lmao
Achievement Accomplished: The Brother of Inner Sloth
YOU SHOULD MAKE "Game of bells and thrones and thrones"
10:44 i see that error like every other week lol
There are censored words you cant get (word you were able to get but you can't get it anymore), for example "Terrorist"
Brother is the sloth for a reason
they keep making new catthulu sequels
Bro is the reason why I can't get any first discoveries
Finally another person who is a little bit annoyed by this too I remember my first first discovery was something called a Gryphong or smth
You can input items manually throught local storage so IDK
if it really stores which items you have in local storage then there is a limit cause local storage is limited to 5-10mb on most browsers
So basically it’s infinite because it makes stuff up.. so you did beat it and you even got stuff nobody else found. I say that’s a success
"Every ounce of brain power I have" 🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣 Nice vid right there🤩🤩🤩
11:48 when I was playing this game for the first time I got same thing but with Diablo, I had hundreds of them.
AI game vs AI gamer
"Cheesicornic Darth pie-ranha" 11:46 💀💀💀
this video is just an AI beating another AI.