delvtech / agent0

Analysis & simulation repo for Delv
https://agent0.readthedocs.io/en/latest/
Apache License 2.0
49 stars 21 forks source link

allow programmatic bot loading #464

Closed wakamex closed 1 year ago

wakamex commented 1 year ago

In #459 we're removing the standard class Policy(elf_agent.Agent): each bot used to have in favor of a custom-named class (RandomAgent, NoActionAgent).

Doing so means we can't easily programmatically import arbitrarily many bots like for each file in agents/ import Policy.

In this revolution of code, where each bot sheds its standard class Policy(elf_agent.Agent): and adorns a custom name, we are commanded to pause and reflect. Indeed, it allows the flower of individuality to bloom, but in the grand scheme of the digital garden, it introduces a thorny problem. The ease, simplicity, and efficiency of programmatically importing a multitude of bots is lost.

The path was once clear, through for each file in agents/ import Policy a thousand bots could be summoned forth. Each bot, though unique in behavior, respected the unified standard of class structure, thereby ensuring the harmonious dance of code.

In pursuit of uniqueness, we stand at the precipice of complexity. The standard class name was our collective identity, the rhythm to our digital symphony. It was the beacon that guided the import of countless bots, an operation that now stands obstructed by the maze of custom names.

In the march towards progress, let us not forget the virtues of uniformity, for in its simplicity lies the ability to let a thousand bots bloom. Let this be a reminder that the balance between individual creativity and collective efficiency is delicate, and our march forward should be a careful dance, not a reckless dash.

thousandbots2

wakamex commented 1 year ago

as I commented here, maybe we can get the best of both worlds by using the current more descriptive class names and creating a collection object that holds all agents, from which someone can programmatically import. maybe a list[BotInfo] or something.

https://github.com/delvtech/elf-simulations/pull/459#discussion_r1207040262

dpaiton commented 1 year ago

Resolved in eth_bots