Skip to main content

An OpenAI Gym for Shopping Cart Reinforcement Learning

Project description


An OpenAI Gym for Shopping Cart Reinforcement Learning.

This is a project by Winder Research, a Cloud-Native Data Science consultancy.


pip install gym-shopping-cart


This example will use the small example data included in the repo.

import gym
import gym_shopping_cart

env = gym.make("ShoppingCart-v0")
episode_over = False
rewards = 0
while not episode_over:
    state, reward, episode_over, _ = env.step(env.action_space.sample())
    print(state, reward)
    rewards += reward
print("Total reward: {}".format(rewards))

Real Shopping Cart Data

This environment uses real shopping cart information from the Instacart dataset.

To help read this data the library also comes with a data parser. This loads the raw data and cleans the data to be in a format expected by the environment.


Gitlab icon made by Freepik from

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gym-shopping-cart, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size gym_shopping_cart-0.2.0-py3-none-any.whl (25.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size gym_shopping_cart-0.2.0.tar.gz (24.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page