This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.11.14 | |
using Markdown | |
using InteractiveUtils | |
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). | |
macro bind(def, element) | |
quote | |
local el = $(esc(element)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.11.12 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ a8657c36-f1b1-11ea-2d91-ffd1be275a14 | |
begin | |
using WGLMakie | |
using AbstractPlotting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.11.12 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 6b2d70e0-f0c0-11ea-11b1-452aa45f043d | |
using WGLMakie, AbstractPlotting, JSServe, Colors | |
# ╔═╡ ce3effa2-f0c1-11ea-1dc5-6fb4da9951c0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.11.12 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ acb74b48-edc4-11ea-12eb-d9193f5ab64f | |
using Plots | |
# ╔═╡ b2c05e44-edc4-11ea-356f-c1042b919836 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.11.10 | |
using Markdown | |
using InteractiveUtils | |
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). | |
macro bind(def, element) | |
quote | |
local el = $(esc(element)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here I store more data as I go, | |
# which I could use to plot figures comparing methods | |
# the convergence speed of different methods | |
# I use the Rosenbrock classic example and | |
# Optim.jl as an iterative process which will | |
# call f multiple times to find its minimum | |
# and I plot the convergence vs time | |
using Optim, Cassette |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just trying stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AbstractPlotting | |
using MakieLayout | |
using GLMakie; GLMakie.activate!() | |
GLMakie.GLFW.WindowHint(GLMakie.GLFW.FLOATING, 1) | |
using LinearAlgebra | |
## | |
scene = Scene(center = false, raw = true, resolution = (800, 800)) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NEIGHBORS_MAP = { | |
0: (0, 0, 0, 0, 1, 0, 1, 0, 0, 0), | |
1: (0, 0, 0, 0, 0, 0, 1, 0, 1, 0), | |
2: (0, 0, 0, 0, 0, 0, 0, 1, 0, 1), | |
3: (0, 0, 0, 0, 1, 0, 0, 0, 1, 0), | |
4: (1, 0, 0, 1, 0, 0, 0, 0, 0, 1), | |
5: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0), | |
6: (1, 1, 0, 0, 0, 0, 0, 1, 0, 0), | |
7: (0, 0, 1, 0, 0, 0, 1, 0, 0, 0), | |
8: (0, 1, 0, 1, 0, 0, 0, 0, 0 ,0), |