Skip to content
Snippets Groups Projects
Environment_Rules.md 10 KiB
Newer Older
xixi's avatar
xixi committed
# Environment Rules

Author: Jiaxin, Enhong

Date: 2022-08-24

Version: v1.0

## **Overview**

In this environment, we introduced the blue circle system, the combat system, and the trading system, which made the environment challenging. This competition is a game like Player Unknown's Battlegrounds with NPCs. The game score of a player depends on how well the team of agents survives and how many agents they killed. Hence,

1. The agent must survive as long as possible within the 1024 game ticks, and upgrade the skill by killing the enemy or collecting materials to obtain a greater survival advantage. (A higher skill level means that agents can equip better equipment. As a  result, agents can cause higher damage to the enemy, take less damage or restore more HP / Food&Water)
2. NPCs play a key role in this game because agents mainly get gold and items by killing NPCs. Roughly speaking, the higher-level NPCs you kill, you have a higher probability to get better items.
3. The agent needs to clean up unused items from the inventory by using the trading system. (Note that the capacity of the inventory is limited. When the inventory is full, the agent can no longer acquire new items from the environment.)
4. Due to the existence of the blue circle, the agent also needs to learn how to escape from it (finding the way and moving to the central area) or find a way to use consumables to survive in the poison circle.

## Terrian

| Index | Element | Use | Passable |
| --- | --- | --- | --- |
| 0 | Lava | Will die if touch Lava | False |
| 1 | Water | Harvest Water | False |
| 2 | Grass | Land | True |
| 3 | Scrub | Forest degrades to Scrub after being harvested | True |
| 4 | Forest | Harvest Forest for producing food | True |
| 5 | Stone | Barriers | False |
| 6 | Slag | Ore degrades to Slag after being harvested | True |
| 7 | Ore | Harvest ore to produce melee ammunition | True |
| 8 | Stump | Tree degrades to Stump after being harvestedafter being harvested | True |
| 9 | Tree | Harvest Tree to produce range ammunition | True |
| 10 | Fragment | Crystal degrades to Fragment after being harvested | True |
| 11 | Crystal | Harvest crystal, it can produce mage ammunition | True |
| 12 | Weeds | Herb degrades to weeds after being harvested | True |
| 13 | Herb | Harvest Herb to produce Ration | True |
| 14 | Ocean | Fish degrades to the ocean after being harvested | False |
| 15 | Fish | Harvest Fish to produce Poultice | False |

## Attack styles

The ranges of three attack styles, namely, mage, melee, and range are the same, i.e., 3 tiles. And it is measured by $L_\infin$ distance. 

The promoting and inhibiting relationship is in a rock-scissors-paper style: melee>range>mage>melee. 

## Professions

This environment encourages agents to specialize and cooperate. Eight professions and the corresponding skills are designed as follows. And a leveling system that enables agents to become better at things by doing them. Each agent is born with all the professions of Level 1 and they cannot use items higher than the level of the corresponding items. 

Some good policies can be imagined as, Alchemy uses a high-level tool, Arcane Focus, to harvest high-level crystals to produce Shard and give it to its teammates who are good at mage to improve the attacking damage. 

The professions are listed:

- 3 attack professions
    - Melee
    - Range
    - Mage
- 5 foraging professions
    - Fishing
    - Herbalism
    - Prospecting
    - Carving
    - Alchemy

| Professions | Weapon/Tool | Ammunition/Consumable items | Produce |
| --- | --- | --- | --- |
| Focus on attacking |  |  |  |
| Melee | Sword | Scrap | Damage |
| Range | Bow | Shaving | Damage |
| Mage | Wand | Shard | Damage |
| Forage |  |  |  |
| Fishing | Rod | Fish | Ration |
| Herbalism | Gloves | Herb | Poultice |
| Prospecting | Pickaxe | Fragment | Scrap |
| Carving | Chisel | Tree | Shaving |
| Alchemy | Arcane Focus | Crystal | Shard |

## Items

### **Bag**

- The maximum capacity of the agent’s bag is 12.
- Four items can be equipped at most, 3 armor and 1 weapon.
- One sheet to store ammunition. No maximum capacity for ammunition storage.

### **Note that**

- An item in your bag should be used except gold (an action of each agent), and then it will be in the Hat/Top/Bottom/Weapon/Ammunition sheets.
- And if you want to take down it from the equipment sheets, you also need to ‘use’ it or directly ‘sell’ it.

xixi's avatar
xixi committed
![Untitled](images/Untitled.png)
xixi's avatar
xixi committed

## Usages of Items

| Name | Use | Types | How to obtain | Level | Profession Specific |
| --- | --- | --- | --- | --- | --- |
| Ammunition | To improve damage | Shaving/Scrap/Shard | 1. Buy from the global market
2. Gather resources          3. Kill players and get it from their bags | 1-10 | True |
| Gold | Buy items from the global market |  | Kill NPCs and kill players | False | False
 |
| Weapon | To improve damage | Sword/Bow/Wand | 1. Kill NPCs
2. Buy from the global market                         
3. Harvesting ammunition with a low probability (p=0.025)
4. Kill players                    | 1-10 | True
 |
| Armor | To improve defense | Hat/Top/Bottom | 1. Kill NPCs
2. Buy from the global market                                  3. Kill players | 1-10 | False |
| Tool | To improve the level of products after gathering resources  | Rod/Gloves/Pickaxe/Chisel/Arcane Focus | 1. Kill NPCs
2. Buy from the global market                                       3. Kill players | 1-10 | True
 |
| Consumable items | To return Food/Water/HP | Ration/Poultice | 1. Buy from the global market
2. Gather resources                         3. Kill players | 1-10 | Use: False
Produce: True |

### **Weapon**

1. To improve 10 damage points per level if you use the corresponding attack style.
- **Sword:**
    
bowu0818's avatar
bowu0818 committed
    <!-- ![Untitled](images/Untitled1.png)  -->
    <img src="images/Untitled1.png" width="50"/>
xixi's avatar
xixi committed
    
- **Bow:**
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled2.png)
xixi's avatar
xixi committed
    
- **Wand:**
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled3.png)
xixi's avatar
xixi committed
    

### **Armor**

1. To improve 4 defense points per level per item (e.g., if you are equipped with Hat/Top/Bottom items of Level 2, they will increase 24 defense points for you).
- **Hat**
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled4.png)
xixi's avatar
xixi committed
    
- **Top**
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled5.png)
xixi's avatar
xixi committed
    
- **Bottom**
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled6.png)
xixi's avatar
xixi committed
    

### **Tool:**

1. To improve 4 defense points per level per item. 
2. To use the tool by using it on the weapon sheet.
3. Each tool is used to produce the corresponding consumable items (Poultice/Ration) and ammunition (Scrap/Shaving/Shard), e.g., If you use a Rod of Level 3, you can produce Poultice of Level 3.
- **Rod:** produce Poultice
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled7.png)
xixi's avatar
xixi committed
    
- **Gloves:** produce Ration
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled8.png)
xixi's avatar
xixi committed
    
- **Pickaxe:** produce Scrap
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled9.png)
xixi's avatar
xixi committed
    
- **Chisel:** produce Shaving
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled10.png)
xixi's avatar
xixi committed
    
- **Arcane Focus:** produce Shard
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled11.png)
xixi's avatar
xixi committed
    

### **Consumable items:**

- **Ration:** Each Ration returns 50 Food and Water, and each higher level returns 5 more Food and Water (e.g., Ration of Level 1 returns 55 Food and Water, Ration of Level 2 returns 60 Food and Water).
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled12.png)
xixi's avatar
xixi committed
    
- **Poultice:** Each Poultice returns 50 HP, and each higher level returns 5 more HP (e.g., Ration of Level 1 returns 55 HP, Ration of Level 2 returns 60 HP).
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled13.png)
xixi's avatar
xixi committed
    

### **Ammunition:**

1. To improve 10 damage points per level, if you use the corresponding attack style (e.g., Scrap of Level 2 increases 20 damage points, if you use Melee attack style).
- **Scrap**
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled14.png)
xixi's avatar
xixi committed
    
- **Shaving**
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled15.png)
xixi's avatar
xixi committed
    
- **Shard**
    
xixi's avatar
xixi committed
    ![Untitled](images/Untitled16.png)
xixi's avatar
xixi committed
    

## Rule of trading in the global market

### Actions of trading

- **Sell**
- **Buy**
- **Prize**
- **Use**

### Rules:

1. For each step, each agent can sell one item from its bag and give it a prize (1-100). At the same time, it can buy an item from the global market.
2. The trading behaviors proceed by the agent ID, i.e., Agent 1 sells and buys, then Agent 2 sells and buys, etc… So, as the IDs of teammates are close, it can be understood that teammates have the priority to buy items from the same team.

### Note that

- If your bag is full and you kill an NPC, the dropped items can not be put in your bag. So you must sell some idle items.
- If your food and water are more than 50%, you can restore 10 HP for each game clock.
- If two agents kill one NPC together, the dropped items will be randomly assigned to one agent.
- Each agent is born with 1 gold and 8 professions are set to 1.
- Agents can attack without any armor or weapon. The base damage is 7 and the base defense is 0. The armor, weapon, and ammunition are used for increasing damage and defense.
- Agents can forage without tools. Tools can improve the level of the products of the harvested resources.
- Resources will be automatically harvested when the agents pass them.
- All the weapons can be obtained by harvesting resources with a low probability (p=0.025).
- The level of armor can be equipped ≤ the highest level of the agents’ 8 professions. In other words, although you obtain a Hat of Level 8, you can not use it if your highest level of 8 professions is lower than 8.
- The level of weapon/ammunition/tool can be used ≤ the corresponding level of the profession. In other words, although you have a Wand of Level 5, if your mage level is 4, you cannot equip it.
- Agents gain access to melee, range, and mage attacks. These obey a rock-paper-scissors dominance relationship: melee beats range beats mage beats melee. Dominance is calculated using the attacker’s chosen attack skill and the defender’s main combat skill. The dominant style causes damage of 1.5 times.

### Circle

xixi's avatar
xixi committed
From Step 240, the circle starts to shrink. For every 16 steps, the circle shrinks one tile left and right.  When the agent is in fog, the fog damage will increase with the distance from the edge of the fog.