Documentation
¶
Index ¶
- type Action
- type CarParams
- type Config
- type Env
- func (e *Env) ActionSpec() core.Spec
- func (e *Env) Alive() int
- func (e *Env) Bounds() (minX, minY, maxX, maxY float64)
- func (e *Env) CarPosition(i int) core.Vec2
- func (e *Env) ObservationSpec() core.Spec
- func (e *Env) Passed(i int) int
- func (e *Env) Render(r core.Renderer)
- func (e *Env) ResetAll(n int, rng *rand.Rand) []core.State
- func (e *Env) SensorEndpoints(i int) (origin core.Vec2, ends []core.Vec2)
- func (e *Env) SetBest(i int)
- func (e *Env) StepAll(actions []core.Action) (states []core.State, rewards []core.Reward, dones []bool)
- func (e *Env) Track() *Track
- type SensorParams
- type State
- type Track
- type TrackParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CarParams ¶
func DefaultCarParams ¶
func DefaultCarParams() CarParams
type Config ¶
type Config struct {
Track TrackParams
Car CarParams
Sensors SensorParams
CheckpointReward float64
SpeedBonus float64
TimeBonus float64
WallPenalty float64
}
func DefaultConfig ¶
func DefaultConfig() Config
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
func (*Env) ActionSpec ¶
func (*Env) ObservationSpec ¶
func (*Env) SensorEndpoints ¶
type SensorParams ¶
func DefaultSensorParams ¶
func DefaultSensorParams() SensorParams
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (State) Observation ¶
type Track ¶
type Track struct {
Center []vec
Inner []vec
Outer []vec
Checkpoints []gate
Width float64
StartPos vec
StartDir vec
}
func GenerateTrack ¶
func GenerateTrack(rng *rand.Rand, p TrackParams) *Track
type TrackParams ¶
type TrackParams struct {
Points int
Radius float64
Width float64
Displace float64
SplineSteps int
Checkpoints int
}
func DefaultTrackParams ¶
func DefaultTrackParams() TrackParams
Click to show internal directories.
Click to hide internal directories.