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

Score is updated too frequently #73

Closed carlofazioli closed 4 years ago

carlofazioli commented 4 years ago

Problem

Currently, the hearts adjudicator appears to update the players' point totals incrementally after every trick. However, according to the rules, points are only accrued at the end of each round.

Fix

Update the adjudicator step_game to only update the score when the final trick is over.

aphelps4 commented 4 years ago

After looking into this a bit further, there is no reference to the points variable in state.py (which is something I need to clean up). I made a getter for the points a while ago in the adjudicator which gets called towards the end for updating score and also gets called while printing the trick results for testing purposes. Should I move the getter into the agents that use it or should I keep it in adjudicator since it basically ended up getting used as a score getter there?