ai

package
v0.0.0-...-ac81ae4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NOTHING = iota
	TURN_RIGHT
	TURN_LEFT
	FORWARD
	BACKWARD
	ATTACK
	TAKE
)
View Source
const (
	STOP = iota
	EXPLORING
	FETCHING_GOLD
	FETCHING_PU
	ATTACKING
	FLEEING
)

Variables

This section is empty.

Functions

func Astar

func Astar(orig, dest gamemap.Coord, m *gamemap.Map) (actions []int, numActions int)

func FindUnexplored

func FindUnexplored(m *gamemap.Map, c gamemap.Coord) gamemap.Coord

Types

type AI

type AI struct {
	State       int
	ActionStack []int

	Coord         gamemap.Coord
	Dest          *gamemap.Coord
	Energy        int
	TimeRunnning  int
	Observations  uint
	EnemyDetected bool
	Gamemap       *gamemap.Map
	// contains filtered or unexported fields
}

func AIInit

func AIInit(m *gamemap.Map, c gamemap.Coord) AI

func (*AI) GetDecision

func (ai *AI) GetDecision(mapChanged bool) int

func (*AI) Think

func (ai *AI) Think(mapChanged bool)

Jump to

Keyboard shortcuts

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