1
0
Fork 0
mirror of https://gitlab.rlp.net/mobitar/ReCo.jl.git synced 2024-11-08 22:21:08 +00:00

Fix OriginEnv

This commit is contained in:
Mo8it 2022-01-29 17:39:31 +01:00
parent d568964eb4
commit c6a9d45e4a
3 changed files with 33 additions and 38 deletions

View file

@ -102,9 +102,9 @@ version = "0.10.2"
[[deps.CUDA]]
deps = ["AbstractFFTs", "Adapt", "BFloat16s", "CEnum", "CompilerSupportLibraries_jll", "ExprTools", "GPUArrays", "GPUCompiler", "LLVM", "LazyArtifacts", "Libdl", "LinearAlgebra", "Logging", "Printf", "Random", "Random123", "RandomNumbers", "Reexport", "Requires", "SparseArrays", "SpecialFunctions", "TimerOutputs"]
git-tree-sha1 = "3eb49a30d6093dfb6cd60ea66ff681a7db87178a"
git-tree-sha1 = "7405a853ebba81936827459bfe30608bbce7371e"
uuid = "052768ef-5323-5732-b1bb-66c8b64840ba"
version = "3.7.1"
version = "3.8.0"
[[deps.Cairo]]
deps = ["Cairo_jll", "Colors", "Glib_jll", "Graphics", "Libdl", "Pango_jll"]
@ -114,9 +114,9 @@ version = "1.0.5"
[[deps.CairoMakie]]
deps = ["Base64", "Cairo", "Colors", "FFTW", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "SHA", "StaticArrays"]
git-tree-sha1 = "c5c1397a0df375fda6fc20a54c5610c96ad71cf5"
git-tree-sha1 = "90fe6622efbb627e7c962e9bd6f5c4228680b7ca"
uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
version = "0.7.1"
version = "0.7.2"
[[deps.Cairo_jll]]
deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
@ -138,9 +138,9 @@ version = "1.25.0"
[[deps.ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "54fc4400de6e5c3e27be6047da2ef6ba355511f8"
git-tree-sha1 = "f9982ef575e19b0e5c7a98c6e75ee496c0f73a93"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.11.6"
version = "1.12.0"
[[deps.ChangesOfVariables]]
deps = ["ChainRulesCore", "LinearAlgebra", "Test"]
@ -283,10 +283,10 @@ uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
version = "1.0.3"
[[deps.DiffRules]]
deps = ["LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"]
git-tree-sha1 = "9bc5dac3c8b6706b58ad5ce24cffd9861f07c94f"
deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"]
git-tree-sha1 = "84083a5136b6abf426174a58325ffd159dd6d94f"
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
version = "1.9.0"
version = "1.9.1"
[[deps.Distributed]]
deps = ["Random", "Serialization", "Sockets"]
@ -294,9 +294,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[deps.Distributions]]
deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"]
git-tree-sha1 = "5863b0b10512ed4add2b5ec07e335dc6121065a5"
git-tree-sha1 = "0c8693f37a265b6c0e552861cad8bf4b13d65686"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.25.41"
version = "0.25.42"
[[deps.DocStringExtensions]]
deps = ["LibGit2"]
@ -393,9 +393,9 @@ version = "0.2.10"
[[deps.Flux]]
deps = ["AbstractTrees", "Adapt", "ArrayInterface", "CUDA", "CodecZlib", "Colors", "DelimitedFiles", "Functors", "Juno", "LinearAlgebra", "MacroTools", "NNlib", "NNlibCUDA", "Pkg", "Printf", "Random", "Reexport", "SHA", "SparseArrays", "Statistics", "StatsBase", "Test", "ZipFile", "Zygote"]
git-tree-sha1 = "e8b37bb43c01eed0418821d1f9d20eca5ba6ab21"
git-tree-sha1 = "983271b47332fd3d9488d6f2d724570290971794"
uuid = "587475ba-b771-5e3f-ad9e-33799f191a9c"
version = "0.12.8"
version = "0.12.9"
[[deps.Fontconfig_jll]]
deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"]
@ -462,9 +462,9 @@ version = "3.3.5+1"
[[deps.GLMakie]]
deps = ["ColorTypes", "Colors", "FileIO", "FixedPointNumbers", "FreeTypeAbstraction", "GLFW", "GeometryBasics", "LinearAlgebra", "Makie", "Markdown", "MeshIO", "ModernGL", "Observables", "Printf", "Serialization", "ShaderAbstractions", "StaticArrays"]
git-tree-sha1 = "80911d92073981c791434da418952c517022b4b5"
git-tree-sha1 = "b69044d453d377f616227ce0baa50995979cbacc"
uuid = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
version = "0.5.1"
version = "0.5.2"
[[deps.GPUArrays]]
deps = ["Adapt", "LLVM", "LinearAlgebra", "Printf", "Random", "Serialization", "Statistics"]
@ -602,9 +602,9 @@ version = "0.1.2"
[[deps.InlineStrings]]
deps = ["Parsers"]
git-tree-sha1 = "8d70835a3759cdd75881426fced1508bb7b7e1b6"
git-tree-sha1 = "61feba885fac3a407465726d0c330b3055df897f"
uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48"
version = "1.1.1"
version = "1.1.2"
[[deps.IntelOpenMP_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
@ -668,9 +668,9 @@ version = "1.0.0"
[[deps.JLD2]]
deps = ["DataStructures", "FileIO", "MacroTools", "Mmap", "Pkg", "Printf", "Reexport", "TranscodingStreams", "UUIDs"]
git-tree-sha1 = "39f22411266cdd1621092c762a3f0648dbdc8433"
git-tree-sha1 = "bcb31db46795eeb64480c89d854615bc78a13289"
uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
version = "0.4.18"
version = "0.4.19"
[[deps.JLLWrappers]]
deps = ["Preferences"]
@ -871,9 +871,9 @@ version = "0.5.9"
[[deps.Makie]]
deps = ["Animations", "Base64", "ColorBrewer", "ColorSchemes", "ColorTypes", "Colors", "Contour", "Distributions", "DocStringExtensions", "FFMPEG", "FileIO", "FixedPointNumbers", "Formatting", "FreeType", "FreeTypeAbstraction", "GeometryBasics", "GridLayoutBase", "ImageIO", "IntervalSets", "Isoband", "KernelDensity", "LaTeXStrings", "LinearAlgebra", "MakieCore", "Markdown", "Match", "MathTeXEngine", "Observables", "OffsetArrays", "Packing", "PlotUtils", "PolygonOps", "Printf", "Random", "RelocatableFolders", "Serialization", "Showoff", "SignedDistanceFields", "SparseArrays", "StaticArrays", "Statistics", "StatsBase", "StatsFuns", "StructArrays", "UnicodeFun"]
git-tree-sha1 = "8222fe4310820801c6590256b0df7f83bfa78c1a"
git-tree-sha1 = "0aafd5121c6e1b6a83bd3bb341da45f058225a9b"
uuid = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
version = "0.16.2"
version = "0.16.3"
[[deps.MakieCore]]
deps = ["Observables"]
@ -960,20 +960,20 @@ uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
[[deps.NNlib]]
deps = ["Adapt", "ChainRulesCore", "Compat", "LinearAlgebra", "Pkg", "Requires", "Statistics"]
git-tree-sha1 = "3a8dfd0cfb5bb3b82d09949e14423409b9334acb"
git-tree-sha1 = "0b9f48ee4a793ae1d2c766093e9f45f405de6231"
uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
version = "0.7.34"
version = "0.8.0"
[[deps.NNlibCUDA]]
deps = ["CUDA", "LinearAlgebra", "NNlib", "Random", "Statistics"]
git-tree-sha1 = "a2dc748c9f6615197b6b97c10bcce829830574c9"
git-tree-sha1 = "adb43860f6371f42fb42d1d792c5d0d2f4cbc716"
uuid = "a00861dc-f156-4864-bf3c-e6376f28a68d"
version = "0.1.11"
version = "0.2.0"
[[deps.NaNMath]]
git-tree-sha1 = "f755f36b19a5116bb580de457cda0c140153f283"
git-tree-sha1 = "b086b7ea07f8e38cf122f5016af580881ac914fe"
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
version = "0.3.6"
version = "0.3.7"
[[deps.Netpbm]]
deps = ["FileIO", "ImageCore"]
@ -1088,9 +1088,9 @@ version = "0.12.3"
[[deps.Parsers]]
deps = ["Dates"]
git-tree-sha1 = "92f91ba9e5941fc781fecf5494ac1da87bdac775"
git-tree-sha1 = "0b5cfbb704034b5b4c1869e36634438a047df065"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.2.0"
version = "2.2.1"
[[deps.Pixman_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
@ -1522,9 +1522,9 @@ version = "2.7.0"
[[deps.VectorizationBase]]
deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "Hwloc", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static"]
git-tree-sha1 = "6e261bff5c9f2537776165dea3067df9de4440cf"
git-tree-sha1 = "e9a35d501b24c127af57ca5228bcfb806eda7507"
uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
version = "0.21.23"
version = "0.21.24"
[[deps.Wayland_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"]

View file

@ -42,12 +42,7 @@ mutable struct OriginEnvHelper <: EnvHelper
function OriginEnvHelper(shared::EnvHelperSharedProps, half_box_len::Float64)
max_distance_to_origin = sqrt(2) * half_box_len
return new(
shared,
fill(SVector(0.0, 0.0), shared.n_particles),
max_distance_to_origin,
half_box_len,
)
return new(shared, zeros(shared.n_particles), max_distance_to_origin, half_box_len)
end
end

View file

@ -1,7 +1,7 @@
module ReCo
export init_sim,
run_sim, run_rl, animate, plot_snapshot, LocalCOMWithAdditionalShapeRewardEnv
run_sim, run_rl, animate, plot_snapshot, LocalCOMWithAdditionalShapeRewardEnv, OriginEnv
using StaticArrays: SVector
using JLD2: JLD2