Giter Site home page Giter Site logo

How to create new envs about ndq HOT 5 CLOSED

tonghanwang avatar tonghanwang commented on August 13, 2024
How to create new envs

from ndq.

Comments (5)

TonghanWang avatar TonghanWang commented on August 13, 2024

Hi, you can create your own maps by StarCraft II map editor. Create a RL unit as follows:

Open editor, data editor, unit tab
Right click and click add new unit
Name the new unit, click suggest right below it
Leave the "parent:" row alone. That determines what we're making. We want to make a unit
Select the unit you want to copy (bottom of the new opened window, "copy from" row) e.g. zealot if you're copying zealot
Set the "Object family:," "Race:," and "Object Type:" as desired. THESE DO NOTHING but make it easier for you to find your new unit once it's made. e.g. you probably want a new zerg unit to be in the zerg section when you go to place it on your map or something.
Press okay, you're almost done
Click the plus sign on the data editor tabs, go to edit actor data, actors
Click the new actors tab
Right click and click add new actor
Name it and click suggest like before
Change the "Actor Type:" row to unit
Select what you want to copy from (bottom of the new opened window again) e.g. zealot if you're coping a zealot
Press okay
Click on your new actor
At the bottom right of the window where it says "Token" and then "Unit Name," change the unit name to the name of your unit e.g. Zealot RL
Go back to the Unit tab, find the new unit and modify the following fields:
(Basic) Stats: Supplies - 0
Combat: Default Acquire Level - Passive
Behaviour: Response - No Response

You can start from an existing SMAC map and add new RL units. After that, click "Tiggers" and edit the function "Spawn" to decide which and how many agents are included in the new map. You can also edit the function "Enemy Attack" there to change the attack mode of the enemies.

from ndq.

GoingMyWay avatar GoingMyWay commented on August 13, 2024

Hi, you can create your own maps by StarCraft II map editor. Create a RL unit as follows:

Open editor, data editor, unit tab
Right click and click add new unit
Name the new unit, click suggest right below it
Leave the "parent:" row alone. That determines what we're making. We want to make a unit
Select the unit you want to copy (bottom of the new opened window, "copy from" row) e.g. zealot if you're copying zealot
Set the "Object family:," "Race:," and "Object Type:" as desired. THESE DO NOTHING but make it easier for you to find your new unit once it's made. e.g. you probably want a new zerg unit to be in the zerg section when you go to place it on your map or something.
Press okay, you're almost done
Click the plus sign on the data editor tabs, go to edit actor data, actors
Click the new actors tab
Right click and click add new actor
Name it and click suggest like before
Change the "Actor Type:" row to unit
Select what you want to copy from (bottom of the new opened window again) e.g. zealot if you're coping a zealot
Press okay
Click on your new actor
At the bottom right of the window where it says "Token" and then "Unit Name," change the unit name to the name of your unit e.g. Zealot RL
Go back to the Unit tab, find the new unit and modify the following fields:
(Basic) Stats: Supplies - 0
Combat: Default Acquire Level - Passive
Behaviour: Response - No Response

You can start from an existing SMAC map and add new RL units. After that, click "Tiggers" and edit the function "Spawn" to decide which and how many agents are included in the new map. You can also edit the function "Enemy Attack" there to change the attack mode of the enemies.

Great, very detailed steps, I will try it, thanks. Sorry for my another question: how do you make the video? Do you use the save_replay of SMAC?

from ndq.

TonghanWang avatar TonghanWang commented on August 13, 2024

Yes, we use the save_replay of SMAC.

  1. Set save_replay to True
  2. Specify checkpoint_path
  3. Set runner to episode
  4. Set batch_size_run to 1

from ndq.

GoingMyWay avatar GoingMyWay commented on August 13, 2024

Yes, we use the save_replay of SMAC.

  1. Set save_replay to True
  2. Specify checkpoint_path
  3. Set runner to episode
  4. Set batch_size_run to 1

Thanks, I load the model and evaluate and save the replay.

from ndq.

TonghanWang avatar TonghanWang commented on August 13, 2024

Great!

We are willing to help if you encounter other questions when creating new maps.

from ndq.

Related Issues (7)

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.