{"id":18525167,"url":"https://github.com/phylliade/vinci","last_synced_at":"2025-04-10T04:13:13.578Z","repository":{"id":62587511,"uuid":"99590692","full_name":"Phylliade/vinci","owner":"Phylliade","description":" A generic, easy to use, and keras-compatible deep RL framework ","archived":false,"fork":false,"pushed_at":"2017-11-21T16:17:54.000Z","size":9275,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T05:34:50.237Z","etag":null,"topics":["ddpg","deep-reinforcement-learning","keras","openai-gym","tensorflow","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Phylliade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-07T15:07:55.000Z","updated_at":"2019-04-19T13:08:02.000Z","dependencies_parsed_at":"2022-11-03T20:22:48.065Z","dependency_job_id":null,"html_url":"https://github.com/Phylliade/vinci","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phylliade%2Fvinci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phylliade%2Fvinci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phylliade%2Fvinci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Phylliade%2Fvinci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Phylliade","download_url":"https://codeload.github.com/Phylliade/vinci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154996,"owners_count":21056543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ddpg","deep-reinforcement-learning","keras","openai-gym","tensorflow","visualization"],"created_at":"2024-11-06T17:44:38.843Z","updated_at":"2025-04-10T04:13:13.555Z","avatar_url":"https://github.com/Phylliade.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vinci\n\n[![Build Status](https://travis-ci.org/Phylliade/vinci.svg?branch=master)](https://travis-ci.org/Phylliade/vinci)\n[![Documentation Status](http://readthedocs.org/projects/vinci/badge/?version=latest)](http://vinci.readthedocs.io/en/latest/?badge=latest)\n[![PyPI](https://img.shields.io/pypi/v/vinci.svg)](https://pypi.python.org/pypi/vinci/)\n[![Python versions](https://img.shields.io/pypi/pyversions/vinci/.svg)](https://pypi.python.org/pypi/vinci/)\n\nThis is a generic, easy to use, and keras-compatible deep RL framework.\n\nIt began as a fork of [keras-rl](https://github.com/matthiasplappert/keras-rl) but is now a separated project.\n\n# Features\n\n* Define your Deep Nets using Keras\n* Simulate on the OpenAI Gym Environments\n* Easy to implement a new algorithm, using a well-defined API\n* Advanced training capabilities: Offline training, critic-only (or actor-only) training...\n* Easy logging : Tensorboard, Terminal...\n\nHere's an example of the evolution of the policy during learning on the ContinuousMountainCar environment:\n\n![](assets/animation.gif)\n\n# Documentation\nAn online documentation can be found at:\n\nhttp://vinci.readthedocs.io/en/latest/\n\n# Installation\nRun :\n```\npip install  git+ssh://git@github.com/Phylliade/vinci.git\n```\n\n# Creating the Deep Networks with Keras\nVinci is designed to seamlessy use Keras's networks.\nYou can design your networks as always, using the Sequential or Functional API.\n\n\n## Environment-agnostic networks\nVinci also adds some utilities to make the network creation **environment agnostic**, which can be nice!\n\nTo do this, the `env` object (a wrapper around a gym env, of type `rl.EnvWrapper`) provides different utilities, depending if you're using the Sequential or Functional APIs.\n\n### Using the functional API\nYou just have to design your Keras model using the functional API and the `state` and `action` placeholders  of the `env` object.\n\nFor example, for a simple critic:\n```python\n# Inputs\nobservation = env.state\naction = env.action\n# Concatenate the inputs for the critic\ninputs = concatenate([observation, action])\n\n# Hidden layer\nx = Dense(100)(inputs)\nx = Activation('relu')(x)\n\n# Output layer\nx = Dense(1)(x)\nx = Activation('linear')(x)\n\n# Final model\ncritic = Model(inputs=[observation, action], outputs=[x])\n```\n\n### Using the Sequential API\nSince you have to specify the input shapes by hand, you can use the `state_space_dim` and `action_space_dim` attributes of the EnvWrapper.\n\nFor example of an actor:\n```python\nactor = Sequential()\n\n# Hidden layers\nactor.add(Dense(400, input_shape=(env.state_space_dim,)))\nactor.add(Activation(\"relu\"))\nactor.add(Dense(300))\nactor.add(Activation(\"relu\"))\n\n# Output layer\nactor.add(Dense(env.action_space_dim, activation=\"tanh\"))\n```\n\n## Efficiency of Keras models\nInternally, Keras models are used in a functional fashion:\n\n```\nout = keras_model(in)\n```\n\nSome may wonder about some potential leaks with this usage, and they're right!\nWith a traditional function, each time `keras_model(in)` is called, a new `Tensor` is created (and every underlying ops) and added to the Graph.\n\nBut, Keras uses a cache for the computations, so each call to `keras_model(in)` always results in the same variable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphylliade%2Fvinci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphylliade%2Fvinci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphylliade%2Fvinci/lists"}