Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to redefine agents #907

Closed
Tortar opened this issue Oct 10, 2023 · 4 comments
Closed

Make it possible to redefine agents #907

Tortar opened this issue Oct 10, 2023 · 4 comments
Labels
agent-construction About making agents hard quality of life QoL enhancements that make user experience smoother

Comments

@Tortar
Copy link
Member

Tortar commented Oct 10, 2023

Problem mentioned more than one time in #884 e,g, #884 (comment)

Didn't know about that but there are actually two packages for this!!

https://github.com/BeastyBlacksmith/ProtoStructs.jl and https://github.com/FedericoStra/RedefStructs.jl

@Tortar Tortar added quality of life QoL enhancements that make user experience smoother agent-construction About making agents labels Oct 10, 2023
@Tortar Tortar modified the milestone: v6.0 Oct 10, 2023
@Tortar
Copy link
Member Author

Tortar commented Oct 10, 2023

Still these packages are in early dev and they need some more work to be fully usable with the agent macro. Will try to work on that

@Datseris Datseris added the hard label Oct 11, 2023
@Datseris
Copy link
Member

Just a comment: Generally speaking one should not try too hard to "hack-away" fundamental limitations of the language in used packages. The simpler the package, the better. The design of Agents.jl has always been "basic Julia structures is all you need". The @agent macro goes beyond basic Julia by providing field inheritance, but we should be careful to not go too far. This doesn't mean that we shouldn't try to make agent types redefinable, but we also should be careful. Weight the pros and cons, and departing from the core language is a con with deep impact.

@Tortar
Copy link
Member Author

Tortar commented Oct 11, 2023

This shoudn't be done inside Agents.jl itself for sure. Talking about ProtoStructs.jl since it seems a bit better than the other: the proto macro is just a development experience improvement which should be just mentioned in the docs somewhere so that if the user wants to apply that to the agent macro when developing it is possible to do so (the macro should be deleted when the work is finished since I think it creates performance issues). But before these two issues must be resolved BeastyBlacksmith/ProtoStructs.jl#16 and BeastyBlacksmith/ProtoStructs.jl#15 for full compatibility.

@Tortar
Copy link
Member Author

Tortar commented Dec 29, 2023

I thought about this a bit, and unfortunately...I guess we will leave this issue to Julia devs.

Including the proto macro in this repo could have some severe disadvantage and don't integrate too well, at least I improved this macro quite a bit in this journey :D

@Tortar Tortar closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-construction About making agents hard quality of life QoL enhancements that make user experience smoother
Projects
None yet
Development

No branches or pull requests

2 participants