UFRN-URNAI / urnai-tools

A modular Deep Reinforcement Learning library that supports multiple environments, made with Python 3.6.
Apache License 2.0
5 stars 8 forks source link

Create base classes for Action #67

Closed alvarofpp closed 3 months ago

alvarofpp commented 9 months ago

We should have a base class for developing agent actions, these would be the micro-actions. In addition, we need a class for collecting actions, these would be macro-actions. These classes need to have methods that make it possible to know whether or not it is possible to perform that action.

Suggestions:

Notes:

CinquilCinquil commented 6 months ago

Hello, i would like some help on this issue. I dont know exactly where to go from here, should i add methods, like the ones i commented on the code, for all possible actions of a SC2 player?

alvarofpp commented 6 months ago

For this issue, what you need to do is create abstract classes that will be used to create the classes of the action or set of actions. Defining methods and attributes is up to you. You can sketch something out, up the code and we can discuss your approach.

CinquilCinquil commented 6 months ago

I thought the methods from here suited the task, so i distributed them between the 2 files (with a few modifications). What do you think?

alvarofpp commented 6 months ago

The file you mentioned refers to #68 and not to the issue we're discussing.

alvarofpp commented 6 months ago

Try to think about what is necessary for an Action. In my case, I think that an Action requires an identifier (maybe self.id), a condition to occur (maybe self.check()) and a method to execute it (maybe self.run()). Try to think about the Action and a set of Actions.

CinquilCinquil commented 6 months ago

Hey! Just commenting in case you did not receive a notification for those 2 commits. I'm wating to see if they have any problems.

alvarofpp commented 6 months ago

Hey @CinquilCinquil, if possible open a PR, it's better to see your changes there than commit by commit.