How to use the pyperformance.benchmarks.bm_hexiom.Dir function in pyperformance

To help you get started, we’ve selected a few pyperformance examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github python / pyperformance / pyperformance / benchmarks / bm_hexiom.py View on Github external
import pyperf

# 2016-07-07: CPython 3.6 takes ~25 ms to solve the board level 25
DEFAULT_LEVEL = 25


##################################
class Dir(object):

    def __init__(self, x, y):
        self.x = x
        self.y = y


DIRS = [Dir(1, 0),
        Dir(-1, 0),
        Dir(0, 1),
        Dir(0, -1),
        Dir(1, 1),
        Dir(-1, -1)]

EMPTY = 7

##################################


class Done(object):
    MIN_CHOICE_STRATEGY = 0
    MAX_CHOICE_STRATEGY = 1
    HIGHEST_VALUE_STRATEGY = 2
    FIRST_STRATEGY = 3
    MAX_NEIGHBORS_STRATEGY = 4
github python / pyperformance / pyperformance / benchmarks / bm_hexiom.py View on Github external
# 2016-07-07: CPython 3.6 takes ~25 ms to solve the board level 25
DEFAULT_LEVEL = 25


##################################
class Dir(object):

    def __init__(self, x, y):
        self.x = x
        self.y = y


DIRS = [Dir(1, 0),
        Dir(-1, 0),
        Dir(0, 1),
        Dir(0, -1),
        Dir(1, 1),
        Dir(-1, -1)]

EMPTY = 7

##################################


class Done(object):
    MIN_CHOICE_STRATEGY = 0
    MAX_CHOICE_STRATEGY = 1
    HIGHEST_VALUE_STRATEGY = 2
    FIRST_STRATEGY = 3
    MAX_NEIGHBORS_STRATEGY = 4
    MIN_NEIGHBORS_STRATEGY = 5
github python / pyperformance / pyperformance / benchmarks / bm_hexiom.py View on Github external
DEFAULT_LEVEL = 25


##################################
class Dir(object):

    def __init__(self, x, y):
        self.x = x
        self.y = y


DIRS = [Dir(1, 0),
        Dir(-1, 0),
        Dir(0, 1),
        Dir(0, -1),
        Dir(1, 1),
        Dir(-1, -1)]

EMPTY = 7

##################################


class Done(object):
    MIN_CHOICE_STRATEGY = 0
    MAX_CHOICE_STRATEGY = 1
    HIGHEST_VALUE_STRATEGY = 2
    FIRST_STRATEGY = 3
    MAX_NEIGHBORS_STRATEGY = 4
    MIN_NEIGHBORS_STRATEGY = 5

    def __init__(self, count, empty=False):
github python / pyperformance / pyperformance / benchmarks / bm_hexiom.py View on Github external
# 2016-07-07: CPython 3.6 takes ~25 ms to solve the board level 25
DEFAULT_LEVEL = 25


##################################
class Dir(object):

    def __init__(self, x, y):
        self.x = x
        self.y = y


DIRS = [Dir(1, 0),
        Dir(-1, 0),
        Dir(0, 1),
        Dir(0, -1),
        Dir(1, 1),
        Dir(-1, -1)]

EMPTY = 7

##################################


class Done(object):
    MIN_CHOICE_STRATEGY = 0
    MAX_CHOICE_STRATEGY = 1
    HIGHEST_VALUE_STRATEGY = 2
    FIRST_STRATEGY = 3
    MAX_NEIGHBORS_STRATEGY = 4
    MIN_NEIGHBORS_STRATEGY = 5
github python / pyperformance / pyperformance / benchmarks / bm_hexiom.py View on Github external
import pyperf

# 2016-07-07: CPython 3.6 takes ~25 ms to solve the board level 25
DEFAULT_LEVEL = 25


##################################
class Dir(object):

    def __init__(self, x, y):
        self.x = x
        self.y = y


DIRS = [Dir(1, 0),
        Dir(-1, 0),
        Dir(0, 1),
        Dir(0, -1),
        Dir(1, 1),
        Dir(-1, -1)]

EMPTY = 7

##################################


class Done(object):
    MIN_CHOICE_STRATEGY = 0
    MAX_CHOICE_STRATEGY = 1
    HIGHEST_VALUE_STRATEGY = 2
    FIRST_STRATEGY = 3