-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some questions about best practices #43
Comments
I thought of a few more questions. Since this has not been answered yet, I will add them here instead of creating a new issue. Query actionsShould the game always tell all information to Neuro, or is it better to let her 'look up' information using a 'query action'? Examples[
{
"name": "query_location",
"description": "Look up your current location.",
"schema": {}
},
{
"name": "query_objective",
"description": "Look up your current objective.",
"schema": {}
},
{
"name": "query_rules",
"description": "Look up how to play the game.",
"schema": {}
}
] How much assistance should Neuro get?Taking Buckshot Roulette as an example for a game with imperfect information, should Neuro be notified of the shell counts at the start of each round? Or should she only get the shell counts when the gun is reloaded and keep track of how many are shot herself? How much information does Neuro tolerate?Take a card game like Slay the Spire for example. Should she get all information about the game at all times (essentially card-counting, knowing which cards are in which pile but not in what order)? Neuro has a history of trying to perform impossible actions (like giving a Twitch poll too many options or making the options too long), could large amounts of cards confuse her so she tries to play cards that are not in her hand? Chained actionsThe specification mentions that the schema for an action should be simple. Is it possible (i.e. would Neuro understand) to split a complex action into a (cancelable) chain of simple forced actions, with the last action being the one that actually has an effect on the game? If so, what would be a good description for such an action? This would also be useful for example in a card game where a card can only be used on specific targets or can be otherwise modified (such as choosing cards to discard). If this is possible, how many actions should be chained (considering l*tency)? ExampleIn a Spire-like game, Neuro has a card with the following description:
sequenceDiagram
participant Neuro
participant Game
Note over Game: Start of Neuro's turn
Game ->> Neuro: Register actions 'play_card', 'end_turn'
Note right of Game: play_card: "Play a card in your hand."
Game ->> Neuro: Context (Current hand cards)
Neuro ->> Game: Execute action 'play_card' (card: ExampleCard)
activate Neuro
Game ->> Neuro: Action success
deactivate Neuro
Game ->> Neuro: Register actions 'choose_target', 'cancel'
Note right of Game: choose_target: "Choose which enemy to use the card on."
Note right of Game: cancel: "Cancel playing this card."
Game ->> Neuro: Force actions 'choose_target', 'cancel'
Neuro ->> Game: Execute action 'choose_target' (target: Enemy A)
activate Neuro
Game ->> Neuro: Unregister action 'choose_target'
Game ->> Neuro: Action success
deactivate Neuro
Game ->> Neuro: Register actions 'choose_discards'
Note right of Game: choose_discards: "Choose which cards you want to discard, if any."
Game ->> Neuro: Force actions 'choose_discards', 'cancel'
Neuro ->> Game: Execute action 'choose_discards' (2 cards chosen)
activate Neuro
Game ->> Neuro: Unregister actions 'choose_discards', 'cancel'
Game ->> Neuro: Action success
deactivate Neuro
Game --> Game: Visually play card
Game ->> Neuro: Context ("You deal 45 damage to Enemy A.")
When to use
|
I have some questions about best practices working with the API so Neuro has as little problems as possible playing my game.
Sending a lot of data
The API specification states that the state of
actions/force
may be in an arbitrary format, which is great for sending large amounts of data as JSON. However, for context messages the specification states that is must be plaintext. Does this mean that I cannot send JSON to Neuro if I do not force an action? If not, how should a context message be formatted so that Neuro will best understand it?Example: I want to give Neuro the contents of her inventory as context without immediately forcing her to take an action.
Should I prefer multiple actions or a single action?
Consider for example a game where Neuro can have up to 3 items at a time with different effects. Is it better to register a schema-less action for each item and describe the effect of the item in the action description (method A), or to register one action with the item ID in the schema and send the description of the items in a context message (method B)?
Method A:
Method B:
Other questions
actions/force
state be indented or compact?The text was updated successfully, but these errors were encountered: