Learning a Inventory Management System