Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement getActionsFromInfoSet #3

Open
whatsdis opened this issue Mar 23, 2020 · 0 comments
Open

implement getActionsFromInfoSet #3

whatsdis opened this issue Mar 23, 2020 · 0 comments

Comments

@whatsdis
Copy link
Owner

whatsdis commented Mar 23, 2020

Relevant bit from @EAT-CODE-KITE-REPEAT:

getActionsFromInfoSet should do the exact thing as it's called. From the infoSet it should get a set of possible actions at that moment so it can iterate over those in the beginning of the script. Depending on how infoSet is implemented this is possible OR NOT, I think currently there is a problem and can't be implented yet because of the implementation of an infoSet. But I honestly think that this part of the code isn't even necessary:


function MCCFR_P(minutes = 1) {
  for (let p = 0; p < PLAYERS.length; p++) {
    Object.keys(treeMap).map(key => {
      const I = treeMap[key];
      if (getCurrentPlayerFromInfoSet(I.infoSet) === p) {
        const actions = getActionsFromInfoSet(I);
        let regretSum = [];
        let strategy = [];

        for (let a = 0; a < actions.length; a++) {
          regretSum[a] = 0;
          if (isPreflop(I)) {
            strategy[a] = 0; // 𝜙(Ii,a) = 0; not sure if this is correct
          }
        }
        treeMap[I.infoSet] = { ...I, regretSum, strategy };
      }
    });
  }

so that would make getActionsFromInfoSet uneccesary also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant