Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to restrict being selected scenarios in craigslistbargain #54

Closed
Mocchaso opened this issue Dec 14, 2018 · 3 comments
Closed

How to restrict being selected scenarios in craigslistbargain #54

Mocchaso opened this issue Dec 14, 2018 · 3 comments

Comments

@Mocchaso
Copy link

I'd like to select only the scenario that rulebased is the seller and human is the buyer.
However, I can't understand how to do this.

What should I change in craigslistbargain to restrict being selected scenarios?

@hhexiy
Copy link
Collaborator

hhexiy commented Dec 14, 2018

scenarios are separated from the agents. when you build the session, you can check if kb.role == 'seller' and give that kb to the rulebased seller.

@Mocchaso
Copy link
Author

Thank you for commenting.

I could restrict a scenario to rulebased is seller.

The following error occurred, but I guess that this is no problem because this error occurs when the selected scenario is not rulebased: seller.
Furthermore, backend.py select a scenario until being selected a scenario of rulebased: seller.

Is my thought correct...?

cocoa_src/cocoa/web/main/backend.py, in line 320
  config = bot_session.config
AttributeError: 'NoneType' object has no attribute 'config'

@hhexiy
Copy link
Collaborator

hhexiy commented Oct 25, 2019

Hmm. I'm not sure that I fully understand your thoughts. But what I was suggesting is that you don't have to change the backend (i.e. scenario loading), you can directly set the agents accordingly when you build the session. The scenario itself does not specify who's the seller and who's the buyer.

@hhexiy hhexiy closed this as completed Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants