Examples of PlayerData

  • org.cspoker.ai.opponentmodels.weka.PlayerData
    Class that tracks player statistics when playing games. @author guy

  • Examples of com.flansmod.common.PlayerData

                  mc.fontRenderer.drawString(s, i / 2 + 33 + x, j - 60, 0xffffff);
                  x += 16 + mc.fontRenderer.getStringWidth(s);
                }
              }
              //Render secondary gun
              PlayerData data = PlayerHandler.getPlayerData(mc.thePlayer, Side.CLIENT);
              if(gunType.oneHanded && data.offHandGunSlot != 0)
              {
                ItemStack offHandStack = mc.thePlayer.inventory.getStackInSlot(data.offHandGunSlot - 1);
                if(offHandStack != null && offHandStack.getItem() instanceof ItemGun)
                {
                  GunType offHandGunType = ((ItemGun)offHandStack.getItem()).type;
                  x = 0;
                  for(int n = 0; n < offHandGunType.numAmmoItemsInGun; n++)
                  {
                    ItemStack bulletStack = ((ItemGun)offHandStack.getItem()).getBulletItemStack(offHandStack, n);
                    if(bulletStack != null && bulletStack.getItem() != null && bulletStack.getItemDamage() < bulletStack.getMaxDamage())
                    {
                      //Find the string we are displaying next to the ammo item
                      String s = (bulletStack.getMaxDamage() - bulletStack.getItemDamage()) + "/" + bulletStack.getMaxDamage();
                      if(bulletStack.getMaxDamage() == 1)
                        s = "";
                     
                      //Draw the slot and then move leftwards
                      RenderHelper.enableGUIStandardItemLighting();
                      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                      GL11.glEnable(GL12.GL_RESCALE_NORMAL);
                      OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
                      drawSlotInventory(mc.fontRenderer, bulletStack, i / 2 - 32 - x, j - 65)
                      x += 16 + mc.fontRenderer.getStringWidth(s);
                     
                      //Draw the string
                      GL11.glDisable(GL12.GL_RESCALE_NORMAL);
                      RenderHelper.disableStandardItemLighting();
                      mc.fontRenderer.drawString(s, i / 2 - 16 - x, j - 59, 0x000000);
                      mc.fontRenderer.drawString(s, i / 2 - 17 - x, j - 60, 0xffffff);
                    }
                  }
                }
              }
            }
          }
         
          PacketTeamInfo teamInfo = FlansModClient.teamInfo;
         
          if(teamInfo != null && FlansModClient.minecraft.thePlayer != null && (teamInfo.numTeams > 0 || !teamInfo.sortedByTeam) && teamInfo.getPlayerScoreData(FlansModClient.minecraft.thePlayer.getCommandSenderName()) != null)
          {
            GL11.glEnable(3042 /* GL_BLEND */);
            GL11.glDisable(2929 /* GL_DEPTH_TEST */);
            GL11.glDepthMask(false);
            GL11.glBlendFunc(770, 771);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            GL11.glDisable(3008 /* GL_ALPHA_TEST */);
     
            mc.renderEngine.bindTexture(GuiTeamScores.texture);
                   
            tessellator.startDrawingQuads();
            tessellator.addVertexWithUV(i / 2 - 43, 27, -90D, 85D / 256D, 27D / 256D);
            tessellator.addVertexWithUV(i / 2 + 43, 27, -90D, 171D / 256D, 27D / 256D);
            tessellator.addVertexWithUV(i / 2 + 43, 0D, -90D, 171D / 256D, 0D / 256D);
            tessellator.addVertexWithUV(i / 2 - 43, 0D, -90D, 85D / 256D, 0D / 256D);
            tessellator.draw();
           
            //If we are in a two team gametype, draw the team scores at the top of the screen
            if(teamInfo.numTeams == 2 && teamInfo.sortedByTeam)
            {
              //Draw team 1 colour bit
              int colour = teamInfo.teamData[0].team.teamColour; 
              GL11.glColor4f(((colour >> 16) & 0xff) / 256F, ((colour >> 8) & 0xff) / 256F, (colour & 0xff) / 256F, 1.0F);
              tessellator.startDrawingQuads();
              tessellator.addVertexWithUV(i / 2 - 43, 27, -90D, 0D / 256D, 125D / 256D);
              tessellator.addVertexWithUV(i / 2 - 19, 27, -90D, 24D / 256D, 125D / 256D);
              tessellator.addVertexWithUV(i / 2 - 19, 0D, -90D, 24D / 256D, 98D / 256D);
              tessellator.addVertexWithUV(i / 2 - 43, 0D, -90D, 0D / 256D, 98D / 256D);
              tessellator.draw();
              //Draw team 2 colour bit
              colour = teamInfo.teamData[1].team.teamColour; 
              GL11.glColor4f(((colour >> 16) & 0xff) / 256F, ((colour >> 8) & 0xff) / 256F, (colour & 0xff) / 256F, 1.0F);
              tessellator.startDrawingQuads();
              tessellator.addVertexWithUV(i / 2 + 19, 27, -90D, 62D / 256D, 125D / 256D);
              tessellator.addVertexWithUV(i / 2 + 43, 27, -90D, 86D / 256D, 125D / 256D);
              tessellator.addVertexWithUV(i / 2 + 43, 0D, -90D, 86D / 256D, 98D / 256D);
              tessellator.addVertexWithUV(i / 2 + 19, 0D, -90D, 62D / 256D, 98D / 256D);
              tessellator.draw();
             
              GL11.glDepthMask(true);
              GL11.glEnable(2929 /* GL_DEPTH_TEST */);
              GL11.glEnable(3008 /* GL_ALPHA_TEST */);
              GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
             
              //Draw the team scores
              mc.fontRenderer.drawString(teamInfo.teamData[0].score + "", i / 2 - 35, 9, 0x000000);
              mc.fontRenderer.drawString(teamInfo.teamData[0].score + "", i / 2 - 36, 8, 0xffffff);
              mc.fontRenderer.drawString(teamInfo.teamData[1].score + "", i / 2 + 35 - mc.fontRenderer.getStringWidth(teamInfo.teamData[1].score + ""), 9, 0x000000);
              mc.fontRenderer.drawString(teamInfo.teamData[1].score + "", i / 2 + 34 - mc.fontRenderer.getStringWidth(teamInfo.teamData[1].score + ""), 8, 0xffffff);
            }
           
            mc.fontRenderer.drawString(teamInfo.gametype + "", i / 2 + 48, 9, 0x000000);
            mc.fontRenderer.drawString(teamInfo.gametype + "", i / 2 + 47, 8, 0xffffff);
            mc.fontRenderer.drawString(teamInfo.map + "", i / 2 - 47 - mc.fontRenderer.getStringWidth(teamInfo.map + ""), 9, 0x000000);
            mc.fontRenderer.drawString(teamInfo.map + "", i / 2 - 48 - mc.fontRenderer.getStringWidth(teamInfo.map + ""), 8, 0xffffff);
           
            int secondsLeft = teamInfo.timeLeft / 20;
            int minutesLeft = secondsLeft / 60;
            secondsLeft = secondsLeft % 60;
            String timeLeft = minutesLeft + ":" + (secondsLeft < 10 ? "0" + secondsLeft : secondsLeft);
            mc.fontRenderer.drawString(timeLeft, i / 2 - mc.fontRenderer.getStringWidth(timeLeft) / 2 - 1, 29, 0x000000);
            mc.fontRenderer.drawString(timeLeft, i / 2 - mc.fontRenderer.getStringWidth(timeLeft) / 2, 30, 0xffffff);
     
           
            GL11.glDepthMask(true);
            GL11.glEnable(2929 /* GL_DEPTH_TEST */);
            GL11.glEnable(3008 /* GL_ALPHA_TEST */);
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            String playerUsername = FlansModClient.minecraft.thePlayer.getCommandSenderName();
           
            mc.fontRenderer.drawString(teamInfo.getPlayerScoreData(playerUsername).score + "", i / 2 - 7, 1, 0x000000);
            mc.fontRenderer.drawString(teamInfo.getPlayerScoreData(playerUsername).kills + "", i / 2 - 7, 9, 0x000000);
            mc.fontRenderer.drawString(teamInfo.getPlayerScoreData(playerUsername).deaths + "", i / 2 - 7, 17, 0x000000);
          }
          for(int n = 0; n < killMessages.size(); n++)
          {
            KillMessage killMessage = killMessages.get(n);
            mc.fontRenderer.drawString("\u00a7" + killMessage.killerName + "     " + "\u00a7" + killMessage.killedName, i - mc.fontRenderer.getStringWidth(killMessage.killerName + "     " + killMessage.killedName) - 6, j - 32 - killMessage.line * 16, 0xffffff);
          }
               
          //Draw icons indicated weapons used
          RenderHelper.enableGUIStandardItemLighting();
          GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
          GL11.glEnable(GL12.GL_RESCALE_NORMAL);
          OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F)
          for(int n = 0; n < killMessages.size(); n++)
          {
            KillMessage killMessage = killMessages.get(n);
            drawSlotInventory(mc.fontRenderer, new ItemStack(killMessage.weapon.item), i - mc.fontRenderer.getStringWidth("     " + killMessage.killedName) - 12, j - 36 - killMessage.line * 16);
          }
          GL11.glDisable(3042 /*GL_BLEND*/);
          RenderHelper.disableStandardItemLighting();
         
          //Off-hand weapon graphics
          mc.renderEngine.bindTexture(offHand);
         
          ItemStack currentStack = mc.thePlayer.inventory.getCurrentItem();
          PlayerData data = PlayerHandler.getPlayerData(mc.thePlayer, Side.CLIENT);
         
          if(currentStack != null && currentStack.getItem() instanceof ItemGun && ((ItemGun)currentStack.getItem()).type.oneHanded)
          {
            for(int n = 0; n < 9; n++)
            {
              if(data.offHandGunSlot == n + 1)
              {
                tessellator.startDrawingQuads();
                tessellator.addVertexWithUV(i / 2 - 88 + 20 * n, j - 3, -90D, 16D / 64D, 16D / 32D);
                tessellator.addVertexWithUV(i / 2 - 72 + 20 * n, j - 3, -90D, 32D / 64D, 16D / 32D);
                tessellator.addVertexWithUV(i / 2 - 72 + 20 * n, j - 19, -90D, 32D / 64D, 0D / 32D);
                tessellator.addVertexWithUV(i / 2 - 88 + 20 * n, j - 19, -90D, 16D / 64D, 0D / 32D);
                tessellator.draw();
              }
              else if(data.isValidOffHandWeapon(mc.thePlayer, n + 1))
              {         
                tessellator.startDrawingQuads();
                tessellator.addVertexWithUV(i / 2 - 88 + 20 * n, j - 3, -90D, 0D / 64D, 16D / 32D);
                tessellator.addVertexWithUV(i / 2 - 72 + 20 * n, j - 3, -90D, 16D / 64D, 16D / 32D);
                tessellator.addVertexWithUV(i / 2 - 72 + 20 * n, j - 19, -90D, 16D / 64D, 0D / 32D);
    View Full Code Here

    Examples of com.l2client.model.network.PlayerData

       * Reads x,y,z, objectId, name, race and classid only at the moment
       */
      @Override
      public void handlePacket() {
        log.fine("Read from Server "+this.getClass().getSimpleName());
        PlayerData p = new PlayerData();
        p.setX(ServerValues.getClientCoordX(readD()));
        //reverted jme uses Y as up
        p.setZ(ServerValues.getClientCoordZ(readD()));
        p.setY(ServerValues.getClientCoordY(readD()));
        readD();
        p.setObjectId(readD());
        p.setName(readS());
        p.setRace(readD());
        p.setClassId(readD());
        //FIXME read in the rest if CharInfo: paperdoll etc,.. whole lot more is in
        _client.getNpcHandler().add(p);
      }
    View Full Code Here

    Examples of fr.neatmonster.nocheatplus.players.PlayerData

                return sendAdminNotifyMessageStored(message);
            }
        }

        private final boolean hasTurnedOffNotifications(final String playerName){
            final PlayerData data = DataManager.getPlayerData(playerName, false);
            return data != null && data.getNotifyOff();
        }
    View Full Code Here

    Examples of fr.neatmonster.nocheatplus.players.PlayerData

        protected void onJoinLow(final Player player){
            final String playerName = player.getName();
            if (nameSetPerms.hasPermission(playerName, Permissions.NOTIFY)){
                // Login notifications...
                final PlayerData data = DataManager.getPlayerData(playerName, true);
                //      // Update available.
                //      if (updateAvailable) player.sendMessage(ChatColor.RED + "NCP: " + ChatColor.WHITE + "A new update of NoCheatPlus is available.\n" + "Download it at http://nocheatplus.org/update");

                // Inconsistent config version.
                if (configProblems != null && ConfigManager.getConfigFile().getBoolean(ConfPaths.CONFIGVERSION_NOTIFY)) {
                    // Could use custom prefix from logging, however ncp should be mentioned then.
                    sendMessageOnTick(playerName, ChatColor.RED + "NCP: " + ChatColor.WHITE + configProblems);
                }
                // Message if notify is turned off.
                if (data.getNotifyOff()) {
                    sendMessageOnTick(playerName, MSG_NOTIFY_OFF);
                }
            }
            // JoinLeaveListenerS: Do update comment in NoCheatPlusAPI with changing event priority.
            for (final JoinLeaveListener jlListener : joinLeaveListeners){
    View Full Code Here

    Examples of org.cspoker.ai.opponentmodels.weka.PlayerData

    //          new Object[]{minRaise, maxRaise, relRaiseAmount, blindRelRaiseAmount}));
              new Object[]{relRaiseAmount}));   
      }
     
      private void logRaiseAmount(Object actorId, double raiseAmount){
        PlayerData p = this.getPlayers().get(actorId);
        double bb = p.getBB();
        double relAmount = raiseAmount;
        raiseAmount = raiseAmount * bb;
        double minRaise = (double)getMinRaise(p);
        double maxRaise = (double)getMaxRaise(p);
        raiseAmount = Math.min(raiseAmount, maxRaise);
    View Full Code Here

    Examples of org.cspoker.ai.opponentmodels.weka.PlayerData

      }


     
      public Instance getUnclassifiedInstance(Propositionalizer prop, Object actor) {
        PlayerData p = prop.getPlayers().get(actor);
        Instance instance = new Instance(length);
       
        instance.setDataset(dataset);
       
        instance.setValue(0, prop.getRoundCompletion());
        instance.setValue(1, prop.getPlayersActed());
        instance.setValue(2, prop.getPlayersToAct());
        instance.setValue(3, p.getGameCount());
        instance.setValue(4, prop.getTableGameStats().getNbRoundActions(prop));
        // Amounts
        instance.setValue(5, prop.getRelativePotSize());
        instance.setValue(6, p.getRelativeStack());
        // Player count
        instance.setValue(7, prop.getNbSeatedPlayers());
        instance.setValue(8, prop.getNbActivePlayers());
        instance.setValue(9, prop.getActivePlayerRatio());
        // Global player frequencies
        instance.setValue(10, p.getGlobalStats().getBetFrequency(4));
        // Per-round player frequencies
        instance.setValue(11, p.getGlobalStats().getRoundBetFrequency(prop,4));
        // PT Stats
        instance.setValue(12, p.getVPIP(4));
        instance.setValue(13, p.getPFR(4));
        instance.setValue(14, p.getGlobalStats().getAF(5));
        instance.setValue(15, p.getGlobalStats().getAFq(5));
        instance.setValue(16, (float)Math.log(p.getGlobalStats().getAFAmount(5)));
        instance.setValue(17, p.getWtSD(4));
        // Table PT stat averages
        instance.setValue(18, prop.getAverageVPIP(p,4));
        instance.setValue(19, prop.getAveragePFR(p,4));
        instance.setValue(20, prop.getAverageAF(p,5));
        instance.setValue(21, prop.getAverageAFq(p,5));
    View Full Code Here

    Examples of org.cspoker.ai.opponentmodels.weka.PlayerData

        super(name, attributes, targets);
      }


      public Instance getUnclassifiedInstance(Propositionalizer prop, Object actor) {
        PlayerData p = prop.getPlayers().get(actor);
        Instance instance = new Instance(length);

        instance.setDataset(dataset);

        instance.setValue(0, prop.getRoundCompletion());
        instance.setValue(1, prop.getPlayersActed());
        instance.setValue(2, prop.getPlayersToAct());
        instance.setValue(3, prop.getRound());
        instance.setValue(4, p.getGameCount());
        instance.setValue(5, prop.getTableGameStats().getNbRoundActions(prop));
        // Amounts
        instance.setValue(6, prop.getRelativePotSize());
        instance.setValue(7, p.getRelativeStack());
        instance.setValue(8, (float)Math.log(p.getRelativeDeficit(prop)));
        instance.setValue(9, p.getPotOdds(prop));
        instance.setValue(10, (float)Math.log(prop.getRelativeMaxBet()));
        // Player count
        instance.setValue(11, prop.getNbSeatedPlayers());
        instance.setValue(12, prop.getNbActivePlayers());
        instance.setValue(13, prop.getActivePlayerRatio());
        // Global player frequencies
        // Global player frequencies
        instance.setValue(14, p.getGlobalStats().getFoldFrequency(4));
        instance.setValue(15, p.getGlobalStats().getCallFrequency(4));
        instance.setValue(16, p.getGlobalStats().getRaiseFrequency(4));
        // Per-round player frequencies
        instance.setValue(17, p.getGlobalStats().getRoundFoldFrequency(prop,4));
        instance.setValue(18, p.getGlobalStats().getRoundCallFrequency(prop,4));
        instance.setValue(19, p.getGlobalStats().getRoundRaiseFrequency(prop,4));
        // Game betting behaviour
        instance.setValue(20, p.isComitted()+"");
        instance.setValue(21, prop.getTableGameStats().getNbBetsRaises());
        instance.setValue(22, p.getGameStats().getNbBetsRaises());
        instance.setValue(23, p.getGameStats().getNbRoundBetsRaises(prop));
        instance.setValue(24, prop.rel(p.getGameStats().getNbBetsRaises(),prop.getTableGameStats().getNbBetsRaises()));
        instance.setValue(25, (float)Math.log1p(p.getGameStats().getTotalBetRaiseAmount()));
        instance.setValue(26, prop.rel(p.getGameStats().getTotalBetRaiseAmount(),prop.getTableGameStats().getTotalBetRaiseAmount()));
        instance.setValue(27, p.isLastActionWasRaise()+"");
        // PT Stats
        instance.setValue(28, p.getVPIP(4));
        instance.setValue(29, p.getPFR(4));
        instance.setValue(30, p.getGlobalStats().getAF(5));
        instance.setValue(31, p.getGlobalStats().getAFq(5));
        instance.setValue(32, (float)Math.log(p.getGlobalStats().getAFAmount(5)));
        instance.setValue(33, p.getWtSD(4));
        // Table PT stat averages
        instance.setValue(34, prop.getAverageVPIP(p,4));
        instance.setValue(35, prop.getAveragePFR(p,4));
        instance.setValue(36, prop.getAverageAF(p,5));
        instance.setValue(37, prop.getAverageAFq(p,5));
    View Full Code Here

    Examples of org.cspoker.ai.opponentmodels.weka.PlayerData

      }



      public Instance getUnclassifiedInstance(Propositionalizer prop, Object actor) {
        PlayerData p = prop.getPlayers().get(actor);
        Instance instance = new Instance(length);
        if (p==null) p = new PlayerData(actor);
        instance.setDataset(dataset);

        instance.setValue(0, prop.getRoundCompletion());
        instance.setValue(1, prop.getPlayersActed());
        instance.setValue(2, prop.getPlayersToAct());
        instance.setValue(3, p.getGameCount());
        instance.setValue(4, prop.isSomebodyActedThisRound()+"");
        instance.setValue(5, prop.getTableGameStats().getNbRoundActions(prop));
        // Amounts
        instance.setValue(6, prop.getRelativePotSize());
        instance.setValue(7, p.getRelativeStack());
        instance.setValue(8, (float)Math.log(p.getRelativeDeficit(prop)));
        instance.setValue(9, p.getPotOdds(prop));
        instance.setValue(10, (float)Math.log(prop.getRelativeMaxBet()));
        // Player count
        instance.setValue(11, prop.getNbSeatedPlayers());
        instance.setValue(12, prop.getNbActivePlayers());
        instance.setValue(13, prop.getActivePlayerRatio());
        // Global player frequencies
        instance.setValue(14, p.getGlobalStats().getFoldFrequency(4));
        instance.setValue(15, p.getGlobalStats().getCallFrequency(4));
        instance.setValue(16, p.getGlobalStats().getRaiseFrequency(4));
        // Per-round player frequencies
        instance.setValue(17, p.getGlobalStats().getRoundFoldFrequency(prop,4));
        instance.setValue(18, p.getGlobalStats().getRoundCallFrequency(prop,4));
        instance.setValue(19, p.getGlobalStats().getRoundRaiseFrequency(prop,4));
        // Game betting behaviour
        instance.setValue(20, p.isComitted()+"");
        instance.setValue(21, prop.getTableGameStats().getNbBetsRaises());
        instance.setValue(22, p.getGameStats().getNbBetsRaises());
        instance.setValue(23, prop.rel(p.getGameStats().getNbBetsRaises(),prop.getTableGameStats().getNbBetsRaises()));
        instance.setValue(24, (float)Math.log1p(p.getGameStats().getTotalBetRaiseAmount()));
        instance.setValue(25, prop.rel(p.getGameStats().getTotalBetRaiseAmount(),prop.getTableGameStats().getTotalBetRaiseAmount()));
        instance.setValue(26, p.isLastActionWasRaise()+"");
        // PT Stats
        instance.setValue(27, p.getVPIP(4));
        instance.setValue(28, p.getPFR(4));
        instance.setValue(29, p.getGlobalStats().getAF(5));
        instance.setValue(30, p.getGlobalStats().getAFq(5));
        instance.setValue(31, (float)Math.log(p.getGlobalStats().getAFAmount(5)));
        instance.setValue(32, p.getWtSD(4));
        // Table PT stat averages
        instance.setValue(33, prop.getAverageVPIP(p,4));
        instance.setValue(34, prop.getAveragePFR(p,4));
        instance.setValue(35, prop.getAverageAF(p,5));
        instance.setValue(36, prop.getAverageAFq(p,5));
    View Full Code Here

    Examples of org.cspoker.ai.opponentmodels.weka.PlayerData

        super(name, attributes, targets);
      }


      public Instance getUnclassifiedInstance(Propositionalizer prop, Object actor) {
        PlayerData p = prop.getPlayers().get(actor);
        Instance instance = new Instance(length);

        instance.setDataset(dataset);

        instance.setValue(0, prop.getRoundCompletion());
        instance.setValue(1, prop.getPlayersActed());
        instance.setValue(2, prop.getPlayersToAct());
        instance.setValue(3, prop.getRound()+"");
        instance.setValue(4, p.getGameCount());
        instance.setValue(5, prop.isSomebodyActedThisRound()+"");
        instance.setValue(6, prop.getTableGameStats().getNbRoundActions(prop));
        // Amounts
        instance.setValue(7, prop.getRelativePotSize());
        instance.setValue(8, p.getRelativeStack());
        // Player count
        instance.setValue(9, prop.getNbSeatedPlayers());
        instance.setValue(10, prop.getNbActivePlayers());
        instance.setValue(11, prop.getActivePlayerRatio());
        // Global player frequencies
        instance.setValue(12, p.getGlobalStats().getBetFrequency(4));
        // Per-round player frequencies
        instance.setValue(13, p.getGlobalStats().getRoundBetFrequency(prop,4));
        // Game betting behaviour
        instance.setValue(14, prop.getTableGameStats().getNbBetsRaises());
        instance.setValue(15, p.getGameStats().getNbBetsRaises());
        instance.setValue(16, prop.rel(p.getGameStats().getNbBetsRaises(),prop.getTableGameStats().getNbBetsRaises()));
        instance.setValue(17, (float)Math.log1p(p.getGameStats().getTotalBetRaiseAmount()));
        instance.setValue(18, prop.rel(p.getGameStats().getTotalBetRaiseAmount(),prop.getTableGameStats().getTotalBetRaiseAmount()));
        instance.setValue(19, p.isLastActionWasRaise()+"");
        // PT Stats
        instance.setValue(20, p.getVPIP(4));
        instance.setValue(21, p.getPFR(4));
        instance.setValue(22, p.getGlobalStats().getAF(5));
        instance.setValue(23, p.getGlobalStats().getAFq(5));
        instance.setValue(24, (float)Math.log(p.getGlobalStats().getAFAmount(5)));
        instance.setValue(25, p.getWtSD(4));
        // Table PT stat averages
        instance.setValue(26, prop.getAverageVPIP(p,4));
        instance.setValue(27, prop.getAveragePFR(p,4));
        instance.setValue(28, prop.getAverageAF(p,5));
        instance.setValue(29, prop.getAverageAFq(p,5));
    View Full Code Here

    Examples of org.cspoker.ai.opponentmodels.weka.PlayerData

      public ShowdownInstances(String name, String targets) {
        super(name, attributes, targets);
      }

      public Instance getUnclassifiedInstance(Propositionalizer prop, Object actor) {
        PlayerData p = prop.getPlayers().get(actor);
        Instance instance = new Instance(length);
       
        instance.setDataset(dataset);

        instance.setValue(0, p.getGameCount());
        // Amounts
        instance.setValue(1, prop.getRelativePotSize());
        instance.setValue(2, (float)Math.log(prop.getRelativePotSize()));
        instance.setValue(3, p.getRelativeStack());
        instance.setValue(4, (float)Math.log1p(p.getRelativeStack()));
        // Player count
        instance.setValue(5, prop.getNbSeatedPlayers());
        instance.setValue(6, prop.getNbActivePlayers());
        instance.setValue(7, prop.getActivePlayerRatio());
        // Global player frequencies
        instance.setValue(8, p.getGlobalStats().getBetFrequency(4));
        instance.setValue(9, p.getGlobalStats().getFoldFrequency(4));
        instance.setValue(10, p.getGlobalStats().getCallFrequency(4));
        instance.setValue(11, p.getGlobalStats().getRaiseFrequency(4));
        //BetRaise counts
        instance.setValue(12, prop.getTableGameStats().getNbBetsRaises());
        instance.setValue(13, p.getGameStats().getNbBetsRaises());
        instance.setValue(14, p.getGameStats().getNbBetsRaisesPreFlop());
        instance.setValue(15, p.getGameStats().getNbBetsRaisesPostFlop());
        instance.setValue(16, p.getGameStats().getNbBetsRaisesFlop());
        instance.setValue(17, p.getGameStats().getNbBetsRaisesTurn());
        instance.setValue(18, p.getGameStats().getNbBetsRaisesRiver());
        //BetRaise amount
        instance.setValue(19, (float)prop.getTableGameStats().getTotalBetRaiseAmount());
        instance.setValue(20, (float)p.getGameStats().getTotalBetRaiseAmount());
        instance.setValue(21, (float)p.getGameStats().getBetRaiseAmountPreFlop());
        instance.setValue(22, (float)p.getGameStats().getBetRaiseAmountPostFlop());
        instance.setValue(23, (float)p.getGameStats().getBetRaiseAmountFlop());
        instance.setValue(24, (float)p.getGameStats().getBetRaiseAmountTurn());
        instance.setValue(25, (float)p.getGameStats().getBetRaiseAmountRiver());
        //Bet amount
        instance.setValue(26, (float)prop.getTableGameStats().getTotalBetAmount());
        instance.setValue(27, (float)p.getGameStats().getTotalBetAmount());
        instance.setValue(28, (float)p.getGameStats().getBetAmountPreFlop());
        instance.setValue(29, (float)p.getGameStats().getBetAmountPostFlop());
        instance.setValue(30, (float)p.getGameStats().getBetAmountFlop());
        instance.setValue(31, (float)p.getGameStats().getBetAmountTurn());
        instance.setValue(32, (float)p.getGameStats().getBetAmountRiver());
        //Raise amount
        instance.setValue(33, (float)prop.getTableGameStats().getTotalRaiseAmount());
        instance.setValue(34, (float)p.getGameStats().getTotalRaiseAmount());
        instance.setValue(35, (float)p.getGameStats().getRaiseAmountPreFlop());
        instance.setValue(36, (float)p.getGameStats().getRaiseAmountPostFlop());
        instance.setValue(37, (float)p.getGameStats().getRaiseAmountFlop());
        instance.setValue(38, (float)p.getGameStats().getRaiseAmountTurn());
        instance.setValue(39, (float)p.getGameStats().getRaiseAmountRiver());
        // Relative BetRaise counts
        instance.setValue(40, prop.rel(p.getGameStats().getNbBetsRaises(),prop.getTableGameStats().getNbBetsRaises()));
        instance.setValue(41, prop.rel(p.getGameStats().getNbBetsRaisesPreFlop(),prop.getTableGameStats().getNbBetsRaisesPreFlop()));
        instance.setValue(42, prop.rel(p.getGameStats().getNbBetsRaisesPostFlop(),prop.getTableGameStats().getNbBetsRaisesPostFlop()));
        instance.setValue(43, prop.rel(p.getGameStats().getNbBetsRaisesFlop(),prop.getTableGameStats().getNbBetsRaisesFlop()));
        instance.setValue(44, prop.rel(p.getGameStats().getNbBetsRaisesTurn(),prop.getTableGameStats().getNbBetsRaisesTurn()));
        instance.setValue(45, prop.rel(p.getGameStats().getNbBetsRaisesRiver(),prop.getTableGameStats().getNbBetsRaisesRiver()));
        // Relative BetRaise amounts
        instance.setValue(46, prop.rel(p.getGameStats().getTotalBetRaiseAmount(),prop.getTableGameStats().getTotalBetRaiseAmount()));
        instance.setValue(47, prop.rel(p.getGameStats().getBetRaiseAmountPreFlop(),prop.getTableGameStats().getBetRaiseAmountPreFlop()));
        instance.setValue(48, prop.rel(p.getGameStats().getBetRaiseAmountPostFlop(),prop.getTableGameStats().getBetRaiseAmountPostFlop()));
        instance.setValue(49, prop.rel(p.getGameStats().getBetRaiseAmountFlop(),prop.getTableGameStats().getBetRaiseAmountFlop()));
        instance.setValue(50, prop.rel(p.getGameStats().getBetRaiseAmountTurn(),prop.getTableGameStats().getBetRaiseAmountTurn()));
        instance.setValue(51, prop.rel(p.getGameStats().getBetRaiseAmountRiver(),prop.getTableGameStats().getBetRaiseAmountRiver()));
        //Table BetRaise counts
        instance.setValue(52, prop.getTableGameStats().getNbBetsRaisesPreFlop());
        instance.setValue(53, prop.getTableGameStats().getNbBetsRaisesPostFlop());
        instance.setValue(54, prop.getTableGameStats().getNbBetsRaisesFlop());
        instance.setValue(55, prop.getTableGameStats().getNbBetsRaisesTurn());
        instance.setValue(56, prop.getTableGameStats().getNbBetsRaisesRiver());
        //Table BetRaise amount
        instance.setValue(57, (float)prop.getTableGameStats().getBetRaiseAmountPreFlop());
        instance.setValue(58, (float)prop.getTableGameStats().getBetRaiseAmountPostFlop());
        instance.setValue(59, (float)prop.getTableGameStats().getBetRaiseAmountFlop());
        instance.setValue(60, (float)prop.getTableGameStats().getBetRaiseAmountTurn());
        instance.setValue(61, (float)prop.getTableGameStats().getBetRaiseAmountRiver());
        // Other
        instance.setValue(62, p.isLastActionWasRaise()+"");
        // PT Stats
        instance.setValue(63, p.getVPIP(4));
        instance.setValue(64, p.getPFR(4));
        instance.setValue(65, p.getGlobalStats().getAF(5));
        instance.setValue(66, p.getGlobalStats().getAFq(5));
        instance.setValue(67, (float)Math.log(p.getGlobalStats().getAFAmount(5)));
        instance.setValue(68, p.getWtSD(4));
        // Table PT stat averages
        instance.setValue(69, prop.getAverageVPIP(p,4));
        instance.setValue(70, prop.getAveragePFR(p,4));
        instance.setValue(71, prop.getAverageAF(p,5));
        instance.setValue(72, prop.getAverageAFq(p,5));
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.