Логотип Algorithm Selection And Complexity

Algorithm Selection And Complexity

Сообщество
peterbamuhigire
algorithm-selection-and-complexity

Use when choosing, reviewing, or explaining an algorithm under explicit correctness, time, space, input-scale, or maintainability constraints; use system-architecture-design for service boundaries and language skills for implementation syntax.

Обзор

Издательpeterbamuhigire
Репозиторийchwezi-dev-engine
Название навыкаalgorithm-selection-and-complexity
Звёзды
29
Форки
6
Встроенные файлы
1
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Файл SKILL.md, который модель загружает по необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 1

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Опубликовано на GitHub: peterbamuhigire. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Algorithm Selection And Complexity в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/languages/algorithm-selection-and-complexity
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Новый навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/peterbamuhigire/chwezi-dev-engine.git /tmp/chwezi-dev-engine
mkdir -p .claude/skills
cp -r /tmp/chwezi-dev-engine/skills/languages/algorithm-selection-and-complexity .claude/skills/algorithm-selection-and-complexity
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Algorithm Selection And Complexity в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Algorithm Selection And Complexity, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Algorithm Selection And Complexity не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими API-ключами.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Algorithm Selection and Complexity

Choose algorithms by the problem contract and operating constraints, then prove the choice with edge cases and measurements. This skill covers a small, production-relevant catalogue; it does not replace domain, language, or architecture review.

Use When

  • A feature has a non-trivial search, matching, assignment, optimisation, graph, cache, or pathfinding problem.
  • Two correct implementations have different worst-case time, memory, or operational behaviour.
  • A developer needs a plain-language explanation before writing or reviewing code.
  • An early implementation works on examples but its behaviour at scale or at failure boundaries is unknown.

Do Not Use When

  • A standard library operation already satisfies the measured contract; use the language skill and document the chosen primitive.
  • The main decision is service decomposition, data ownership, or deployment; use the applicable architecture or operations skill.
  • The request is an interview-only puzzle with no implementation, correctness, or maintenance decision.

Inputs

InputRequiredPurpose
Problem statement and expected outputyesEstablish correctness and generality
Input shape, scale, and distributionyesBound time and memory behaviour
Failure, freshness, and determinism constraintsconditionalExpose operational risks
Baseline implementation or brute-force comparatorconditionalMeasure whether optimisation earns its complexity

Outputs

  • Algorithm decision record naming the selected algorithm, rejected alternatives, assumptions, and complexity bounds.
  • Edge-case and correctness test matrix.
  • Benchmark evidence on representative and adversarial inputs, or an explicit NOT ASSESSED record.

Evidence Produced

CategoryArtifactFormatExample
CorrectnessDecision recordMarkdown record: selected algorithm and rejected alternatives are traceable to constraintsdocs/algorithms/pathfinding-decision.md
CorrectnessCorrectness matrixMarkdown matrix: edge and failure cases are covered or marked opendocs/algorithms/pathfinding-correctness.md
PerformanceBenchmark recordMarkdown record: inputs, environment, result, and threshold are retaineddocs/algorithms/pathfinding-benchmark.md

Non-negotiables

  • Start with a clear, correct baseline before optimising.
  • Analyse worst-case time and space, not only a favourable example.
  • State what the algorithm assumes about ordering, alphabet, graph weights, cache workload, or input validity.
  • Prefer a simpler correct algorithm when the measured constraint does not require the extra machinery.
  • Do not treat a book example or asymptotic bound as production evidence.

Decision Rules

Problem shape or constraintCandidate routeRequired caution
Stable matching between two preference listsGale-ShapleyDefine proposer-side outcome and incomplete or tied preferences before implementation
Minimum-cost assignment between equal or rectangular setsHungarian algorithmConfirm the cost matrix, forbidden assignments, and padding policy
Many pattern searches or rolling-hash-friendly textRabin-KarpVerify hash hits with exact comparison; collisions are not matches
Pattern search over a stream that cannot be rewoundKnuth-Morris-PrattTest fallback-table construction and repeated-prefix cases
Long static text with a diverse alphabetHorspoolDo not use its skip assumptions blindly on tiny alphabets or short patterns
Bounded value/capacity optimisationKnapsack dynamic programmingState whether the problem is 0/1 or unbounded and bound the table size
Heuristic exploration of combinatorial pathsAnt colony optimisationDefine convergence, reproducibility, and a usable fallback; it is not an exact guarantee
All-pairs shortest paths on a manageable graphFloyd-WarshallReject negative cycles and bound the cubic work before choosing it
Maximum flow through a capacity networkPush-relabelValidate capacities, residual edges, and conservation invariants
Maximal cliques in a graphBron-KerboschExpect output-sensitive growth; constrain graph size and result volume
Lowest-cost path with a useful heuristicA*The heuristic must be admissible for optimality; handle no-path and stale-node cases
Cache with recency and frequency shiftsAdaptive replacement cacheMeasure workload, memory overhead, and eviction stability against a simpler policy

Workflow

  1. Write the problem as input, output, invariants, and failure behaviour.
  2. Implement or retain a transparent baseline and test it on empty, minimum, maximum, duplicate, malformed, and adversarial inputs.
  3. Compare candidate algorithms by correctness risk, worst-case cost, memory, data-shape assumptions, observability, and maintenance burden.
  4. Choose the smallest candidate that satisfies the stated contract. Record the reason, rejected alternative, and any heuristic or probabilistic caveat.
  5. Add proof-oriented tests for invariants and differential tests against the baseline on generated inputs where practical.
  6. Benchmark representative and worst-case distributions. Keep input fixtures, environment, result, and regression threshold with the decision record.
  7. Revisit the choice when data shape, throughput, memory budget, or failure consequences change; do not optimise from an old measurement.

Anti-patterns

  • Choosing an algorithm because its name is fashionable. Fix: start with the problem contract and measured constraint.
  • Reporting average-case speed without naming the input distribution. Fix: include worst-case analysis and a distribution-specific benchmark.
  • Replacing a correct baseline before writing differential tests. Fix: keep the baseline as an oracle for bounded fixtures.
  • Using a probabilistic hash match as proof of equality. Fix: perform exact verification after a candidate hash hit.
  • Applying A* with an overestimating heuristic while claiming optimality. Fix: prove admissibility or label the result heuristic.
  • Introducing a cache policy without measuring hit rate, memory, and eviction churn. Fix: compare it with a documented baseline.

Read next

  • python-modern-standards or the relevant language skill for implementation and tests.
  • system-architecture-design when the algorithm changes a service or data boundary.
  • database-design-engineering when indexes or query plans are the real solution.
  • advanced-testing-strategy for risk-scaled evidence and regression thresholds.

References

Capability Contract

Read and search are required. Execution is preferred for benchmarks and tests. Editing is allowed only within the authorised implementation scope.

Degraded Mode

Without representative inputs or execution, return the decision, assumptions, complexity analysis, and an explicit NOT ASSESSED benchmark requirement.

Встроенные файлы

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Algorithm Selection And Complexity?

Use when choosing, reviewing, or explaining an algorithm under explicit correctness, time, space, input-scale, or maintainability constraints; use system-architecture-design for service boundaries and language skills for implementation syntax.

Зачем использовать Algorithm Selection And Complexity в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Algorithm Selection And Complexity — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Algorithm Selection And Complexity в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/languages/algorithm-selection-and-complexity. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Algorithm Selection And Complexity?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Algorithm Selection And Complexity?

С любым количеством. Если модель поддерживает навыки, вы можете использовать с ней Algorithm Selection And Complexity: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama и другие — всё в TypingMind с вашими собственными ключами API.

Бесплатен ли навык ИИ Algorithm Selection And Complexity?

Да. Навык опубликован на GitHub автором peterbamuhigire по лицензии MIT. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это многоразовый набор инструкций, который объясняет модели ИИ, как выполнять конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты для вызова — код, который где-то выполняется и возвращает результат. Навык ИИ вместо этого даёт модели знания и порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇