@wentorai/research-plugins 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -18
- package/curated/analysis/README.md +12 -1
- package/curated/domains/README.md +48 -1
- package/curated/literature/README.md +46 -1
- package/curated/research/README.md +16 -1
- package/curated/tools/README.md +20 -1
- package/curated/writing/README.md +13 -1
- package/mcp-configs/academic-db/alphafold-mcp.json +20 -0
- package/mcp-configs/academic-db/brightspace-mcp.json +21 -0
- package/mcp-configs/academic-db/climatiq-mcp.json +20 -0
- package/mcp-configs/academic-db/gibs-mcp.json +20 -0
- package/mcp-configs/academic-db/gis-mcp-server.json +22 -0
- package/mcp-configs/academic-db/google-earth-engine-mcp.json +21 -0
- package/mcp-configs/academic-db/m4-clinical-mcp.json +21 -0
- package/mcp-configs/academic-db/medical-mcp.json +21 -0
- package/mcp-configs/academic-db/nexonco-mcp.json +20 -0
- package/mcp-configs/academic-db/omop-mcp.json +20 -0
- package/mcp-configs/academic-db/onekgpd-mcp.json +20 -0
- package/mcp-configs/academic-db/openedu-mcp.json +20 -0
- package/mcp-configs/academic-db/opengenes-mcp.json +20 -0
- package/mcp-configs/academic-db/openstax-mcp.json +21 -0
- package/mcp-configs/academic-db/openstreetmap-mcp.json +21 -0
- package/mcp-configs/academic-db/opentargets-mcp.json +21 -0
- package/mcp-configs/academic-db/pdb-mcp.json +21 -0
- package/mcp-configs/academic-db/smithsonian-mcp.json +20 -0
- package/mcp-configs/ai-platform/magi-researchers.json +21 -0
- package/mcp-configs/ai-platform/mcp-academic-researcher.json +22 -0
- package/mcp-configs/ai-platform/open-paper-machine.json +21 -0
- package/mcp-configs/ai-platform/paper-intelligence.json +21 -0
- package/mcp-configs/ai-platform/paper-reader.json +21 -0
- package/mcp-configs/ai-platform/paperdebugger.json +21 -0
- package/mcp-configs/browser/exa-mcp.json +20 -0
- package/mcp-configs/browser/mcp-searxng.json +21 -0
- package/mcp-configs/browser/mcp-webresearch.json +20 -0
- package/mcp-configs/communication/discourse-mcp.json +21 -0
- package/mcp-configs/data-platform/automl-stat-mcp.json +21 -0
- package/mcp-configs/data-platform/jefferson-stats-mcp.json +22 -0
- package/mcp-configs/data-platform/mcp-excel-server.json +21 -0
- package/mcp-configs/data-platform/mcp-stata.json +21 -0
- package/mcp-configs/data-platform/mcpstack-jupyter.json +21 -0
- package/mcp-configs/data-platform/ml-mcp.json +21 -0
- package/mcp-configs/data-platform/nasdaq-data-link-mcp.json +20 -0
- package/mcp-configs/data-platform/numpy-mcp.json +21 -0
- package/mcp-configs/dev-platform/geogebra-mcp.json +21 -0
- package/mcp-configs/dev-platform/latex-mcp-server.json +21 -0
- package/mcp-configs/dev-platform/manim-mcp.json +20 -0
- package/mcp-configs/dev-platform/mcp-echarts.json +20 -0
- package/mcp-configs/dev-platform/panel-viz-mcp.json +20 -0
- package/mcp-configs/dev-platform/paperbanana.json +20 -0
- package/mcp-configs/dev-platform/texflow-mcp.json +20 -0
- package/mcp-configs/dev-platform/texmcp.json +20 -0
- package/mcp-configs/dev-platform/typst-mcp.json +21 -0
- package/mcp-configs/dev-platform/vizro-mcp.json +20 -0
- package/mcp-configs/note-knowledge/local-faiss-mcp.json +21 -0
- package/mcp-configs/note-knowledge/mcp-memory-service.json +21 -0
- package/mcp-configs/note-knowledge/mcp-obsidian.json +23 -0
- package/mcp-configs/note-knowledge/mcp-ragdocs.json +20 -0
- package/mcp-configs/note-knowledge/mcp-summarizer.json +21 -0
- package/mcp-configs/note-knowledge/mediawiki-mcp.json +21 -0
- package/mcp-configs/note-knowledge/openzim-mcp.json +20 -0
- package/mcp-configs/note-knowledge/zettelkasten-mcp.json +21 -0
- package/mcp-configs/reference-mgr/academic-paper-mcp-http.json +20 -0
- package/mcp-configs/reference-mgr/academix.json +20 -0
- package/mcp-configs/reference-mgr/arxiv-research-mcp.json +21 -0
- package/mcp-configs/reference-mgr/google-scholar-abstract-mcp.json +19 -0
- package/mcp-configs/reference-mgr/google-scholar-mcp.json +20 -0
- package/mcp-configs/reference-mgr/mcp-paperswithcode.json +21 -0
- package/mcp-configs/reference-mgr/mcp-scholarly.json +20 -0
- package/mcp-configs/reference-mgr/mcp-simple-arxiv.json +20 -0
- package/mcp-configs/reference-mgr/mcp-simple-pubmed.json +20 -0
- package/mcp-configs/reference-mgr/mcp-zotero.json +21 -0
- package/mcp-configs/reference-mgr/mendeley-mcp.json +20 -0
- package/mcp-configs/reference-mgr/ncbi-mcp-server.json +22 -0
- package/mcp-configs/reference-mgr/onecite.json +21 -0
- package/mcp-configs/reference-mgr/paper-search-mcp.json +21 -0
- package/mcp-configs/reference-mgr/pubmed-search-mcp.json +21 -0
- package/mcp-configs/reference-mgr/scholar-mcp.json +21 -0
- package/mcp-configs/reference-mgr/scholar-multi-mcp.json +21 -0
- package/mcp-configs/reference-mgr/seerai.json +21 -0
- package/mcp-configs/reference-mgr/semantic-scholar-fastmcp.json +21 -0
- package/mcp-configs/reference-mgr/sourcelibrary.json +20 -0
- package/openclaw.plugin.json +2 -2
- package/package.json +2 -2
- package/skills/analysis/dataviz/citation-map-guide/SKILL.md +184 -0
- package/skills/analysis/dataviz/data-visualization-principles/SKILL.md +171 -0
- package/skills/analysis/econometrics/econml-causal-guide/SKILL.md +2 -2
- package/skills/analysis/econometrics/empirical-paper-analysis/SKILL.md +192 -0
- package/skills/analysis/econometrics/mostly-harmless-guide/SKILL.md +2 -2
- package/skills/analysis/econometrics/panel-data-regression-workflow/SKILL.md +267 -0
- package/skills/analysis/econometrics/python-causality-guide/SKILL.md +2 -2
- package/skills/analysis/econometrics/stata-reference-guide/SKILL.md +293 -0
- package/skills/analysis/statistics/general-statistics-guide/SKILL.md +226 -0
- package/skills/analysis/statistics/infiagent-benchmark-guide/SKILL.md +106 -0
- package/skills/analysis/wrangling/claude-data-analysis-guide/SKILL.md +100 -0
- package/skills/analysis/wrangling/open-data-scientist-guide/SKILL.md +197 -0
- package/skills/analysis/wrangling/streamline-analyst-guide/SKILL.md +119 -0
- package/skills/domains/ai-ml/ai-agent-papers-guide/SKILL.md +146 -0
- package/skills/domains/ai-ml/anomaly-detection-papers-guide/SKILL.md +167 -0
- package/skills/domains/ai-ml/autonomous-agents-papers-guide/SKILL.md +178 -0
- package/skills/domains/ai-ml/domain-adaptation-papers-guide/SKILL.md +173 -0
- package/skills/domains/ai-ml/generative-ai-guide/SKILL.md +2 -2
- package/skills/domains/ai-ml/graph-learning-papers-guide/SKILL.md +125 -0
- package/skills/domains/ai-ml/kolmogorov-arnold-networks-guide/SKILL.md +185 -0
- package/skills/domains/ai-ml/npcpy-research-guide/SKILL.md +137 -0
- package/skills/domains/ai-ml/responsible-ai-guide/SKILL.md +126 -0
- package/skills/domains/ai-ml/vmas-simulator-guide/SKILL.md +129 -0
- package/skills/domains/biomedical/clawbio-guide/SKILL.md +167 -0
- package/skills/domains/biomedical/clinical-dialogue-agents-guide/SKILL.md +145 -0
- package/skills/domains/biomedical/ena-sequence-api/SKILL.md +175 -0
- package/skills/domains/biomedical/genomas-guide/SKILL.md +126 -0
- package/skills/domains/biomedical/genotex-benchmark-guide/SKILL.md +125 -0
- package/skills/domains/biomedical/med-researcher-guide/SKILL.md +161 -0
- package/skills/domains/biomedical/med-researcher-r1-guide/SKILL.md +146 -0
- package/skills/domains/biomedical/ncbi-blast-api/SKILL.md +195 -0
- package/skills/domains/biomedical/ncbi-datasets-api/SKILL.md +220 -0
- package/skills/domains/biomedical/quickgo-api/SKILL.md +181 -0
- package/skills/domains/business/xpert-bi-guide/SKILL.md +84 -0
- package/skills/domains/chemistry/cactus-cheminformatics-guide/SKILL.md +89 -0
- package/skills/domains/chemistry/chemeagle-guide/SKILL.md +147 -0
- package/skills/domains/chemistry/chemgraph-agent-guide/SKILL.md +120 -0
- package/skills/domains/cs/ai-security-papers-guide/SKILL.md +103 -0
- package/skills/domains/cs/code-llm-papers-guide/SKILL.md +131 -0
- package/skills/domains/cs/gaussian-splatting-papers-guide/SKILL.md +158 -0
- package/skills/domains/cs/llm-aiops-guide/SKILL.md +70 -0
- package/skills/domains/cs/software-heritage-api/SKILL.md +200 -0
- package/skills/domains/economics/nber-working-papers-api/SKILL.md +177 -0
- package/skills/domains/economics/repec-economics-api/SKILL.md +188 -0
- package/skills/domains/education/academic-study-methods/SKILL.md +228 -0
- package/skills/domains/education/edumcp-guide/SKILL.md +74 -0
- package/skills/domains/education/open-syllabus-api/SKILL.md +171 -0
- package/skills/domains/finance/akshare-finance-data/SKILL.md +207 -0
- package/skills/domains/finance/finsight-research-guide/SKILL.md +113 -0
- package/skills/domains/finance/options-analytics-agent-guide/SKILL.md +117 -0
- package/skills/domains/geoscience/pangaea-data-api/SKILL.md +197 -0
- package/skills/domains/humanities/digital-humanities-methods/SKILL.md +232 -0
- package/skills/domains/law/caselaw-access-api/SKILL.md +149 -0
- package/skills/domains/law/legal-agent-skills-guide/SKILL.md +132 -0
- package/skills/domains/law/legal-research-methods/SKILL.md +190 -0
- package/skills/domains/law/opencontracts-guide/SKILL.md +168 -0
- package/skills/domains/math/lean-theorem-proving-guide/SKILL.md +140 -0
- package/skills/domains/pharma/madd-drug-discovery-guide/SKILL.md +153 -0
- package/skills/domains/social-science/ipums-microdata-api/SKILL.md +211 -0
- package/skills/domains/social-science/sociology-research-methods/SKILL.md +181 -0
- package/skills/literature/discovery/arxiv-paper-monitoring/SKILL.md +233 -0
- package/skills/literature/discovery/papers-we-love-guide/SKILL.md +169 -0
- package/skills/literature/discovery/zotero-arxiv-daily-guide/SKILL.md +2 -2
- package/skills/literature/fulltext/bioc-pmc-api/SKILL.md +146 -0
- package/skills/literature/fulltext/dataverse-api/SKILL.md +215 -0
- package/skills/literature/fulltext/hal-archive-api/SKILL.md +218 -0
- package/skills/literature/fulltext/osf-api/SKILL.md +212 -0
- package/skills/literature/fulltext/pmc-ftp-bulk-download/SKILL.md +182 -0
- package/skills/literature/fulltext/zotero-ai-butler-guide/SKILL.md +166 -0
- package/skills/literature/fulltext/zotero-scihub-guide/SKILL.md +168 -0
- package/skills/literature/metadata/bibliometrix-guide/SKILL.md +164 -0
- package/skills/literature/metadata/crossref-event-data-api/SKILL.md +183 -0
- package/skills/literature/metadata/doi-content-negotiation/SKILL.md +202 -0
- package/skills/literature/metadata/orkg-api/SKILL.md +153 -0
- package/skills/literature/metadata/plumx-metrics-api/SKILL.md +188 -0
- package/skills/literature/metadata/ror-organization-api/SKILL.md +208 -0
- package/skills/literature/metadata/sophosia-reference-guide/SKILL.md +110 -0
- package/skills/literature/metadata/viaf-authority-api/SKILL.md +209 -0
- package/skills/literature/metadata/zoplicate-dedup-guide/SKILL.md +147 -0
- package/skills/literature/metadata/zotero-actions-tags-guide/SKILL.md +212 -0
- package/skills/literature/metadata/zotmoov-guide/SKILL.md +120 -0
- package/skills/literature/metadata/zutilo-guide/SKILL.md +140 -0
- package/skills/literature/search/arxiv-cli-tools/SKILL.md +172 -0
- package/skills/literature/search/arxiv-osiris/SKILL.md +199 -0
- package/skills/literature/search/base-academic-search/SKILL.md +196 -0
- package/skills/literature/search/chatpaper-guide/SKILL.md +2 -2
- package/skills/literature/search/citeseerx-api/SKILL.md +183 -0
- package/skills/literature/search/deepgit-search-guide/SKILL.md +2 -2
- package/skills/literature/search/eric-education-api/SKILL.md +199 -0
- package/skills/literature/search/findpapers-guide/SKILL.md +177 -0
- package/skills/literature/search/ieee-xplore-api/SKILL.md +177 -0
- package/skills/literature/search/lens-scholarly-api/SKILL.md +211 -0
- package/skills/literature/search/multi-database-literature-search/SKILL.md +198 -0
- package/skills/literature/search/open-library-api/SKILL.md +196 -0
- package/skills/literature/search/open-semantic-search-guide/SKILL.md +190 -0
- package/skills/literature/search/openaire-api/SKILL.md +141 -0
- package/skills/literature/search/paper-search-mcp-guide/SKILL.md +107 -0
- package/skills/literature/search/papers-chat-guide/SKILL.md +194 -0
- package/skills/literature/search/pasa-paper-search-guide/SKILL.md +2 -2
- package/skills/literature/search/plos-open-access-api/SKILL.md +203 -0
- package/skills/literature/search/scielo-api/SKILL.md +182 -0
- package/skills/literature/search/share-research-api/SKILL.md +129 -0
- package/skills/literature/search/worldcat-search-api/SKILL.md +224 -0
- package/skills/research/automation/aim-experiment-guide/SKILL.md +2 -2
- package/skills/research/automation/claude-academic-workflow-guide/SKILL.md +202 -0
- package/skills/research/automation/coexist-ai-guide/SKILL.md +149 -0
- package/skills/research/automation/datagen-research-guide/SKILL.md +2 -2
- package/skills/research/automation/foam-agent-guide/SKILL.md +203 -0
- package/skills/research/automation/kedro-pipeline-guide/SKILL.md +2 -2
- package/skills/research/automation/mle-agent-guide/SKILL.md +2 -2
- package/skills/research/automation/paper-to-agent-guide/SKILL.md +2 -2
- package/skills/research/deep-research/auto-deep-research-guide/SKILL.md +2 -2
- package/skills/research/deep-research/cognitive-kernel-guide/SKILL.md +200 -0
- package/skills/research/deep-research/corvus-research-guide/SKILL.md +132 -0
- package/skills/research/deep-research/in-depth-research-guide/SKILL.md +205 -0
- package/skills/research/deep-research/kosmos-scientist-guide/SKILL.md +185 -0
- package/skills/research/deep-research/llm-scientific-discovery-guide/SKILL.md +178 -0
- package/skills/research/deep-research/open-researcher-guide/SKILL.md +138 -0
- package/skills/research/methodology/claude-scientific-guide/SKILL.md +2 -2
- package/skills/research/methodology/parsifal-slr-guide/SKILL.md +154 -0
- package/skills/research/methodology/research-pipeline-units-guide/SKILL.md +169 -0
- package/skills/research/methodology/slr-automation-guide/SKILL.md +235 -0
- package/skills/research/paper-review/latte-review-guide/SKILL.md +175 -0
- package/skills/research/paper-review/paper-critique-framework/SKILL.md +181 -0
- package/skills/tools/code-exec/contextplus-mcp-guide/SKILL.md +110 -0
- package/skills/tools/diagram/clawphd-guide/SKILL.md +149 -0
- package/skills/tools/diagram/kroki-diagram-api/SKILL.md +198 -0
- package/skills/tools/diagram/scientific-graphical-abstract/SKILL.md +201 -0
- package/skills/tools/document/docsgpt-guide/SKILL.md +2 -2
- package/skills/tools/document/md2pdf-xelatex/SKILL.md +212 -0
- package/skills/tools/document/openpaper-guide/SKILL.md +232 -0
- package/skills/tools/document/weknora-guide/SKILL.md +216 -0
- package/skills/tools/document/zotero-addon-market-guide/SKILL.md +108 -0
- package/skills/tools/document/zotero-night-theme-guide/SKILL.md +142 -0
- package/skills/tools/document/zotero-style-guide/SKILL.md +217 -0
- package/skills/tools/knowledge-graph/graphiti-guide/SKILL.md +2 -2
- package/skills/tools/knowledge-graph/mimir-memory-guide/SKILL.md +135 -0
- package/skills/tools/knowledge-graph/notero-zotero-notion-guide/SKILL.md +187 -0
- package/skills/tools/knowledge-graph/open-webui-tools-guide/SKILL.md +156 -0
- package/skills/tools/knowledge-graph/openspg-guide/SKILL.md +210 -0
- package/skills/tools/knowledge-graph/paperpile-notion-guide/SKILL.md +84 -0
- package/skills/tools/knowledge-graph/zotero-markdb-connect-guide/SKILL.md +162 -0
- package/skills/tools/ocr-translate/latex-translation-guide/SKILL.md +176 -0
- package/skills/tools/ocr-translate/math-equation-renderer/SKILL.md +198 -0
- package/skills/tools/ocr-translate/pdf-math-translate-guide/SKILL.md +2 -2
- package/skills/tools/ocr-translate/zotero-pdf-translate-guide/SKILL.md +2 -2
- package/skills/tools/ocr-translate/zotero-pdf2zh-guide/SKILL.md +2 -2
- package/skills/writing/citation/academic-citation-manager-guide/SKILL.md +182 -0
- package/skills/writing/citation/citation-assistant-skill/SKILL.md +192 -0
- package/skills/writing/citation/jabref-reference-guide/SKILL.md +2 -2
- package/skills/writing/citation/jasminum-zotero-guide/SKILL.md +2 -2
- package/skills/writing/citation/mendeley-api/SKILL.md +231 -0
- package/skills/writing/citation/obsidian-citation-guide/SKILL.md +2 -2
- package/skills/writing/citation/obsidian-zotero-guide/SKILL.md +2 -2
- package/skills/writing/citation/onecite-reference-guide/SKILL.md +168 -0
- package/skills/writing/citation/papersgpt-zotero-guide/SKILL.md +2 -2
- package/skills/writing/citation/papis-cli-guide/SKILL.md +2 -2
- package/skills/writing/citation/zotero-better-bibtex-guide/SKILL.md +2 -2
- package/skills/writing/citation/zotero-better-notes-guide/SKILL.md +2 -2
- package/skills/writing/citation/zotero-gpt-guide/SKILL.md +2 -2
- package/skills/writing/citation/zotero-mcp-guide/SKILL.md +2 -2
- package/skills/writing/citation/zotero-mdnotes-guide/SKILL.md +2 -2
- package/skills/writing/citation/zotero-reference-guide/SKILL.md +2 -2
- package/skills/writing/citation/zotfile-attachment-guide/SKILL.md +2 -2
- package/skills/writing/composition/opendraft-thesis-guide/SKILL.md +200 -0
- package/skills/writing/composition/paper-debugger-guide/SKILL.md +2 -2
- package/skills/writing/composition/paperforge-guide/SKILL.md +205 -0
- package/skills/writing/composition/research-paper-writer/SKILL.md +226 -0
- package/skills/writing/composition/scientific-writing-resources/SKILL.md +2 -2
- package/skills/writing/latex/academic-writing-latex/SKILL.md +285 -0
- package/skills/writing/latex/latex-drawing-collection/SKILL.md +2 -2
- package/skills/writing/latex/latex-templates-collection/SKILL.md +2 -2
- package/skills/writing/polish/chinese-text-humanizer/SKILL.md +140 -0
- package/skills/writing/templates/arxiv-preprint-template/SKILL.md +184 -0
- package/skills/writing/templates/elegant-paper-template/SKILL.md +141 -0
- package/skills/writing/templates/novathesis-guide/SKILL.md +2 -2
- package/skills/writing/templates/sjtuthesis-guide/SKILL.md +2 -2
- package/skills/writing/templates/thuthesis-guide/SKILL.md +2 -2
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kolmogorov-arnold-networks-guide
|
|
3
|
+
description: "Papers and tutorials on KAN learnable activation networks"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "📐"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "ai-ml"
|
|
9
|
+
keywords: ["KAN", "Kolmogorov-Arnold", "learnable activations", "spline networks", "neural architecture", "interpretability"]
|
|
10
|
+
source: "https://github.com/mintisan/awesome-kan"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Kolmogorov-Arnold Networks (KAN) Guide
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
Kolmogorov-Arnold Networks (KANs) are a novel neural network architecture that places learnable activation functions on edges (weights) instead of fixed activations on nodes. Based on the Kolmogorov-Arnold representation theorem, KANs use B-spline functions as learnable edge activations, achieving better accuracy and interpretability than MLPs with fewer parameters in certain domains. This collection tracks the rapidly growing KAN literature.
|
|
18
|
+
|
|
19
|
+
## Core Concept
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Traditional MLP:
|
|
23
|
+
x → [fixed activation(linear transform)] → y
|
|
24
|
+
Activations on nodes, weights on edges
|
|
25
|
+
|
|
26
|
+
KAN:
|
|
27
|
+
x → [learnable spline functions on edges] → sum → y
|
|
28
|
+
Each edge learns its own activation function (B-spline)
|
|
29
|
+
|
|
30
|
+
Kolmogorov-Arnold Theorem:
|
|
31
|
+
f(x₁,...,xₙ) = Σ Φᵢ(Σ φᵢⱼ(xⱼ))
|
|
32
|
+
Any multivariate continuous function = composition of
|
|
33
|
+
univariate functions and addition
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Key Papers
|
|
37
|
+
|
|
38
|
+
```bibtex
|
|
39
|
+
@article{liu2024kan,
|
|
40
|
+
title={KAN: Kolmogorov-Arnold Networks},
|
|
41
|
+
author={Liu, Ziming and Wang, Yixuan and Vaidya, Sachin and
|
|
42
|
+
Ruehle, Fabian and Halverson, James and
|
|
43
|
+
Solja{\v{c}}i{\'c}, Marin and Hou, Thomas Y. and
|
|
44
|
+
Tegmark, Max},
|
|
45
|
+
journal={arXiv:2404.19756},
|
|
46
|
+
year={2024}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Implementation
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
# Using pykan (official implementation)
|
|
54
|
+
# pip install pykan
|
|
55
|
+
|
|
56
|
+
from kan import KAN
|
|
57
|
+
import torch
|
|
58
|
+
|
|
59
|
+
# Create a KAN model
|
|
60
|
+
model = KAN(
|
|
61
|
+
width=[2, 5, 1], # Input: 2, Hidden: 5, Output: 1
|
|
62
|
+
grid=5, # Spline grid resolution
|
|
63
|
+
k=3, # Spline order (cubic)
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# Training data
|
|
67
|
+
x = torch.randn(1000, 2)
|
|
68
|
+
y = torch.sin(x[:, 0]) + torch.cos(x[:, 1])
|
|
69
|
+
y = y.unsqueeze(1)
|
|
70
|
+
|
|
71
|
+
# Train
|
|
72
|
+
dataset = {"train_input": x[:800], "train_label": y[:800],
|
|
73
|
+
"test_input": x[800:], "test_label": y[800:]}
|
|
74
|
+
model.train(dataset, steps=100, lr=0.01)
|
|
75
|
+
|
|
76
|
+
# Visualize learned functions
|
|
77
|
+
model.plot()
|
|
78
|
+
|
|
79
|
+
# Prune and simplify
|
|
80
|
+
model = model.prune()
|
|
81
|
+
model.plot()
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## KAN vs MLP Comparison
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
# Comparison on function approximation
|
|
88
|
+
from kan import KAN
|
|
89
|
+
import torch.nn as nn
|
|
90
|
+
|
|
91
|
+
# KAN: learnable activations on edges
|
|
92
|
+
kan_model = KAN(width=[2, 5, 1], grid=5, k=3)
|
|
93
|
+
# Parameters: ~150 (spline coefficients)
|
|
94
|
+
|
|
95
|
+
# MLP: fixed activations on nodes
|
|
96
|
+
class MLP(nn.Module):
|
|
97
|
+
def __init__(self):
|
|
98
|
+
super().__init__()
|
|
99
|
+
self.net = nn.Sequential(
|
|
100
|
+
nn.Linear(2, 50),
|
|
101
|
+
nn.ReLU(),
|
|
102
|
+
nn.Linear(50, 50),
|
|
103
|
+
nn.ReLU(),
|
|
104
|
+
nn.Linear(50, 1),
|
|
105
|
+
)
|
|
106
|
+
def forward(self, x):
|
|
107
|
+
return self.net(x)
|
|
108
|
+
|
|
109
|
+
mlp_model = MLP()
|
|
110
|
+
# Parameters: ~2,700
|
|
111
|
+
|
|
112
|
+
# KAN advantages:
|
|
113
|
+
# - Fewer parameters for same accuracy
|
|
114
|
+
# - Interpretable (visualize learned functions)
|
|
115
|
+
# - Better for scientific discovery (symbolic regression)
|
|
116
|
+
# - Grid refinement for progressive accuracy
|
|
117
|
+
|
|
118
|
+
# MLP advantages:
|
|
119
|
+
# - Faster training
|
|
120
|
+
# - Better scaling to high dimensions
|
|
121
|
+
# - More mature tooling and optimization
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Extensions and Variants
|
|
125
|
+
|
|
126
|
+
| Variant | Innovation | Application |
|
|
127
|
+
|---------|-----------|-------------|
|
|
128
|
+
| **KAN 2.0** | MultKAN with multiplication nodes | Improved scaling |
|
|
129
|
+
| **Temporal KAN** | Time-series adaptation | Forecasting |
|
|
130
|
+
| **ConvKAN** | KAN + convolutions | Image processing |
|
|
131
|
+
| **GraphKAN** | KAN on graph structures | Graph learning |
|
|
132
|
+
| **FourierKAN** | Fourier basis instead of splines | Periodic functions |
|
|
133
|
+
| **WavKAN** | Wavelet-based activations | Signal processing |
|
|
134
|
+
| **BSRBF-KAN** | B-spline + radial basis | Function approximation |
|
|
135
|
+
|
|
136
|
+
## Scientific Applications
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
# KAN for symbolic regression (discovering equations)
|
|
140
|
+
from kan import KAN
|
|
141
|
+
|
|
142
|
+
# Generate data from unknown equation: f(x,y) = x*exp(y)
|
|
143
|
+
import torch
|
|
144
|
+
x = torch.rand(1000, 2) * 2
|
|
145
|
+
y = x[:, 0:1] * torch.exp(x[:, 1:2])
|
|
146
|
+
|
|
147
|
+
dataset = {"train_input": x[:800], "train_label": y[:800],
|
|
148
|
+
"test_input": x[800:], "test_label": y[800:]}
|
|
149
|
+
|
|
150
|
+
model = KAN(width=[2, 1, 1], grid=10, k=3)
|
|
151
|
+
model.train(dataset, steps=200)
|
|
152
|
+
|
|
153
|
+
# Symbolic fitting — discover the equation
|
|
154
|
+
model.auto_symbolic()
|
|
155
|
+
# Output: f(x₁, x₂) = x₁ * exp(x₂)
|
|
156
|
+
# KAN can discover symbolic expressions from data
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Research Landscape
|
|
160
|
+
|
|
161
|
+
```markdown
|
|
162
|
+
### Key Research Directions
|
|
163
|
+
1. **Scaling** — Making KANs work at LLM scale
|
|
164
|
+
2. **Efficiency** — Reducing spline computation overhead
|
|
165
|
+
3. **Theory** — Understanding approximation guarantees
|
|
166
|
+
4. **Architecture search** — Optimal KAN topologies
|
|
167
|
+
5. **Hybrid models** — Combining KAN and MLP strengths
|
|
168
|
+
6. **Domain applications** — Physics, chemistry, biology
|
|
169
|
+
7. **Interpretability** — Extracting symbolic knowledge
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Use Cases
|
|
173
|
+
|
|
174
|
+
1. **Scientific discovery**: Extract equations from experimental data
|
|
175
|
+
2. **Function approximation**: High-accuracy low-parameter models
|
|
176
|
+
3. **Interpretable ML**: Understand what the network learned
|
|
177
|
+
4. **Physics-informed**: Embed physical constraints in activations
|
|
178
|
+
5. **Education**: Teach alternative neural network architectures
|
|
179
|
+
|
|
180
|
+
## References
|
|
181
|
+
|
|
182
|
+
- [awesome-kan](https://github.com/mintisan/awesome-kan)
|
|
183
|
+
- [KAN Paper](https://arxiv.org/abs/2404.19756)
|
|
184
|
+
- [pykan Implementation](https://github.com/KindXiaoming/pykan)
|
|
185
|
+
- [KAN 2.0 Paper](https://arxiv.org/abs/2408.10205)
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: npcpy-research-guide
|
|
3
|
+
description: "All-in-one Python library for NLP, agents, and knowledge graphs"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "🎭"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "ai-ml"
|
|
9
|
+
keywords: ["npcpy", "NLP", "agents", "knowledge graph", "all-in-one", "Python library"]
|
|
10
|
+
source: "https://github.com/NPC-Worldwide/npcpy"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# npcpy Research Guide
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
npcpy is an all-in-one Python library that combines NLP, agent orchestration, and knowledge graph capabilities in a single package. It provides tools for text processing, entity extraction, agent creation, graph-based reasoning, and research automation. Designed as a Swiss Army knife for AI researchers who need quick access to diverse NLP and agent capabilities without juggling many dependencies.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install npcpy
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Core Modules
|
|
26
|
+
|
|
27
|
+
### NLP Processing
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from npcpy import NLP
|
|
31
|
+
|
|
32
|
+
nlp = NLP()
|
|
33
|
+
|
|
34
|
+
# Text processing pipeline
|
|
35
|
+
doc = nlp.process(
|
|
36
|
+
"Transformers have revolutionized NLP since Vaswani et al. "
|
|
37
|
+
"introduced the attention mechanism in 2017."
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
# Named entities
|
|
41
|
+
for entity in doc.entities:
|
|
42
|
+
print(f"[{entity.type}] {entity.text}")
|
|
43
|
+
# [METHOD] Transformers
|
|
44
|
+
# [PERSON] Vaswani
|
|
45
|
+
# [CONCEPT] attention mechanism
|
|
46
|
+
# [DATE] 2017
|
|
47
|
+
|
|
48
|
+
# Key phrases
|
|
49
|
+
print(doc.key_phrases)
|
|
50
|
+
# ["attention mechanism", "Transformers", "NLP"]
|
|
51
|
+
|
|
52
|
+
# Sentiment / stance
|
|
53
|
+
print(doc.sentiment) # positive
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Agent Creation
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
from npcpy import Agent, Tool
|
|
60
|
+
|
|
61
|
+
# Create a research agent
|
|
62
|
+
agent = Agent(
|
|
63
|
+
name="research_assistant",
|
|
64
|
+
llm_provider="anthropic",
|
|
65
|
+
tools=[
|
|
66
|
+
Tool("web_search", description="Search the web"),
|
|
67
|
+
Tool("paper_search", description="Search academic papers"),
|
|
68
|
+
Tool("calculator", description="Math calculations"),
|
|
69
|
+
],
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# Run a task
|
|
73
|
+
result = agent.run(
|
|
74
|
+
"Find the top 5 most cited papers on few-shot learning "
|
|
75
|
+
"from 2023 and summarize their approaches."
|
|
76
|
+
)
|
|
77
|
+
print(result.output)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Knowledge Graphs
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from npcpy import KnowledgeGraph
|
|
84
|
+
|
|
85
|
+
kg = KnowledgeGraph()
|
|
86
|
+
|
|
87
|
+
# Extract knowledge from text
|
|
88
|
+
kg.extract_from_text(
|
|
89
|
+
"BERT uses masked language modeling for pre-training. "
|
|
90
|
+
"GPT uses autoregressive language modeling. "
|
|
91
|
+
"Both are based on the Transformer architecture."
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
# Query the graph
|
|
95
|
+
results = kg.query("What models use Transformer architecture?")
|
|
96
|
+
# ["BERT", "GPT"]
|
|
97
|
+
|
|
98
|
+
# Visualize
|
|
99
|
+
kg.visualize("knowledge_graph.html")
|
|
100
|
+
|
|
101
|
+
# Export
|
|
102
|
+
kg.export("kg.json")
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Research Workflows
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
from npcpy import ResearchWorkflow
|
|
109
|
+
|
|
110
|
+
workflow = ResearchWorkflow(llm_provider="anthropic")
|
|
111
|
+
|
|
112
|
+
# Literature search + synthesis
|
|
113
|
+
report = workflow.literature_review(
|
|
114
|
+
topic="prompt engineering techniques",
|
|
115
|
+
num_papers=20,
|
|
116
|
+
synthesis_style="academic",
|
|
117
|
+
)
|
|
118
|
+
report.save("review.md")
|
|
119
|
+
|
|
120
|
+
# Paper analysis
|
|
121
|
+
analysis = workflow.analyze_paper("paper.pdf")
|
|
122
|
+
print(analysis.summary)
|
|
123
|
+
print(analysis.methodology)
|
|
124
|
+
print(analysis.key_findings)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Use Cases
|
|
128
|
+
|
|
129
|
+
1. **Quick NLP**: Text processing without heavy setup
|
|
130
|
+
2. **Agent prototyping**: Rapid agent creation and testing
|
|
131
|
+
3. **Knowledge extraction**: Build KGs from research text
|
|
132
|
+
4. **Research automation**: Literature search and synthesis
|
|
133
|
+
5. **Teaching**: Demonstrate NLP/agent concepts
|
|
134
|
+
|
|
135
|
+
## References
|
|
136
|
+
|
|
137
|
+
- [npcpy GitHub](https://github.com/NPC-Worldwide/npcpy)
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: responsible-ai-guide
|
|
3
|
+
description: "Resources for trustworthy, fair, and ethical AI research"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "⚖️"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "ai-ml"
|
|
9
|
+
keywords: ["responsible AI", "AI ethics", "fairness", "trustworthy AI", "AI safety", "bias"]
|
|
10
|
+
source: "https://github.com/AthenaCore/AwesomeResponsibleAI"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Responsible AI Guide
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
A comprehensive collection of resources for building trustworthy, fair, and ethical AI systems. Covers fairness metrics, bias detection and mitigation, explainability methods, privacy-preserving techniques, robustness testing, and governance frameworks. Essential reading for researchers working on AI safety, alignment, and deploying models in high-stakes domains.
|
|
18
|
+
|
|
19
|
+
## Topic Taxonomy
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Responsible AI
|
|
23
|
+
├── Fairness
|
|
24
|
+
│ ├── Bias detection (data, model, outcome)
|
|
25
|
+
│ ├── Fairness metrics (demographic parity, equalized odds)
|
|
26
|
+
│ ├── Bias mitigation (pre/in/post-processing)
|
|
27
|
+
│ └── Intersectional fairness
|
|
28
|
+
├── Explainability
|
|
29
|
+
│ ├── Feature attribution (SHAP, LIME, IG)
|
|
30
|
+
│ ├── Concept-based (TCAV, concept bottleneck)
|
|
31
|
+
│ ├── Counterfactual explanations
|
|
32
|
+
│ └── Mechanistic interpretability
|
|
33
|
+
├── Privacy
|
|
34
|
+
│ ├── Differential privacy
|
|
35
|
+
│ ├── Federated learning
|
|
36
|
+
│ ├── Membership inference attacks
|
|
37
|
+
│ └── Machine unlearning
|
|
38
|
+
├── Robustness
|
|
39
|
+
│ ├── Adversarial attacks/defenses
|
|
40
|
+
│ ├── Distribution shift
|
|
41
|
+
│ ├── Uncertainty quantification
|
|
42
|
+
│ └── Out-of-distribution detection
|
|
43
|
+
├── Safety & Alignment
|
|
44
|
+
│ ├── RLHF and preference learning
|
|
45
|
+
│ ├── Constitutional AI
|
|
46
|
+
│ ├── Red teaming
|
|
47
|
+
│ └── Guardrails and filters
|
|
48
|
+
└── Governance
|
|
49
|
+
├── Model cards
|
|
50
|
+
├── Datasheets for datasets
|
|
51
|
+
├── AI impact assessments
|
|
52
|
+
└── Regulatory compliance (EU AI Act)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Key Tools
|
|
56
|
+
|
|
57
|
+
| Tool | Category | Purpose |
|
|
58
|
+
|------|----------|---------|
|
|
59
|
+
| **Fairlearn** | Fairness | Bias assessment + mitigation |
|
|
60
|
+
| **AI Fairness 360** | Fairness | IBM fairness toolkit |
|
|
61
|
+
| **SHAP** | Explainability | Shapley value explanations |
|
|
62
|
+
| **Captum** | Explainability | PyTorch interpretability |
|
|
63
|
+
| **Opacus** | Privacy | Differential privacy for PyTorch |
|
|
64
|
+
| **ART** | Robustness | Adversarial robustness toolbox |
|
|
65
|
+
| **Alibi** | Explainability | ML model explanations |
|
|
66
|
+
|
|
67
|
+
## Fairness Assessment
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from fairlearn.metrics import MetricFrame
|
|
71
|
+
from sklearn.metrics import accuracy_score, recall_score
|
|
72
|
+
|
|
73
|
+
# Assess fairness across demographic groups
|
|
74
|
+
metrics = MetricFrame(
|
|
75
|
+
metrics={
|
|
76
|
+
"accuracy": accuracy_score,
|
|
77
|
+
"recall": recall_score,
|
|
78
|
+
},
|
|
79
|
+
y_true=y_test,
|
|
80
|
+
y_pred=y_pred,
|
|
81
|
+
sensitive_features=demographics,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
print("Overall:")
|
|
85
|
+
print(metrics.overall)
|
|
86
|
+
print("\nBy group:")
|
|
87
|
+
print(metrics.by_group)
|
|
88
|
+
print("\nDifference (max - min):")
|
|
89
|
+
print(metrics.difference())
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Reading Roadmap
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
### Foundations
|
|
96
|
+
1. "Fairness and Machine Learning" (Barocas, Hardt, Narayanan)
|
|
97
|
+
2. "Datasheets for Datasets" (Gebru et al., 2021)
|
|
98
|
+
3. "Model Cards for Model Reporting" (Mitchell et al., 2019)
|
|
99
|
+
|
|
100
|
+
### Fairness
|
|
101
|
+
4. "On Fairness and Calibration" (Pleiss et al., 2017)
|
|
102
|
+
5. "Fairness Through Awareness" (Dwork et al., 2012)
|
|
103
|
+
|
|
104
|
+
### Explainability
|
|
105
|
+
6. "A Unified Approach to Interpreting Model Predictions" (SHAP)
|
|
106
|
+
7. "Why Should I Trust You?" (LIME, Ribeiro et al., 2016)
|
|
107
|
+
|
|
108
|
+
### Safety
|
|
109
|
+
8. "Constitutional AI" (Bai et al., 2022)
|
|
110
|
+
9. "Red Teaming Language Models" (Perez et al., 2022)
|
|
111
|
+
10. "Scaling Monosemanticity" (Anthropic, 2024)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Use Cases
|
|
115
|
+
|
|
116
|
+
1. **Bias auditing**: Check models for demographic biases
|
|
117
|
+
2. **Compliance**: EU AI Act and regulatory requirements
|
|
118
|
+
3. **Model documentation**: Model cards and impact assessments
|
|
119
|
+
4. **Research ethics**: Ethical considerations for AI research
|
|
120
|
+
5. **Course material**: Teach responsible AI principles
|
|
121
|
+
|
|
122
|
+
## References
|
|
123
|
+
|
|
124
|
+
- [AwesomeResponsibleAI](https://github.com/AthenaCore/AwesomeResponsibleAI)
|
|
125
|
+
- [Fairlearn](https://fairlearn.org/)
|
|
126
|
+
- [EU AI Act](https://artificialintelligenceact.eu/)
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vmas-simulator-guide
|
|
3
|
+
description: "Vectorized multi-agent reinforcement learning simulator"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "🎮"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "ai-ml"
|
|
9
|
+
keywords: ["multi-agent RL", "VMAS", "simulator", "reinforcement learning", "vectorized", "cooperative"]
|
|
10
|
+
source: "https://github.com/proroklab/VectorizedMultiAgentSimulator"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# VMAS: Vectorized Multi-Agent Simulator Guide
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
VMAS is a vectorized simulator for multi-agent reinforcement learning (MARL) that runs thousands of parallel environments on GPU via PyTorch. It provides a diverse set of 2D cooperative, competitive, and mixed scenarios for benchmarking multi-agent algorithms. Orders of magnitude faster than CPU-based simulators, enabling rapid research iteration on multi-agent coordination problems.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install vmas
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
import vmas
|
|
29
|
+
|
|
30
|
+
# Create vectorized environment
|
|
31
|
+
env = vmas.make_env(
|
|
32
|
+
scenario="simple_spread",
|
|
33
|
+
num_envs=1024, # Parallel environments
|
|
34
|
+
num_agents=3,
|
|
35
|
+
device="cuda", # GPU acceleration
|
|
36
|
+
continuous_actions=True,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
# Environment loop
|
|
40
|
+
obs = env.reset()
|
|
41
|
+
for step in range(100):
|
|
42
|
+
# Random actions for demonstration
|
|
43
|
+
actions = [env.action_space[i].sample()
|
|
44
|
+
for i in range(env.n_agents)]
|
|
45
|
+
|
|
46
|
+
obs, rewards, dones, infos = env.step(actions)
|
|
47
|
+
# obs: list of [num_envs, obs_dim] tensors
|
|
48
|
+
# rewards: list of [num_envs] tensors
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Scenarios
|
|
52
|
+
|
|
53
|
+
| Scenario | Type | Agents | Description |
|
|
54
|
+
|----------|------|--------|-------------|
|
|
55
|
+
| **simple_spread** | Cooperative | 3 | Cover N landmarks |
|
|
56
|
+
| **simple_tag** | Competitive | 4 | Predator-prey |
|
|
57
|
+
| **transport** | Cooperative | 4 | Move package to goal |
|
|
58
|
+
| **wheel** | Cooperative | 4 | Coordination on wheel |
|
|
59
|
+
| **flocking** | Cooperative | 5+ | Reynolds flocking |
|
|
60
|
+
| **discovery** | Cooperative | 3 | Explore and discover |
|
|
61
|
+
| **navigation** | Mixed | N | Multi-agent navigation |
|
|
62
|
+
|
|
63
|
+
## Integration with MARL Libraries
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
# With TorchRL
|
|
67
|
+
from torchrl.envs import VmasEnv
|
|
68
|
+
|
|
69
|
+
env = VmasEnv(
|
|
70
|
+
scenario="simple_spread",
|
|
71
|
+
num_envs=512,
|
|
72
|
+
device="cuda",
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# With RLlib
|
|
76
|
+
from ray.rllib.env import MultiAgentEnv
|
|
77
|
+
# VMAS provides RLlib-compatible wrapper
|
|
78
|
+
|
|
79
|
+
# With CleanRL / custom training
|
|
80
|
+
import torch
|
|
81
|
+
|
|
82
|
+
env = vmas.make_env("transport", num_envs=2048, device="cuda")
|
|
83
|
+
obs = env.reset()
|
|
84
|
+
|
|
85
|
+
# All tensors on GPU — train directly without CPU transfer
|
|
86
|
+
policy_output = policy_network(obs[0]) # Agent 0 observations
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Custom Scenarios
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
from vmas import Scenario, Agent, World, Landmark
|
|
93
|
+
|
|
94
|
+
class MyScenario(Scenario):
|
|
95
|
+
def make_world(self, batch_dim, device):
|
|
96
|
+
world = World(batch_dim=batch_dim, device=device)
|
|
97
|
+
world.add_agent(Agent(name="agent_0"))
|
|
98
|
+
world.add_agent(Agent(name="agent_1"))
|
|
99
|
+
world.add_landmark(Landmark(name="goal"))
|
|
100
|
+
return world
|
|
101
|
+
|
|
102
|
+
def reset_world(self, env, world):
|
|
103
|
+
# Randomize positions
|
|
104
|
+
for agent in world.agents:
|
|
105
|
+
agent.set_pos(torch.rand(env.batch_dim, 2) * 2 - 1)
|
|
106
|
+
|
|
107
|
+
def reward(self, agent, world):
|
|
108
|
+
# Distance to goal
|
|
109
|
+
goal = world.landmarks[0]
|
|
110
|
+
return -torch.linalg.norm(agent.state.pos - goal.state.pos,
|
|
111
|
+
dim=-1)
|
|
112
|
+
|
|
113
|
+
# Register and use
|
|
114
|
+
env = vmas.make_env(MyScenario(), num_envs=512)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Use Cases
|
|
118
|
+
|
|
119
|
+
1. **MARL research**: Benchmark multi-agent algorithms
|
|
120
|
+
2. **Cooperative learning**: Study emergent coordination
|
|
121
|
+
3. **Scalability testing**: GPU-accelerated parallel training
|
|
122
|
+
4. **Custom scenarios**: Design domain-specific multi-agent tasks
|
|
123
|
+
5. **Education**: Teach multi-agent RL concepts
|
|
124
|
+
|
|
125
|
+
## References
|
|
126
|
+
|
|
127
|
+
- [VMAS GitHub](https://github.com/proroklab/VectorizedMultiAgentSimulator)
|
|
128
|
+
- [VMAS Paper](https://arxiv.org/abs/2207.03530)
|
|
129
|
+
- [BenchMARL](https://github.com/facebookresearch/BenchMARL)
|