Automaton with multiple active states

Open
#13 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
csharp
Domain
backend

Research direction

No files or tests are named in the issue. Start by reading the repository's existing automaton and state APIs to understand how states and transitions are represented. Done means an automaton can hold multiple active states and take all applicable transitions on an input, as in the PNJ examples.

Written by the indexing model from the issue text.

Description

enhancement

The idea

This is a new idea for a new type of automaton. The automaton has several active states. When reading, all states take a transition, and all possible transitions are taken.

How would it be used

Let's take a game scenario. When gifting a PNJ a liked item, this PNG becomes both surpised and in a good mood. When suprised and the PNJ is attacked, it becomes confuse. When in a good mood and the PNJ is attacked, it becomes confused and sad. The PNJ can also become surprised after using a confusion spell. In that case, if he is attacked, it will not become sad. Here is a graph below that represents the different states the PNJ is in.

flowchart LR

gmood["Good Mood"]

Idle --gifted--> Surprised & gmood
Idle --potion--> Surprised
Surprised --attacked--> Confused
gmood --attacked--> Confused & Sad

In this example, after gifting the gift, the PNJ is in two states, but after using the potion, it is only in one state. Depending of the previous action, the states it is in after being attacked varies. So the automaton representing the PNJ state must handle two active states and take both the transitions.

Dominant language
C#
Stars
0
Forks
1
Avg merge
1h 1m
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Natvs/Nt.Automaton

All issues in Natvs/Nt.Automaton

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.