prove

package
v0.0.0-...-7af1aca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const INFINITY uint32 = 1 << 30

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug          int
	MaxNodes       uint64
	LogPrefix      string
	PreserveSolved bool
	PN2            bool
	MaxDepth       int
}

type DFPNConfig

type DFPNConfig struct {
	Debug    int
	Attacker tak.Color
	TableMem int64
}

type DFPNSolver

type DFPNSolver struct {
	// contains filtered or unexported fields
}

func NewDFPN

func NewDFPN(cfg *DFPNConfig) *DFPNSolver

func (*DFPNSolver) Prove

func (d *DFPNSolver) Prove(g *tak.Position) (ProofResult, DFPNStats)

type DFPNStats

type DFPNStats struct {
	Work       uint64
	Repetition uint64

	Terminal uint64
	Solved   uint64
	Hits     uint64
	Miss     uint64
}

type Evaluation

type Evaluation int8
const (
	EvalUnknown Evaluation = iota
	EvalTrue
	EvalFalse
)

func (Evaluation) String

func (e Evaluation) String() string

type PNStats

type PNStats struct {
	Nodes     uint64
	Proved    uint64
	Disproved uint64
	Dropped   uint64
	Expanded  uint64
	MaxDepth  uint64
}

func (*PNStats) Live

func (st *PNStats) Live() uint64

type ProofResult

type ProofResult struct {
	Duration        time.Duration
	Result          Evaluation
	Depth           uint32
	Proof, Disproof uint32
	Move            tak.Move
}

type Prover

type Prover struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *Prover

func (*Prover) DumpTree

func (p *Prover) DumpTree(out io.Writer)

func (*Prover) Prove

func (p *Prover) Prove(ctx context.Context, pos *tak.Position) (ProofResult, PNStats)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL