Poker-AI.org Poker AI and Botting Discussion Forum 2013-05-08T04:51:39+00:00 http://poker-ai.org/phpbb/feed.php?f=24&t=2486 2013-05-08T04:51:39+00:00 2013-05-08T04:51:39+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2486&p=4122#p4122 <![CDATA[Re: Still some bugs in my riversolver]]> Image
Check=>Bet=>Raise=>Raise:
Image

All 3 images so far for an initial potsize of 0.

For a potsize of 5:

Check=>Bet=>Raise=>Raise

Image

Check=>Bet=>Raise

Image

Check

Image

Statistics: Posted by HontoNiBaka — Wed May 08, 2013 4:51 am


]]>
2013-05-08T03:58:22+00:00 2013-05-08T03:58:22+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2486&p=4121#p4121 <![CDATA[Re: Still some bugs in my riversolver]]> if he only calls with AA (likely), we are indifferent to raise/call with AA.

seems odd with uniform distribution for everything else though. what's the result for Check=>? it seems to only bet AA.

Statistics: Posted by somehomelessguy — Wed May 08, 2013 3:58 am


]]>
2013-05-08T03:36:42+00:00 2013-05-08T03:36:42+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2486&p=4120#p4120 <![CDATA[Still some bugs in my riversolver]]>
This is my tree:

Image

Its not pretty, I programmed a treeDrawer quickly, but maybe you will see an error there. I stored the amount a player can win in the terminal nodes, not the overal potsize. I guess this should be ok, but I have been looking for a bug for hours, so I am not sure about anything anymore :?

Some code:

Code:
public class FoldNode extends Node {
   @Override
   public double[] trainVanilla(int trainPlayer, double[] p, double[] op) {
      double pValue = trainPlayer == 0 ? payOff : -payOff;
      double[] ev = new double[p.length];

      for (int i = 0; i < p.length; i++) {
         double sum = 0;

         for (int j = 0; j < op.length; j++) {
            if (!(Game.get(trainPlayer).get(i).overlaps(Game.get(trainPlayer^1).get(j))))
               sum += op[j];
         }
         ev[i] = sum * pValue;
         if(!(player==trainPlayer)){
            ev[i] = ev[i] + sum * Game.pot;
         }
      }
      return ev;
}   


Code:
public class ShowdownNode extends Node{
   public double[] trainVanilla(int trainPlayer, double[] p, double[] op) {
      
      double[] ev = new double[p.length];
      for (int i = 0; i < p.length; i++)
      {
         double sum = 0;
         double sum2 = 0;

         for (int j = 0; j < op.length; j++)
         {
            if (!(Game.get(trainPlayer).get(i).overlaps(Game.get(trainPlayer^1).get(j))))
            {
               if (Game.get(trainPlayer).get(i).getRank()
                     > Game.get(trainPlayer^1).get(j).getRank()){
                  sum += op[j];
                  sum2 += op[j];
               }
               else if (Game.get(trainPlayer).get(i).getRank()
                     < Game.get(trainPlayer^1).get(j).getRank()){
                  sum -= op[j];
               }
               else{
                  sum2 += 0.5*op[j];
               }
            }
         }
         ev[i] = sum * payOff + sum2*Game.pot;
      }
      return ev;      
   }
}


Code:
public class DecisionNode extends Node {
   @Override
   public double[] trainVanilla(int trainPlayer, double[] p, double[] op) {
      double[][] s = new double[Game.get(player).getSize()][];
      for (int i = 0; i < Game.get(player).getSize(); i++)
         s[i] = getStrategy(i);

      if (player == trainPlayer)
      {
         for (int i = 0; i < p.length; i++)
         {
            for (int j = 0; j < children.length; j++)
               cumulativeStrategy[i][j] += p[i] * s[i][j];
         }

         double[][] u = new double[children.length][];
         double[] ev = new double[p.length];

         for (int j = 0; j < children.length; j++)
         {
            double[] newp = new double[p.length];
            for (int i = 0; i < p.length; i++)
               newp[i] = s[i][j] * p[i];

            u[j] = children[j].trainVanilla(trainPlayer, newp, op);

            for (int i = 0; i < p.length; i++)
               ev[i] += u[j][i] * s[i][j];
         }
         for (int i = 0; i < p.length; i++)
         {
            for (int j = 0; j < children.length; j++){
               regret[i][j] += u[j][i] - ev[i];
            }
         }

         return ev;

      }
      else
      {
         double[] ev = new double[p.length];

         for (int j = 0; j < children.length; j++)
         {
            double[] newop = new double[op.length];
            for (int i = 0; i < op.length; i++)
               newop[i] = s[i][j] * op[i];

            double[] u = children[j].trainVanilla(trainPlayer, p, newop);

            for (int i = 0; i < p.length; i++)
               ev[i] += u[i];
         }
         return ev;
      }
   }
}


It all worked fine for Kuhn with each player posting an ante and an initial potsize of 0. It doesnt work for trees, that allow raises or for Kuhn with an initial potsize.

This is the result for Check=>Bet=>Raise on an AKQ98 board for instance.

Image

As you can see, AA calls with a probability of 90%, which of course doesn't make sense with the nuts. If you need some other informations about my code, or results I am getting, just let me know.

Statistics: Posted by HontoNiBaka — Wed May 08, 2013 3:36 am


]]>