src.dcss.state.cell
Module Contents
Classes
Stores a cell of the map, not sure what all the information means yet |
- class src.dcss.state.cell.Cell(vals)
Stores a cell of the map, not sure what all the information means yet
- set_vals(vals)
- remove_all_items()
- get_pddl_name()
- get_cell_vector()
A tile can have 0 or 1 monsters. Monsters do not have IDs therefore they are referred to by the tile they are occupying.
Each tile is represented by a vector of size 34:
Vector Index
Description of Data
Data Type if available
0-19
Monster data, see monster.py get_cell_vector()
20
Terrain Type
Int repr.type ID
21
Has Item Potion
Int repr. type ID
22
Has Item Scroll
Int repr. type ID
23
Has Item Armour
Int repr. type ID
24
Has Item Weapon
Int repr. type ID
25
Has Item Missile
Int repr. type ID
26
Has Gold
Boolean
27
Has Smoke / Fog
Boolean
28
Has Flame Cloud
Boolean
29
(TODO) Has Rune
Int repr. type ID
30
Has Orb of Zot
Boolean
- get_pddl_facts()
- straight_line_distance(cell)
- get_simple_vector_value()
Returns a vector based representation of the cell for use in RL approaches.
This vector has length 1 and is highly simplified. Possible values are: 0 - empty 1 - player 2 - monster 3 - lava 4 - plant or tree 5 - stairsup 6 - stairsdown 7 - statue or wall or 8 - open door 9 - closed door
- static get_simple_vector_value_for_nonexistent_cell()
In the situation where we need to represent a tile that doesn’t exist, use this as the default value
- __str__()
Return str(self).