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?