How to use NN blocks?
-
I do NOT know how to use the NN blocks, this is my current set up.
-
@jd131111 you have to put data in the table, I have messed with them and could setup an example hypothetically.
-
@tyller_ Alright, ill ask for the example if i need it, thank you
-
-
@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?
-
@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 -
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?
-
@info-creaticode No, Im not really into all of the AI assistant tools that are included, but thanks for the tip
-
@jeffreyrb03-gmail Thank you