Giter VIP home page Giter VIP logo

deep-rts's Introduction

Cair Platform

This package providies you with three components to manage the content on your website:

  • Platform: A dynamic active record implementation. Allowing you to configure your data structure at runtime.
  • Access: A restful JSON API used by the admin panel or by your application.
  • Panel: The admin panel for filling in your data.

Installation

Via composer.

{
    "require": {
        "cair/cair": "0.1.*",
        "stack/builder": "1.0.*",
        "stack/url-map": "1.0.*"
    }
}

composer update

And bower.

bower install cair-panel

Usage

// Create your application in $app.

Cair\Platform\Provider::setConfig([
  'resources' => [
		'posts' => [
			'attributes' => ['title', 'content'],
			'rules' => [
				'title' => ['required', 'min' => 3],
				'content' => ['required']
			],
			'types' => [
				'title' => 'text',
				'content' => 'textarea',
			]
		]
	],
	'scripts' => [
		"panel/dist/js/cair.js"
	]
]);

$stack = new Stack\Builder;

$stack->push('Stack\UrlMap', [
    '/admin' => require(__DIR__.'/src/Cair/Panel/start.php'),
    '/api' => require(__DIR__.'/src/Cair/Access/start.php'),
]);

$app = $stack->resolve($app);

$request = Request::createFromGlobals();

$app->handle($request)->send();

deep-rts's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deep-rts's Issues

`pip install` cannot work

The latest pip (19.0.3) for python3 cannot install deep-rts with your instruction. Could you provide more information about the available version or solutions? thx.

installation error message

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting git+https://github.com/UIA-CAIR/DeepRTS
  Cloning https://github.com/UIA-CAIR/DeepRTS to /tmp/pip-req-build-8m608ix7
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.6/tokenize.py", line 452, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-8m608ix7/setup.py'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-8m608ix7/

Multi-tile Units does not handle damage correctly

deep-rts/src/Tile.cpp

Lines 262 to 270 in 148df8d

void Tile::update(Unit& unit) const {
// TODO - does not handle multi-tile blocks (for example Town-Hall)
// TODO - maybe this is OK?
if(hasOccupant() && damageModifier > 0){
unit.afflictDamage(std::ceil(damageModifier));
}
}

In multi-tile units, the damage is only applied to the "primary tile". Units currently only reference1 tile, but perhaps there should be a list of "secondary tiles"

Installation issue

Hello,
I have tried many ways to install DeepRTS.
I was able to install the older version but it seems not to be a gym environment. Based on your minimal example, I see it is a gym environment in the new version.
I tried to install the new version with setup.py in the first page, but it failed. Then, after lots of trials, I succeed to install it. There is a "DeepRTS" in my environment's site-package. There also is "python" folder inside it. However, there is no "Engine" folder or .py file inside DeepRTS folder. Therefore, I get error for the "from DeepRTS import Engine" line, since it does not exist. Instead, I see a file with name "Engine.cpython-37m-x86_64-linux-gnu.so", maybe it is related to this issue.

Could you help me about the problem, if you already know about it. Or could you help me about the installation instructions ?

Thanks in advance,

Installation problem

Through the above two methods and Dockerfile, my installation failed. Can you update the installation steps?I would be very grateful if you can provide a current stable installation method.

pip3 install fails with pkg_resources.DistributionNotFound

The error is:

pkg_resources.DistributionNotFound: The 'DeepRTS' distribution was not found and is required by the application

Does this means that I need to have an older version installed before I can install release 2.5.0?

I'm trying to install this on MacOS. Tried on an Ubuntu container, but got the same error. I've made a dockerfile (attached) that works to build it, but it is a really old commit (based on help to issue #5), so I can't use it.

If I try to build this (on Ubuntu or Mac OS) from the latest commit, I get a lot of warnings and pip fails to install it.

Could you describe the correct way to install this? Thanks.

Dockerfile.txt

Example Not working!

After installing DeepRts I cannot run the code as it is either missing dependencies or smth. like that.

AttributeError: 'DeepRTS.Engine.Config' object has no attribute 'set_start_wood'

Question about the training data

Hey,

I am making a Warcraft 3 sandbox game and train the AIs with RL so they can go against players. Could I ask how you manage to obtain the training data in this game? Since warcraft 3 doesnt provide a way for log files to be de-encrypted It would be nice to know how I can manage training without the professional players log files.

Aborted (core dumped)

have been trying to use thefeatures/drqn_1.2 branch and
was successfully able to compile the code, but the DeepRTS executable
encounters a runtime error.

Screenshot from 2019-06-14 09-53-54

Cannot use custom maps

Hello! I'm not being able to use custom maps on DeepRTS.

If I try to load a map that is not inside the default maps folder, it fails. I took a look at the code and saw that the game will only run maps that are inside that directory.

Even if I copy my custom map to DeepRTS/python/assets/maps, the game won't load. The error I'm getting is this one:

"RuntimeError: File Error: Could not find: 32.json (/home/marcocspc/git/drts/DeepRTS/python/assets/maps/32.json).
Ensure that the data directory exists!"

But the file is there:

"$ls /home/marcocspc/git/drts/DeepRTS/python/assets/maps/ -l
total 52
-rw-r--r-- 1 marcocspc marcocspc 1253 jan 21 10:12 10x10-2v2.json
-rw-r--r-- 1 marcocspc marcocspc 1881 jan 21 10:12 15x15-2v2.json
-rw-r--r-- 1 marcocspc marcocspc 2937 jan 21 10:12 21x21-2v2.json
-rw-r--r-- 1 marcocspc marcocspc 5497 jan 21 10:12 31x31-2v2.json
-rw-r--r-- 1 marcocspc marcocspc 5495 jan 21 10:12 31x31-4v4.json
-rw-r--r-- 1 marcocspc marcocspc 5493 jan 21 10:12 31x31-6v6.json
-rw-rw-r-- 1 marcocspc marcocspc 5493 jan 21 16:10 32.json
-rw-rw-r-- 1 marcocspc marcocspc 5493 jan 21 16:01 simple_32_32.json"

I tried to reinstall DeepRTS with the custom maps inside the folder, but to no avail. I thought that the installation "freezes" the files inside the folder and won´t "see" the new files that I added there, so If I reinstalled the module, maybe the maps would be included.

Thank you for your support!

Fatal Python error: (pygame prachute) Segmentation Fault

I've tried to run your given example in README, then the script thrown an exception at g.update():

pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
[FPS=0, UPS=0]
Fatal Python error: (pygame parachute) Segmentation Fault

Current thread 0x00007feadc869740 (most recent call first):
  File "test.py", line 25 in <module>
[1]    23004 abort (core dumped)  python3 test.py

System information

ubuntu 16.0.4
python 3.6
pygame 1.9.4
DeepRTS latest version

which opencv version to use?

I am currently using opencv version 4.5.4 to compile this project. It turns out giving me these errors:

ndarray_converter.obj : error LNK2001: unresolved external symbol "public: void __cdecl cv::Mat::copyTo(class cv::debug_build_guard::_OutputArray const &)const " (?copyTo@Mat@cv@@QEBAXAEBV_OutputArray@debug_build_guard@2@@z) [C:\Users\alexa\AppData\Local\Temp\pip-req-build-z8212hxv\build\temp.win-amd64-3.10\Release\Engine.vcxproj]
Blend2DGUI.obj : error LNK2001: unresolved external symbol "public: class cv::Mat & __cdecl cv::Mat::setTo(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &)" (?setTo@Mat@cv@@QEAAAEAV12@AEBV_InputArray@debug_build_guard@2@0@Z) [C:\Users\alexa\AppData\Local\Temp\pip-req-build-z8212hxv\build\temp.win-amd64-3.10\Release\Engine.vcxproj]
Blend2DGUI.obj : error LNK2001: unresolved external symbol "bool __cdecl cv::imencode(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class cv::debug_build_guard::_InputArray const &,class std::vector<unsigned char,class std::allocator > &,class std::vector<int,class std::allocator > const &)" (?imencode@cv@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@AEBV_InputArray@debug_build_guard@1@AEAV?$vector@EV?$allocator@E@std@@@3@AEBV?$vector@HV?$allocator@H@std@@@3@@z) [C:\Users\alexa\AppData\Local\Temp\pip-req-build-z8212hxv\build\temp.win-amd64-3.10\Release\Engine.vcxproj]
Blend2DGUI.obj : error LNK2001: unresolved external symbol "class cv::Mat __cdecl cv::imdecode(class cv::debug_build_guard::_InputArray const &,int)" (?imdecode@cv@@ya?AVMat@1@AEBV_InputArray@debug_build_guard@1@H@Z) [C:\Users\alexa\AppData\Local\Temp\pip-req-build-z8212hxv\build\temp.win-amd64-3.10\Release\Engine.vcxproj]
Blend2DGUI.obj : error LNK2001: unresolved external symbol "void __cdecl cv::inRange(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &)" (?inRange@cv@@YAXAEBV_InputArray@debug_build_guard@1@00AEBV_OutputArray@31@@z) [C:\Users\alexa\AppData\Local\Temp\pip-req-build-z8212hxv\build\temp.win-amd64-3.10\Release\Engine.vcxproj]
C:\Users\alexa\AppData\Local\Temp\pip-req-build-z8212hxv\build\lib.win-amd64-3.10\DeepRTS\Engine.cp310-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals [C:\Users\alexa\AppData\Local\Temp\pip-req-build-z8212hxv\build\temp.win-amd64-3.10\Release\Engine.vcxproj]

What to do to solve these issues? Thanks!!

Manual Play GUI

The paper mentions a C++ GUI that enables manual play of DeepRTS. Is there still such a thing in the project?

I built and ran DeepRTSGame from Cmake, but the GUI only shows the game map and I can not interact with it.

What is the latest stable build?

I'm currently encountering several build errors when trying to pip install DeepRTS from master. I'm starting to go through the master branch to until I can find a commit with a working example, but have been unsuccessful so far.

I would appreciate any help identifying the best version to install.

Practicality for thesis?

Dear Deep RTS,
I am considering using Deep RTS as my environment for a HTN Goal-Based Autonomy planner for a masters thesis. I was wondering how complex is the environment to develop for and how long it took you guys to make the Deep Q-Network for the test? Is it practical to make a bot for this within 1-1.15 months?
Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.