forked from minetest/minetest
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from JJJHolscher/develop
Build for Arch and an info property for the Observation protobuf class
- Loading branch information
Showing
25 changed files
with
176 additions
and
39 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
load_mod_random_v0 = true | ||
load_mod_rewards = true | ||
load_mod_treechop_v1 = false | ||
load_mod_treechop_shaped_v0 = false | ||
load_mod_random_v1 = false | ||
load_mod_treechop_v0 = false | ||
load_mod_random_v0 = false | ||
load_mod_preview = false | ||
load_mod_treechop_shaped_v0 = false | ||
load_mod_treechop_v0 = false |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
-- define global reward and terminal variables | ||
-- define global reward, terminal and info variables | ||
REWARD = 0.0 | ||
TERMINAL = false | ||
INFO = "" |
Submodule minetest_game
updated
10 files
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
minetest.register_globalstep(function(dtime) | ||
-- set a random reward and terminal value | ||
local players = minetest.get_connected_players() | ||
for i = 1, #players do | ||
local player = players[i] | ||
local playername = player:get_player_name() | ||
minetest.debug("Reward before: " .. tostring(REWARD[playername])) | ||
local reward = math.random() | ||
REWARD[playername] = reward | ||
TERMINAL[playername] = math.floor(reward + 0.05) == 1 | ||
INFO[playername] = playername .. " is at " .. | ||
tostring(player:get_pos()) | ||
end | ||
end) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
name = info |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
minetest.register_globalstep(function(dtime) | ||
-- set a random reward and terminal value | ||
local players = minetest.get_connected_players() | ||
local players = minetest.get_connected_players() | ||
for i = 1, #players do | ||
local playername = players[i]:get_player_name() | ||
minetest.debug("Reward before: " .. tostring(REWARD[playername])) | ||
REWARD[playername] = math.random() | ||
TERMINAL[playername] = math.floor(math.random() + 0.5) == 1 | ||
OUT[playername] = "Hello World" | ||
end | ||
end) | ||
end) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
-- define global reward and terminal tables | ||
-- define global reward, terminal and info tables | ||
REWARD = {} | ||
TERMINAL = {} | ||
INFO = {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,4 +122,5 @@ message Observation { | |
float reward = 2; | ||
bool terminal = 3; | ||
Action action = 4; | ||
string info = 5; | ||
} |
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
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
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
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
Oops, something went wrong.