diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7acf5ed --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2024, EMI-Group +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6f2fb47 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,42 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +mypkg = ["*.txt", "*.json"] + +[project] +name = "tensorneat" +version = "0.1.0" +authors = [{ name = "Lishuang Wang", email = "wanglishuang22@gmail.com" }] +description = "tensorneat" +readme = "README.md" +license = { file = "LICENSE" } +requires-python = ">=3.9" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: BSD License", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Artificial Intelligence", +] + +dependencies = [ + "brax >= 0.10.3", + "jax >= 0.4.28", + "gymnax >= 0.0.8", + "jaxopt >= 0.8.3", + "optax >= 0.2.2", + "flax >= 0.8.4", + "mujoco >= 3.1.4", + "mujoco-mjx >= 3.1.4", +] + +[project.urls] +"Homepage" = "https://github.com/EMI-Group/tensorneat" +"Bug Tracker" = "https://github.com/EMI-Group/tensorneat/issues" diff --git a/tensorneat/algorithm/__init__.py b/src/tensorneat/algorithm/__init__.py similarity index 100% rename from tensorneat/algorithm/__init__.py rename to src/tensorneat/algorithm/__init__.py diff --git a/tensorneat/algorithm/base.py b/src/tensorneat/algorithm/base.py similarity index 100% rename from tensorneat/algorithm/base.py rename to src/tensorneat/algorithm/base.py diff --git a/tensorneat/algorithm/hyperneat/__init__.py b/src/tensorneat/algorithm/hyperneat/__init__.py similarity index 100% rename from tensorneat/algorithm/hyperneat/__init__.py rename to src/tensorneat/algorithm/hyperneat/__init__.py diff --git a/tensorneat/algorithm/hyperneat/hyperneat.py b/src/tensorneat/algorithm/hyperneat/hyperneat.py similarity index 100% rename from tensorneat/algorithm/hyperneat/hyperneat.py rename to src/tensorneat/algorithm/hyperneat/hyperneat.py diff --git a/tensorneat/algorithm/hyperneat/substrate/__init__.py b/src/tensorneat/algorithm/hyperneat/substrate/__init__.py similarity index 100% rename from tensorneat/algorithm/hyperneat/substrate/__init__.py rename to src/tensorneat/algorithm/hyperneat/substrate/__init__.py diff --git a/tensorneat/algorithm/hyperneat/substrate/base.py b/src/tensorneat/algorithm/hyperneat/substrate/base.py similarity index 100% rename from tensorneat/algorithm/hyperneat/substrate/base.py rename to src/tensorneat/algorithm/hyperneat/substrate/base.py diff --git a/tensorneat/algorithm/hyperneat/substrate/default.py b/src/tensorneat/algorithm/hyperneat/substrate/default.py similarity index 100% rename from tensorneat/algorithm/hyperneat/substrate/default.py rename to src/tensorneat/algorithm/hyperneat/substrate/default.py diff --git a/tensorneat/algorithm/hyperneat/substrate/full.py b/src/tensorneat/algorithm/hyperneat/substrate/full.py similarity index 100% rename from tensorneat/algorithm/hyperneat/substrate/full.py rename to src/tensorneat/algorithm/hyperneat/substrate/full.py diff --git a/tensorneat/algorithm/neat/__init__.py b/src/tensorneat/algorithm/neat/__init__.py similarity index 100% rename from tensorneat/algorithm/neat/__init__.py rename to src/tensorneat/algorithm/neat/__init__.py diff --git a/tensorneat/algorithm/neat/neat.py b/src/tensorneat/algorithm/neat/neat.py similarity index 100% rename from tensorneat/algorithm/neat/neat.py rename to src/tensorneat/algorithm/neat/neat.py diff --git a/tensorneat/algorithm/neat/species.py b/src/tensorneat/algorithm/neat/species.py similarity index 100% rename from tensorneat/algorithm/neat/species.py rename to src/tensorneat/algorithm/neat/species.py diff --git a/tensorneat/common/__init__.py b/src/tensorneat/common/__init__.py similarity index 100% rename from tensorneat/common/__init__.py rename to src/tensorneat/common/__init__.py diff --git a/tensorneat/common/activation/__init__.py b/src/tensorneat/common/activation/__init__.py similarity index 100% rename from tensorneat/common/activation/__init__.py rename to src/tensorneat/common/activation/__init__.py diff --git a/tensorneat/common/activation/act_jnp.py b/src/tensorneat/common/activation/act_jnp.py similarity index 100% rename from tensorneat/common/activation/act_jnp.py rename to src/tensorneat/common/activation/act_jnp.py diff --git a/tensorneat/common/activation/act_sympy.py b/src/tensorneat/common/activation/act_sympy.py similarity index 100% rename from tensorneat/common/activation/act_sympy.py rename to src/tensorneat/common/activation/act_sympy.py diff --git a/tensorneat/common/aggregation/__init__.py b/src/tensorneat/common/aggregation/__init__.py similarity index 100% rename from tensorneat/common/aggregation/__init__.py rename to src/tensorneat/common/aggregation/__init__.py diff --git a/tensorneat/common/aggregation/agg_jnp.py b/src/tensorneat/common/aggregation/agg_jnp.py similarity index 100% rename from tensorneat/common/aggregation/agg_jnp.py rename to src/tensorneat/common/aggregation/agg_jnp.py diff --git a/tensorneat/common/aggregation/agg_sympy.py b/src/tensorneat/common/aggregation/agg_sympy.py similarity index 100% rename from tensorneat/common/aggregation/agg_sympy.py rename to src/tensorneat/common/aggregation/agg_sympy.py diff --git a/tensorneat/common/graph.py b/src/tensorneat/common/graph.py similarity index 100% rename from tensorneat/common/graph.py rename to src/tensorneat/common/graph.py diff --git a/tensorneat/common/state.py b/src/tensorneat/common/state.py similarity index 100% rename from tensorneat/common/state.py rename to src/tensorneat/common/state.py diff --git a/tensorneat/common/stateful_class.py b/src/tensorneat/common/stateful_class.py similarity index 100% rename from tensorneat/common/stateful_class.py rename to src/tensorneat/common/stateful_class.py diff --git a/tensorneat/common/tools.py b/src/tensorneat/common/tools.py similarity index 100% rename from tensorneat/common/tools.py rename to src/tensorneat/common/tools.py diff --git a/tensorneat/genome/__init__.py b/src/tensorneat/genome/__init__.py similarity index 100% rename from tensorneat/genome/__init__.py rename to src/tensorneat/genome/__init__.py diff --git a/tensorneat/genome/base.py b/src/tensorneat/genome/base.py similarity index 100% rename from tensorneat/genome/base.py rename to src/tensorneat/genome/base.py diff --git a/tensorneat/genome/default.py b/src/tensorneat/genome/default.py similarity index 100% rename from tensorneat/genome/default.py rename to src/tensorneat/genome/default.py diff --git a/tensorneat/genome/gene/__init__.py b/src/tensorneat/genome/gene/__init__.py similarity index 100% rename from tensorneat/genome/gene/__init__.py rename to src/tensorneat/genome/gene/__init__.py diff --git a/tensorneat/genome/gene/base.py b/src/tensorneat/genome/gene/base.py similarity index 100% rename from tensorneat/genome/gene/base.py rename to src/tensorneat/genome/gene/base.py diff --git a/tensorneat/genome/gene/conn/__init__.py b/src/tensorneat/genome/gene/conn/__init__.py similarity index 100% rename from tensorneat/genome/gene/conn/__init__.py rename to src/tensorneat/genome/gene/conn/__init__.py diff --git a/tensorneat/genome/gene/conn/base.py b/src/tensorneat/genome/gene/conn/base.py similarity index 100% rename from tensorneat/genome/gene/conn/base.py rename to src/tensorneat/genome/gene/conn/base.py diff --git a/tensorneat/genome/gene/conn/default.py b/src/tensorneat/genome/gene/conn/default.py similarity index 100% rename from tensorneat/genome/gene/conn/default.py rename to src/tensorneat/genome/gene/conn/default.py diff --git a/tensorneat/genome/gene/node/__init__.py b/src/tensorneat/genome/gene/node/__init__.py similarity index 100% rename from tensorneat/genome/gene/node/__init__.py rename to src/tensorneat/genome/gene/node/__init__.py diff --git a/tensorneat/genome/gene/node/base.py b/src/tensorneat/genome/gene/node/base.py similarity index 100% rename from tensorneat/genome/gene/node/base.py rename to src/tensorneat/genome/gene/node/base.py diff --git a/tensorneat/genome/gene/node/bias.py b/src/tensorneat/genome/gene/node/bias.py similarity index 100% rename from tensorneat/genome/gene/node/bias.py rename to src/tensorneat/genome/gene/node/bias.py diff --git a/tensorneat/genome/gene/node/default.py b/src/tensorneat/genome/gene/node/default.py similarity index 100% rename from tensorneat/genome/gene/node/default.py rename to src/tensorneat/genome/gene/node/default.py diff --git a/tensorneat/genome/operations/__init__.py b/src/tensorneat/genome/operations/__init__.py similarity index 100% rename from tensorneat/genome/operations/__init__.py rename to src/tensorneat/genome/operations/__init__.py diff --git a/tensorneat/genome/operations/crossover/__init__.py b/src/tensorneat/genome/operations/crossover/__init__.py similarity index 100% rename from tensorneat/genome/operations/crossover/__init__.py rename to src/tensorneat/genome/operations/crossover/__init__.py diff --git a/tensorneat/genome/operations/crossover/base.py b/src/tensorneat/genome/operations/crossover/base.py similarity index 100% rename from tensorneat/genome/operations/crossover/base.py rename to src/tensorneat/genome/operations/crossover/base.py diff --git a/tensorneat/genome/operations/crossover/default.py b/src/tensorneat/genome/operations/crossover/default.py similarity index 100% rename from tensorneat/genome/operations/crossover/default.py rename to src/tensorneat/genome/operations/crossover/default.py diff --git a/tensorneat/genome/operations/distance/__init__.py b/src/tensorneat/genome/operations/distance/__init__.py similarity index 100% rename from tensorneat/genome/operations/distance/__init__.py rename to src/tensorneat/genome/operations/distance/__init__.py diff --git a/tensorneat/genome/operations/distance/base.py b/src/tensorneat/genome/operations/distance/base.py similarity index 100% rename from tensorneat/genome/operations/distance/base.py rename to src/tensorneat/genome/operations/distance/base.py diff --git a/tensorneat/genome/operations/distance/default.py b/src/tensorneat/genome/operations/distance/default.py similarity index 100% rename from tensorneat/genome/operations/distance/default.py rename to src/tensorneat/genome/operations/distance/default.py diff --git a/tensorneat/genome/operations/mutation/__init__.py b/src/tensorneat/genome/operations/mutation/__init__.py similarity index 100% rename from tensorneat/genome/operations/mutation/__init__.py rename to src/tensorneat/genome/operations/mutation/__init__.py diff --git a/tensorneat/genome/operations/mutation/base.py b/src/tensorneat/genome/operations/mutation/base.py similarity index 100% rename from tensorneat/genome/operations/mutation/base.py rename to src/tensorneat/genome/operations/mutation/base.py diff --git a/tensorneat/genome/operations/mutation/default.py b/src/tensorneat/genome/operations/mutation/default.py similarity index 100% rename from tensorneat/genome/operations/mutation/default.py rename to src/tensorneat/genome/operations/mutation/default.py diff --git a/tensorneat/genome/recurrent.py b/src/tensorneat/genome/recurrent.py similarity index 100% rename from tensorneat/genome/recurrent.py rename to src/tensorneat/genome/recurrent.py diff --git a/tensorneat/genome/utils.py b/src/tensorneat/genome/utils.py similarity index 100% rename from tensorneat/genome/utils.py rename to src/tensorneat/genome/utils.py diff --git a/tensorneat/pipeline.py b/src/tensorneat/pipeline.py similarity index 100% rename from tensorneat/pipeline.py rename to src/tensorneat/pipeline.py diff --git a/tensorneat/problem/__init__.py b/src/tensorneat/problem/__init__.py similarity index 100% rename from tensorneat/problem/__init__.py rename to src/tensorneat/problem/__init__.py diff --git a/tensorneat/problem/base.py b/src/tensorneat/problem/base.py similarity index 100% rename from tensorneat/problem/base.py rename to src/tensorneat/problem/base.py diff --git a/tensorneat/problem/func_fit/__init__.py b/src/tensorneat/problem/func_fit/__init__.py similarity index 100% rename from tensorneat/problem/func_fit/__init__.py rename to src/tensorneat/problem/func_fit/__init__.py diff --git a/tensorneat/problem/func_fit/custom.py b/src/tensorneat/problem/func_fit/custom.py similarity index 100% rename from tensorneat/problem/func_fit/custom.py rename to src/tensorneat/problem/func_fit/custom.py diff --git a/tensorneat/problem/func_fit/func_fit.py b/src/tensorneat/problem/func_fit/func_fit.py similarity index 100% rename from tensorneat/problem/func_fit/func_fit.py rename to src/tensorneat/problem/func_fit/func_fit.py diff --git a/tensorneat/problem/func_fit/xor.py b/src/tensorneat/problem/func_fit/xor.py similarity index 100% rename from tensorneat/problem/func_fit/xor.py rename to src/tensorneat/problem/func_fit/xor.py diff --git a/tensorneat/problem/func_fit/xor3d.py b/src/tensorneat/problem/func_fit/xor3d.py similarity index 100% rename from tensorneat/problem/func_fit/xor3d.py rename to src/tensorneat/problem/func_fit/xor3d.py diff --git a/tensorneat/problem/rl/__init__.py b/src/tensorneat/problem/rl/__init__.py similarity index 100% rename from tensorneat/problem/rl/__init__.py rename to src/tensorneat/problem/rl/__init__.py diff --git a/tensorneat/problem/rl/brax.py b/src/tensorneat/problem/rl/brax.py similarity index 100% rename from tensorneat/problem/rl/brax.py rename to src/tensorneat/problem/rl/brax.py diff --git a/tensorneat/problem/rl/gymnax.py b/src/tensorneat/problem/rl/gymnax.py similarity index 100% rename from tensorneat/problem/rl/gymnax.py rename to src/tensorneat/problem/rl/gymnax.py diff --git a/tensorneat/problem/rl/rl_jit.py b/src/tensorneat/problem/rl/rl_jit.py similarity index 100% rename from tensorneat/problem/rl/rl_jit.py rename to src/tensorneat/problem/rl/rl_jit.py