Skip to content

Commit 314f9e7

Browse files
author
Chris Elion
authored
rearrange match3 docs (#5215)
* rearrange match3 docs * changelog and migration from previous PR
1 parent c0889d5 commit 314f9e7

File tree

3 files changed

+30
-32
lines changed

3 files changed

+30
-32
lines changed

com.unity.ml-agents.extensions/Documentation~/Match3.md

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,15 @@
22

33
<img src="images/match3.png" align="center" width="3000"/>
44

5-
## Overview
6-
One of the main feedback we get is to illustrate more real game examples using ML-Agents. We are excited to provide an
7-
example implementation of Match-3 using ML-Agents and additional utilities to integrate ML-Agents with Match-3 games.
8-
9-
Our aim is to enable Match-3 teams to leverage ML-Agents to create player agents to learn and play different Match-3
10-
levels. This implementation is intended as a starting point and guide for teams to get started (as there are many
11-
nuances with Match-3 for training ML-Agents) and for us to iterate both on the C#, hyperparameters, and trainers to
12-
improve ML-Agents for Match-3.
13-
14-
This implementation includes:
15-
16-
* C# implementation catered toward a Match-3 setup including concepts around encoding for moves based on
17-
[Human Like Playtesting with Deep Learning](https://www.researchgate.net/publication/328307928_Human-Like_Playtesting_with_Deep_Learning)
18-
* An example Match-3 scene with ML-Agents implemented (located under /Project/Assets/ML-Agents/Examples/Match3).
19-
More information on the Match-3 example is [here](https://github.com/Unity-Technologies/ml-agents/tree/release_15_docs/docs/docs/Learning-Environment-Examples.md#match-3).
20-
21-
### Feedback
22-
If you are a Match-3 developer and are trying to leverage ML-Agents for this scenario,
23-
[we want to hear from you](https://forms.gle/TBsB9jc8WshgzViU9). Additionally, we are also looking for interested
24-
Match-3 teams to speak with us for 45 minutes. If you are interested, please indicate that in the
25-
[form](https://forms.gle/TBsB9jc8WshgzViU9). If selected, we will provide gift cards as a token of appreciation.
26-
27-
### Interested in more game templates?
28-
Do you have a type of game you are interested for ML-Agents? If so, please post a
29-
[forum issue](https://forum.unity.com/forums/ml-agents.453/) with [GAME TEMPLATE] in the title.
30-
315
## Getting started
32-
The C# code for Match-3 exists inside of the extensions package (com.unity.ml-agents.extensions). A good first step
6+
The C# code for Match-3 exists inside of the extensions package (com.unity.ml-agents.extensions). A good first step
337
would be to familiarize with the extensions package by reading the document [here](com.unity.ml-agents.extensions.md).
348
The second step would be to take a look at how we have implemented the C# code in the example Match-3 scene (located
35-
under /Project/Assets/ML-Agents/Examples/match3). Once you have some familiarity, then the next step would be to
36-
implement the C# code for Match-3 from the extensions package.
9+
under /Project/Assets/ML-Agents/Examples/match3). Once you have some familiarity, then the next step would be to
10+
implement the C# code for Match-3 from the extensions package.
3711

38-
Additionally, see below for additional technical specifications on the C# code for Match-3. Please note the Match-3
39-
game isn't human playable as implemented and can be only played via training.
12+
Additionally, see below for additional technical specifications on the C# code for Match-3. Please note the Match-3 game
13+
isn't human playable as implemented and can be only played via training.
4014

4115
## Technical specifications for Match-3 with ML-Agents
4216

@@ -128,3 +102,13 @@ The indexing for actions is the same as described in
128102
[Human Like Playtesting with Deep Learning](https://www.researchgate.net/publication/328307928_Human-Like_Playtesting_with_Deep_Learning)
129103
(for example, Figure 2b). The horizontal moves are enumerated first, then the vertical ones.
130104
<img src="images/match3-moves.png" align="center"/>
105+
106+
## Feedback
107+
If you are a Match-3 developer and are trying to leverage ML-Agents for this scenario,
108+
[we want to hear from you](https://forms.gle/TBsB9jc8WshgzViU9). Additionally, we are also looking for interested
109+
Match-3 teams to speak with us for 45 minutes. If you are interested, please indicate that in the
110+
[form](https://forms.gle/TBsB9jc8WshgzViU9). If selected, we will provide gift cards as a token of appreciation.
111+
112+
### Interested in more game templates?
113+
Do you have a type of game you are interested for ML-Agents? If so, please post a
114+
[forum issue](https://forum.unity.com/forums/ml-agents.453/) with [GAME TEMPLATE] in the title.

com.unity.ml-agents/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ interface was removed. (#5164)
2727
- `Match3Sensor` was refactored to produce cell and special type observations separately, and `Match3SensorComponent` now
2828
produces two `Match3Sensor`s (unless there are no special types). Previously trained models will have different observation
2929
sizes and will need to be retrained. (#5181)
30+
- The `AbstractBoard` class for integration with Match-3 games was changed to make it easier to support boards with
31+
different sizes using the same model. For a summary of the interface changes, please see the Migration Guide. (##5189)
3032

3133
#### ml-agents / ml-agents-envs / gym-unity (Python)
3234

docs/Migrating.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ double-check that the versions are in the same. The versions can be found in
1818
- The official version of Unity ML-Agents supports is now 2019.4 LTS. If you run
1919
into issues, please consider deleting your project's Library folder and reponening your
2020
project.
21-
- If you used any of the APIs that were deprecated before version 2.0, you need to use their replacement. These deprecated APIs have been removed. See the migration steps bellow for specific API replacements.
21+
- If you used any of the APIs that were deprecated before version 2.0, you need to use their replacement. These
22+
deprecated APIs have been removed. See the migration steps bellow for specific API replacements.
2223
### IDiscreteActionMask changes
2324
- The interface for disabling specific discrete actions has changed. `IDiscreteActionMask.WriteMask()` was removed,
2425
and replaced with `SetActionEnabled()`. Instead of returning an IEnumerable with indices to disable, you can
@@ -93,6 +94,17 @@ public CompressionSpec GetCompressionSpec()
9394
- The abstract method `SensorComponent.GetObservationShape()` was removed.
9495
- The abstract method `SensorComponent.CreateSensor()` was replaced with `CreateSensors()`, which returns an `ISensor[]`.
9596

97+
### Match3 integration changes
98+
The `AbstractBoard` interface was changed:
99+
* `AbstractBoard` no longer contains `Rows`, `Columns`, `NumCellTypes`, and `NumSpecialTypes` fields.
100+
* `public abstract BoardSize GetMaxBoardSize()` was added as an abstract method. `BoardSize` is a new struct that
101+
contains `Rows`, `Columns`, `NumCellTypes`, and `NumSpecialTypes` fields, with the same meanings as the old
102+
`AbstractBoard` fields.
103+
* `public virtual BoardSize GetCurrentBoardSize()` is an optional method; by default it returns `GetMaxBoardSize()`. If
104+
you wish to use a single behavior to work with multiple board sizes, override `GetCurrentBoardSize()` to return the
105+
current `BoardSize`. The values returned by `GetCurrentBoardSize()` must be less than or equal to the corresponding
106+
values from `GetMaxBoardSize()`.
107+
96108
## Migrating to Release 13
97109
### Implementing IHeuristic in your IActuator implementations
98110
- If you have any custom actuators, you can now implement the `IHeuristicProvider` interface to have your actuator

0 commit comments

Comments
 (0)