facebookresearch / EGG

EGG: Emergence of lanGuage in Games
MIT License
281 stars 99 forks source link

Is signal game with variable message length possible? #253

Open leonl42 opened 1 year ago

leonl42 commented 1 year ago

I was wondering if there is an easy way to do the Single Symbol Game with RNN's and variable message length. It seems like the wrappers only support Single Symbol communication. I furthermore think the object_game example cant be used for this (at least straightforwardly), because it expects an integer tensor and not an embedding.

Is a Variable message length symbol game really not implemented (or straightforwardly possible) or am I missing something. Thanks :)

robertodessi commented 1 year ago

Hi @leonl42,

I'm not sure I fully understood. The Single Symbol game assumes the Sender can send only symbol, which is contrast with variable length communication. What would you want to do exactly? :)

leonl42 commented 1 year ago

Hi @robertodessi,

Thanks for the quick reply. I want to play the Symbol game with variable message length. The question is, is this possible with EGG? Or does EGG only support the Single Symbol game?

robertodessi commented 1 year ago

Hi,

What do you mean exactly with Symbol game? In EGG the symbol Game is a wrapper for single symbol communication games, see here.

If you want to have a variable communication game, either with reinforce or gumbel, you should use either this or this wrapper. These use recurrent networks to generate a message and you could also set message lengths to 1 if you need.

Hope this clarifies and feel free to let me know if you need anything else

leonl42 commented 1 year ago

Hey thanks again,

I dont know how, but I just realized I got the name wrong :D. I meant the signal game. So youve Implemented the Signal game as a Single Symbol game. But is it possible to play the Signal game with variable message length. Sorry for the confusion. (I just realized, its called Signal game but the wrapper is called SymbolGame so I guess you can say both)

Best regards

Shubham0209 commented 1 year ago

@leonl42 Follow this tutorial. It will clear your doubts: https://github.com/facebookresearch/EGG/blob/main/tutorials/EGG%20walkthrough%20with%20a%20MNIST%20autoencoder.ipynb

robertodessi commented 1 year ago

Hey @leonl42, yes it is possible and ti should be a matter of changing the SymbolGame to an RNN based one and choose the wrappers accordingly. Thanks @Shubham0209 for pointing the tutorial! That should indeed clarify things. Do let me know if you have any problems going through the tutorial