cmac

A core C++ implementation of the Cerebellar Model Articulation Controller (CMAC) with APIs in various languages. This artificial neural network is designed to be used in control system applications.

https://github.com/samlero/cmac

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.9%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A core C++ implementation of the Cerebellar Model Articulation Controller (CMAC) with APIs in various languages. This artificial neural network is designed to be used in control system applications.

Basic Info
  • Host: GitHub
  • Owner: samlero
  • License: gpl-3.0
  • Language: C++
  • Default Branch: main
  • Size: 406 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 5
Created about 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

🧠 Cerebellar Model Articulation Controller (CMAC) 🎛️

License: GPL-3.0

An artificial neural network based on a human cerebellum. It is mostly used in control systems applications due to its fast calculation and training; it does so by only activating or operating on a subset of the weights at a time, thus minimizing the amount of multiplication and addition operations.

The core implementation is written in C++ and packaged using CMake. Other API wrappers include: 1. MATLAB (must be manually built) 2. Python 3. Julia

The APIs are a work in progress and more will come. If a specific language API is needed for an application, feel free to open an issue about it. We will get to it as soon as we can.

🌟 CAPABILITIES

The CMAC implementation can do the following: 1. Predict: calculates the output of a CMAC by accumulating all active weights scaled by their corresponding basis function values. 2. Adjust: trains the active weights based on a corrective term, while also providing a damping term to avoid overlearning (or bursting). 3. Save: writes the contents of a CMAC to a file. 4. Load: loads the contents of a CMAC-saved file. 5. Zeroize: sets all the weights back to zero, untraining the CMAC.

The Predict and Adjust capabilities are available in the ICmac interface while the Save and Load capabilities in IMarshaller.

Predict and Adjust are used for near continuous calculation of CMAC outputs for feedforward control, and weight training for adaptive capabilities. The speed limitation will depend on the number of Predict inputs and number of layers (or active weights). The more of either the slower the calculation gets, so tune the CMAC parameters properly.

Save and Load are functions are typically used when the user wants to save a trained CMAC for later use.

📦 INSTALLATION

Windows

Download the latest CmacLib-x.x.x-win64.exe and follow the installation wizard.

Linux

Download the latest CmacLib-x.x.x-Linux.tar.gz and unzip.

🏗️ BUILD

A couple of build scripts were generated to ease building the installers. Scripts with win are used under the Windows environment and the others under Linux.

💻 USAGE

The following example illustrates how the capabilities mentioned above could be used.

C++

See the unit tests in CmacTests.cpp and MarshallerTests.cpp.

Matlab

See the unit tests in usage.m.

Python

See the unit tests in test_cmac.py and test_serializable.py.

Julia

See the unit tests in test_cmac.jl and test_serialization.jl

⚠️ DISCLAIMER

The repository is thoroughly tested and utilized by the authors in a Windows environment using the MATLAB API for control systems research. This is also a good indication that the core C++ is functional under a Windows environment. Linux works in theory, more testing to be done on it.

Owner

  • Login: samlero
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Doctolero"
  given-names: "Sam"
- family-names: "Espinas"
  given-names: "Aldhinn"
title: "Cmac"
version: 1.005
date-released: 2024-02-10
url: "https://github.com/samlero/Cmac"

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1