AlirezaMahDev.Extensions.Brain.Abstractions
0.0.1-alpha7
dotnet add package AlirezaMahDev.Extensions.Brain.Abstractions --version 0.0.1-alpha7
NuGet\Install-Package AlirezaMahDev.Extensions.Brain.Abstractions -Version 0.0.1-alpha7
<PackageReference Include="AlirezaMahDev.Extensions.Brain.Abstractions" Version="0.0.1-alpha7" />
<PackageVersion Include="AlirezaMahDev.Extensions.Brain.Abstractions" Version="0.0.1-alpha7" />
<PackageReference Include="AlirezaMahDev.Extensions.Brain.Abstractions" />
paket add AlirezaMahDev.Extensions.Brain.Abstractions --version 0.0.1-alpha7
#r "nuget: AlirezaMahDev.Extensions.Brain.Abstractions, 0.0.1-alpha7"
#:package AlirezaMahDev.Extensions.Brain.Abstractions@0.0.1-alpha7
#addin nuget:?package=AlirezaMahDev.Extensions.Brain.Abstractions&version=0.0.1-alpha7&prerelease
#tool nuget:?package=AlirezaMahDev.Extensions.Brain.Abstractions&version=0.0.1-alpha7&prerelease
AlirezaMahDev.Extensions.Brain.Abstractions
Project Description
This project defines the core abstractions and interfaces for the Brain extension, providing a contract-based approach to neural network operations. It serves as the foundation for the Brain implementation, enabling loose coupling and testability.
Dependencies
Project Dependencies
- AlirezaMahDev.Extensions.DataManager.Abstractions: Provides data management abstractions for neural network persistence
Core Interfaces
INerve<TData>
The central interface representing a neural network, providing methods for training and inference:
Learn: Trains the network with provided dataThink: Performs inference on input dataSleep: Optimizes the network stateName: Identifies the nerve instanceRoot: Provides access to the root connection
INeuron<TData>
Represents a single neuron in the network:
Offset: Memory offset of the neuronRefValue: Direct reference to the neuron's valueRefData: Direct reference to the neuron's dataConnection: Gets or creates connections to other neurons
IConnection<TData>
Manages connections between neurons:
Location: Data location of the connectionOffset: Memory offset of the connectionNeuron: Connected neuronPrevious/Next: Navigation through connection chains
IBrainService
Service interface for managing neural network instances:
GetOrAdd<TData>: Retrieves or creates a named neural network
Data Structures
NeuronValue<TData>
Structure representing a neuron's state:
Data: The actual data stored in the neuronScore: Activation scoreWeight: Connection weightConnection: Reference to connected neurons
ConnectionValue
Structure representing a connection between neurons:
Next: Reference to the next neuron in the connection chainWeight: Strength of the connection
Design Principles
- Type Safety: Strongly-typed generic interfaces
- Separation of Concerns: Clear distinction between different neural network components
- Memory Efficiency: Uses value types and references where appropriate
- Extensibility: Designed to support various neural network architectures
Usage Example
// Get or create a neural network
var nerve = brainService.GetOrAdd<float[]>(networkName);
// Train the network
var trainingData = GetTrainingData();
nerve.Learn(trainingData);
// Perform inference
var input = new float[] { /* input data */ };
var result = nerve.Think(input);
Architecture
The project follows a clean architecture with:
- Abstractions Layer: Defines the contracts for neural network operations
- Data Structures: Provides the core data types used by the implementation
- Service Contracts: Defines the service interfaces for neural network management
This design allows for different implementations while maintaining a consistent API for consumers.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AlirezaMahDev.Extensions.DataManager.Abstractions (>= 0.0.1-alpha7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AlirezaMahDev.Extensions.Brain.Abstractions:
| Package | Downloads |
|---|---|
|
AlirezaMahDev.Extensions.Brain
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1-alpha7 | 404 | 12/8/2025 |
| 0.0.1-alpha | 272 | 12/7/2025 |