hpi-epic / BP2021

Working repository in context of the bachelor project "Online Marketplace Simulation: A Testbed for Self-Learning Agents" at the research group Enterprise Platform and Integration Concepts
MIT License
3 stars 0 forks source link

[vendors] Check off-by-one #354

Open jannikgro opened 2 years ago

jannikgro commented 2 years ago

We don't know if we have an off-by-one-error in our policy and market functions. Check that and define our solution.

Edit: (investigated by @SinNeax) Since the RLAgents determine/randomly choose a price between 0 and config.maxprice - 1, we needed to increment the opponents price in CompetitorLinearRatio1 so that we don't get a divided by zero error.

https://github.com/hpi-epic/BP2021/blob/2535ba00d9ba99405d6874207e923f6f4400701b/recommerce/market/linear/linear_vendors.py#L33-L48

That could be the only off-by-one error because all of the other vendors never recognize the opponents' prices with an increment.

NikkelM commented 2 years ago

Is this a duplicate of #147 ?

nick-bessin commented 2 years ago

We should examine whether the _access_and_adjust_policy method don't need to return the incremented policy_value.

https://github.com/hpi-epic/BP2021/blob/2535ba00d9ba99405d6874207e923f6f4400701b/recommerce/monitoring/policyanalyzer.py#L43-L46