tarunravi / BlackjackAI

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

ValueError with Q Learning algorithm #1

Open LucasColas opened 3 weeks ago

LucasColas commented 3 weeks 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 3 weeks ago

Maybe this solution can help.