Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 library release #4

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
dc2606a
Updated .gitignore to exclude GoLand project file
yaricom Apr 21, 2022
a2c7f61
Updated eshyperneat library version to v2. Fixed comments and typos.
yaricom Apr 21, 2022
8256a31
Updated funding
yaricom Apr 21, 2022
ab67b0b
Updated title of the README.md
yaricom Apr 21, 2022
6cd0db7
Updated release drafter configuration
yaricom Apr 22, 2022
cf93ed1
Updated README title
yaricom Apr 22, 2022
bdf2c8a
Updated README. Added linter exclusion rule README.md
yaricom Apr 22, 2022
f3fecb1
Updated CPPN implementation to use v2 of the goNEAT library.
yaricom Apr 22, 2022
fb8a0ec
Updated ES-HyperNEAT and HyperNEAT implementation to use v2 of the go…
yaricom Apr 22, 2022
c70a015
Updated experiment executor and implementation of the retina experime…
yaricom Apr 22, 2022
1b47db6
Updated go module definition
yaricom Apr 22, 2022
916bb0f
Fixed error strings format to avoid linter errors.
yaricom Apr 22, 2022
25c64b9
Fixed code duplication in evolvable_substrate.go. Added JSCPD thresho…
yaricom Apr 22, 2022
9e3729d
Updated JSCPD configuration
yaricom Apr 22, 2022
0bb00ae
Code deduplication
yaricom Apr 22, 2022
25821a2
Code deduplication
yaricom Apr 22, 2022
8a9b698
Updated super-linter configuration
yaricom Apr 22, 2022
0550168
Updated super-linter configuration
yaricom Apr 22, 2022
5d8d5fa
Updated linter configuration to use golangci-lint directly
yaricom Apr 22, 2022
339784e
Updated README to include UA badge
yaricom May 6, 2022
6a514bb
Updated to use v3 of the goNEAT library
yaricom Jun 5, 2022
4ea9c37
Updated experiment executor to use utilities to read NEAT options and…
yaricom Jun 5, 2022
6e8208f
Updated experiment executor and retina experiment sample to get ES-Hy…
yaricom Jun 5, 2022
51cca8e
Implemented support for soft stabilization of number of species in po…
yaricom Jun 5, 2022
c61db95
Updated retina configuration
yaricom Jun 5, 2022
5078887
Fixed bug in predictions evaluation. Added solver flushing.
yaricom Jun 7, 2022
ddc3f8d
Merge branch 'master' into v2
yaricom Jun 21, 2022
b12b8a0
Fixed bug with ineffectual assigment to err
yaricom Jun 21, 2022
adf78e4
Renamed parameters and variables for better clarity.
yaricom Jun 23, 2022
cbebfbe
Implemented check for valid network solver created
yaricom Jun 23, 2022
146f9da
Implemented support for LEO in the EvolvableSubstrate.CreateNetworkSo…
yaricom Jun 23, 2022
fc02c46
Fixed test genome configuration
yaricom Jun 23, 2022
0821682
Fixed TestEvolvableSubstrate_CreateNetworkSolver_LEO
yaricom Jun 23, 2022
d5e0a44
Updated goNeat dependency version
yaricom Jun 23, 2022
004ba27
Updated retina experiment runner to support LEO, CPPN bias, provide m…
yaricom Jun 23, 2022
cf7a9b5
Fixed CPPN genome of retina experiment to implement X-locality and Ge…
yaricom Jun 23, 2022
7d9d4ec
Fixed to use the latest version `goNEAT` library.
yaricom Apr 12, 2024
0afe4bb
Added new configuration options
yaricom Apr 15, 2024
a8b5f7a
Removed obsolete
yaricom Apr 15, 2024
fc50d1d
Implemented support for LEO threshold
yaricom Apr 15, 2024
5fa5fdd
Changed variance calculation to be more optimized
yaricom Apr 15, 2024
2b97627
Added support of Z coordinate by QuadTree
yaricom Apr 15, 2024
54e4e02
Fixed evolvable substrate generation. Fixed quad tree stringer. Fixed…
yaricom Apr 18, 2024
a9dad24
Fixed substrate to use 3d coordinates. Fixed substrate tests
yaricom Apr 18, 2024
d36021a
Fixed retina experiment and tests.
yaricom Apr 18, 2024
59b5d54
Implemented support for different activation types for hidden and out…
yaricom Apr 18, 2024
218fcb4
Implemented support for different activation types for hidden and out…
yaricom Apr 18, 2024
a51a7ef
Optimized loss calculation by flattening loop
yaricom Apr 19, 2024
ecd8f6a
Updated dependencies. Fixed deprecations
yaricom May 16, 2024
25b46a2
Changed retina solver activation routine
yaricom May 16, 2024
54552e3
Modified evolvable_substrate.go to support CPPN as Network
yaricom May 16, 2024
c384a24
Updated README to include correct links in references. Updated depend…
yaricom Dec 9, 2024
cac4617
Updated GitHub workflows
yaricom Dec 9, 2024
fa6f17f
Retina experiment configuration updates.
yaricom Dec 9, 2024
9302962
Fixed failing unit tests.
yaricom Dec 9, 2024
011dd11
Updated to use `ReadAll` from `io` package. Commented unused method
yaricom Dec 9, 2024
8d21ae9
Changed GO version for linter
yaricom Dec 9, 2024
632ee17
Updated workflow
yaricom Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# These are supported funding model platforms

patreon: io42
custom: ["https://www.buymeacoffee.com/io42"]
2 changes: 1 addition & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ignore:
- "examples/**/*" # ignoring experiments folder
- "examples/**/*" # ignoring examples folder
10 changes: 10 additions & 0 deletions .github/linters/.jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"threshold": 20,
"reporters": [
"consoleFull"
],
"ignore": [
"**/__snapshots__/**"
],
"absolute": true
}
2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name-template: 'v$RESOLVED_VERSION 🌈'
name-template: 'v$RESOLVED_VERSION 🇺🇦'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.21

- name: Build
run: go build -v ./...
Expand All @@ -29,4 +29,9 @@ jobs:
GO111MODULE: on

- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
uses: codecov/codecov-action@v4
with:
files: ./coverage.txt
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
54 changes: 38 additions & 16 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,50 @@
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/github/super-linter
# https://github.com/golangci/golangci-lint-action
name: Lint Code Base

on:
push:
branches: [ master ]
tags:
- v*
branches:
- master
- main
pull_request:
branches: [ master ]
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
run-lint:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: '1.19'
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.60

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true

- name: Lint Code Base
uses: github/super-linter/slim@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
FILTER_REGEX_EXCLUDE: .*README.md
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vendor

# The IDEA project forlder
.idea
/goESHyperNEAT.iml

# The MacOS specific
.DS_Store
Expand All @@ -22,3 +23,4 @@ vendor

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GORUN = $(GOCMD) run
# The common parameters
BINARY_NAME = eshyperneat
OUT_DIR = out
LOG_LEVEL = -1
LOG_LEVEL = info

#
# The retina experiment parameters
Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# goESHyperNEAT 🇺🇦 [![Made in Ukraine](https://img.shields.io/badge/made_in-ukraine-ffd700.svg?labelColor=0057b7)](https://u24.gov.ua)

[![Build Status](https://travis-ci.org/yaricom/goESHyperNEAT.svg?branch=master)](https://travis-ci.org/yaricom/goESHyperNEAT) [![GoDoc](https://godoc.org/github.com/yaricom/goESHyperNEAT?status.svg)](https://godoc.org/github.com/yaricom/goESHyperNEAT)

## Overview
Expand All @@ -15,32 +17,32 @@ by human before algorithm execution to reflect inherent geometrical topology of
of hidden nodes in the network this leads to the reduction of algorithm efficiency due to lack of ability to estimate where
CPPN generated patterns will have intersection with manually seeded nodes.

This drawback is addressed by **Evolved-Substrate HyperNEAT** method which allows to encode hidden nodes position
This drawback is addressed by **Evolvable-Substrate HyperNEAT** method which allows to encode hidden nodes position
in the substrate in the CPPN generated patterns of weights. As additional benefit of this the substrate is able to evolve it's
geometrical topology during training, producing regions with varying neural density, thereby providing a kind of scaffolding
for situating cognitive structures in the biological brains.


## References:
## References

1. The original C++ NEAT implementation created by Kenneth O. Stanley, see: [NEAT][1]
2. Other NEAT implementations can be found at [NEAT Software Catalog][2]
3. [The ES-HyperNEAT Users Page][3]
4. Kenneth O. Stanley, David D’Ambrosio and Jason Gauci, [A Hypercube-Based Indirect Encoding for Evolving Large-Scale Neural Networks][4], Artificial Life journal 15(2), Cambridge, MA: MIT Press, 2009
5. Sebastian Risi, Kenneth O. Stanley, [An Enhanced Hypercube-Based Encoding for Evolving the Placement, Density and Connectivity of Neurons][5], Artificial Life journal, Cambridge, MA: MIT Press, 2012
6. Kenneth O. Stanley, [Ph.D. Dissertation: EFFICIENT EVOLUTION OF NEURAL NETWORKS THROUGH COMPLEXIFICATION][6], Department of Computer Sciences, The University of Texas at Austin, Technical Report~AI-TR-04–39, August 2004
7. Kenneth O. Stanley, [Compositional Pattern Producing Networks: A Novel Abstraction of Development][7], Genetic Programming and Evolvable Machines, Special Issue on Developmental Systems, New York, NY: Springer, 2007
8. Iaroslav Omelianenko, [The GoLang NEAT implementation][8], GitHub, 2018
4. Kenneth O. Stanley, David D’Ambrosio and Jason Gauci, [A Hypercube-Based Indirect Encoding for Evolving Large-Scale Neural Networks][4], Artificial Life journal, Cambridge, MA: MIT Press, 2009, vol. 15, no. 2, pp. 185-212
5. Sebastian Risi, Kenneth O. Stanley, [An Enhanced Hypercube-Based Encoding for Evolving the Placement, Density and Connectivity of Neurons][5], Artificial Life journal, Cambridge, MA: MIT Press, 2012, vol. 18, no. 4, pp. 331-363
6. Kenneth O. Stanley, [Ph.D. Dissertation: Efficient Evolution of Neural Networks through Complexification][6], Department of Computer Sciences, The University of Texas at Austin, Technical Report~AI-TR-04–39, August 2004
7. Kenneth O. Stanley, [Compositional Pattern Producing Networks: A Novel Abstraction of Development][7], Genetic Programming and Evolvable Machines, Special Issue on Developmental Systems, New York, NY: Springer, 2007, vol. 8, pp. 131-162
8. Omelianenko, Iaroslav, [The GoLang implementation of NeuroEvolution of Augmented Topologies (NEAT) algorithm][8], GitHub, Computer software

This source code maintained and managed by [Iaroslav Omelianenko][9]


[1]:http://www.cs.ucf.edu/~kstanley/neat.html
[2]:http://eplex.cs.ucf.edu/neat_software/
[3]:http://eplex.cs.ucf.edu/hyperNEATpage/HyperNEAT.html
[4]:http://eplex.cs.ucf.edu/papers/stanley_alife09.pdf
[5]:https://www.mitpressjournals.org/doi/pdfplus/10.1162/ARTL_a_00071
[6]:http://nn.cs.utexas.edu/keyword?stanley:phd04
[7]:http://eplex.cs.ucf.edu/papers/stanley_gpem07.pdf
[8]:https://github.com/yaricom/goNEAT
[4]:https://doi.org/10.1162/artl.2009.15.2.15202
[5]:https://doi.org/10.1162/ARTL_a_00071
[6]:https://nn.cs.utexas.edu/downloads/papers/stanley.phd04.pdf
[7]:https://doi.org/10.1007/s10710-007-9028-8
[8]:https://doi.org/10.5281/zenodo.13628842
[9]:https://io42.space
31 changes: 31 additions & 0 deletions cppn/common_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package cppn

import (
"bytes"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/yaricom/goNEAT/v4/neat/network"
"testing"
)

func checkNetworkSolverOutputs(solver network.Solver, outExpected []float64, delta float64, t *testing.T) {
signals := []float64{0.9, 5.2, 1.2, 0.6}
err := solver.LoadSensors(signals)
require.NoError(t, err, "failed to load sensors")

res, err := solver.RecursiveSteps()
require.NoError(t, err, "failed to perform recursive activation")
require.True(t, res, "failed to relax network")

outs := solver.ReadOutputs()
for i, out := range outs {
assert.InDelta(t, outExpected[i], out, delta, "wrong output at: %d", i)
}
}

func printGraph(graph SubstrateGraphBuilder, t *testing.T) {
var buf bytes.Buffer
err := graph.Marshal(&buf)
assert.NoError(t, err)
t.Log(buf.String())
}
73 changes: 0 additions & 73 deletions cppn/cpnn_test.go

This file was deleted.

Loading
Loading