Skip to content

Commit

Permalink
Merge branch 'release/0.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bam4d committed Jan 22, 2021
2 parents e4e68f9 + 6146d08 commit 6703fba
Show file tree
Hide file tree
Showing 80 changed files with 688 additions and 522 deletions.
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. 0.3.1]
- Version [e.g. 0.3.2]

**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,5 +1,5 @@
cmake_minimum_required(VERSION 3.10.0)
project(Griddly VERSION 0.3.1)
project(Griddly VERSION 0.3.2)

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") = "0.3.1";
m.attr("version") = "0.3.2";

#ifndef NDEBUG
spdlog::set_level(spdlog::level::debug);
Expand Down
1 change: 1 addition & 0 deletions bindings/wrapper/GameWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ class Py_GameWrapper {
py_objectInfo["Location"] = py::cast(std::vector<int32_t>{
objectInfo.location.x,
objectInfo.location.y});
py_objectInfo["Orientation"] = objectInfo.orientation.getName();
py_objectInfo["PlayerId"] = objectInfo.playerId;
py_objectInfo["Variables"] = py_objectVariables;

Expand Down
8 changes: 4 additions & 4 deletions bindings/wrapper/NumpyWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ namespace griddly {
template <class Scalar>
class NumpyWrapper {
public:
NumpyWrapper(std::vector<uint32_t> shape, std::vector<uint32_t> strides, std::shared_ptr<Scalar> data)
: shape_(shape), strides_(strides), data_(std::move(data)) {
NumpyWrapper(std::vector<uint32_t> shape, std::vector<uint32_t> strides, Scalar* data)
: shape_(shape), strides_(strides), data_(data) {
}

std::vector<uint32_t> getShape() const { return shape_; }
std::vector<uint32_t> getStrides() const { return strides_; }
uint32_t getScalarSize() const { return sizeof(Scalar); }
Scalar* getData() const { return data_.get(); }
Scalar* getData() const { return data_; }

private:
const std::vector<uint32_t> shape_;
const std::vector<uint32_t> strides_;
const std::shared_ptr<Scalar> data_;
Scalar* data_;
};
} // namespace griddly
2 changes: 1 addition & 1 deletion 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 = '0.3.1'
release = '0.3.2'


# -- General configuration ---------------------------------------------------
Expand Down
133 changes: 0 additions & 133 deletions python/benchmarks/BWDistantResources32x32.yaml

This file was deleted.

131 changes: 131 additions & 0 deletions python/benchmarks/MicrortsMining.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
Version: "0.1"
Environment:
Name: MicrortsMining
Observers:
Sprite2D:
TileSize: 24
BackgroundTile: oryx/oryx_tiny_galaxy/tg_sliced/tg_world/tg_world_floor_panel_metal_a.png
Player:
Count: 2
Termination:
Win:
- eq: [_score, 10] # First player to 10 reward points
Levels:
- |
. . . . . . . . . . . . . . . M
. . . . . . . . . . . . . . H2 M
. . . . . . . . . . . . . B2 . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . B1 . . . . . . . . . . . . .
M H1 . . . . . . . . . . . . . .
M . . . . . . . . . . . . . . .
Actions:
- Name: gather
Behaviours:
- Src:
Object: harvester
Commands:
- incr: resources
- reward: 1
Dst:
Object: minerals
Commands:
- decr: resources
- Src:
Object: harvester
Commands:
- decr: resources
- reward: 1
Dst:
Object: base
Commands:
- incr: resources

- Name: move
Behaviours:
- Src:
Object: [harvester]
Commands:
- mov: _dest # mov will move the object, _dest is the destination location of the action
Dst:
Object: _empty

Objects:
- Name: minerals
MapCharacter: M
Variables:
- Name: resources
InitialValue: 10
Observers:
Sprite2D:
- Image: oryx/oryx_tiny_galaxy/tg_sliced/tg_items/tg_items_crystal_green.png
Block2D:
- Shape: triangle
Color: [0.0, 1.0, 0.0]
Scale: 1.0

- Name: fixed_wall
MapCharacter: W
Observers:
Sprite2D:
- TilingMode: WALL_2 # Will tile walls with two images
Image:
- oryx/oryx_tiny_galaxy/tg_sliced/tg_world_fixed/img33.png
- oryx/oryx_tiny_galaxy/tg_sliced/tg_world_fixed/img40.png
Block2D:
- Color: [0.5, 0.5, 0.5]
Shape: square

- Name: harvester
MapCharacter: H
Variables:
- Name: resources
InitialValue: 0
- Name: health
InitialValue: 10
Observers:
Sprite2D:
- Image: oryx/oryx_tiny_galaxy/tg_sliced/tg_monsters/tg_monsters_jelly_d1.png
Block2D:
- Shape: square
Color: [0.6, 0.2, 0.2]
Scale: 0.5

- Name: base
MapCharacter: B
Variables:
- Name: resources
InitialValue: 0
- Name: health
InitialValue: 10
Observers:
Sprite2D:
- Image: oryx/oryx_tiny_galaxy/tg_sliced/tg_world_fixed/img324.png
Block2D:
- Color: [0.8, 0.8, 0.3]
Shape: triangle
Loading

0 comments on commit 6703fba

Please sign in to comment.