include("VariationalLearning.jl")
using .VariationalLearning
Bric-a-brac
A compendium of sundry miscellanea.
plot_birds_fixed.jl – A Julia Plots recipe, used to plot birds in the homework Making birds fly
VariationalLearning.jl – A Julia module that defines the
VariationalLearner
type and some functions to deal with such learners. See, in particular, this homework solution. To use this, execute the following (don’t forget the dot before the module name, as this is a local module):GridVL.jl – A Julia module that implements a
VariationalLearner
on a grid space in Agents.jl. To use:include("GridVL.jl") using .GridVL
If Julia complains about an “invalid redefinition of type VariationalLearner”, this is because you have the older (non-spatial) type in memory. Exit your Julia session (or VSCode) and try again. Once the module has been successfully loaded, you can run the commands in the lecture on structured populations.
VL.jl – Updated version of our variational learning module. Defines
VariationalLearner
as an abstract type, plus two non-abstract daughter types,SimpleVL
(corresponding to our old variational learning code) andGridVL
(a variational learner on a 2D grid). Load like this:include("VL.jl") using .VL
If VSCode gives you module-related troubles, delete the first and last lines of the file
VL.jl
and load it using just:include("VL.jl")
VL2.jl – Yet again updated version of our variational learning module. Defines a
NetworkVL
type, a variational learner that occupies the node of a graph.