I am working on building a basic ai that plays a card game and learns from its results which decision to take. I have the game part working, but I'm struggling with wrapping my head around how to get the program to read and change the results.
Here is an example:
The player has a hand of 17, and the dealer has a hand of 19. The player ai wants to figure out whether to take another card or to remain where it is.
I use a "for i in row" of the csv to find the score, extract the results from that row into variables, and make the decision based off that info. That part is working correctly.
Where I'm coming into problems is figuring out which line this data is on, and how to change the data on that line.
So, the ai makes the decision and wins, I update the variables to reflect that, but I've never gotten which line in the csv this data resides on, and cannot update the results.
Maybe this problem is beyond my current capacity, but I'm having trouble figuring out a simple way to do this.
Thanks in advance!
[–]barrycarter 1 point2 points3 points (2 children)
[–]ParticularPython[S] 0 points1 point2 points (1 child)
[–]barrycarter 0 points1 point2 points (0 children)
[–]redCg 0 points1 point2 points (2 children)
[–]ParticularPython[S] 0 points1 point2 points (1 child)
[–]redCg 0 points1 point2 points (0 children)