Closed sash2104 closed 2 years ago
(a) is the expected behavior
you can treat a CityTile as an individual Worker collecting resources.
@StoneT2000 thank you for the explanation.
In Case 2
, how many woods will be collected by the CityTile? 30?
If (a) is the expected behavior, then CityTile is subject to the same constraints as other Workers, and I think it cannot collect more than 20 wood (wood collection rate per turn).
Am I misunderstanding something?
Note that ResourceRequests are made by tile. basically if a tile already has a request for resources, other units on the same tile cannot generate more requests. See https://github.com/Lux-AI-Challenge/Lux-Design-2021/blob/26ff64b1d119c7ac582acb2b4df17c0d70cd819d/src/Game/index.ts#L675-L685
Once resource requests are made, if a resource request's location is the same as a city tile, we don't use that 2nd amount
argument anymore. See
So in the end, only r1
is created, and since on (5, 5)
we have a CityTile, the CityTile collects 20 wood and converts that into 20 fuel. None of the workers u_1
or u_2
collect anything, and the worker u_2
drops all 90 wood into the CityTile for it to be converted into 90 fuel.
basically if a tile already has a request for resources, other units on the same tile cannot generate more requests ... So in the end, only r1 is created,
In current implementation, if 2nd amount
argument is different, multiple requests will be generated for units on the same tile.
https://github.com/Lux-AI-Challenge/Lux-Design-2021/blob/26ff64b1d119c7ac582acb2b4df17c0d70cd819d/src/Game/index.ts#L26-L39
In Case 2
, 2nd amount
argument between r1
and r2
is different, so both r1
and r2
are created.
I wrote a test to reproduce Case 2
, and it looks like CityTile is collecting 30 wood instead of 20.
Could you please check this?
https://github.com/sash2104/Lux-Design-2021/pull/1
Hi, this is definitely a bug. However, our team has decided that it is too minor of a thing to ever get used as it's rare for this to occur.
https://www.lux-ai.org/specs-2021
What is the expected behavior of the above specifications?
Candidates are:
In my understanding, (c) is the current behavior. But this comment says (a) is the expected behavior.
For example,
Case 1:
c_1
is on(5, 5)
. Wood Resource with enough resources is on(5, 6)
u_1
with 0 wood moves to(5, 5)
.r1 := ResourceRequest((5, 5), 20, undefined, c_1)
u_2
with 0 wood moves to(5, 5)
.r2 := ResourceRequest((5, 5), 20, undefined, c_1)
r1.equals(r2)
istrue
. So,r2
is ignored and CityTilec_1
collects only20
woodsCase 2:
c_1
is on(5, 5)
. Wood Resource with enough resources is on(5, 6)
u_1
with 0 wood moves to(5, 5)
.r1 := ResourceRequest((5, 5), 20, undefined, c_1)
u_2
with 90 wood moves to(5, 5)
.r2 := ResourceRequest((5, 5), 10, undefined, c_1)
r1.equals(r2)
isfalse
. So,r2
is NOT ignored and CityTilec_1
collects20+10=30
woods