hexzpb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CPUPlayerService_ServerInfo_FullMethodName  = "/hexzpb.CPUPlayerService/ServerInfo"
	CPUPlayerService_SuggestMove_FullMethodName = "/hexzpb.CPUPlayerService/SuggestMove"
)
View Source
const (
	TrainingService_AddTrainingExamples_FullMethodName   = "/hexzpb.TrainingService/AddTrainingExamples"
	TrainingService_FetchModel_FullMethodName            = "/hexzpb.TrainingService/FetchModel"
	TrainingService_ControlEvents_FullMethodName         = "/hexzpb.TrainingService/ControlEvents"
	TrainingService_GetTrainingParameters_FullMethodName = "/hexzpb.TrainingService/GetTrainingParameters"
)

Variables

View Source
var (
	Board_GameState_name = map[int32]string{
		0: "INITIAL",
		1: "RUNNING",
		2: "FINISHED",
	}
	Board_GameState_value = map[string]int32{
		"INITIAL":  0,
		"RUNNING":  1,
		"FINISHED": 2,
	}
)

Enum value maps for Board_GameState.

View Source
var (
	Field_CellType_name = map[int32]string{
		0: "NORMAL",
		1: "DEAD",
		2: "GRASS",
		3: "ROCK",
		4: "FIRE",
		5: "FLAG",
		6: "PEST",
		7: "DEATH",
	}
	Field_CellType_value = map[string]int32{
		"NORMAL": 0,
		"DEAD":   1,
		"GRASS":  2,
		"ROCK":   3,
		"FIRE":   4,
		"FLAG":   5,
		"PEST":   6,
		"DEATH":  7,
	}
)

Enum value maps for Field_CellType.

View Source
var (
	CPUPlayerMode_Enum_name = map[int32]string{
		0: "NONE",
		1: "WASM",
		2: "EMBEDDED_CPU",
		3: "REMOTE_CPU",
	}
	CPUPlayerMode_Enum_value = map[string]int32{
		"NONE":         0,
		"WASM":         1,
		"EMBEDDED_CPU": 2,
		"REMOTE_CPU":   3,
	}
)

Enum value maps for CPUPlayerMode_Enum.

View Source
var (
	SuggestMoveStats_ScoreKind_name = map[int32]string{
		0: "FINAL",
		1: "MCTS_PRIOR",
	}
	SuggestMoveStats_ScoreKind_value = map[string]int32{
		"FINAL":      0,
		"MCTS_PRIOR": 1,
	}
)

Enum value maps for SuggestMoveStats_ScoreKind.

View Source
var (
	ServerInfoResponse_ServerType_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "TYPE_MCTS",
		2: "TYPE_NEURAL_MCTS",
	}
	ServerInfoResponse_ServerType_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"TYPE_MCTS":        1,
		"TYPE_NEURAL_MCTS": 2,
	}
)

Enum value maps for ServerInfoResponse_ServerType.

View Source
var (
	AddTrainingExamplesResponse_Status_name = map[int32]string{
		0: "STATUS_UNSPECIFIED",
		1: "ACCEPTED",
		2: "REJECTED_WRONG_MODEL",
		3: "REJECTED_AT_CAPACITY",
		4: "REJECTED_OTHER",
	}
	AddTrainingExamplesResponse_Status_value = map[string]int32{
		"STATUS_UNSPECIFIED":   0,
		"ACCEPTED":             1,
		"REJECTED_WRONG_MODEL": 2,
		"REJECTED_AT_CAPACITY": 3,
		"REJECTED_OTHER":       4,
	}
)

Enum value maps for AddTrainingExamplesResponse_Status.

View Source
var (
	TrainingExample_Encoding_name = map[int32]string{
		0: "NUMPY",
		1: "PYTORCH",
	}
	TrainingExample_Encoding_value = map[string]int32{
		"NUMPY":   0,
		"PYTORCH": 1,
	}
)

Enum value maps for TrainingExample_Encoding.

View Source
var (
	ModelEncoding_Enum_name = map[int32]string{
		0: "STATE_DICT",
		1: "JIT_SCRIPT",
		2: "JIT_TRACE",
	}
	ModelEncoding_Enum_value = map[string]int32{
		"STATE_DICT": 0,
		"JIT_SCRIPT": 1,
		"JIT_TRACE":  2,
	}
)

Enum value maps for ModelEncoding_Enum.

View Source
var CPUPlayerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hexzpb.CPUPlayerService",
	HandlerType: (*CPUPlayerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ServerInfo",
			Handler:    _CPUPlayerService_ServerInfo_Handler,
		},
		{
			MethodName: "SuggestMove",
			Handler:    _CPUPlayerService_SuggestMove_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/hexz.proto",
}

CPUPlayerService_ServiceDesc is the grpc.ServiceDesc for CPUPlayerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_proto_hexz_proto protoreflect.FileDescriptor
View Source
var TrainingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hexzpb.TrainingService",
	HandlerType: (*TrainingServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddTrainingExamples",
			Handler:    _TrainingService_AddTrainingExamples_Handler,
		},
		{
			MethodName: "FetchModel",
			Handler:    _TrainingService_FetchModel_Handler,
		},
		{
			MethodName: "GetTrainingParameters",
			Handler:    _TrainingService_GetTrainingParameters_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ControlEvents",
			Handler:       _TrainingService_ControlEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/hexz.proto",
}

TrainingService_ServiceDesc is the grpc.ServiceDesc for TrainingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterCPUPlayerServiceServer

func RegisterCPUPlayerServiceServer(s grpc.ServiceRegistrar, srv CPUPlayerServiceServer)

func RegisterTrainingServiceServer

func RegisterTrainingServiceServer(s grpc.ServiceRegistrar, srv TrainingServiceServer)

Types

type AddTrainingExamplesRequest

type AddTrainingExamplesRequest struct {
	Examples []*TrainingExample `protobuf:"bytes,1,rep,name=examples,proto3" json:"examples,omitempty"`
	// ID identifying the worker run that generated this example.
	// Typically a random UUID.
	ExecutionId string `protobuf:"bytes,2,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"`
	// Another random ID generated by the worker. Can be used, e.g.,
	// to identify games in the model repo that looked interesting in the
	// worker logs.
	GameId       string        `protobuf:"bytes,4,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"`
	WorkerConfig *WorkerConfig `protobuf:"bytes,3,opt,name=worker_config,json=workerConfig,proto3" json:"worker_config,omitempty"`
	// The Git commit hash (typically a prefix of length 8) of the worker.
	CommitHash string `protobuf:"bytes,6,opt,name=commit_hash,json=commitHash,proto3" json:"commit_hash,omitempty"`
	// Set by the training server when archiving training data.
	ReceivedTimestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=received_timestamp,json=receivedTimestamp,proto3" json:"received_timestamp,omitempty"`
	// contains filtered or unexported fields
}

Used by workers to upload examples to the training server.

func (*AddTrainingExamplesRequest) Descriptor deprecated

func (*AddTrainingExamplesRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddTrainingExamplesRequest.ProtoReflect.Descriptor instead.

func (*AddTrainingExamplesRequest) GetCommitHash

func (x *AddTrainingExamplesRequest) GetCommitHash() string

func (*AddTrainingExamplesRequest) GetExamples

func (x *AddTrainingExamplesRequest) GetExamples() []*TrainingExample

func (*AddTrainingExamplesRequest) GetExecutionId

func (x *AddTrainingExamplesRequest) GetExecutionId() string

func (*AddTrainingExamplesRequest) GetGameId

func (x *AddTrainingExamplesRequest) GetGameId() string

func (*AddTrainingExamplesRequest) GetReceivedTimestamp

func (x *AddTrainingExamplesRequest) GetReceivedTimestamp() *timestamppb.Timestamp

func (*AddTrainingExamplesRequest) GetWorkerConfig

func (x *AddTrainingExamplesRequest) GetWorkerConfig() *WorkerConfig

func (*AddTrainingExamplesRequest) ProtoMessage

func (*AddTrainingExamplesRequest) ProtoMessage()

func (*AddTrainingExamplesRequest) ProtoReflect

func (*AddTrainingExamplesRequest) Reset

func (x *AddTrainingExamplesRequest) Reset()

func (*AddTrainingExamplesRequest) String

func (x *AddTrainingExamplesRequest) String() string

type AddTrainingExamplesResponse

type AddTrainingExamplesResponse struct {
	Status AddTrainingExamplesResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=hexzpb.AddTrainingExamplesResponse_Status" json:"status,omitempty"`
	// Tells the worker which model to use for subsequent requests.
	LatestModel *ModelKey `protobuf:"bytes,2,opt,name=latest_model,json=latestModel,proto3" json:"latest_model,omitempty"`
	// Populated if there was an error processing the request.
	ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*AddTrainingExamplesResponse) Descriptor deprecated

func (*AddTrainingExamplesResponse) Descriptor() ([]byte, []int)

Deprecated: Use AddTrainingExamplesResponse.ProtoReflect.Descriptor instead.

func (*AddTrainingExamplesResponse) GetErrorMessage

func (x *AddTrainingExamplesResponse) GetErrorMessage() string

func (*AddTrainingExamplesResponse) GetLatestModel

func (x *AddTrainingExamplesResponse) GetLatestModel() *ModelKey

func (*AddTrainingExamplesResponse) GetStatus

func (*AddTrainingExamplesResponse) ProtoMessage

func (*AddTrainingExamplesResponse) ProtoMessage()

func (*AddTrainingExamplesResponse) ProtoReflect

func (*AddTrainingExamplesResponse) Reset

func (x *AddTrainingExamplesResponse) Reset()

func (*AddTrainingExamplesResponse) String

func (x *AddTrainingExamplesResponse) String() string

type AddTrainingExamplesResponse_Status

type AddTrainingExamplesResponse_Status int32
const (
	AddTrainingExamplesResponse_STATUS_UNSPECIFIED   AddTrainingExamplesResponse_Status = 0
	AddTrainingExamplesResponse_ACCEPTED             AddTrainingExamplesResponse_Status = 1
	AddTrainingExamplesResponse_REJECTED_WRONG_MODEL AddTrainingExamplesResponse_Status = 2
	AddTrainingExamplesResponse_REJECTED_AT_CAPACITY AddTrainingExamplesResponse_Status = 3
	AddTrainingExamplesResponse_REJECTED_OTHER       AddTrainingExamplesResponse_Status = 4
)

func (AddTrainingExamplesResponse_Status) Descriptor

func (AddTrainingExamplesResponse_Status) Enum

func (AddTrainingExamplesResponse_Status) EnumDescriptor deprecated

func (AddTrainingExamplesResponse_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use AddTrainingExamplesResponse_Status.Descriptor instead.

func (AddTrainingExamplesResponse_Status) Number

func (AddTrainingExamplesResponse_Status) String

func (AddTrainingExamplesResponse_Status) Type

type Board

type Board struct {
	Turn         int32           `protobuf:"varint,1,opt,name=turn,proto3" json:"turn,omitempty"`
	Move         int32           `protobuf:"varint,2,opt,name=move,proto3" json:"move,omitempty"`
	LastRevealed int32           `protobuf:"varint,3,opt,name=last_revealed,json=lastRevealed,proto3" json:"last_revealed,omitempty"`
	FlatFields   []*Field        `protobuf:"bytes,4,rep,name=flat_fields,json=flatFields,proto3" json:"flat_fields,omitempty"`
	Score        []int32         `protobuf:"varint,5,rep,packed,name=score,proto3" json:"score,omitempty"`
	Resources    []*ResourceInfo `protobuf:"bytes,6,rep,name=resources,proto3" json:"resources,omitempty"`
	State        Board_GameState `protobuf:"varint,7,opt,name=state,proto3,enum=hexzpb.Board_GameState" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*Board) Descriptor deprecated

func (*Board) Descriptor() ([]byte, []int)

Deprecated: Use Board.ProtoReflect.Descriptor instead.

func (*Board) GetFlatFields

func (x *Board) GetFlatFields() []*Field

func (*Board) GetLastRevealed

func (x *Board) GetLastRevealed() int32

func (*Board) GetMove

func (x *Board) GetMove() int32

func (*Board) GetResources

func (x *Board) GetResources() []*ResourceInfo

func (*Board) GetScore

func (x *Board) GetScore() []int32

func (*Board) GetState

func (x *Board) GetState() Board_GameState

func (*Board) GetTurn

func (x *Board) GetTurn() int32

func (*Board) ProtoMessage

func (*Board) ProtoMessage()

func (*Board) ProtoReflect

func (x *Board) ProtoReflect() protoreflect.Message

func (*Board) Reset

func (x *Board) Reset()

func (*Board) String

func (x *Board) String() string

type Board_GameState

type Board_GameState int32
const (
	Board_INITIAL  Board_GameState = 0
	Board_RUNNING  Board_GameState = 1
	Board_FINISHED Board_GameState = 2
)

func (Board_GameState) Descriptor

func (Board_GameState) Enum

func (x Board_GameState) Enum() *Board_GameState

func (Board_GameState) EnumDescriptor deprecated

func (Board_GameState) EnumDescriptor() ([]byte, []int)

Deprecated: Use Board_GameState.Descriptor instead.

func (Board_GameState) Number

func (Board_GameState) String

func (x Board_GameState) String() string

func (Board_GameState) Type

type CPUPlayerMode

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

func (*CPUPlayerMode) Descriptor deprecated

func (*CPUPlayerMode) Descriptor() ([]byte, []int)

Deprecated: Use CPUPlayerMode.ProtoReflect.Descriptor instead.

func (*CPUPlayerMode) ProtoMessage

func (*CPUPlayerMode) ProtoMessage()

func (*CPUPlayerMode) ProtoReflect

func (x *CPUPlayerMode) ProtoReflect() protoreflect.Message

func (*CPUPlayerMode) Reset

func (x *CPUPlayerMode) Reset()

func (*CPUPlayerMode) String

func (x *CPUPlayerMode) String() string

type CPUPlayerMode_Enum

type CPUPlayerMode_Enum int32
const (
	CPUPlayerMode_NONE         CPUPlayerMode_Enum = 0 // Not playing against a CPU
	CPUPlayerMode_WASM         CPUPlayerMode_Enum = 1 // Use client-side WASM engine
	CPUPlayerMode_EMBEDDED_CPU CPUPlayerMode_Enum = 2 // Use embedded CPU engine
	CPUPlayerMode_REMOTE_CPU   CPUPlayerMode_Enum = 3 // Use remote CPU engine
)

func (CPUPlayerMode_Enum) Descriptor

func (CPUPlayerMode_Enum) Enum

func (CPUPlayerMode_Enum) EnumDescriptor deprecated

func (CPUPlayerMode_Enum) EnumDescriptor() ([]byte, []int)

Deprecated: Use CPUPlayerMode_Enum.Descriptor instead.

func (CPUPlayerMode_Enum) Number

func (CPUPlayerMode_Enum) String

func (x CPUPlayerMode_Enum) String() string

func (CPUPlayerMode_Enum) Type

type CPUPlayerServiceClient

type CPUPlayerServiceClient interface {
	// Returns the ModelKey of the ML model that the CPU Player engine uses.
	// If the remote engine does not use an ML model
	ServerInfo(ctx context.Context, in *ServerInfoRequest, opts ...grpc.CallOption) (*ServerInfoResponse, error)
	// Returns a move suggestion for a single game engine state.
	SuggestMove(ctx context.Context, in *SuggestMoveRequest, opts ...grpc.CallOption) (*SuggestMoveResponse, error)
}

CPUPlayerServiceClient is the client API for CPUPlayerService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

CPUPlayerService is the service to obtain move suggestions from remote CPU players.

type CPUPlayerServiceServer

type CPUPlayerServiceServer interface {
	// Returns the ModelKey of the ML model that the CPU Player engine uses.
	// If the remote engine does not use an ML model
	ServerInfo(context.Context, *ServerInfoRequest) (*ServerInfoResponse, error)
	// Returns a move suggestion for a single game engine state.
	SuggestMove(context.Context, *SuggestMoveRequest) (*SuggestMoveResponse, error)
	// contains filtered or unexported methods
}

CPUPlayerServiceServer is the server API for CPUPlayerService service. All implementations must embed UnimplementedCPUPlayerServiceServer for forward compatibility.

CPUPlayerService is the service to obtain move suggestions from remote CPU players.

type ControlEvent

type ControlEvent struct {

	// Types that are assignable to EventType:
	//
	//	*ControlEvent_TrainingStarted_
	//	*ControlEvent_TrainingDone_
	EventType isControlEvent_EventType `protobuf_oneof:"event_type"`
	// contains filtered or unexported fields
}

func (*ControlEvent) Descriptor deprecated

func (*ControlEvent) Descriptor() ([]byte, []int)

Deprecated: Use ControlEvent.ProtoReflect.Descriptor instead.

func (*ControlEvent) GetEventType

func (m *ControlEvent) GetEventType() isControlEvent_EventType

func (*ControlEvent) GetTrainingDone

func (x *ControlEvent) GetTrainingDone() *ControlEvent_TrainingDone

func (*ControlEvent) GetTrainingStarted

func (x *ControlEvent) GetTrainingStarted() *ControlEvent_TrainingStarted

func (*ControlEvent) ProtoMessage

func (*ControlEvent) ProtoMessage()

func (*ControlEvent) ProtoReflect

func (x *ControlEvent) ProtoReflect() protoreflect.Message

func (*ControlEvent) Reset

func (x *ControlEvent) Reset()

func (*ControlEvent) String

func (x *ControlEvent) String() string

type ControlEvent_TrainingDone

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

func (*ControlEvent_TrainingDone) Descriptor deprecated

func (*ControlEvent_TrainingDone) Descriptor() ([]byte, []int)

Deprecated: Use ControlEvent_TrainingDone.ProtoReflect.Descriptor instead.

func (*ControlEvent_TrainingDone) ProtoMessage

func (*ControlEvent_TrainingDone) ProtoMessage()

func (*ControlEvent_TrainingDone) ProtoReflect

func (*ControlEvent_TrainingDone) Reset

func (x *ControlEvent_TrainingDone) Reset()

func (*ControlEvent_TrainingDone) String

func (x *ControlEvent_TrainingDone) String() string

type ControlEvent_TrainingDone_

type ControlEvent_TrainingDone_ struct {
	TrainingDone *ControlEvent_TrainingDone `protobuf:"bytes,2,opt,name=training_done,json=trainingDone,proto3,oneof"`
}

type ControlEvent_TrainingStarted

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

func (*ControlEvent_TrainingStarted) Descriptor deprecated

func (*ControlEvent_TrainingStarted) Descriptor() ([]byte, []int)

Deprecated: Use ControlEvent_TrainingStarted.ProtoReflect.Descriptor instead.

func (*ControlEvent_TrainingStarted) ProtoMessage

func (*ControlEvent_TrainingStarted) ProtoMessage()

func (*ControlEvent_TrainingStarted) ProtoReflect

func (*ControlEvent_TrainingStarted) Reset

func (x *ControlEvent_TrainingStarted) Reset()

func (*ControlEvent_TrainingStarted) String

type ControlEvent_TrainingStarted_

type ControlEvent_TrainingStarted_ struct {
	TrainingStarted *ControlEvent_TrainingStarted `protobuf:"bytes,1,opt,name=training_started,json=trainingStarted,proto3,oneof"`
}

type ControlRequest

type ControlRequest struct {
	ExecutionId string `protobuf:"bytes,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ControlRequest) Descriptor deprecated

func (*ControlRequest) Descriptor() ([]byte, []int)

Deprecated: Use ControlRequest.ProtoReflect.Descriptor instead.

func (*ControlRequest) GetExecutionId

func (x *ControlRequest) GetExecutionId() string

func (*ControlRequest) ProtoMessage

func (*ControlRequest) ProtoMessage()

func (*ControlRequest) ProtoReflect

func (x *ControlRequest) ProtoReflect() protoreflect.Message

func (*ControlRequest) Reset

func (x *ControlRequest) Reset()

func (*ControlRequest) String

func (x *ControlRequest) String() string

type FetchModelRequest

type FetchModelRequest struct {

	// Set model_key.checkpoint == -1 to request the latest checkpoint.
	// Specify no model_key at all to fetch the latest model for training.
	ModelKey *ModelKey          `protobuf:"bytes,1,opt,name=model_key,json=modelKey,proto3" json:"model_key,omitempty"`
	Encoding ModelEncoding_Enum `protobuf:"varint,2,opt,name=encoding,proto3,enum=hexzpb.ModelEncoding_Enum" json:"encoding,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchModelRequest) Descriptor deprecated

func (*FetchModelRequest) Descriptor() ([]byte, []int)

Deprecated: Use FetchModelRequest.ProtoReflect.Descriptor instead.

func (*FetchModelRequest) GetEncoding

func (x *FetchModelRequest) GetEncoding() ModelEncoding_Enum

func (*FetchModelRequest) GetModelKey

func (x *FetchModelRequest) GetModelKey() *ModelKey

func (*FetchModelRequest) ProtoMessage

func (*FetchModelRequest) ProtoMessage()

func (*FetchModelRequest) ProtoReflect

func (x *FetchModelRequest) ProtoReflect() protoreflect.Message

func (*FetchModelRequest) Reset

func (x *FetchModelRequest) Reset()

func (*FetchModelRequest) String

func (x *FetchModelRequest) String() string

type FetchModelResponse

type FetchModelResponse struct {
	ModelKey *ModelKey `protobuf:"bytes,1,opt,name=model_key,json=modelKey,proto3" json:"model_key,omitempty"`
	// Serialized PyTorch model.
	ModelBytes []byte `protobuf:"bytes,2,opt,name=model_bytes,json=modelBytes,proto3" json:"model_bytes,omitempty"`
	// Encoding that was used to serializez the model.
	Encoding ModelEncoding_Enum `protobuf:"varint,3,opt,name=encoding,proto3,enum=hexzpb.ModelEncoding_Enum" json:"encoding,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchModelResponse) Descriptor deprecated

func (*FetchModelResponse) Descriptor() ([]byte, []int)

Deprecated: Use FetchModelResponse.ProtoReflect.Descriptor instead.

func (*FetchModelResponse) GetEncoding

func (x *FetchModelResponse) GetEncoding() ModelEncoding_Enum

func (*FetchModelResponse) GetModelBytes

func (x *FetchModelResponse) GetModelBytes() []byte

func (*FetchModelResponse) GetModelKey

func (x *FetchModelResponse) GetModelKey() *ModelKey

func (*FetchModelResponse) ProtoMessage

func (*FetchModelResponse) ProtoMessage()

func (*FetchModelResponse) ProtoReflect

func (x *FetchModelResponse) ProtoReflect() protoreflect.Message

func (*FetchModelResponse) Reset

func (x *FetchModelResponse) Reset()

func (*FetchModelResponse) String

func (x *FetchModelResponse) String() string

type Field

type Field struct {
	Type     Field_CellType `protobuf:"varint,1,opt,name=type,proto3,enum=hexzpb.Field_CellType" json:"type,omitempty"`
	Owner    int32          `protobuf:"varint,2,opt,name=owner,proto3" json:"owner,omitempty"`
	Hidden   bool           `protobuf:"varint,3,opt,name=hidden,proto3" json:"hidden,omitempty"`
	Value    int32          `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"`
	Blocked  int32          `protobuf:"varint,5,opt,name=blocked,proto3" json:"blocked,omitempty"`
	Lifetime int32          `protobuf:"varint,6,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
	NextVal  []int32        `protobuf:"varint,7,rep,packed,name=next_val,json=nextVal,proto3" json:"next_val,omitempty"`
	// contains filtered or unexported fields
}

func (*Field) Descriptor deprecated

func (*Field) Descriptor() ([]byte, []int)

Deprecated: Use Field.ProtoReflect.Descriptor instead.

func (*Field) GetBlocked

func (x *Field) GetBlocked() int32

func (*Field) GetHidden

func (x *Field) GetHidden() bool

func (*Field) GetLifetime

func (x *Field) GetLifetime() int32

func (*Field) GetNextVal

func (x *Field) GetNextVal() []int32

func (*Field) GetOwner

func (x *Field) GetOwner() int32

func (*Field) GetType

func (x *Field) GetType() Field_CellType

func (*Field) GetValue

func (x *Field) GetValue() int32

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) ProtoReflect

func (x *Field) ProtoReflect() protoreflect.Message

func (*Field) Reset

func (x *Field) Reset()

func (*Field) String

func (x *Field) String() string

type Field_CellType

type Field_CellType int32
const (
	Field_NORMAL Field_CellType = 0
	Field_DEAD   Field_CellType = 1
	Field_GRASS  Field_CellType = 2
	Field_ROCK   Field_CellType = 3
	Field_FIRE   Field_CellType = 4
	Field_FLAG   Field_CellType = 5
	Field_PEST   Field_CellType = 6
	Field_DEATH  Field_CellType = 7
)

func (Field_CellType) Descriptor

func (Field_CellType) Enum

func (x Field_CellType) Enum() *Field_CellType

func (Field_CellType) EnumDescriptor deprecated

func (Field_CellType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Field_CellType.Descriptor instead.

func (Field_CellType) Number

func (Field_CellType) String

func (x Field_CellType) String() string

func (Field_CellType) Type

type GameEngineClassicState

type GameEngineClassicState struct {
	Board *Board `protobuf:"bytes,1,opt,name=board,proto3" json:"board,omitempty"`
	// contains filtered or unexported fields
}

The encoded state of a GameEngineClassic. Used for saving and loading games.

func (*GameEngineClassicState) Descriptor deprecated

func (*GameEngineClassicState) Descriptor() ([]byte, []int)

Deprecated: Use GameEngineClassicState.ProtoReflect.Descriptor instead.

func (*GameEngineClassicState) GetBoard

func (x *GameEngineClassicState) GetBoard() *Board

func (*GameEngineClassicState) ProtoMessage

func (*GameEngineClassicState) ProtoMessage()

func (*GameEngineClassicState) ProtoReflect

func (x *GameEngineClassicState) ProtoReflect() protoreflect.Message

func (*GameEngineClassicState) Reset

func (x *GameEngineClassicState) Reset()

func (*GameEngineClassicState) String

func (x *GameEngineClassicState) String() string

type GameEngineFlagzState

type GameEngineFlagzState struct {
	Board     *Board `protobuf:"bytes,1,opt,name=board,proto3" json:"board,omitempty"`
	FreeCells int32  `protobuf:"varint,2,opt,name=free_cells,json=freeCells,proto3" json:"free_cells,omitempty"`
	// Always exactly two elements, one per player.
	NormalMoves []int32 `protobuf:"varint,3,rep,packed,name=normal_moves,json=normalMoves,proto3" json:"normal_moves,omitempty"`
	// contains filtered or unexported fields
}

The encoded state of a GameEngineFlagz. Used for saving and loading games.

func (*GameEngineFlagzState) Descriptor deprecated

func (*GameEngineFlagzState) Descriptor() ([]byte, []int)

Deprecated: Use GameEngineFlagzState.ProtoReflect.Descriptor instead.

func (*GameEngineFlagzState) GetBoard

func (x *GameEngineFlagzState) GetBoard() *Board

func (*GameEngineFlagzState) GetFreeCells

func (x *GameEngineFlagzState) GetFreeCells() int32

func (*GameEngineFlagzState) GetNormalMoves

func (x *GameEngineFlagzState) GetNormalMoves() []int32

func (*GameEngineFlagzState) ProtoMessage

func (*GameEngineFlagzState) ProtoMessage()

func (*GameEngineFlagzState) ProtoReflect

func (x *GameEngineFlagzState) ProtoReflect() protoreflect.Message

func (*GameEngineFlagzState) Reset

func (x *GameEngineFlagzState) Reset()

func (*GameEngineFlagzState) String

func (x *GameEngineFlagzState) String() string

type GameEngineFreeformState

type GameEngineFreeformState struct {
	Board *Board `protobuf:"bytes,1,opt,name=board,proto3" json:"board,omitempty"`
	// contains filtered or unexported fields
}

The encoded state of a GameEngineFreeform. Used for saving and loading games.

func (*GameEngineFreeformState) Descriptor deprecated

func (*GameEngineFreeformState) Descriptor() ([]byte, []int)

Deprecated: Use GameEngineFreeformState.ProtoReflect.Descriptor instead.

func (*GameEngineFreeformState) GetBoard

func (x *GameEngineFreeformState) GetBoard() *Board

func (*GameEngineFreeformState) ProtoMessage

func (*GameEngineFreeformState) ProtoMessage()

func (*GameEngineFreeformState) ProtoReflect

func (x *GameEngineFreeformState) ProtoReflect() protoreflect.Message

func (*GameEngineFreeformState) Reset

func (x *GameEngineFreeformState) Reset()

func (*GameEngineFreeformState) String

func (x *GameEngineFreeformState) String() string

type GameEngineMove

type GameEngineMove struct {
	PlayerNum int32          `protobuf:"varint,1,opt,name=player_num,json=playerNum,proto3" json:"player_num,omitempty"`
	Move      int32          `protobuf:"varint,2,opt,name=move,proto3" json:"move,omitempty"`
	Row       int32          `protobuf:"varint,3,opt,name=row,proto3" json:"row,omitempty"`
	Col       int32          `protobuf:"varint,4,opt,name=col,proto3" json:"col,omitempty"`
	CellType  Field_CellType `protobuf:"varint,5,opt,name=cell_type,json=cellType,proto3,enum=hexzpb.Field_CellType" json:"cell_type,omitempty"`
	// contains filtered or unexported fields
}

func (*GameEngineMove) Descriptor deprecated

func (*GameEngineMove) Descriptor() ([]byte, []int)

Deprecated: Use GameEngineMove.ProtoReflect.Descriptor instead.

func (*GameEngineMove) GetCellType

func (x *GameEngineMove) GetCellType() Field_CellType

func (*GameEngineMove) GetCol

func (x *GameEngineMove) GetCol() int32

func (*GameEngineMove) GetMove

func (x *GameEngineMove) GetMove() int32

func (*GameEngineMove) GetPlayerNum

func (x *GameEngineMove) GetPlayerNum() int32

func (*GameEngineMove) GetRow

func (x *GameEngineMove) GetRow() int32

func (*GameEngineMove) ProtoMessage

func (*GameEngineMove) ProtoMessage()

func (*GameEngineMove) ProtoReflect

func (x *GameEngineMove) ProtoReflect() protoreflect.Message

func (*GameEngineMove) Reset

func (x *GameEngineMove) Reset()

func (*GameEngineMove) String

func (x *GameEngineMove) String() string

type GameEngineState

type GameEngineState struct {

	// Types that are assignable to State:
	//
	//	*GameEngineState_Flagz
	//	*GameEngineState_Classic
	//	*GameEngineState_Freeform
	State isGameEngineState_State `protobuf_oneof:"state"`
	// contains filtered or unexported fields
}

This message contains all data to restore a game engine state. Every GameEngine implementation implements the .Encode() method to encode its state into this message.

func (*GameEngineState) Descriptor deprecated

func (*GameEngineState) Descriptor() ([]byte, []int)

Deprecated: Use GameEngineState.ProtoReflect.Descriptor instead.

func (*GameEngineState) GetClassic

func (x *GameEngineState) GetClassic() *GameEngineClassicState

func (*GameEngineState) GetFlagz

func (x *GameEngineState) GetFlagz() *GameEngineFlagzState

func (*GameEngineState) GetFreeform

func (x *GameEngineState) GetFreeform() *GameEngineFreeformState

func (*GameEngineState) GetState

func (m *GameEngineState) GetState() isGameEngineState_State

func (*GameEngineState) ProtoMessage

func (*GameEngineState) ProtoMessage()

func (*GameEngineState) ProtoReflect

func (x *GameEngineState) ProtoReflect() protoreflect.Message

func (*GameEngineState) Reset

func (x *GameEngineState) Reset()

func (*GameEngineState) String

func (x *GameEngineState) String() string

type GameEngineState_Classic

type GameEngineState_Classic struct {
	Classic *GameEngineClassicState `protobuf:"bytes,2,opt,name=classic,proto3,oneof"`
}

type GameEngineState_Flagz

type GameEngineState_Flagz struct {
	// All game engine types should have one field in this oneof.
	Flagz *GameEngineFlagzState `protobuf:"bytes,1,opt,name=flagz,proto3,oneof"`
}

type GameEngineState_Freeform

type GameEngineState_Freeform struct {
	Freeform *GameEngineFreeformState `protobuf:"bytes,3,opt,name=freeform,proto3,oneof"`
}

type GameInfo

type GameInfo struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The player hosting the game.
	Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
	// The pubsub channel on which updates for this game are published.
	PubsubChannelId string `protobuf:"bytes,7,opt,name=pubsub_channel_id,json=pubsubChannelId,proto3" json:"pubsub_channel_id,omitempty"`
	// Time when this game was started.
	Started *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=started,proto3" json:"started,omitempty"`
	// The type is expected to match a hexz.GameType value.
	Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
	// If playing against a CPU, indicates which CPU engine type is used.
	CpuPlayerMode CPUPlayerMode_Enum `` /* 134-byte string literal not displayed */
	Settings      *GameInfo_Settings `protobuf:"bytes,6,opt,name=settings,proto3" json:"settings,omitempty"`
	// contains filtered or unexported fields
}

GameInfo contains summary information about a game.

func (*GameInfo) Descriptor deprecated

func (*GameInfo) Descriptor() ([]byte, []int)

Deprecated: Use GameInfo.ProtoReflect.Descriptor instead.

func (*GameInfo) GetCpuPlayerMode

func (x *GameInfo) GetCpuPlayerMode() CPUPlayerMode_Enum

func (*GameInfo) GetHost

func (x *GameInfo) GetHost() string

func (*GameInfo) GetId

func (x *GameInfo) GetId() string

func (*GameInfo) GetPubsubChannelId

func (x *GameInfo) GetPubsubChannelId() string

func (*GameInfo) GetSettings

func (x *GameInfo) GetSettings() *GameInfo_Settings

func (*GameInfo) GetStarted

func (x *GameInfo) GetStarted() *timestamppb.Timestamp

func (*GameInfo) GetType

func (x *GameInfo) GetType() string

func (*GameInfo) ProtoMessage

func (*GameInfo) ProtoMessage()

func (*GameInfo) ProtoReflect

func (x *GameInfo) ProtoReflect() protoreflect.Message

func (*GameInfo) Reset

func (x *GameInfo) Reset()

func (*GameInfo) String

func (x *GameInfo) String() string

type GameInfo_Settings

type GameInfo_Settings struct {
	CpuThinkTimeMillis int64 `protobuf:"varint,1,opt,name=cpu_think_time_millis,json=cpuThinkTimeMillis,proto3" json:"cpu_think_time_millis,omitempty"`
	// contains filtered or unexported fields
}

func (*GameInfo_Settings) Descriptor deprecated

func (*GameInfo_Settings) Descriptor() ([]byte, []int)

Deprecated: Use GameInfo_Settings.ProtoReflect.Descriptor instead.

func (*GameInfo_Settings) GetCpuThinkTimeMillis

func (x *GameInfo_Settings) GetCpuThinkTimeMillis() int64

func (*GameInfo_Settings) ProtoMessage

func (*GameInfo_Settings) ProtoMessage()

func (*GameInfo_Settings) ProtoReflect

func (x *GameInfo_Settings) ProtoReflect() protoreflect.Message

func (*GameInfo_Settings) Reset

func (x *GameInfo_Settings) Reset()

func (*GameInfo_Settings) String

func (x *GameInfo_Settings) String() string

type GameState

type GameState struct {
	GameInfo *GameInfo              `protobuf:"bytes,1,opt,name=game_info,json=gameInfo,proto3" json:"game_info,omitempty"`
	Modified *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=modified,proto3" json:"modified,omitempty"`
	// Players in this game, in the order they joined.
	Players []*Player `protobuf:"bytes,3,rep,name=players,proto3" json:"players,omitempty"`
	// Flag indicating whether this game is still waiting for more players to join.
	AllPlayersJoined bool                     `protobuf:"varint,6,opt,name=all_players_joined,json=allPlayersJoined,proto3" json:"all_players_joined,omitempty"`
	EngineState      *GameEngineState         `protobuf:"bytes,4,opt,name=engine_state,json=engineState,proto3" json:"engine_state,omitempty"`
	UndoRedoState    *GameState_UndoRedoState `protobuf:"bytes,5,opt,name=undo_redo_state,json=undoRedoState,proto3" json:"undo_redo_state,omitempty"`
	// contains filtered or unexported fields
}

This message contains all data to restore a game state. It can be used to save and load games in a memory store.

func (*GameState) Descriptor deprecated

func (*GameState) Descriptor() ([]byte, []int)

Deprecated: Use GameState.ProtoReflect.Descriptor instead.

func (*GameState) GetAllPlayersJoined

func (x *GameState) GetAllPlayersJoined() bool

func (*GameState) GetEngineState

func (x *GameState) GetEngineState() *GameEngineState

func (*GameState) GetGameInfo

func (x *GameState) GetGameInfo() *GameInfo

func (*GameState) GetModified

func (x *GameState) GetModified() *timestamppb.Timestamp

func (*GameState) GetPlayers

func (x *GameState) GetPlayers() []*Player

func (*GameState) GetUndoRedoState

func (x *GameState) GetUndoRedoState() *GameState_UndoRedoState

func (*GameState) ProtoMessage

func (*GameState) ProtoMessage()

func (*GameState) ProtoReflect

func (x *GameState) ProtoReflect() protoreflect.Message

func (*GameState) Reset

func (x *GameState) Reset()

func (*GameState) String

func (x *GameState) String() string

type GameState_UndoRedoState

type GameState_UndoRedoState struct {
	InitialState *GameEngineState `protobuf:"bytes,1,opt,name=initial_state,json=initialState,proto3" json:"initial_state,omitempty"`
	// History of moves made up to the current engine_state.
	Moves []*GameEngineMove `protobuf:"bytes,2,rep,name=moves,proto3" json:"moves,omitempty"`
	// Moves that can be applied to engine_state, obtained
	// from previous Undo actions.
	RedoMoves []*GameEngineMove `protobuf:"bytes,3,rep,name=redo_moves,json=redoMoves,proto3" json:"redo_moves,omitempty"`
	// contains filtered or unexported fields
}

func (*GameState_UndoRedoState) Descriptor deprecated

func (*GameState_UndoRedoState) Descriptor() ([]byte, []int)

Deprecated: Use GameState_UndoRedoState.ProtoReflect.Descriptor instead.

func (*GameState_UndoRedoState) GetInitialState

func (x *GameState_UndoRedoState) GetInitialState() *GameEngineState

func (*GameState_UndoRedoState) GetMoves

func (x *GameState_UndoRedoState) GetMoves() []*GameEngineMove

func (*GameState_UndoRedoState) GetRedoMoves

func (x *GameState_UndoRedoState) GetRedoMoves() []*GameEngineMove

func (*GameState_UndoRedoState) ProtoMessage

func (*GameState_UndoRedoState) ProtoMessage()

func (*GameState_UndoRedoState) ProtoReflect

func (x *GameState_UndoRedoState) ProtoReflect() protoreflect.Message

func (*GameState_UndoRedoState) Reset

func (x *GameState_UndoRedoState) Reset()

func (*GameState_UndoRedoState) String

func (x *GameState_UndoRedoState) String() string

type GameStorePubsubEvent

type GameStorePubsubEvent struct {
	GameId string `protobuf:"bytes,1,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"`
	// Types that are assignable to Event:
	//
	//	*GameStorePubsubEvent_PlayerJoined_
	//	*GameStorePubsubEvent_GameUpdated_
	//	*GameStorePubsubEvent_NewGameStarted_
	Event isGameStorePubsubEvent_Event `protobuf_oneof:"Event"`
	// contains filtered or unexported fields
}

GameStore (Redis) pubsub events

func (*GameStorePubsubEvent) Descriptor deprecated

func (*GameStorePubsubEvent) Descriptor() ([]byte, []int)

Deprecated: Use GameStorePubsubEvent.ProtoReflect.Descriptor instead.

func (*GameStorePubsubEvent) GetEvent

func (m *GameStorePubsubEvent) GetEvent() isGameStorePubsubEvent_Event

func (*GameStorePubsubEvent) GetGameId

func (x *GameStorePubsubEvent) GetGameId() string

func (*GameStorePubsubEvent) GetGameUpdated

func (*GameStorePubsubEvent) GetNewGameStarted

func (*GameStorePubsubEvent) GetPlayerJoined

func (*GameStorePubsubEvent) ProtoMessage

func (*GameStorePubsubEvent) ProtoMessage()

func (*GameStorePubsubEvent) ProtoReflect

func (x *GameStorePubsubEvent) ProtoReflect() protoreflect.Message

func (*GameStorePubsubEvent) Reset

func (x *GameStorePubsubEvent) Reset()

func (*GameStorePubsubEvent) String

func (x *GameStorePubsubEvent) String() string

type GameStorePubsubEvent_GameUpdated

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

The game state was updated in any way. All pllayers should reload the game state.

func (*GameStorePubsubEvent_GameUpdated) Descriptor deprecated

func (*GameStorePubsubEvent_GameUpdated) Descriptor() ([]byte, []int)

Deprecated: Use GameStorePubsubEvent_GameUpdated.ProtoReflect.Descriptor instead.

func (*GameStorePubsubEvent_GameUpdated) ProtoMessage

func (*GameStorePubsubEvent_GameUpdated) ProtoMessage()

func (*GameStorePubsubEvent_GameUpdated) ProtoReflect

func (*GameStorePubsubEvent_GameUpdated) Reset

func (*GameStorePubsubEvent_GameUpdated) String

type GameStorePubsubEvent_GameUpdated_

type GameStorePubsubEvent_GameUpdated_ struct {
	GameUpdated *GameStorePubsubEvent_GameUpdated `protobuf:"bytes,3,opt,name=game_updated,json=gameUpdated,proto3,oneof"`
}

type GameStorePubsubEvent_NewGameStarted

type GameStorePubsubEvent_NewGameStarted struct {
	GameId string `protobuf:"bytes,1,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"`
	// contains filtered or unexported fields
}

The same players play a new game, under a new game ID.

func (*GameStorePubsubEvent_NewGameStarted) Descriptor deprecated

func (*GameStorePubsubEvent_NewGameStarted) Descriptor() ([]byte, []int)

Deprecated: Use GameStorePubsubEvent_NewGameStarted.ProtoReflect.Descriptor instead.

func (*GameStorePubsubEvent_NewGameStarted) GetGameId

func (*GameStorePubsubEvent_NewGameStarted) ProtoMessage

func (*GameStorePubsubEvent_NewGameStarted) ProtoMessage()

func (*GameStorePubsubEvent_NewGameStarted) ProtoReflect

func (*GameStorePubsubEvent_NewGameStarted) Reset

func (*GameStorePubsubEvent_NewGameStarted) String

type GameStorePubsubEvent_NewGameStarted_

type GameStorePubsubEvent_NewGameStarted_ struct {
	NewGameStarted *GameStorePubsubEvent_NewGameStarted `protobuf:"bytes,4,opt,name=new_game_started,json=newGameStarted,proto3,oneof"`
}

type GameStorePubsubEvent_PlayerJoined

type GameStorePubsubEvent_PlayerJoined struct {
	PlayerName string `protobuf:"bytes,1,opt,name=player_name,json=playerName,proto3" json:"player_name,omitempty"`
	// contains filtered or unexported fields
}

A new player joined the game.

func (*GameStorePubsubEvent_PlayerJoined) Descriptor deprecated

func (*GameStorePubsubEvent_PlayerJoined) Descriptor() ([]byte, []int)

Deprecated: Use GameStorePubsubEvent_PlayerJoined.ProtoReflect.Descriptor instead.

func (*GameStorePubsubEvent_PlayerJoined) GetPlayerName

func (x *GameStorePubsubEvent_PlayerJoined) GetPlayerName() string

func (*GameStorePubsubEvent_PlayerJoined) ProtoMessage

func (*GameStorePubsubEvent_PlayerJoined) ProtoMessage()

func (*GameStorePubsubEvent_PlayerJoined) ProtoReflect

func (*GameStorePubsubEvent_PlayerJoined) Reset

func (*GameStorePubsubEvent_PlayerJoined) String

type GameStorePubsubEvent_PlayerJoined_

type GameStorePubsubEvent_PlayerJoined_ struct {
	PlayerJoined *GameStorePubsubEvent_PlayerJoined `protobuf:"bytes,2,opt,name=player_joined,json=playerJoined,proto3,oneof"`
}

type GetTrainingParametersRequest

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

func (*GetTrainingParametersRequest) Descriptor deprecated

func (*GetTrainingParametersRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetTrainingParametersRequest.ProtoReflect.Descriptor instead.

func (*GetTrainingParametersRequest) ProtoMessage

func (*GetTrainingParametersRequest) ProtoMessage()

func (*GetTrainingParametersRequest) ProtoReflect

func (*GetTrainingParametersRequest) Reset

func (x *GetTrainingParametersRequest) Reset()

func (*GetTrainingParametersRequest) String

type ModelEncoding

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

func (*ModelEncoding) Descriptor deprecated

func (*ModelEncoding) Descriptor() ([]byte, []int)

Deprecated: Use ModelEncoding.ProtoReflect.Descriptor instead.

func (*ModelEncoding) ProtoMessage

func (*ModelEncoding) ProtoMessage()

func (*ModelEncoding) ProtoReflect

func (x *ModelEncoding) ProtoReflect() protoreflect.Message

func (*ModelEncoding) Reset

func (x *ModelEncoding) Reset()

func (*ModelEncoding) String

func (x *ModelEncoding) String() string

type ModelEncoding_Enum

type ModelEncoding_Enum int32
const (
	// Model's state_dict was saved using torch.save.
	ModelEncoding_STATE_DICT ModelEncoding_Enum = 0
	// Model was saved using torch.jit.script.
	ModelEncoding_JIT_SCRIPT ModelEncoding_Enum = 1
	// Model was saved using torch.jit.trace.
	ModelEncoding_JIT_TRACE ModelEncoding_Enum = 2
)

func (ModelEncoding_Enum) Descriptor

func (ModelEncoding_Enum) Enum

func (ModelEncoding_Enum) EnumDescriptor deprecated

func (ModelEncoding_Enum) EnumDescriptor() ([]byte, []int)

Deprecated: Use ModelEncoding_Enum.Descriptor instead.

func (ModelEncoding_Enum) Number

func (ModelEncoding_Enum) String

func (x ModelEncoding_Enum) String() string

func (ModelEncoding_Enum) Type

type ModelKey

type ModelKey struct {
	Name       string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Checkpoint int32  `protobuf:"varint,2,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
	// contains filtered or unexported fields
}

func (*ModelKey) Descriptor deprecated

func (*ModelKey) Descriptor() ([]byte, []int)

Deprecated: Use ModelKey.ProtoReflect.Descriptor instead.

func (*ModelKey) GetCheckpoint

func (x *ModelKey) GetCheckpoint() int32

func (*ModelKey) GetName

func (x *ModelKey) GetName() string

func (*ModelKey) ProtoMessage

func (*ModelKey) ProtoMessage()

func (*ModelKey) ProtoReflect

func (x *ModelKey) ProtoReflect() protoreflect.Message

func (*ModelKey) Reset

func (x *ModelKey) Reset()

func (*ModelKey) String

func (x *ModelKey) String() string

type Player

type Player struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Player) Descriptor deprecated

func (*Player) Descriptor() ([]byte, []int)

Deprecated: Use Player.ProtoReflect.Descriptor instead.

func (*Player) GetId

func (x *Player) GetId() string

func (*Player) GetName

func (x *Player) GetName() string

func (*Player) ProtoMessage

func (*Player) ProtoMessage()

func (*Player) ProtoReflect

func (x *Player) ProtoReflect() protoreflect.Message

func (*Player) Reset

func (x *Player) Reset()

func (*Player) String

func (x *Player) String() string

type ResourceInfo

type ResourceInfo struct {

	// Has exactly as many elements as there are cell types.
	NumPieces []int32 `protobuf:"varint,1,rep,packed,name=num_pieces,json=numPieces,proto3" json:"num_pieces,omitempty"`
	// contains filtered or unexported fields
}

func (*ResourceInfo) Descriptor deprecated

func (*ResourceInfo) Descriptor() ([]byte, []int)

Deprecated: Use ResourceInfo.ProtoReflect.Descriptor instead.

func (*ResourceInfo) GetNumPieces

func (x *ResourceInfo) GetNumPieces() []int32

func (*ResourceInfo) ProtoMessage

func (*ResourceInfo) ProtoMessage()

func (*ResourceInfo) ProtoReflect

func (x *ResourceInfo) ProtoReflect() protoreflect.Message

func (*ResourceInfo) Reset

func (x *ResourceInfo) Reset()

func (*ResourceInfo) String

func (x *ResourceInfo) String() string

type ServerInfoRequest

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

func (*ServerInfoRequest) Descriptor deprecated

func (*ServerInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use ServerInfoRequest.ProtoReflect.Descriptor instead.

func (*ServerInfoRequest) ProtoMessage

func (*ServerInfoRequest) ProtoMessage()

func (*ServerInfoRequest) ProtoReflect

func (x *ServerInfoRequest) ProtoReflect() protoreflect.Message

func (*ServerInfoRequest) Reset

func (x *ServerInfoRequest) Reset()

func (*ServerInfoRequest) String

func (x *ServerInfoRequest) String() string

type ServerInfoResponse

type ServerInfoResponse struct {
	ServerType ServerInfoResponse_ServerType `` /* 134-byte string literal not displayed */
	// Only populated for TYPE_NEURAL_MCTS.
	ModelKey *ModelKey `protobuf:"bytes,2,opt,name=model_key,json=modelKey,proto3" json:"model_key,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerInfoResponse) Descriptor deprecated

func (*ServerInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use ServerInfoResponse.ProtoReflect.Descriptor instead.

func (*ServerInfoResponse) GetModelKey

func (x *ServerInfoResponse) GetModelKey() *ModelKey

func (*ServerInfoResponse) GetServerType

func (*ServerInfoResponse) ProtoMessage

func (*ServerInfoResponse) ProtoMessage()

func (*ServerInfoResponse) ProtoReflect

func (x *ServerInfoResponse) ProtoReflect() protoreflect.Message

func (*ServerInfoResponse) Reset

func (x *ServerInfoResponse) Reset()

func (*ServerInfoResponse) String

func (x *ServerInfoResponse) String() string

type ServerInfoResponse_ServerType

type ServerInfoResponse_ServerType int32
const (
	ServerInfoResponse_TYPE_UNSPECIFIED ServerInfoResponse_ServerType = 0
	ServerInfoResponse_TYPE_MCTS        ServerInfoResponse_ServerType = 1
	ServerInfoResponse_TYPE_NEURAL_MCTS ServerInfoResponse_ServerType = 2
)

func (ServerInfoResponse_ServerType) Descriptor

func (ServerInfoResponse_ServerType) Enum

func (ServerInfoResponse_ServerType) EnumDescriptor deprecated

func (ServerInfoResponse_ServerType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ServerInfoResponse_ServerType.Descriptor instead.

func (ServerInfoResponse_ServerType) Number

func (ServerInfoResponse_ServerType) String

func (ServerInfoResponse_ServerType) Type

type SuggestMoveRequest

type SuggestMoveRequest struct {

	// Maximum time the engine is allowed to think, in milliseconds.
	MaxThinkTimeMs int64 `protobuf:"varint,1,opt,name=max_think_time_ms,json=maxThinkTimeMs,proto3" json:"max_think_time_ms,omitempty"`
	// Maximum number of MCTS iterations to perform to suggest a move.
	// Only taken into account if max_think_time_ms is zero.
	MaxIterations int64 `protobuf:"varint,3,opt,name=max_iterations,json=maxIterations,proto3" json:"max_iterations,omitempty"`
	// Game engine state from which to start thinking.
	GameEngineState *GameEngineState `protobuf:"bytes,2,opt,name=game_engine_state,json=gameEngineState,proto3" json:"game_engine_state,omitempty"`
	// contains filtered or unexported fields
}

func (*SuggestMoveRequest) Descriptor deprecated

func (*SuggestMoveRequest) Descriptor() ([]byte, []int)

Deprecated: Use SuggestMoveRequest.ProtoReflect.Descriptor instead.

func (*SuggestMoveRequest) GetGameEngineState

func (x *SuggestMoveRequest) GetGameEngineState() *GameEngineState

func (*SuggestMoveRequest) GetMaxIterations

func (x *SuggestMoveRequest) GetMaxIterations() int64

func (*SuggestMoveRequest) GetMaxThinkTimeMs

func (x *SuggestMoveRequest) GetMaxThinkTimeMs() int64

func (*SuggestMoveRequest) ProtoMessage

func (*SuggestMoveRequest) ProtoMessage()

func (*SuggestMoveRequest) ProtoReflect

func (x *SuggestMoveRequest) ProtoReflect() protoreflect.Message

func (*SuggestMoveRequest) Reset

func (x *SuggestMoveRequest) Reset()

func (*SuggestMoveRequest) String

func (x *SuggestMoveRequest) String() string

type SuggestMoveResponse

type SuggestMoveResponse struct {
	Move      *GameEngineMove   `protobuf:"bytes,1,opt,name=move,proto3" json:"move,omitempty"`
	MoveStats *SuggestMoveStats `protobuf:"bytes,2,opt,name=move_stats,json=moveStats,proto3" json:"move_stats,omitempty"`
	// contains filtered or unexported fields
}

func (*SuggestMoveResponse) Descriptor deprecated

func (*SuggestMoveResponse) Descriptor() ([]byte, []int)

Deprecated: Use SuggestMoveResponse.ProtoReflect.Descriptor instead.

func (*SuggestMoveResponse) GetMove

func (x *SuggestMoveResponse) GetMove() *GameEngineMove

func (*SuggestMoveResponse) GetMoveStats

func (x *SuggestMoveResponse) GetMoveStats() *SuggestMoveStats

func (*SuggestMoveResponse) ProtoMessage

func (*SuggestMoveResponse) ProtoMessage()

func (*SuggestMoveResponse) ProtoReflect

func (x *SuggestMoveResponse) ProtoReflect() protoreflect.Message

func (*SuggestMoveResponse) Reset

func (x *SuggestMoveResponse) Reset()

func (*SuggestMoveResponse) String

func (x *SuggestMoveResponse) String() string

type SuggestMoveStats

type SuggestMoveStats struct {

	// All scores that the agent generated. If not empty, the first element
	// in the sequence MUST be the FINAL score.
	Moves []*SuggestMoveStats_ScoredMove `protobuf:"bytes,1,rep,name=moves,proto3" json:"moves,omitempty"`
	// (Optional) evaluation of the board as a whole: does it look winning (1) or losing (-1)?
	Value float32 `protobuf:"fixed32,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*SuggestMoveStats) Descriptor deprecated

func (*SuggestMoveStats) Descriptor() ([]byte, []int)

Deprecated: Use SuggestMoveStats.ProtoReflect.Descriptor instead.

func (*SuggestMoveStats) GetMoves

func (*SuggestMoveStats) GetValue

func (x *SuggestMoveStats) GetValue() float32

func (*SuggestMoveStats) ProtoMessage

func (*SuggestMoveStats) ProtoMessage()

func (*SuggestMoveStats) ProtoReflect

func (x *SuggestMoveStats) ProtoReflect() protoreflect.Message

func (*SuggestMoveStats) Reset

func (x *SuggestMoveStats) Reset()

func (*SuggestMoveStats) String

func (x *SuggestMoveStats) String() string

type SuggestMoveStats_Score

type SuggestMoveStats_Score struct {
	Kind  SuggestMoveStats_ScoreKind `protobuf:"varint,1,opt,name=kind,proto3,enum=hexzpb.SuggestMoveStats_ScoreKind" json:"kind,omitempty"`
	Score float32                    `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
	// contains filtered or unexported fields
}

func (*SuggestMoveStats_Score) Descriptor deprecated

func (*SuggestMoveStats_Score) Descriptor() ([]byte, []int)

Deprecated: Use SuggestMoveStats_Score.ProtoReflect.Descriptor instead.

func (*SuggestMoveStats_Score) GetKind

func (*SuggestMoveStats_Score) GetScore

func (x *SuggestMoveStats_Score) GetScore() float32

func (*SuggestMoveStats_Score) ProtoMessage

func (*SuggestMoveStats_Score) ProtoMessage()

func (*SuggestMoveStats_Score) ProtoReflect

func (x *SuggestMoveStats_Score) ProtoReflect() protoreflect.Message

func (*SuggestMoveStats_Score) Reset

func (x *SuggestMoveStats_Score) Reset()

func (*SuggestMoveStats_Score) String

func (x *SuggestMoveStats_Score) String() string

type SuggestMoveStats_ScoreKind

type SuggestMoveStats_ScoreKind int32

EvalKind indicates the kind of evaluation that the given value represents.

const (
	// The final evaluation score that was used decide which move to make.
	SuggestMoveStats_FINAL SuggestMoveStats_ScoreKind = 0
	// The prior probabilities of a (neural) MCTS search (a.k.a. move_probs).
	SuggestMoveStats_MCTS_PRIOR SuggestMoveStats_ScoreKind = 1
)

func (SuggestMoveStats_ScoreKind) Descriptor

func (SuggestMoveStats_ScoreKind) Enum

func (SuggestMoveStats_ScoreKind) EnumDescriptor deprecated

func (SuggestMoveStats_ScoreKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use SuggestMoveStats_ScoreKind.Descriptor instead.

func (SuggestMoveStats_ScoreKind) Number

func (SuggestMoveStats_ScoreKind) String

func (SuggestMoveStats_ScoreKind) Type

type SuggestMoveStats_ScoredMove

type SuggestMoveStats_ScoredMove struct {
	Row  int32          `protobuf:"varint,1,opt,name=row,proto3" json:"row,omitempty"`
	Col  int32          `protobuf:"varint,2,opt,name=col,proto3" json:"col,omitempty"`
	Type Field_CellType `protobuf:"varint,3,opt,name=type,proto3,enum=hexzpb.Field_CellType" json:"type,omitempty"`
	// Should be between [0..1] and indicate the likelihood of choosing this move.
	Scores []*SuggestMoveStats_Score `protobuf:"bytes,4,rep,name=scores,proto3" json:"scores,omitempty"`
	// contains filtered or unexported fields
}

func (*SuggestMoveStats_ScoredMove) Descriptor deprecated

func (*SuggestMoveStats_ScoredMove) Descriptor() ([]byte, []int)

Deprecated: Use SuggestMoveStats_ScoredMove.ProtoReflect.Descriptor instead.

func (*SuggestMoveStats_ScoredMove) GetCol

func (x *SuggestMoveStats_ScoredMove) GetCol() int32

func (*SuggestMoveStats_ScoredMove) GetRow

func (x *SuggestMoveStats_ScoredMove) GetRow() int32

func (*SuggestMoveStats_ScoredMove) GetScores

func (*SuggestMoveStats_ScoredMove) GetType

func (*SuggestMoveStats_ScoredMove) ProtoMessage

func (*SuggestMoveStats_ScoredMove) ProtoMessage()

func (*SuggestMoveStats_ScoredMove) ProtoReflect

func (*SuggestMoveStats_ScoredMove) Reset

func (x *SuggestMoveStats_ScoredMove) Reset()

func (*SuggestMoveStats_ScoredMove) String

func (x *SuggestMoveStats_ScoredMove) String() string

type SuggestMovesRequest

type SuggestMovesRequest struct {

	// Maximum time the engine is allowed to think, in milliseconds, in total.
	MaxThinkTimeMs int64 `protobuf:"varint,1,opt,name=max_think_time_ms,json=maxThinkTimeMs,proto3" json:"max_think_time_ms,omitempty"`
	// Maximum number of MCTS iterations to perform to suggest a move.
	// Only taken into account if max_think_time_ms is zero.
	MaxIterations int64 `protobuf:"varint,2,opt,name=max_iterations,json=maxIterations,proto3" json:"max_iterations,omitempty"`
	// List of game engine states for which to suggest moves.
	GameEngineStates []*GameEngineState `protobuf:"bytes,3,rep,name=game_engine_states,json=gameEngineStates,proto3" json:"game_engine_states,omitempty"`
	// contains filtered or unexported fields
}

func (*SuggestMovesRequest) Descriptor deprecated

func (*SuggestMovesRequest) Descriptor() ([]byte, []int)

Deprecated: Use SuggestMovesRequest.ProtoReflect.Descriptor instead.

func (*SuggestMovesRequest) GetGameEngineStates

func (x *SuggestMovesRequest) GetGameEngineStates() []*GameEngineState

func (*SuggestMovesRequest) GetMaxIterations

func (x *SuggestMovesRequest) GetMaxIterations() int64

func (*SuggestMovesRequest) GetMaxThinkTimeMs

func (x *SuggestMovesRequest) GetMaxThinkTimeMs() int64

func (*SuggestMovesRequest) ProtoMessage

func (*SuggestMovesRequest) ProtoMessage()

func (*SuggestMovesRequest) ProtoReflect

func (x *SuggestMovesRequest) ProtoReflect() protoreflect.Message

func (*SuggestMovesRequest) Reset

func (x *SuggestMovesRequest) Reset()

func (*SuggestMovesRequest) String

func (x *SuggestMovesRequest) String() string

type TrainingExample

type TrainingExample struct {

	// Timestamp at which this example was generated.
	UnixMicros int64 `protobuf:"varint,1,opt,name=unix_micros,json=unixMicros,proto3" json:"unix_micros,omitempty"`
	// The player whose turn it was (the current player).
	Turn int32 `protobuf:"varint,7,opt,name=turn,proto3" json:"turn,omitempty"`
	// The move that was made during self-play.
	Move     *GameEngineMove          `protobuf:"bytes,9,opt,name=move,proto3" json:"move,omitempty"`
	Encoding TrainingExample_Encoding `protobuf:"varint,6,opt,name=encoding,proto3,enum=hexzpb.TrainingExample_Encoding" json:"encoding,omitempty"`
	// Training inputs.
	//
	// Encoded array containing the (11, 11, 10) Board from the view of the current player.
	// Serialized to bytes using np.save or torch::pickle_save.
	Board []byte `protobuf:"bytes,2,opt,name=board,proto3" json:"board,omitempty"`
	// Encoded array containing the (2, 11, 10) action mask indicating which moves
	// are valid on the given board.
	ActionMask []byte `protobuf:"bytes,8,opt,name=action_mask,json=actionMask,proto3" json:"action_mask,omitempty"`
	// Training labels.
	//
	// Encoded array containing the (2, 11, 10) move likelihoods.
	// Serialized to bytes using np.save or torch::pickle_save.
	MoveProbs []byte `protobuf:"bytes,3,opt,name=move_probs,json=moveProbs,proto3" json:"move_probs,omitempty"`
	// The outcome of the game, from the perspective of the current player:
	// -1: lost, 0: draw, 1: won
	Result           float32                           `protobuf:"fixed32,4,opt,name=result,proto3" json:"result,omitempty"`
	ModelPredictions *TrainingExample_ModelPredictions `protobuf:"bytes,10,opt,name=model_predictions,json=modelPredictions,proto3" json:"model_predictions,omitempty"`
	// The model that was used to generate this particular example.
	// Strictly speaking, the model can be updated even while a single
	// is generated (i.e. in the middle of a single MCTS tree search).
	// The key stored here is the one that was current when the search was over.
	ModelKey *ModelKey              `protobuf:"bytes,11,opt,name=model_key,json=modelKey,proto3" json:"model_key,omitempty"`
	Stats    *TrainingExample_Stats `protobuf:"bytes,5,opt,name=stats,proto3" json:"stats,omitempty"`
	// contains filtered or unexported fields
}

TrainingExample is used to send training examples across the wire and store them on disk in the Python and C++ implementations.

func (*TrainingExample) Descriptor deprecated

func (*TrainingExample) Descriptor() ([]byte, []int)

Deprecated: Use TrainingExample.ProtoReflect.Descriptor instead.

func (*TrainingExample) GetActionMask

func (x *TrainingExample) GetActionMask() []byte

func (*TrainingExample) GetBoard

func (x *TrainingExample) GetBoard() []byte

func (*TrainingExample) GetEncoding

func (x *TrainingExample) GetEncoding() TrainingExample_Encoding

func (*TrainingExample) GetModelKey

func (x *TrainingExample) GetModelKey() *ModelKey

func (*TrainingExample) GetModelPredictions

func (x *TrainingExample) GetModelPredictions() *TrainingExample_ModelPredictions

func (*TrainingExample) GetMove

func (x *TrainingExample) GetMove() *GameEngineMove

func (*TrainingExample) GetMoveProbs

func (x *TrainingExample) GetMoveProbs() []byte

func (*TrainingExample) GetResult

func (x *TrainingExample) GetResult() float32

func (*TrainingExample) GetStats

func (x *TrainingExample) GetStats() *TrainingExample_Stats

func (*TrainingExample) GetTurn

func (x *TrainingExample) GetTurn() int32

func (*TrainingExample) GetUnixMicros

func (x *TrainingExample) GetUnixMicros() int64

func (*TrainingExample) ProtoMessage

func (*TrainingExample) ProtoMessage()

func (*TrainingExample) ProtoReflect

func (x *TrainingExample) ProtoReflect() protoreflect.Message

func (*TrainingExample) Reset

func (x *TrainingExample) Reset()

func (*TrainingExample) String

func (x *TrainingExample) String() string

type TrainingExample_Encoding

type TrainingExample_Encoding int32

Encoding indicates how the bytes fields were encoded. In Python workers, we use numpy (np.save), while in C++ we use PyTorch (torch::pickle_save), since numpy is not available.

const (
	TrainingExample_NUMPY   TrainingExample_Encoding = 0
	TrainingExample_PYTORCH TrainingExample_Encoding = 1
)

func (TrainingExample_Encoding) Descriptor

func (TrainingExample_Encoding) Enum

func (TrainingExample_Encoding) EnumDescriptor deprecated

func (TrainingExample_Encoding) EnumDescriptor() ([]byte, []int)

Deprecated: Use TrainingExample_Encoding.Descriptor instead.

func (TrainingExample_Encoding) Number

func (TrainingExample_Encoding) String

func (x TrainingExample_Encoding) String() string

func (TrainingExample_Encoding) Type

type TrainingExample_ModelPredictions

type TrainingExample_ModelPredictions struct {

	// Encoded array containing the (2, 11, 10) prior move probabilities as predicted
	// by the model. If enabled, contains the added Dirichlet noise, i.e., these
	// priors were used for the neural MCTS runs.
	Priors []byte  `protobuf:"bytes,1,opt,name=priors,proto3" json:"priors,omitempty"`
	Value  float32 `protobuf:"fixed32,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Model outputs during self-play.

func (*TrainingExample_ModelPredictions) Descriptor deprecated

func (*TrainingExample_ModelPredictions) Descriptor() ([]byte, []int)

Deprecated: Use TrainingExample_ModelPredictions.ProtoReflect.Descriptor instead.

func (*TrainingExample_ModelPredictions) GetPriors

func (x *TrainingExample_ModelPredictions) GetPriors() []byte

func (*TrainingExample_ModelPredictions) GetValue

func (*TrainingExample_ModelPredictions) ProtoMessage

func (*TrainingExample_ModelPredictions) ProtoMessage()

func (*TrainingExample_ModelPredictions) ProtoReflect

func (*TrainingExample_ModelPredictions) Reset

func (*TrainingExample_ModelPredictions) String

type TrainingExample_Stats

type TrainingExample_Stats struct {

	// Time it took to generate this example (i.e., to generate the corresponding
	// neural MCTS move suggestion).
	DurationMicros int64 `protobuf:"varint,1,opt,name=duration_micros,json=durationMicros,proto3" json:"duration_micros,omitempty"`
	// Number of valid moves (equal to the number of root child nodes).
	ValidMoves int32 `protobuf:"varint,2,opt,name=valid_moves,json=validMoves,proto3" json:"valid_moves,omitempty"`
	// Times that the root node was visited.
	VisitCount int32 `protobuf:"varint,3,opt,name=visit_count,json=visitCount,proto3" json:"visit_count,omitempty"`
	// Child nodes of the root node that were visited at least once.
	VisitedChildren int32 `protobuf:"varint,4,opt,name=visited_children,json=visitedChildren,proto3" json:"visited_children,omitempty"`
	// Maximum depth of the search tree. The root node has depth 0.
	SearchDepth int32 `protobuf:"varint,5,opt,name=search_depth,json=searchDepth,proto3" json:"search_depth,omitempty"`
	// Total number of nodes in the search tree, including leaves.
	SearchTreeSize int32 `protobuf:"varint,6,opt,name=search_tree_size,json=searchTreeSize,proto3" json:"search_tree_size,omitempty"`
	// Number of non-leaf nodes in the tree, i.e. those visited at least once.
	BranchNodes int32 `protobuf:"varint,7,opt,name=branch_nodes,json=branchNodes,proto3" json:"branch_nodes,omitempty"`
	// Min/max visit counts of the root node's children.
	MinChildVc int32 `protobuf:"varint,8,opt,name=min_child_vc,json=minChildVc,proto3" json:"min_child_vc,omitempty"`
	MaxChildVc int32 `protobuf:"varint,9,opt,name=max_child_vc,json=maxChildVc,proto3" json:"max_child_vc,omitempty"`
	// The Q-value of the selected child node, i.e. wins/visit_count.
	SelectedChildQ float32 `protobuf:"fixed32,13,opt,name=selected_child_q,json=selectedChildQ,proto3" json:"selected_child_q,omitempty"`
	// The visit count of the selected child node.
	SelectedChildVc int32 `protobuf:"varint,10,opt,name=selected_child_vc,json=selectedChildVc,proto3" json:"selected_child_vc,omitempty"`
	// Number of nodes per depth level in the tree.
	// This should be a reasonable indicator of exploration.
	NodesPerDepth []int32 `protobuf:"varint,12,rep,packed,name=nodes_per_depth,json=nodesPerDepth,proto3" json:"nodes_per_depth,omitempty"`
	// Maximum number of visit counts per depth level.
	// This should be a reasonable indicator of exploitation.
	MaxVisitCountPerDepth []int32 `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*TrainingExample_Stats) Descriptor deprecated

func (*TrainingExample_Stats) Descriptor() ([]byte, []int)

Deprecated: Use TrainingExample_Stats.ProtoReflect.Descriptor instead.

func (*TrainingExample_Stats) GetBranchNodes

func (x *TrainingExample_Stats) GetBranchNodes() int32

func (*TrainingExample_Stats) GetDurationMicros

func (x *TrainingExample_Stats) GetDurationMicros() int64

func (*TrainingExample_Stats) GetMaxChildVc

func (x *TrainingExample_Stats) GetMaxChildVc() int32

func (*TrainingExample_Stats) GetMaxVisitCountPerDepth

func (x *TrainingExample_Stats) GetMaxVisitCountPerDepth() []int32

func (*TrainingExample_Stats) GetMinChildVc

func (x *TrainingExample_Stats) GetMinChildVc() int32

func (*TrainingExample_Stats) GetNodesPerDepth

func (x *TrainingExample_Stats) GetNodesPerDepth() []int32

func (*TrainingExample_Stats) GetSearchDepth

func (x *TrainingExample_Stats) GetSearchDepth() int32

func (*TrainingExample_Stats) GetSearchTreeSize

func (x *TrainingExample_Stats) GetSearchTreeSize() int32

func (*TrainingExample_Stats) GetSelectedChildQ

func (x *TrainingExample_Stats) GetSelectedChildQ() float32

func (*TrainingExample_Stats) GetSelectedChildVc

func (x *TrainingExample_Stats) GetSelectedChildVc() int32

func (*TrainingExample_Stats) GetValidMoves

func (x *TrainingExample_Stats) GetValidMoves() int32

func (*TrainingExample_Stats) GetVisitCount

func (x *TrainingExample_Stats) GetVisitCount() int32

func (*TrainingExample_Stats) GetVisitedChildren

func (x *TrainingExample_Stats) GetVisitedChildren() int32

func (*TrainingExample_Stats) ProtoMessage

func (*TrainingExample_Stats) ProtoMessage()

func (*TrainingExample_Stats) ProtoReflect

func (x *TrainingExample_Stats) ProtoReflect() protoreflect.Message

func (*TrainingExample_Stats) Reset

func (x *TrainingExample_Stats) Reset()

func (*TrainingExample_Stats) String

func (x *TrainingExample_Stats) String() string

type TrainingParameters

type TrainingParameters struct {
	RunsPerMove            int32   `protobuf:"varint,1,opt,name=runs_per_move,json=runsPerMove,proto3" json:"runs_per_move,omitempty"`
	UctC                   float32 `protobuf:"fixed32,2,opt,name=uct_c,json=uctC,proto3" json:"uct_c,omitempty"`
	InitialRootQValue      float32 `protobuf:"fixed32,3,opt,name=initial_root_q_value,json=initialRootQValue,proto3" json:"initial_root_q_value,omitempty"`
	InitialQPenalty        float32 `protobuf:"fixed32,4,opt,name=initial_q_penalty,json=initialQPenalty,proto3" json:"initial_q_penalty,omitempty"`
	DirichletConcentration float32 `` /* 129-byte string literal not displayed */
	FastMoveProb           float32 `protobuf:"fixed32,6,opt,name=fast_move_prob,json=fastMoveProb,proto3" json:"fast_move_prob,omitempty"`
	RunsPerFastMove        float32 `protobuf:"fixed32,7,opt,name=runs_per_fast_move,json=runsPerFastMove,proto3" json:"runs_per_fast_move,omitempty"`
	// contains filtered or unexported fields
}

Training parameters for self-play.

func (*TrainingParameters) Descriptor deprecated

func (*TrainingParameters) Descriptor() ([]byte, []int)

Deprecated: Use TrainingParameters.ProtoReflect.Descriptor instead.

func (*TrainingParameters) GetDirichletConcentration

func (x *TrainingParameters) GetDirichletConcentration() float32

func (*TrainingParameters) GetFastMoveProb

func (x *TrainingParameters) GetFastMoveProb() float32

func (*TrainingParameters) GetInitialQPenalty

func (x *TrainingParameters) GetInitialQPenalty() float32

func (*TrainingParameters) GetInitialRootQValue

func (x *TrainingParameters) GetInitialRootQValue() float32

func (*TrainingParameters) GetRunsPerFastMove

func (x *TrainingParameters) GetRunsPerFastMove() float32

func (*TrainingParameters) GetRunsPerMove

func (x *TrainingParameters) GetRunsPerMove() int32

func (*TrainingParameters) GetUctC

func (x *TrainingParameters) GetUctC() float32

func (*TrainingParameters) ProtoMessage

func (*TrainingParameters) ProtoMessage()

func (*TrainingParameters) ProtoReflect

func (x *TrainingParameters) ProtoReflect() protoreflect.Message

func (*TrainingParameters) Reset

func (x *TrainingParameters) Reset()

func (*TrainingParameters) String

func (x *TrainingParameters) String() string

type TrainingServiceClient

type TrainingServiceClient interface {
	// AddTrainingExamples is the method that workers use to send their examples to the training server.
	AddTrainingExamples(ctx context.Context, in *AddTrainingExamplesRequest, opts ...grpc.CallOption) (*AddTrainingExamplesResponse, error)
	// FetchModel returns the PyTorch model to use for self-play.
	FetchModel(ctx context.Context, in *FetchModelRequest, opts ...grpc.CallOption) (*FetchModelResponse, error)
	// ControlEvent is a server-streaming RPC that workers should subscribe to.
	ControlEvents(ctx context.Context, in *ControlRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ControlEvent], error)
	// Workers must use this method to get the correct training parameters.
	// Training servers won't accept training examples that don't match their parameter expectations.
	GetTrainingParameters(ctx context.Context, in *GetTrainingParametersRequest, opts ...grpc.CallOption) (*TrainingParameters, error)
}

TrainingServiceClient is the client API for TrainingService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type TrainingServiceServer

type TrainingServiceServer interface {
	// AddTrainingExamples is the method that workers use to send their examples to the training server.
	AddTrainingExamples(context.Context, *AddTrainingExamplesRequest) (*AddTrainingExamplesResponse, error)
	// FetchModel returns the PyTorch model to use for self-play.
	FetchModel(context.Context, *FetchModelRequest) (*FetchModelResponse, error)
	// ControlEvent is a server-streaming RPC that workers should subscribe to.
	ControlEvents(*ControlRequest, grpc.ServerStreamingServer[ControlEvent]) error
	// Workers must use this method to get the correct training parameters.
	// Training servers won't accept training examples that don't match their parameter expectations.
	GetTrainingParameters(context.Context, *GetTrainingParametersRequest) (*TrainingParameters, error)
	// contains filtered or unexported methods
}

TrainingServiceServer is the server API for TrainingService service. All implementations must embed UnimplementedTrainingServiceServer for forward compatibility.

type TrainingService_ControlEventsClient

type TrainingService_ControlEventsClient = grpc.ServerStreamingClient[ControlEvent]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type TrainingService_ControlEventsServer

type TrainingService_ControlEventsServer = grpc.ServerStreamingServer[ControlEvent]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type UnimplementedCPUPlayerServiceServer

type UnimplementedCPUPlayerServiceServer struct{}

UnimplementedCPUPlayerServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedCPUPlayerServiceServer) ServerInfo

func (UnimplementedCPUPlayerServiceServer) SuggestMove

type UnimplementedTrainingServiceServer

type UnimplementedTrainingServiceServer struct{}

UnimplementedTrainingServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedTrainingServiceServer) AddTrainingExamples

func (UnimplementedTrainingServiceServer) ControlEvents

func (UnimplementedTrainingServiceServer) FetchModel

func (UnimplementedTrainingServiceServer) GetTrainingParameters

type UnsafeCPUPlayerServiceServer

type UnsafeCPUPlayerServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCPUPlayerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CPUPlayerServiceServer will result in compilation errors.

type UnsafeTrainingServiceServer

type UnsafeTrainingServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeTrainingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TrainingServiceServer will result in compilation errors.

type WorkerConfig

type WorkerConfig struct {
	Device              string              `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"`
	WorkerThreads       int32               `protobuf:"varint,3,opt,name=worker_threads,json=workerThreads,proto3" json:"worker_threads,omitempty"`
	FibersPerThread     int32               `protobuf:"varint,4,opt,name=fibers_per_thread,json=fibersPerThread,proto3" json:"fibers_per_thread,omitempty"`
	PredictionBatchSize int32               `protobuf:"varint,5,opt,name=prediction_batch_size,json=predictionBatchSize,proto3" json:"prediction_batch_size,omitempty"`
	TrainingParams      *TrainingParameters `protobuf:"bytes,13,opt,name=training_params,json=trainingParams,proto3" json:"training_params,omitempty"`
	// contains filtered or unexported fields
}

A subset of configuration parameters from hexz::Config that was used by the worker when generating examples.

func (*WorkerConfig) Descriptor deprecated

func (*WorkerConfig) Descriptor() ([]byte, []int)

Deprecated: Use WorkerConfig.ProtoReflect.Descriptor instead.

func (*WorkerConfig) GetDevice

func (x *WorkerConfig) GetDevice() string

func (*WorkerConfig) GetFibersPerThread

func (x *WorkerConfig) GetFibersPerThread() int32

func (*WorkerConfig) GetPredictionBatchSize

func (x *WorkerConfig) GetPredictionBatchSize() int32

func (*WorkerConfig) GetTrainingParams

func (x *WorkerConfig) GetTrainingParams() *TrainingParameters

func (*WorkerConfig) GetWorkerThreads

func (x *WorkerConfig) GetWorkerThreads() int32

func (*WorkerConfig) ProtoMessage

func (*WorkerConfig) ProtoMessage()

func (*WorkerConfig) ProtoReflect

func (x *WorkerConfig) ProtoReflect() protoreflect.Message

func (*WorkerConfig) Reset

func (x *WorkerConfig) Reset()

func (*WorkerConfig) String

func (x *WorkerConfig) String() string

Jump to

Keyboard shortcuts

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