carlofazioli / cardiathena

A project to study strategies in the game of hearts, using distributed computing, AI, and data analytics.
GNU General Public License v3.0
6 stars 1 forks source link

Learning Agent Brainstorming #79

Closed aphelps4 closed 4 years ago

aphelps4 commented 4 years ago

Description

One of the goals for this month is to come up with ideas for learning agents. While it is not at the top of the priority list, I wanted to write down my idea before I forget it. Once we have enough data stored of the games, we could use that data to determine which agent was most successful and have the learning agent mimic their style when it determines what would be the most beneficial action.

Tasks

aphelps4 commented 4 years ago

Another idea is that we could have a learning version of the Shooter agent that looks through all the past games and notes how many cards players had in their hand when points was broken for the first time and find the average of that. That average could be used as a way of determining the first half of the game from the second.

aphelps4 commented 4 years ago

So I was thinking we could use decision trees for our learning agent since Michael and I have worked with this class before when we took the AI class last semester. The basic idea is taking a csv file and using the pandas.read_csv to open a csv file with the data used to train the agent. One column is taken out of that data to be used as classification (this is what we want the agent to predict so it could be the action or the agent, we choose what makes sense to us) and we put this data in to train (or "fit") the agent. After the agent has been trained, they can predict the classification based on all the data they looked at. Since we would not want the agent to learn how to play bad moves, we would only give the data for agents that won that game for the agents to train with.

irobert4 commented 4 years ago

So looking at this DecisionTreeClassifier you've linked, how exactly do we go about using it? What kind of data are we going to be feeding the agent in order to train it?

Also I'm a little confused over the whole training bit. Is the DecisionTreeClassifier what we use to train the agent, or is it what the agent will use when making a decision?

aphelps4 commented 4 years ago

The idea behind a decision tree is you take data of past plays and build a tree to determine future plays. So there would be the initial building of a tree and then when it is time for the agent to make a decision, it would use that tree to do so. I believe the best data would be to use the deck since it can show the current trick and past plays. The output would be actions.