Skip to content

Requirements specification #7

@zsunberg

Description

@zsunberg

In #1, several people talked about a way for algorithm writers to specify requirements. This seems like a good idea, but designing it will be challenging. Here are a few important questions we need to answer:

  1. Are requirements just functions (e.g. clone) or method signatures (i.e. with the argument types, e.g. clone(::YourCommonEnv)?
    There are several sub-issues with this:
    1. if we have any cases of the same function with different possible signatures, then the requirements will need to be signatures
    2. If we use signatures, it is a huge pain to infer the right types to ask for (e.g. suppose we had interact!(env, a), to check the requirement we would have to infer (or ask the user to supply) the type of a. It might be possible to do Base.return_types(env->eltype(actions(env)), Tuple{typeof(env)})) or something.
  2. Do we evaluate requirements all at once so we can show a checklist or allow algorithm-writers to write their own code and go through each requirement one by one?
  3. Should algorithms automatically check requirements when they start, or should we provide a mechanism for an environment-writer to test what methods are needed before running the algorithm?
  4. How should we handle cases where there are "or" requirements, e. g. MCTS could use clone or setstate!
  5. in the interface checking, should we use Base.show_method_candidates to make a report like a MethodError, or just wait until it is erroneously called?

Please weigh in!

Metadata

Metadata

Assignees

No one assigned

    Labels

    decisionA decision that needs to be madehelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions