應用程式介面
外表
應用程式介面(參見英文:API)係一類嘅規格、約定同埋文檔,特徵令某一啲軟件可以透過可重複、可預期嘅方式,去用另一個系統或軟件層所提供嘅資源同功能。呢種介面喺任何軟件之中都會用到,不過可能抽象化咗,終端用家無法直接睇到。應用程式介面有人界定為機制一種,特徵係會定義兩隻軟件之間點樣溝通[1]。
使用例子
[編輯]教人工智能玩遊戲,就可以用到應用程式介面。例如 Unity 就有所謂嘅 ML-Agents Toolkit(意即機器學習個體工具箱)可以將 Unity 場景封裝成互動用嘅虛擬環境,俾 Python 端透過應用程式介面去控制 Unity 之中嘅人工智能體—縱使 Unity 預設嘅手稿語言係 C# [2]。同時 Python 有套件提供 UnityEnvironment 類別去啟動同連接 Unity 可執行檔或者編輯器[3][4][5]。
概念對比
[編輯]應用程式介面同用家介面(UI)嘅分別包括
睇埋
[編輯]引述
[編輯]- ↑ Guidelines for API Protection for Cloud-Native Systems (Initial Public Draft), NIST SP 800-228 (PDF) (報告). National Institute of Standards and Technology. March 2025. p. 11.
An Application Programming Interface (API) defines how any two pieces of software communicate - they are ubiquitous in software.
- ↑ Juliani, Arthur; Berges, Vincent-Pierre; Teng, Ervin; Cohen, Andrew; Harper, Jonathan; Elion, Chris; Goy, Chris; Gao, Yuan; Henry, Hunter; Mattar, Marwan; Lange, Danny (2018). "Unity: A General Platform for Intelligent Agents". arXiv.
...interact with them via a Python API.
{{cite journal}}:|section=ignored (help) - ↑ Juliani, Arthur (2018). "Unity: A General Platform for Intelligent Agents". arXiv.
{{cite journal}}:|section=ignored (help) - ↑ "mlagents-envs — Unity ML-Agents Python Interface". PyPI. 喺2025-09-10搵到.
- ↑ "Python Gym API Documentation". Unity ML-Agents Docs (GitHub). 喺2025-09-10搵到.
- ↑ Guidelines for API Protection for Cloud-Native Systems (Initial Public Draft), NIST SP 800-228 (PDF) (報告). NIST. March 2025. p. 10.
- ↑ "User Interface Design — Module I" (PDF). ACS College of Engineering. 2020. p. 1.
The user interface is the part of a computer and its software that people can see, hear, touch, talk to, or otherwise understand or direct.