2048-ai: github.com/xwjdsh/2048-ai/ai Index | Files

package ai

import "github.com/xwjdsh/2048-ai/ai"


Package Files


type AI Uses

type AI struct {
    // Grid is 4x4 grid.
    Grid *grid.Grid
    // Active is true represent need to select a direction to move, else represent computer need fill a number("2" or "4") into grid.
    Active bool

func (*AI) Search Uses

func (a *AI) Search() grid.Direction

Search method compute each could move direction score result by expect search algorithm

Package ai imports 1 packages (graph) and is imported by 1 packages. Updated 2018-12-10. Refresh now. Tools for package owners.