ying-wen / malib_deprecated

A Multi-agent Learning Framework
MIT License
62 stars 16 forks source link

Environment Useful Error + Tests #17

Closed Phutoast closed 5 years ago

Phutoast commented 5 years ago

For most of the environments, to check for the configuration, there are mostly an assert statements, which checks whether we can create environment out of specified configuration.

It would be better to have explicit error/exception signal, rather than assert, so that it would be more useful for users. The example change would be

if self.agent_num == 2:
    raise WrongAgentNumberException("The agent number for game: penalty, should be 2")

And normally, there should be a test associated with it

Phutoast commented 5 years ago

The Environment Name Error is Finished in commit 747261e

Phutoast commented 5 years ago

The Environment Number Agent, Number Action, Number State Error is Finished in commit e5b04be

Phutoast commented 5 years ago

Number of Action Error in 765c9f8