Giter VIP home page Giter VIP logo

nde_foraging's Introduction

NDE Foraging

This repository supplements our paper "A Dynamical Systems Approach to Optimal Foraging"
License: MIT
Alt Text

Overview

This repository contains code for the 3 experiments presented in the paper. It is developed using the JAX ecosystem

  • Experiment 1 highlights the learning process involved in adaptive patch foraging and analysis of the learned agent at various stages of training.
  • Experiment 2 presents an analysis of evidence accumulation mechanism observed in the adaptive agent.
  • Experiment 3 presents an analysis of change in average patch residing time of the adaptive agent with respect to change in growth rate of the resources in the environment.
  • Experiment 4 shows how the setup can be extended to nosiy setup like noise in observations.
  • Experiment 5 shows how the setup can be extended to nosiy setup like multi-agent setups.

Requirements

In order to run the code following requirements must be satisfied.

File structure

This repository is stuctured as follows

  • source
    • exp_1_basic_foraging: directory for Experiment 1.
      • main.py: A Python script that executes the learning process for different seeds.
      • plot_values.ipynb: An IPython notebook to plot the loss curve.
      • analysis.ipynb: An IPython notebook to observe the behaviour of agent at various stages of training.
      • render.py: A Python Script to render the learned agent.
    • exp_2_evidence_accumulation: directory for Experiment 2.
      • evidence.ipynb: An IPython notebook to analyse the neuronal dynamics of the learned agent.
    • exp_3_diff_growth_rate: directory for Experiment 3.
      • growth_rate_08f.py: A Python file for learning in the environment having growth rate of 0.08.
      • growth_rate_10f.py: A Python file for learning in the environment having growth rate of 0.1.
      • growth_rate_12f.py: A Python file for learning in the environment having growth rate of 0.12.
      • growth_rate_time_analysis.ipynb: An IPython notebook to sample and compare average patch residing time for agent trajectories in the 3 environemts.
      • avg_growth_rate_plt.ipynb: An IPython notebook to plot the average patch residing time across the 3 environments for the first 3 patch visits.
    • exp_4_noise: directory for Experiment 4.
      • min.py: A python file that executes learning process for noisy setup for different seeds.
      • render.py: A Python script to render the learned agents.
      • plot.ipynb: An IPython notebook to plot different performance criteria for comparison.
    • exp_5_multi_Agent: directory for Experiment 5.
      • main_g_01.py: A Python script for learning in an environemt where growth rate of both resources is 0.1.
      • main_g_03.py: A Python script for learning in an environemt where growth rate of the first resource is 0.1 and second resource is 0.3
      • main_g_10.py: A Python script for learning in an environemt where growth rate of the first resource is 0.1 and second resource is 1.0
      • render.py: A Python script for rendering the multi-agent setup
      • infer.ipynb: An IPython notebook to plot relevant trends of the experiment.

Acknowledgements

This software is part of the project Dutch Brain Interface Initiative (DBI2) with project number 024.005.022 of the research programme Gravitation which is (partly) financed by the Dutch Research Council (NWO).

Citation

For citing this work you can cite the paper

@article {Chaturvedi2024.01.20.576399,
	author = {Siddharth Chaturvedi and Ahmed ElGazzar and Marcel van Gerven},
	title = {A Dynamical Systems Approach to Optimal Foraging},
	elocation-id = {2024.01.20.576399},
	year = {2024},
	doi = {10.1101/2024.01.20.576399},
	publisher = {Cold Spring Harbor Laboratory},
	URL = {https://www.biorxiv.org/content/early/2024/01/22/2024.01.20.576399},
	eprint = {https://www.biorxiv.org/content/early/2024/01/22/2024.01.20.576399.full.pdf},
	journal = {bioRxiv}
}

nde_foraging's People

Contributors

i-m-iron-man avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.