Metadata-Version: 2.4
Name: aassrv2-core
Version: 1.0.1
Summary: Environment-independent cognitive core for AASSRv2
Author: aether0xff-afk
License-Expression: MIT
Project-URL: Repository, https://github.com/aether0xff-afk/AASSRv2
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: gui
Requires-Dist: PyQt6<7,>=6.7; extra == "gui"
Dynamic: license-file

# AASSRv2 Core

> **Current core release:** `v1.0.1`

AASSRv2 Core는 환경 구현, 플러그인 구현, 학습 실험과 자산을 포함하지 않는 순수
Python 인지 코어 패키지다. 상태와 행동, 지식 저장, 예측·상상, 정책, 궤적 평가,
환경 독립 실행 계약과 선택 설치형 PyQt Core Workbench를 제공한다.

## Release scope

이 브랜치가 배포하는 범위는 다음뿐이다.

- `core/`: AASSRv2 Core 런타임과 환경 독립 계약
- `aassrv2_gui/`: 플러그인을 포함하지 않는 PyQt Core Workbench
- `tests/`: Core 단위·계약 테스트
- `pyproject.toml`: `aassrv2-core` 빌드 메타데이터
- `LICENSE`, `VERSION`: 라이선스와 릴리즈 버전

GridWorld를 포함한 구체 환경, 플러그인, training pipeline, 연구 runner, notebook,
checkpoint와 실행 결과는 이 릴리즈에 포함하지 않는다.

## Install

Python 3.10 이상이 필요하다. 런타임 외부 의존성은 없다.

```bash
python -m pip install .
```

설치 후:

```python
from core import Action, AASSRCore, Plugin, State


class CounterSession(Plugin):
    def __init__(self) -> None:
        self.value = 0
        self.increment = Action("increment")

    def observe(self) -> State:
        return State({"value": self.value})

    def available_actions(self) -> list[Action]:
        return [self.increment]

    def execute(self, action: Action) -> None:
        if action != self.increment:
            raise ValueError(action.key)
        self.value += 1


core = AASSRCore(CounterSession())
transition = core.act(core.available_actions()[0])
```

## PyQt Core Workbench

GUI를 함께 설치한다.

```bash
python -m pip install ".[gui]"
```

다음 중 하나로 실행한다.

```bash
aassrv2-gui
python -m aassrv2_gui
```

Workbench는 특정 환경이나 플러그인을 내장하지 않는다. 사용자가 현재 상태와 다음
상태를 JSON 객체로 입력하고 행동을 선택하면 실제 `AASSRCore.act()`를 실행해 다음을
확인할 수 있다.

- 현재 semantic state와 사용 가능한 action
- 실행된 `(State, Action, Next State)` ASEQ
- transition history와 memory revision
- Core가 허용하는 flat scalar JSON 상태 계약

## Verify and build

```bash
python -m pip install -r requirements-dev.txt
python -m pytest -q
python -m build
python -m twine check dist/*
```

빌드 결과의 wheel과 source distribution에는 `core`와 환경 독립
`aassrv2_gui` 패키지만 포함된다. PyQt6는 `gui` extra를 선택했을 때만 설치되므로
Core 자체의 런타임 의존성은 계속 0개다.

## License

MIT. 자세한 내용은 `LICENSE`를 참고한다.
