Coding Challenge #69: Evolutionary Steering Behaviors - Part 1

Поделиться
HTML-код
  • Опубликовано: 17 ноя 2024

Комментарии • 165

  • @andyli1890
    @andyli1890 7 лет назад +153

    "Goodbye! I mean not goodbye, in the past-the future for you-I'll see again, goodbye-not goodbye..."
    This dude is awesome

  • @sanjarmirakhmedov4016
    @sanjarmirakhmedov4016 7 лет назад +62

    Hello Mr. Daniel Shiffman, you are one of the greatest teachers in the world. When I watch your videos I don't get bored and at the same time I also learn something new. Wish you good luck with new videos sir.

  • @Le_Codex
    @Le_Codex 7 лет назад +21

    He is awesome for 1 thing. He bought an entire white board wall just to make explaning us things easier.

  • @xavierhorton5789
    @xavierhorton5789 7 лет назад +8

    I am an enormous fan of this series, every time I find myself looking to try a new concept I come here! Thank you!

  • @panta_rhei.26
    @panta_rhei.26 4 года назад

    These videos are extremely informative even years later. Thanks Daniel for all your hard work, you make the RUclips coding landscape so much more fun.

  • @neoblackcyptron
    @neoblackcyptron 2 года назад +2

    These videos are gold. I built my first genetic algorithm in c++ following the video series to evaluate words.
    I used a genetic algorithm that used one alpha dominant fitness candidate to cross over with all my other candidates with mutation thrown in and it worked.
    This video will help me go further. I’m planning to use OpenGL with c++ to implement what is shown here.
    I’m also really pumped regarding the neuroevolution playlist.

  • @seymurhamidov6091
    @seymurhamidov6091 4 месяца назад

    Best teacher and explanations! This man deserves best

  • @Lanr1s
    @Lanr1s 7 лет назад +50

    Awesome series !

  • @RanTutorials
    @RanTutorials 7 лет назад +28

    Set up a forum on your website and for each video where you would like to see submissions you should create a thread where a user can do so.

  • @memorablename5187
    @memorablename5187 7 лет назад +1

    John Koza did this over 20 years ago, back then this was super advanced stuff. After my exams im going to follow a long with this, for my Inteligent agents modules i actually had a very similar course work assignment, but it wasnt evolved behaviour just programmed.

  • @henruh07
    @henruh07 7 лет назад

    Daniel, your ability to teach and have fun and make what you're teaching fun to learn is incredible, and ,although I don't personally use p5.js, you've taught me so much about object-oriented programming as well as algorithms and data structures. Keep up the good work!

  • @sahajamatya
    @sahajamatya 7 лет назад +9

    Thank you so much for putting such time and effort into vids like these.

  • @aloveofsurf
    @aloveofsurf 5 лет назад +1

    This is a beautiful journey you're offering to everyone. Thank you very much for sharing.

    • @aloveofsurf
      @aloveofsurf 5 лет назад

      Bravo! Thank you for the accessible knowledge that is a true gift to all of us.

    • @aloveofsurf
      @aloveofsurf 5 лет назад

      Aweful lot of aw, me goin' on. Breathe in deep breaths whose depth is only constrained by the greatness you want to live like you believe you've attained. Thank the creator of this video because this is a wonderfully exciting project for an individual taking it on while at the same time being promising to have many people introduced to the idea of computational hacking with models recreationally.

  • @doomlexus835
    @doomlexus835 7 лет назад +2

    Great content as always - I just so happened to see this video in the playlist. Awesome!

  • @christianjt7018
    @christianjt7018 6 лет назад +2

    You keep surprising us with awesome projects, one after another :)

  • @matthewbraun6517
    @matthewbraun6517 7 лет назад +3

    So fantastic! The wife and I enjoy watching the live streams :D Keep up the Amazing work!

    • @discoboy1500
      @discoboy1500 7 лет назад +1

      Matthew Braun waw u and ur wife code that's so cool for u and ur partner in life to have the same passion goodluck in life for the both of u ^^

    • @matthewbraun6517
      @matthewbraun6517 7 лет назад +1

      My wife doesn't code yet :D She just enjoys Dan's enthusiastic approach to life and is hooked on this.dot song :D

    • @discoboy1500
      @discoboy1500 7 лет назад

      I knew it was 2 gud to be true :p

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +2

      Thank you!

  • @Naeddyr
    @Naeddyr 7 лет назад +4

    I'm not a programmer (though I know how), but I've had in mind for the longest time an evolution game that is similar to this. The basis would be the game of Snake, the genes are a binary tree (or a pair of them) that basically make a program that decides whether the snake goes forward (trees don't agree), right (both trees 'exit' right) or left (both tree 'exit' left), and the snakes would clone and procreate by doing some 'physical' action in the space. Probably find an 'unfertilized' egg or something, this is the hardest part to figure out. Kissing snakes? The snakes expend energy by moving through the binary tree program inside of them, and gain energy (and length = fat reserves) by eating generated snake food pellets or by eating the remnants of other, dead snakes. Naturally, they have to be able to 'see'... and they do so in a kind of Manhattan space manner, Z space in front and N to the left or right... Someday!

  • @koushikvarma2611
    @koushikvarma2611 2 года назад

    Ii hope i had a professor like in my university, who will teach with that much energy. So, Happy to learn from you.

  • @alexi1182
    @alexi1182 6 лет назад

    I've been a programmer for the last 6 years now, and I know shit about neural crap.
    After watching this, I didn't turn into an expert or something, but at least the "crap" part is gone. Thanks Dan!!

  • @daniellang4297
    @daniellang4297 7 лет назад +1

    I love it! You are such a great and positive guy!

  • @TheDarkOLeo
    @TheDarkOLeo 7 лет назад +3

    I see the first few seconds, I'm hyped.

  • @dynamicgecko1213
    @dynamicgecko1213 7 лет назад

    7:50 that is interesting because this algorithm can be used for scenarios in which the result is not obvious, like for example building an architectural structure much more efficiently.

  • @rebuffedsalmon6264
    @rebuffedsalmon6264 7 лет назад

    Hey Daniel. You should consider doing a programming setup/room tour video. I'd love to see how you have your stream setup, and what you use when writing code. Thanks!

    • @Elyx0
      @Elyx0 7 лет назад

      He already did! It's in his videos somewhere

  • @RaccoonEatingCacti
    @RaccoonEatingCacti 4 года назад

    I really like the kind of things you're making in all your videos! I was trying to do some stuff like this using python, but after finding your processing and p5 videos I got hooked. I don't plan on giving up python, but I'm curious if you use processing and p5 because they're better suited for this 'modelling' stuff or if it's just preference? They have a very powerful API, so I'm glad to pick up the languages anyway. By the way your spirit is very refreshing, thank you very much for doing this.

  • @MarkusBurrer
    @MarkusBurrer 7 лет назад

    Great series. And perfect timing. I want to do something in a Minecraft like game with A* pathfinding, steering behavior and maybe a little bit of evolution. I want to make mobs evolve over time to chase the player better and better

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +1

      Cool, please share if you do, I love minecraft!

    • @MarkusBurrer
      @MarkusBurrer 7 лет назад +1

      It is not Minecraft. The game is called Minetest and is open source.
      And if you make a series about AI you should also make videos about State Machines and GOAP

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +1

      Great suggestions!

  •  7 лет назад

    i was wathcing this live! :D i love your videos, keep making them! :3

  • @letoan285
    @letoan285 7 лет назад

    you are Genius Dev ever!

  • @WistrelChianti
    @WistrelChianti 2 года назад

    that error looks like it might be whatever the JS equivalent of array out of bounds exception as it happens when the food vanishes. So guessing something in the draw function and it using an old value for the length of the array

  • @Tomyk9991
    @Tomyk9991 7 лет назад

    Finally. New videos! :o

  • @Max-bh8tg
    @Max-bh8tg 7 лет назад

    Your mannerisms are very entertaining

  • @kosmic000
    @kosmic000 6 лет назад

    amazing and very interesting as usual dan

  • @adomasz.3958
    @adomasz.3958 7 лет назад +1

    Love your videos!

  • @cameronnichols9905
    @cameronnichols9905 7 лет назад

    How about implementing a genetic algorithm with machine learning?
    Such as the food has a label of 1, and the poison has a label of -1, and the vehicles would learn what to eat, and what avoid...
    I'll look into this when I'm done watching this series.

    • @cameronnichols9905
      @cameronnichols9905 7 лет назад

      And after watching more of the video, I learn this is being implemented lol

  • @lonelybookworm
    @lonelybookworm 5 лет назад

    What a NICE challenge

  • @vigneshpadmanabhan
    @vigneshpadmanabhan 4 года назад

    Can we have a session with a side by side comparison between reinforced learning and genetic algorithm working on the same problem ? Thanks !

  • @ahmedhafez3758
    @ahmedhafez3758 Год назад

    you're a legend

  • @fuoser
    @fuoser 7 лет назад +4

    good guy dan links to all unreleased parts.

  • @mhmdalharbi2370
    @mhmdalharbi2370 7 лет назад

    Finally i was waiting for you 😃

  • @0Destroyergm0
    @0Destroyergm0 5 лет назад +1

    I'm having trouble understanding why we add PI / 2 from the vector.heading? Which angle are we getting exactly when we say vector.heading? Relative to which line?? That part with angles always confused me with vectors and simulations, and I'm not sure how you knew exactly to add PI / 2 to make it face the mouse. Can anyone explain a bit?

  • @rizkiheryandi5759
    @rizkiheryandi5759 7 лет назад

    he show about how great to be a frontend developer 😎😎😎

  • @anidea8012
    @anidea8012 4 года назад +1

    Hi , i am from future and i have gud news for you that is you'll get a million subscribers in 2020 so keep it up😹

  • @numero7mojeangering
    @numero7mojeangering 6 лет назад

    it wil be nice if the agent can see the color of the food but not tell if i'ts poison or not, it will learn it after some time. With this in mind wou can have food that give you more life than other and some that kill you instantly, and also some fake food with color that dont mach with what the food will do

  • @beaverjoe9171
    @beaverjoe9171 6 лет назад

    OMG I spent many times to check and tell myself the food can be written in the object file because this is one global can be used anywhere. and change some to the food and keep others list. And always find why some errors on my running broswer. And finally I speed up to the end you find the food should be list.....

  • @adamrozzon7901
    @adamrozzon7901 7 лет назад

    Im learning JavaScript like : I copy what he does and I start learning what do different lines do.

  • @xavierhorton5789
    @xavierhorton5789 7 лет назад +4

    Does he do lectures anywhere publicly? Does anyone know?

    • @gumbilicious1
      @gumbilicious1 7 лет назад +2

      Xavier Horton he is a professor at NYU I believe

  • @tomburris8380
    @tomburris8380 7 лет назад

    Nice haircut Dan :)

  • @prateek6502-y4p
    @prateek6502-y4p 5 лет назад

    Hi coding train...I am from future.
    Pls make tutorials on reinforcement learning

  • @PaulGoux
    @PaulGoux 5 лет назад

    Wow it took me 2 days to complete this.....

  • @1morelight
    @1morelight 6 лет назад

    Shouldn't these videos of this coding challenge be after the ones about genetic algorithms in the "Intelligence and Learning" playlist? They are before. As always great video! Thaaaaaanks :)

  • @attyuttamsaha8
    @attyuttamsaha8 6 лет назад

    can you tell me some possible applications of this project that you have built? Thanks :)

  • @jakubandrzej791
    @jakubandrzej791 7 лет назад

    Would you, by any chance do a video about random forests?
    Please :D

  • @gaziagulnarmohit_
    @gaziagulnarmohit_ 4 года назад

    Amazing video really u r cool...

  • @CSRocks
    @CSRocks 7 лет назад

    Great video! Was anyone able to catch what's written on Dan's t-shirt?

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +2

      It's "Common Place" a poetry podcast! commonpodcast.com

    • @CSRocks
      @CSRocks 7 лет назад

      Thank you Dan!

  • @Held006
    @Held006 7 лет назад +4

    Where does he link to the code he starts out with (@09.28)?

    • @thegreenhoneybee9687
      @thegreenhoneybee9687 7 лет назад +7

      github.com/shiffman/The-Nature-of-Code-Examples-p5.js/tree/master/chp06_agents/NOC_6_01_Seek
      Your welcome :P

    • @DieTankstellenCrew
      @DieTankstellenCrew 7 лет назад

      what a nice guy :D thank you ^^

  • @JoseMorales-vv5fx
    @JoseMorales-vv5fx 7 лет назад

    Am I the only one that is new to coding ? I'm going for a major thats bachelor of science in software engineering. It seems pretty fun

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +1

      You can use these playlists to start from scratch!
      ruclips.net/user/shiffmanplaylists?view=50&shelf_id=14&sort=dd
      ruclips.net/user/shiffmanplaylists?view=50&shelf_id=2&sort=dd

    • @JoseMorales-vv5fx
      @JoseMorales-vv5fx 7 лет назад

      Thank you so much. You honestly make coding seem really fun. God Bless!!

  • @angelcaru
    @angelcaru 5 лет назад

    4:17 Its called punishment

  • @amdreallyfast
    @amdreallyfast 6 лет назад

    Out of curiosity, why is p5's vector positioning upside down? Velocity 0 goes down. Similarly, using beginShape() and endShape(), vertex(-100, -100) and vertex(+100, -100) makes a 200-pixel horizontal line above the centerline of the canvas.
    I found this in your setup code for this session: github.com/shiffman/The-Nature-of-Code-Examples-p5.js/tree/master/chp06_agents/NOC_6_01_Seek

  • @anuragghosh1139
    @anuragghosh1139 6 лет назад

    Hey I want to do my college BTech project on this but I am having a hard time explaining what it's applications are....could you suggest a few?

  • @Spartacus69
    @Spartacus69 5 лет назад

    These videos are amazing at 1.5 speed. #toomuchcaffeine

  • @Tetzuoe
    @Tetzuoe 7 лет назад

    I feel compelled to comment about the itchy nose

  • @syedbaryalay5849
    @syedbaryalay5849 6 лет назад

    You are wearing both your favourite colours

  • @Hirukaki
    @Hirukaki 5 лет назад

    I really enjoy following along in this videos but I cannot find where to start on this one! You say the link is in description, but which one? I'd rather follow along with a vid, but even if there is the code on github i can just copy and paste I'd be happy. But nothing I can find in the links you provide matches the example you start with!

    • @TheCodingTrain
      @TheCodingTrain  5 лет назад

      You can find the code and links to related videos here! thecodingtrain.com/CodingChallenges/069.1-steering-evolution.html (Also, maybe this one will help: thecodingtrain.com/CodingChallenges/059-steering-text-paths.html)

    • @PaulGoux
      @PaulGoux 5 лет назад

      Where can I post examples of our own creations based on your code?

  • @martlesmartlesmartles
    @martlesmartlesmartles 7 лет назад

    could you make a video on making a chat with p5.js?

  • @GabREAL1983
    @GabREAL1983 7 лет назад

    your hair is too short. your stuff is still on point and funny.

  • @Dignometry
    @Dignometry 6 лет назад

    0:47 observe the right poison

  • @rky.91
    @rky.91 7 лет назад +1

    this is realy cool! can you provide code of this challenge also for processing environment? :) please

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +1

      I would love to do this! Please file an issue at the github repo and I will try to get to it (or maybe someone will volunteer to port!)

  • @shayanjavadi
    @shayanjavadi 7 лет назад +1

    Dan what are the chances that you could start start using ES6 syntax? Also why no use prototype instead of this.

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +1

      I've started using prototype more in my videos (since I made a tutorial about it) and would like to adopt ES6, but am holding off as p5.js examples are generally all written with ES5. Would love opinions and advice about this.

    • @shayanjavadi
      @shayanjavadi 7 лет назад

      The Coding Train Maybe you can have the community help you rewrite some of the examples in ES6, or maybe make a separate guide for it. I'd personally be interested in helping
      And then maybe you could make a lesson on ES6? I know people that watch your videos that would kill for that. You're an amazing teacher by the way!

  • @pereirayip881
    @pereirayip881 5 лет назад

    Hey Daniel! Is there anyway that I can have this drawn in angular ? I have having issues converting this over..

  • @dogefromage1917
    @dogefromage1917 7 лет назад

    does someone know why my live preview closes if i open the chrome console?

  • @xFrizix
    @xFrizix 7 лет назад

    1:53 poisson dots :D

  • @persus2001
    @persus2001 7 лет назад

    Dan, can you make a video about how to create a multiplayer app using javascript

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад

      If you look for my agario challenge and my shared drawing canvas that will help you get started.

    • @persus2001
      @persus2001 7 лет назад

      Thanks

  • @Twitchi
    @Twitchi 7 лет назад +2

    No one talking about the itchy nose? for shame youtube comments for shame

  • @sleep3017
    @sleep3017 4 года назад

    Where can I get your transparent laptop on your left?

  • @dashsmashing
    @dashsmashing 7 лет назад

    So is steering similar to LERP, linear interpolation?

  • @holthuizenoemoet591
    @holthuizenoemoet591 6 лет назад

    WOW, why is the video description in Dutch for me ? ( surreal feeling wtf) .

  • @sohailape
    @sohailape 6 лет назад

    can anyone suggest a software or framework where i can make such small games or prototype programs easily

  • @sohailape
    @sohailape 6 лет назад

    one question, i studied you tutorial of steering a object but you used processing in that tutorial not p5.js . When i implement the code in js it is saying there is no PVector in p5.js file. I couldn't find much on google about this. Please help

  • @RRoda
    @RRoda 7 лет назад

    I love you ❤️

  • @therickestric
    @therickestric 7 лет назад

    i just downloaded atom to code with p5.js but i cant see the result of the code (viewer) what can i do to use chrome as viewer or which package does daniel use

    • @gumbilicious1
      @gumbilicious1 7 лет назад +1

      Ricardo Rico you have to make an HTML page to run the JavaScript in. There is an example of how to this in the p5.js download. I think the example is in a folder called "blank example" or something similar, it uses an HTML page called index.html and a js file called sketch.js. You can open sketch.js with atom and insert your code there and then open up index.html in a web browser to view the results. Hope this helps

  • @TidalMaker
    @TidalMaker 7 лет назад

    You have beautiful salt-and-pepper hair.

  • @therickestric
    @therickestric 7 лет назад

    i cant install p5 or processing, can anyone help?........... i just found that there is no editor for p5, which one does dan use, or i should get

    • @Fledron
      @Fledron 7 лет назад

      Ricardo Rico You can? Or you can't?

    • @therickestric
      @therickestric 7 лет назад

      cant, sorry

    • @Fledron
      @Fledron 7 лет назад

      Ricardo Rico Do you get any error message?

    • @therickestric
      @therickestric 7 лет назад

      in processing its very long but the first thing it says is "java.lang.nullpointerexception" and then describes lots of errors all like "base".
      can you recomend an editor for p5, or its better to download the old one

    • @Fledron
      @Fledron 7 лет назад

      Ricardo Rico I have never done anything with processing, I use Java. But you could Google if there is maybe an Eclipse Plugin for it, or just an processing editor. If nothing works, just use Notepad++, because it still has code highlighting.

  • @edfarage570
    @edfarage570 7 лет назад

    Do you think this can work for a game like chess?

    • @goldmanlee8403
      @goldmanlee8403 7 лет назад +1

      Ed Farage it would work, but it wouldnt be the most effective methid because the system would start out with no clue what to do

  • @DSK_ytbe
    @DSK_ytbe 6 лет назад

    Hi, could a genetic algorithm learn backgammon?

  • @RadioHeavenTamil
    @RadioHeavenTamil 7 лет назад

    3rd comment

  • @D4rkS7der
    @D4rkS7der 7 лет назад

    Pink t-shirt and purple hoodie? Really?
    ...Anyway, great video as always! I love your excitement and this topic is really interesting!

  • @kuskus_th13
    @kuskus_th13 7 лет назад

    *I'M GONNA GIVE YOU A CONSEQUENCE*

  • @kelvin80583
    @kelvin80583 7 лет назад

    How do you install that thing that you write the code?

    • @redhen
      @redhen 7 лет назад +1

      Kermit Pika das Galaxias Also, check out CodePen: here is a pen template with the p5 library already set up for you - codepen.io/RedHenDev/pen/MpJeoo

    • @kelvin80583
      @kelvin80583 7 лет назад +1

      ok, thank you

  • @bbugarschi
    @bbugarschi 6 лет назад

    is it just me or does the video skip frames every now and then?

  • @mikedelmonaco6193
    @mikedelmonaco6193 7 лет назад

    What is he writing his code in? It looks nothing like p5js

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +1

      I'm using the atom editor, here are some other workflow videos:
      sublime text: ruclips.net/video/UCHzlUiDD10/видео.html
      atom editor: ruclips.net/video/d3OcFexe9Ik/видео.html
      brackets: ruclips.net/video/nmZbhManVcY/видео.html
      codepen: ruclips.net/video/5gfUgNpS6kY/видео.html

    • @mikedelmonaco6193
      @mikedelmonaco6193 7 лет назад

      Thanks for the reply!

  • @mendisterenfeld2668
    @mendisterenfeld2668 7 лет назад

    Can I use this language on visual Studio?

    • @ledues3336
      @ledues3336 7 лет назад +1

      Yes, but I'm 99% sure you are gonna have to tick some more boxes in the installer program

    • @mendisterenfeld2668
      @mendisterenfeld2668 7 лет назад

      Le due S like what?

    • @gumbilicious1
      @gumbilicious1 7 лет назад

      You can use this when making asp.net pages in visual studio. I usually just place the p5.js library in my js folder and then run another include on my HTML page to include it and that is it

    • @mendisterenfeld2668
      @mendisterenfeld2668 7 лет назад

      Le due S didn't work

    • @gumbilicious1
      @gumbilicious1 7 лет назад +1

      mendi stern I don't know what to tell you because I have done this quite often and it worked just fine. If I was at my computer I'd paste a sample, but I am not

  • @ashikmahmood4018
    @ashikmahmood4018 6 лет назад

    p5 js or processing????

  • @kalenmcnamara8711
    @kalenmcnamara8711 7 лет назад +1

    69.....hehehe

  • @mathiasgredal98
    @mathiasgredal98 7 лет назад

    Someone make diep.io with this thing

  • @maxscribner1743
    @maxscribner1743 7 лет назад

    Haha I made this same project a year ago

  • @mrreese2342
    @mrreese2342 2 года назад

    p5.min.js:3 Uncaught TypeError: e.copy is not a function
    at l.default.Vector.sub (p5.min.js:3:622389)
    at Vehicle.seek (vehicle.js:56:31)
    at draw (sketch.js:51:11)
    at o.default.redraw (p5.min.js:3:493894)
    at _draw (p5.min.js:3:430041)

  • @rebornreaper194
    @rebornreaper194 3 года назад

    Don't worry I won't talk about your itchy nose. 🙂

  • @joraforever9899
    @joraforever9899 7 лет назад +1

    can you make this series so its more for grown people, so i dont look like an idiot when watching your outro, your content is really good for starting programers, and i dont think that 7 y.o. kids will be interested in js.

    • @Illusionaire1
      @Illusionaire1 7 лет назад +14

      If you are worried about looking grown up, you haven't.

    • @Twitchi
      @Twitchi 7 лет назад +1

      Have to agree with illusionaire here, like honestly, why are you so worried about appearing "grown up"?

    • @Fledron
      @Fledron 7 лет назад +3

      JoraForever Erm, it IS for grown people. As you said, most children are NOT interested in programming (except me)

    • @memorablename5187
      @memorablename5187 7 лет назад

      lol what 7 year old can write genetic algorithms.... im 21 and been programming for 5 years and I have a hard time with this stuff still

    • @Fledron
      @Fledron 7 лет назад

      It's easier learning things when you're a kid. That's why.