Documentation ¶
Overview ¶
Package microhal provides a simple chatbot inspired by MegaHAL
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Microhal ¶
type Microhal struct {
// contains filtered or unexported fields
}
func LoadMicrohal ¶
LoadMicrohal returns a new instance of Microhal, initialized from save data associated with name.
func NewMicrohal ¶
NewMicrohal returns a new instance of Microhal. If there alreade exsitst save data associated with name name, it will be overwritten. Markov chains of order order will be used for the database.
func (*Microhal) MarshalJSON ¶
func (*Microhal) Start ¶
Start returns two chanels for input and output to this microhol. Strings sent to input chanel will be processed and a response of at most maxLength words will be sent to the output channel. After each processed input there is a 500 ms. delay. Each saveDuration the current state will be saved to disk.