#๐Ÿ”’ Tetris AI

4 messages ยท Page 1 of 1 (latest)

safe wedge
#
#a and b are my inptus
a= np.array(a)
b=np.array(b)



X = a
Y = b
Z = target


inputs = Input(shape=(12,))
x = Dense(16, activation='relu')(inputs)
x = Dense(32, activation='relu')(x)
output1 = Dense(1)(x)
output2 = Dense(8, activation='softmax')(x)

model = Model(inputs=inputs, outputs=[output1, output2])

model.compile(loss=['mae', 'sparse_categorical_crossentropy'], optimizer='adam')

history = model.fit(X, [Y, Z], epochs=10, batch_size=len(a))

tt=[[1, 1, 0, 0, 0, 0, 0, 0, 0, 0,2,4]]
result = model.predict(x=np.array(tt))

print(result)

i have this that i created in an attempt to make a tetris nn, but im finding that i have no idea how to input or output training data and the moves that it should make, could anyone point me to the right direction?

raven lanternBOT
#

@safe wedge

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

raven lanternBOT
#

@safe wedge

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.