Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    How to use NN blocks?

    Help
    blocks 2d-blocks ai-blocks neuralnetwork
    5
    9
    322
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NotJaldolfYT
      NotJaldolfYT last edited by jeffreyrb03-gmail

      I do NOT know how to use the NN blocks, this is my current set up. f49c5083-5350-4afd-ba0d-5a0bd376cb13-image.png

      i have toddler humor

      Tyller_ info-creaticode 2 Replies Last reply Reply Quote 0
      • Tyller_
        Tyller_ Best Forum Helpers @NotJaldolfYT last edited by

        @jd131111 you have to put data in the table, I have messed with them and could setup an example hypothetically.

        <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
        </div>

        NotJaldolfYT 1 Reply Last reply Reply Quote 1
        • NotJaldolfYT
          NotJaldolfYT @Tyller_ last edited by

          @tyller_ Alright, ill ask for the example if i need it, thank you šŸ˜„

          i have toddler humor

          1 Reply Last reply Reply Quote 1
          • info-creaticode
            CreatiCode @NotJaldolfYT last edited by

            @jd131111

            Here is a tutorial for it:

            https://www.forum.creaticode.com/topic/1115/ai-use-neural-network-model-for-training-and-prediction-difficulty-5

            NotJaldolfYT 1 Reply Last reply Reply Quote 1
            • NotJaldolfYT
              NotJaldolfYT @info-creaticode last edited by

              @info-creaticode I’m so confused, can you please help me make it so that there’s an AI that predicts where the player will go and where the ball is to calculate it and go to the player, trying to block the player, whilst blocking the ball like in ping pong?

              i have toddler humor

              jeffreyrb03-gmail info-creaticode 2 Replies Last reply Reply Quote 1
              • jeffreyrb03-gmail
                JaecadeJnight Mod Helper @NotJaldolfYT last edited by

                @jd131111 I’m gonna give a kind of general answer, you’ll have to translate it into code yourself, but I hope it helps anyways. So, to train a basic AI model (bigger ones are not capable of running in CreatiCode without crashing), you have to train it with relevant data. From what I remember from CreatiCode’s tutorial which I recommend you use as a starting point (https://www.forum.creaticode.com/topic/1115/ai-use-neural-network-model-for-training-and-prediction-difficulty-5), when using the model for prediction, there’s input(s) that YOU give the model, and it will give an output, which is what it thinks is the right answer.

                Here is a better example, you are training a model to perform addition correctly, so you have to give it data of correct addition problems:

                input input 2 Output
                2 3 5
                8 2 10
                5 5 10

                …
                Now, for your case, I don’t think you need a neural algorithm for trying to block the player in ping pong, tracking where the ball is going and making it move accordingly to block the player might be enough. But if you still wanna go through with that, then you’re either gonna A: make the AI adapt to the player, by training it with the user’s X & Y coordinates for whatever like mouse & the ball’s coords (4 inputs total) as they play, or B: play against it a bunch of times and train a model to adapt to your playstyle with the same inputs.

                And for the table data, I’m guessing this is how it’d look:

                MouseX MouseY BallX BallY BallDirection

                #LLJW
                <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                NotJaldolfYT 1 Reply Last reply Reply Quote 0
                • info-creaticode
                  CreatiCode @NotJaldolfYT last edited by

                  @jd131111

                  Are you saying you want to create an AI that can play the game of ping-pong? Usually this can be done by simply matching your board with the Y position of the ball. You don’t really need any complex AI model for it.

                  Have you tried to ask our assistant about how to do it?

                  NotJaldolfYT 1 Reply Last reply Reply Quote 1
                  • NotJaldolfYT
                    NotJaldolfYT @info-creaticode last edited by

                    @info-creaticode No, Im not really into all of the AI assistant tools that are included, but thanks for the tip šŸ˜„

                    i have toddler humor

                    1 Reply Last reply Reply Quote 1
                    • NotJaldolfYT
                      NotJaldolfYT @jeffreyrb03-gmail last edited by

                      @jeffreyrb03-gmail Thank you šŸ˜„

                      i have toddler humor

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post