Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Help
  3. How to use NN blocks?

How to use NN blocks?

Scheduled Pinned Locked Moved Help
blocks2d-blocksai-blocksneuralnetwork
9 Posts 5 Posters 2.5k Views 2 Watching
  • 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.
  • NotJaldolfYTN Offline
    NotJaldolfYTN Offline
    NotJaldolfYT
    trusted helpers
    wrote on last edited by jeffreyrb03-gmail
    #1

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

    šŸ‘‹

    Tyller_T CreatiCodeI 2 Replies Last reply
    0
    • NotJaldolfYTN NotJaldolfYT

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

      Tyller_T Offline
      Tyller_T Offline
      Tyller_
      trusted helpers
      wrote on last edited by
      #2

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

      NotJaldolfYTN 1 Reply Last reply
      1
      • Tyller_T Tyller_

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

        NotJaldolfYTN Offline
        NotJaldolfYTN Offline
        NotJaldolfYT
        trusted helpers
        wrote on last edited by
        #3

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

        šŸ‘‹

        1 Reply Last reply
        1
        • NotJaldolfYTN NotJaldolfYT

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

          CreatiCodeI Offline
          CreatiCodeI Offline
          CreatiCode
          wrote on last edited by
          #4

          @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

          NotJaldolfYTN 1 Reply Last reply
          1
          • CreatiCodeI CreatiCode

            @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

            NotJaldolfYTN Offline
            NotJaldolfYTN Offline
            NotJaldolfYT
            trusted helpers
            wrote on last edited by
            #5

            @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?

            šŸ‘‹

            JaecadeJnightJ CreatiCodeI 2 Replies Last reply
            1
            • NotJaldolfYTN NotJaldolfYT

              @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?

              JaecadeJnightJ Offline
              JaecadeJnightJ Offline
              JaecadeJnight
              Mod Helper
              wrote on last edited by
              #6

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

              NotJaldolfYTN 1 Reply Last reply
              0
              • NotJaldolfYTN NotJaldolfYT

                @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?

                CreatiCodeI Offline
                CreatiCodeI Offline
                CreatiCode
                wrote on last edited by
                #7

                @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?

                NotJaldolfYTN 1 Reply Last reply
                1
                • CreatiCodeI CreatiCode

                  @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?

                  NotJaldolfYTN Offline
                  NotJaldolfYTN Offline
                  NotJaldolfYT
                  trusted helpers
                  wrote on last edited by
                  #8

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

                  šŸ‘‹

                  1 Reply Last reply
                  1
                  • JaecadeJnightJ JaecadeJnight

                    @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
                    NotJaldolfYTN Offline
                    NotJaldolfYTN Offline
                    NotJaldolfYT
                    trusted helpers
                    wrote on last edited by
                    #9

                    @jeffreyrb03-gmail Thank you šŸ˜„

                    šŸ‘‹

                    1 Reply Last reply
                    1

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better šŸ’—

                    Register Login
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • CreatiCode