Skip to content

Commit

Permalink
Merge branch 'release/1.2.36'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bam4d committed Feb 22, 2022
2 parents b9b9b3b + f0347a0 commit 5d76b3b
Show file tree
Hide file tree
Showing 172 changed files with 3,828 additions and 3,085 deletions.
8 changes: 4 additions & 4 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Checks: "*,-fuchsia-*,-google-*,-zircon-*,-abseil-*,-modernize-use-trailing-return-type,-llvm-*,-llvmlibc-*,-altera-struct-pack-align*"
WarningsAsErrors: "*"
HeaderFilterRegex: ""
FormatStyle: none
Checks: "modernize-*,-clang*,-android-*,-fuchsia-*,-google-*,-zircon-*,-abseil-*,-modernize-use-trailing-return-type,-llvm-*,-llvmlibc-*,-altera-struct-pack-align*"
WarningsAsErrors: ""
HeaderFilterRegex: "Griddly/Core/.*hpp"
FormatStyle: "{ BasedOnStyle: Google, ColumnLimit: 0 }"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. mac/linux/windows]
- Version [e.g. 1.2.35]
- Version [e.g. 1.2.36]

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.0)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version")
project(Griddly VERSION 1.2.35)
project(Griddly VERSION 1.2.36)

set(BINARY ${CMAKE_PROJECT_NAME})

Expand Down
2 changes: 1 addition & 1 deletion bindings/python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace griddly {

PYBIND11_MODULE(python_griddly, m) {
m.doc() = "Griddly python bindings";
m.attr("version") = "1.2.35";
m.attr("version") = "1.2.36";

#ifndef NDEBUG
spdlog::set_level(spdlog::level::debug);
Expand Down
2 changes: 1 addition & 1 deletion bindings/wrapper/GDYWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Py_GDYWrapper {
}

py::dict getActionInputMappings() const {
auto actionInputsDefinitions = gdyFactory_->getActionInputsDefinitions();
const auto& actionInputsDefinitions = gdyFactory_->getActionInputsDefinitions();
py::dict py_actionInputsDefinitions;
for (auto actionInputDefinitionPair : actionInputsDefinitions) {
auto actionName = actionInputDefinitionPair.first;
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Chris Bamford'

# The full version, including alpha/beta/rc tags
release = '1.2.35'
release = '1.2.36'


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -68,4 +68,4 @@
master_doc = 'index'

def setup(app):
app.add_css_file('custom.css')
app.add_css_file('custom.css')
Binary file modified docs/games/Robot_Tag_12v12/img/Robot_Tag_12v12-level-Block2D-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_12v12/img/Robot_Tag_12v12-level-Block2D-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_12v12/img/Robot_Tag_12v12-level-Block2D-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_12v12/img/Robot_Tag_12v12-level-Block2D-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_12v12/img/Robot_Tag_12v12-level-Sprite2D-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_12v12/img/Robot_Tag_12v12-level-Sprite2D-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_4v4/img/Robot_Tag_4v4-level-Block2D-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_4v4/img/Robot_Tag_4v4-level-Block2D-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_4v4/img/Robot_Tag_4v4-level-Block2D-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_4v4/img/Robot_Tag_4v4-level-Sprite2D-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_4v4/img/Robot_Tag_4v4-level-Sprite2D-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_4v4/img/Robot_Tag_4v4-level-Sprite2D-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_4v4/img/Robot_Tag_4v4-level-Sprite2D-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_8v8/img/Robot_Tag_8v8-level-Block2D-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_8v8/img/Robot_Tag_8v8-level-Block2D-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_8v8/img/Robot_Tag_8v8-level-Block2D-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_8v8/img/Robot_Tag_8v8-level-Block2D-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_8v8/img/Robot_Tag_8v8-level-Sprite2D-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_8v8/img/Robot_Tag_8v8-level-Sprite2D-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_8v8/img/Robot_Tag_8v8-level-Sprite2D-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/games/Robot_Tag_8v8/img/Robot_Tag_8v8-tile-tagger-Block2D.png
Binary file modified docs/games/img/Robot_Tag_12v12-taster.png
Binary file modified docs/games/img/Robot_Tag_4v4-taster.png
Binary file modified docs/games/img/Robot_Tag_8v8-taster.png
35 changes: 20 additions & 15 deletions python/benchmarks/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import psutil
from gym import register

#from griddly.util.wrappers import InvalidMaskingRTSWrapper
# from griddly.util.wrappers import InvalidMaskingRTSWrapper

process = psutil.Process(os.getpid())

Expand All @@ -15,48 +15,53 @@ def griddly(gdy_file):
from griddly import GymWrapperFactory, gd

wrapper = GymWrapperFactory()
wrapper.build_gym_from_yaml("Griddly", gdy_file, player_observer_type=gd.ObserverType.SPRITE_2D,
level=0)
return gym.make(f'GDY-Griddly-v0')
wrapper.build_gym_from_yaml(
"Griddly", gdy_file, player_observer_type=gd.ObserverType.SPRITE_2D, level=0
)
return gym.make(f"GDY-Griddly-v0")


def micro_rts_test():
import gym_microrts
return gym.make('MicrortsMining-v4')

return gym.make("MicrortsMining-v4")


def minigrid_test():
import gym_minigrid

return gym.make("MiniGrid-FourRooms-v0")


def gvgai_test():
import gvgai

return gym.make("gvgai-sokoban-lvl0-v0")


def gvgai_test_old():
import gym_gvgai

return gym_gvgai.make("gvgai-sokoban-lvl0-v0")


if __name__ == '__main__':
if __name__ == "__main__":

# env = griddly('dmlab_pushbox.yaml')

# env = minigrid_test()
env = griddly('Single-Player/Mini-Grid/minigrid-eyeball.yaml')
env = griddly("Single-Player/Mini-Grid/minigrid-eyeball.yaml")

# env = micro_rts_test()
#env = griddly('MicrortsMining.yaml')
# env = griddly('MicrortsMining.yaml')

# memory usage recorded in these tests is inaccurate because the GVGAI environment is in a different process
# env = gvgai_test()
# env = gvgai_test_old()
# env = griddly('Single-Player/GVGAI/sokoban.yaml')

env.reset()
#env = InvalidMaskingRTSWrapper(env)
# env = InvalidMaskingRTSWrapper(env)
start = timer()

frames = 0
Expand All @@ -72,20 +77,20 @@ def gvgai_test_old():
# env.render()
# rendered_obs = env.render(mode='rgb_array')

#state = env.get_state()
# state = env.get_state()

if frames % 1000 == 0:
end = timer()
fps = (frames / (end - start))
fps = frames / (end - start)
mem = process.memory_info().rss
mem_samples.append(mem)
fps_samples.append(fps)
print(f'fps: {fps}')
print(f'mem: {mem}')
print(f"fps: {fps}")
print(f"mem: {mem}")
frames = 0
start = timer()

if done:
env.reset()
print(f'mean fps: {np.mean(fps_samples)}, std: {np.std(fps_samples)}')
print(f'mean mem: {np.mean(mem_samples)}')
print(f"mean fps: {np.mean(fps_samples)}, std: {np.std(fps_samples)}")
print(f"mean mem: {np.mean(mem_samples)}")
Loading

0 comments on commit 5d76b3b

Please sign in to comment.