mluogh / eastworld

Framework for Generative Agents in Games
Apache License 2.0
188 stars 17 forks source link

New feature: add option to define attributes for playable characters #10

Open AlexBerlo opened 10 months ago

AlexBerlo commented 10 months ago

Hello !

I've been playing a bit with eastworld. Its amazing and it works great ! For my use case I'd like to have attributes for playable characters ( e.g. constitution, intelligence ) and to be able to define behaviours for agents based on those attributes. For example if you have low constitution the agent will be less likely to be intimidated by you. ( similar to attribute checks in d&d ) The attributes could be defined for playable characters in the "eastworlds agent" react client and there could also be an endpoint available so they could be updated in real time from the actual game ( e.g. based on a player action we increase his constitution temporarily and then it will be more likely for the agents to be intimidated by him ). For non playable agents it might suffice to just add the attribute behaviours to "agent instructions", the data that is send to the llm would also need to be updated in order for it to include player attributes.

Is this something planned for implementation ? If not I could try to implement it.

Thanks

mluogh commented 10 months ago

For non playable agents it might suffice to just add the attribute behaviours to "agent instructions", the data that is send to the llm would also need to be updated in order for it to include player attributes.

How would you expect to define what changes in the agents? If "Constitution" was an attribute from 1-10, how would the instructions to the agent change depending on the value? Would you define it yourself?

AlexBerlo commented 10 months ago

Yes, for example if player constitution is below 5 act hostile towards the player. If player constitution is above 5 and player asks for something give it to him ( e.g . call GiveAnswer() )

mluogh commented 9 months ago

Hmm, that seems like something more specific to a particular game. It's possible to do this already with Conversation instructions and custom actions. Not sure that it should be a part of the framework.