tarunravi / BlackjackAI

I designed an AI to learn how to play the popular cardgame Blackjack without any humans teaching it.
6 stars 5 forks source link

ValueError with Q Learning algorithm #1

Open LucasColas opened 2 months ago

LucasColas commented 2 months ago

Hello, I tried to run your algorithm but there's an error.

line 303, in main currentEpisode = np.array(currentEpisode) ^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (1, 3) + inhomogeneous part.

It's related to numpy and a list. Maybe it used to work in an older version but it's no longer the case.

LucasColas commented 2 months ago

Maybe this solution can help.