Use a different method for the ai #21

Open
opened 2023-04-11 08:52:22 +00:00 by LunarTides · 4 comments
LunarTides commented 2023-04-11 08:52:22 +00:00 (Migrated from github.com)

Currently the ai uses a kind of “sentiment analysis” and looking at some numbers like stats and amount of keywords to determine “good” cards. This is basically just guessing but was a simple way of adding a “smart” ai.

Another solution could be to create a sandbox where it simulates what happens after it plays every card in it’s hand and chooses the one with the best outcome. One way to do this without messing with the game state could be to create a perfect copy of the game and making the move there, sandboxing the different cards. Doing it this way should make the ai make better decisions since the ai can see the direct outcome of a card before it plays it instead of just guessing and having to react to the outcome when it’s too late to change it’s mind. The ai could also choose every possible target when evaluating a card, which would make the ai choose better targets as well. This should be an “easy” solution that should directly make the ai play better. The old system should be kept so you can switch between them in the ai config.
Maybe also add a depth to the ai so it can look into the future. The ai can't look at the player's cards so the future is pretty uncertain so the future cards get less valuable the more into the future it is.

Currently the ai uses a kind of “sentiment analysis” and looking at some numbers like stats and amount of keywords to determine “good” cards. This is basically just guessing but was a simple way of adding a “smart” ai. Another solution could be to create a sandbox where it simulates what happens after it plays every card in it’s hand and chooses the one with the best outcome. One way to do this without messing with the game state could be to create a perfect copy of the game and making the move there, sandboxing the different cards. Doing it this way should make the ai make better decisions since the ai can see the direct outcome of a card before it plays it instead of just guessing and having to react to the outcome when it’s too late to change it’s mind. The ai could also choose every possible target when evaluating a card, which would make the ai choose better targets as well. This should be an “easy” solution that should directly make the ai play better. The old system should be kept so you can switch between them in the ai config. Maybe also add a depth to the ai so it can look into the future. The ai can't look at the player's cards so the future is pretty uncertain so the future cards get less valuable the more into the future it is.
IsakSkole123 commented 2023-04-11 11:16:41 +00:00 (Migrated from github.com)

I was not able to add this. It would require too many breaking changes and too much time.

I was not able to add this. It would require too many breaking changes and too much time.
IsakSkole123 commented 2023-06-03 12:56:05 +00:00 (Migrated from github.com)

Second attempt. I have gotten further. First pass is already commited.

Second attempt. I have gotten further. First pass is already commited.
LunarTides commented 2026-01-15 20:00:56 +00:00 (Migrated from github.com)

The AI needs to be re-thought overall...

The AI needs to be re-thought overall...
LunarTides commented 2026-01-28 17:22:05 +00:00 (Migrated from github.com)

Blocked by #464 or a similar solution

Blocked by #464 or a similar solution
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LunarTides/Hearthstone.js#21
No description provided.