Neat - Java Implementation 8 - Evolving

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

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

  • @kashparty
    @kashparty 5 лет назад +4

    I usually discover channels just before they become really big, so take this as a good sign... keep going because I think you're going to become very popular soon.

  • @akashkarnatak6581
    @akashkarnatak6581 4 года назад +3

    Thanks a lot for making this playlist I finally have my own neat library in JavaScript. I have made a lot of modifications to your explanation. Also a big thank for quickly responding to my comments. I hope you continue implementing other such algorithms like Q learning etc. :)

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

      I have qLearning implemented already. With neural networks and without but didnt do a video about it yet :)

  • @user-dy3gp8ll2q
    @user-dy3gp8ll2q 5 лет назад +1

    Hi! First, I'm extremely thankful for these videos, I saw a lot of theory but seeing actual code helped me understand the concepts clearly.
    Second, do you think NEAT is a good neural network implementation for the AI of a game, where CPU time is vital? I mean, is it performance efficient?
    Thanks!

    • @finneggers6612
      @finneggers6612  5 лет назад +2

      Well it is as fast as any other type of neural network. The way it learns just differs.
      NEAT is only designed for small networks. There is something called HyperNEAT. The code doesnt really change except that the encoding works in a different way.
      Genetic algorithms have shown to be more effective in many fields of AI and especially in games.
      If you want to use NEAT, Q-Learning or something like that, depends on the game.

    • @user-dy3gp8ll2q
      @user-dy3gp8ll2q 5 лет назад

      @@finneggers6612 Thanks! I'll start implementing it and see how the result turns out. The game has some traditionally coded AI but I want to get some more natural results (it's a game about fish so their behaviour is pretty simple, eating food and escaping predators, I guess I'll use the nearby food and predators' direction and distance as inputs).

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

      @@user-dy3gp8ll2q that sounds pretty intersting and neat should be able to deal with this easily.
      If you like, you could send me that game. It sounds really intersting to me!

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

    I will be waiting for the next tutorial, thank you very much for your videos :D

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

    Next video?

  • @manju_kura
    @manju_kura 4 года назад +2

    Hab ein problem bei meinem code:
    Exception in thread "main" java.lang.NullPointerException
    at neat.Neat.reproduce(Neat.java:231)
    at neat.Neat.evolve(Neat.java:171)
    at neat.Neat.main(Neat.java:262)
    Zeile 231 ist reproduce da hab ich das:
    private void reproduce() {
    RandomSelector selector = new RandomSelector();
    for(Species s : species.getData()) {
    selector.add(s, s.getScore());
    }
    for(Client c : clients.getData()) {
    if(c.getSpecies() == null) {
    Species s = selector.random();
    c.setGenome(s.breed());
    s.forcePut(c);
    }
    }
    }

    • @manju_kura
      @manju_kura 4 года назад +2

      Habs gefunden hat sich herausgestellt das ich:
      weight_diff /= Math.max(1,similar);
      in der genom klasse nicht hatte
      aber für was ist das?

    • @u_luana.j
      @u_luana.j 4 года назад

      @@manju_kura Can't read German but the same thing happened to me. Maybe he missed this out in the video.

    • @manju_kura
      @manju_kura 4 года назад +2

      @@u_luana.j you forgot weight_diff /= Math.max(1, similar) somewhere in the genom class

  • @u_luana.j
    @u_luana.j 4 года назад

    Maybe I've missed something but I've found an error. If there is no similar connectionGene, Genome.distance returns NaN(weight_diff/similar). In the first main loop this made all the clients in different species, and they all went extinct.

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

      권준현 yes you are right. I also had this problem. My solution was to bias the score. So basically the minimum score was 1 or so :)

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

    Hey Finn! I’ve been following your tutorials to make this code work with a project of mine using NodeJS. I’ve gotten myself snagged on a problem though. When the network goes to reproduce, it throws an error when calling the breed function. I stepped through the code a bit and realized that when the net is removing extinct species, it basically just removes every species because the only client present in each species is the representative. Is there something I missed from the video that would have caused this?

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

      I think this is a known error. I also think someone else posted this before and found a solution himself. sorry for that :(

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

      so obviously extinct species should not be removed. i entirely reomved species if there arent enough clients in it.

  • @Chris-ye7ip
    @Chris-ye7ip 5 лет назад

    So if I want to implement this in a video game I just have to get some information from the game as inputs and use the outputs as actions? Then I would measure their fitness and evolve them until they are professionals at the game right? How many more videos are planned and will you do a practical example too? By the way, your videos are extremely useful as there are nearly no explanations of neat besides the official document.

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

      Chris yes basically that’s all you gotta do. Obviously it’s a little bit more complicated.
      You need to chose:
      - what input is taken
      - how to assign a score
      - Parameters for your neat
      And it can very likely happen that it wont converge (get any better) if you choose wrong parameters.
      I haven’t planned anything yet. I programmed a small game for it in my free time. I could present that if you wish.
      Right now I am planning on explaining how a chess computer thinks and works and how to evolve that with genetic algorithms.
      One last thing to mention is that neat is NOT designed for big networks. So if your input is 3000 neurons and 30 outputs, it would simply take to long.
      There exists hyperNeat. Basically the same but for big networks. As far as I know they changed the way they encode the network. Rest is still the same

    • @Chris-ye7ip
      @Chris-ye7ip 5 лет назад

      @@finneggers6612 by the way, is there any mutation to change the bias of a node or adding a bias node?

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

      Chris i haven’t read about it but surely you can add that. Just add that mutation, and in crossover, choose randomly between the two biases

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

    Hi! In your AI NEAT playlist video this episode comes after episode 9. You should switch it. :)

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

    Just wanted to thank you for the in-depth content and really good explanations around implementing NEAT from scratch.
    I'm following along and implementing everything as a Ruby gem (my first gem!), on github.com/TiuTalk/neat/ - It has all the pieces you described, together with specs/unit tests and some visual debugging. I'm really loving this project.
    Once it's done I will run it against some simple games I created before, will let you know how it work out.
    Thanks one more time and looking forward for the next videos! :)

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

    Thanks