14a9d8716a51f01d230352fcb06c9fdda9a253b2,main.py,Table,call_genetic_algorithm,#Table#,263

Before Change


            return ""

    def call_genetic_algorithm(self):
        if not terminalmode:
            ui_action_and_signals.signal_progressbar_increase.emit(5)
            ui_action_and_signals.signal_status.emit("Updating charts and work in background")
        n = L.get_game_count(p.current_strategy)
        lg = int(
            p.selected_strategy["considerLastGames"])  // only consider lg last games to see if there was a loss
        f = L.get_strategy_return(p.current_strategy, lg)
        if not terminalmode:  ui_action_and_signals.signal_lcd_number_update.emit("gamenumber",int(n))
        if not terminalmode:  ui_action_and_signals.signal_lcd_number_update.emit("winnings", f)
        logger.info("Game //" + str(n) + " - Last " + str(lg) + ": $" + str(f))
        if n % int(p.selected_strategy["strategyIterationGames"]) == 0 and f < float(
                p.selected_strategy["minimumLossForIteration"]):
            if not terminalmode: ui_action_and_signals.signal_status.emit("***Improving current strategy***")
            logger.info("***Improving current strategy***")
            //winsound.Beep(500, 100)
            GeneticAlgorithm(True, logger, L)
            p.read_strategy()

After Change



    def call_genetic_algorithm(self):

        self.gui_signals.signal_progressbar_increase.emit(5)
        self.gui_signals.signal_status.emit("Updating charts and work in background")
        n = L.get_game_count(p.current_strategy)
        lg = int(
            p.selected_strategy["considerLastGames"])  // only consider lg last games to see if there was a loss
        f = L.get_strategy_return(p.current_strategy, lg)
        self.gui_signals.signal_lcd_number_update.emit("gamenumber",int(n))
        self.gui_signals.signal_lcd_number_update.emit("winnings", f)
        self.logger.info("Game //" + str(n) + " - Last " + str(lg) + ": $" + str(f))
        if n % int(p.selected_strategy["strategyIterationGames"]) == 0 and f < float(
                p.selected_strategy["minimumLossForIteration"]):
            self.gui_signals.signal_status.emit("***Improving current strategy***")
            self.logger.info("***Improving current strategy***")
            //winsound.Beep(500, 100)
            GeneticAlgorithm(True, logger, L)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 18

Instances


Project Name: dickreuter/Poker
Commit Name: 14a9d8716a51f01d230352fcb06c9fdda9a253b2
Time: 2016-09-25
Author: dickreuter@yahoo.com
File Name: main.py
Class Name: Table
Method Name: call_genetic_algorithm


Project Name: dickreuter/Poker
Commit Name: 14a9d8716a51f01d230352fcb06c9fdda9a253b2
Time: 2016-09-25
Author: dickreuter@yahoo.com
File Name: main.py
Class Name: Table
Method Name: call_genetic_algorithm


Project Name: dickreuter/Poker
Commit Name: 14a9d8716a51f01d230352fcb06c9fdda9a253b2
Time: 2016-09-25
Author: dickreuter@yahoo.com
File Name: main.py
Class Name: TableScreenBased
Method Name: check_for_checkbutton


Project Name: dickreuter/Poker
Commit Name: 14a9d8716a51f01d230352fcb06c9fdda9a253b2
Time: 2016-09-25
Author: dickreuter@yahoo.com
File Name: main.py
Class Name: TableScreenBased
Method Name: get_dealer_position