python_code
stringlengths 0
780k
| repo_name
stringlengths 7
38
| file_path
stringlengths 5
103
|
|---|---|---|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Top level import for Reverb."""
# pylint: disable=g-import-not-at-top
# pylint: disable=g-bad-import-order
from reverb.platform.default import ensure_tf_install
ensure_tf_install.ensure_tf_version()
# Cleanup symbols to avoid polluting namespace.
del ensure_tf_install
# pylint: enable=g-bad-import-order
from reverb import item_selectors as selectors
from reverb import rate_limiters
from reverb import structured_writer as structured
from reverb.client import Client
from reverb.client import Writer
from reverb.errors import DeadlineExceededError
from reverb.errors import ReverbError
from reverb.pattern_dataset import PatternDataset
from reverb.platform.default import checkpointers
from reverb.replay_sample import ReplaySample
from reverb.replay_sample import SampleInfo
from reverb.server import Server
from reverb.server import Table
from reverb.tf_client import TFClient
from reverb.timestep_dataset import TimestepDataset
from reverb.trajectory_dataset import TrajectoryDataset
from reverb.trajectory_writer import TrajectoryColumn
from reverb.trajectory_writer import TrajectoryWriter
|
reverb-master
|
reverb/__init__.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for trajectory_dataset_eager."""
from absl.testing import parameterized
import numpy as np
from reverb import server as reverb_server
from reverb import trajectory_dataset
import tensorflow as tf
_TABLE = 'queue'
class TrajectoryDatasetEagerTest(tf.test.TestCase, parameterized.TestCase):
@parameterized.product(
num_workers_per_iterator=[1, 3],
max_in_flight_samples_per_worker=[1, 5],
max_samples=[4],
)
def test_max_samples(self, num_workers_per_iterator,
max_in_flight_samples_per_worker, max_samples):
server = reverb_server.Server(
tables=[reverb_server.Table.queue(_TABLE, 10)])
client = server.localhost_client()
with client.trajectory_writer(10) as writer:
for i in range(10):
writer.append([np.ones([3, 3], np.int32) * i])
writer.create_item(_TABLE, 1.0, {
'last': writer.history[0][-1],
'all': writer.history[0][:],
})
dataset = trajectory_dataset.TrajectoryDataset(
tf.constant(client.server_address),
table=tf.constant(_TABLE),
dtypes={
'last': tf.int32,
'all': tf.int32,
},
shapes={
'last': tf.TensorShape([3, 3]),
'all': tf.TensorShape([None, 3, 3]),
},
num_workers_per_iterator=num_workers_per_iterator,
max_in_flight_samples_per_worker=max_in_flight_samples_per_worker,
max_samples=max_samples)
# Check that it fetches exactly `max_samples` samples.
it = dataset.as_numpy_iterator()
self.assertLen(list(it), max_samples)
# Check that no prefetching happen on the queue.
self.assertEqual(client.server_info()[_TABLE].current_size,
10 - max_samples)
if __name__ == '__main__':
tf.test.main()
|
reverb-master
|
reverb/trajectory_dataset_eager_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Sampling and removing selection strategies."""
import functools
from reverb import pybind
Fifo = pybind.FifoSelector
Lifo = pybind.LifoSelector
MaxHeap = functools.partial(pybind.HeapSelector, False) # pylint: disable=invalid-name
MinHeap = functools.partial(pybind.HeapSelector, True) # pylint: disable=invalid-name
Prioritized = pybind.PrioritizedSelector
Uniform = pybind.UniformSelector
|
reverb-master
|
reverb/item_selectors.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Pytype helpers."""
import dataclasses
from typing import Iterable, Mapping, Optional, Union
from reverb import pybind
import tensorflow.compat.v1 as tf
from reverb.cc import schema_pb2
# pylint: disable=g-direct-tensorflow-import
from tensorflow.python.saved_model import nested_structure_coder
# pylint: enable=g-direct-tensorflow-import
Fifo = pybind.FifoSelector
Heap = pybind.HeapSelector
Lifo = pybind.LifoSelector
Prioritized = pybind.PrioritizedSelector
Uniform = pybind.UniformSelector
SelectorType = Union[Fifo, Heap, Lifo, Prioritized, Uniform]
# Note that this is effectively treated as `Any`; see b/109648354.
SpecNest = Union[
tf.TensorSpec, Iterable['SpecNest'], Mapping[str, 'SpecNest']] # pytype: disable=not-supported-yet
@dataclasses.dataclass
class TableInfo:
"""A tuple describing Table information.
The main difference between this object and a `schema_pb2.TableInfo` message
is that the signature is a nested structure of `tf.TypeSpec` objects,
instead of a raw proto.
It also has a `TableInfo.from_serialized_proto` classmethod, which is an
alternate constructor for creating a `TableInfo` object from a serialized
`schema_pb2.TableInfo` proto.
"""
# LINT.IfChange
name: str
sampler_options: schema_pb2.KeyDistributionOptions
remover_options: schema_pb2.KeyDistributionOptions
max_size: int
max_times_sampled: int
rate_limiter_info: schema_pb2.RateLimiterInfo
signature: Optional[SpecNest]
current_size: int
num_episodes: int
num_deleted_episodes: int
num_unique_samples: int
table_worker_time: schema_pb2.TableWorkerTime
# LINT.ThenChange(../../reverb/schema.proto)
@classmethod
def from_serialized_proto(cls, proto_string: bytes) -> 'TableInfo':
"""Constructs a TableInfo from a serialized `schema_pb2.TableInfo`."""
proto = schema_pb2.TableInfo.FromString(proto_string)
if proto.HasField('signature'):
signature = nested_structure_coder.decode_proto(proto.signature)
else:
signature = None
return cls(
name=proto.name,
sampler_options=proto.sampler_options,
remover_options=proto.remover_options,
max_size=proto.max_size,
max_times_sampled=proto.max_times_sampled,
rate_limiter_info=proto.rate_limiter_info,
signature=signature,
current_size=proto.current_size,
num_episodes=proto.num_episodes,
num_deleted_episodes=proto.num_deleted_episodes,
num_unique_samples=proto.num_unique_samples,
table_worker_time=proto.table_worker_time,
)
|
reverb-master
|
reverb/reverb_types.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for tf_client."""
from concurrent import futures
import time
import numpy as np
from reverb import client as reverb_client
from reverb import item_selectors
from reverb import rate_limiters
from reverb import server
from reverb import tf_client
import tensorflow.compat.v1 as tf
def make_tables_and_server():
tables = [
server.Table(
'dist',
sampler=item_selectors.Prioritized(priority_exponent=1),
remover=item_selectors.Fifo(),
max_size=1000000,
rate_limiter=rate_limiters.MinSize(1)),
server.Table(
'dist2',
sampler=item_selectors.Prioritized(priority_exponent=1),
remover=item_selectors.Fifo(),
max_size=1000000,
rate_limiter=rate_limiters.MinSize(1)),
]
return tables, server.Server(tables=tables)
class SampleOpTest(tf.test.TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls._tables, cls._server = make_tables_and_server()
cls._client = reverb_client.Client(f'localhost:{cls._server.port}')
def tearDown(self):
super().tearDown()
self._client.reset('dist')
@classmethod
def tearDownClass(cls):
super().tearDownClass()
cls._server.stop()
def test_sets_meta_data_fields(self):
input_data = [np.ones((81, 81), dtype=np.float64)]
self._client.insert(input_data, {'dist': 1})
with self.session() as session:
client = tf_client.TFClient(self._client.server_address)
sample = session.run(client.sample('dist', [tf.float64]))
np.testing.assert_equal(input_data, sample.data)
self.assertNotEqual(sample.info.key, 0)
self.assertEqual(sample.info.probability, 1)
self.assertEqual(sample.info.table_size, 1)
self.assertEqual(sample.info.priority, 1)
def test_dtype_mismatch_result_in_error_raised(self):
data = [np.zeros((81, 81))]
self._client.insert(data, {'dist': 1})
with self.session() as session:
client = tf_client.TFClient(self._client.server_address)
with self.assertRaises(tf.errors.InternalError):
session.run(client.sample('dist', [tf.float32]))
def test_forwards_server_error(self):
with self.session() as session:
client = tf_client.TFClient(self._client.server_address)
with self.assertRaises(tf.errors.NotFoundError):
session.run(client.sample('invalid', [tf.float64]))
def test_retries_until_success_or_fatal_error(self):
with self.session() as session:
client = tf_client.TFClient(self._client.server_address)
with futures.ThreadPoolExecutor(max_workers=1) as executor:
sample = executor.submit(session.run,
client.sample('dist', [tf.float64]))
input_data = [np.zeros((81, 81))]
self._client.insert(input_data, {'dist': 1})
np.testing.assert_equal(input_data, sample.result().data)
class UpdatePrioritiesOpTest(tf.test.TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls._tables, cls._server = make_tables_and_server()
cls._client = reverb_client.Client(f'localhost:{cls._server.port}')
def tearDown(self):
super().tearDown()
self._client.reset('dist')
@classmethod
def tearDownClass(cls):
super().tearDownClass()
cls._server.stop()
def test_shape_result_in_error_raised(self):
with self.session() as session:
client = tf_client.TFClient(self._client.server_address)
update_op = client.update_priorities(
tf.constant('dist'), tf.constant([1, 2], dtype=tf.uint64),
tf.constant([1], dtype=tf.float64))
with self.assertRaises(tf.errors.InvalidArgumentError):
session.run(update_op)
def test_priority_update_is_applied(self):
# Start with uniform distribution
for i in range(4):
self._client.insert([np.array([i], dtype=np.uint32)], {'dist': 1})
for _ in range(100):
if self._tables[0].info.current_size == 4:
break
time.sleep(0.01)
self.assertEqual(self._tables[0].info.current_size, 4)
# Until we have recieved all 4 items.
items = {}
while len(items) < 4:
item = next(self._client.sample('dist'))[0]
items[item.info.key] = item.info.probability
self.assertEqual(item.info.probability, 0.25)
# Update the priority of one of the items.
update_key = next(iter(items.keys()))
with self.session() as session:
client = tf_client.TFClient(self._client.server_address)
update_op = client.update_priorities(
table=tf.constant('dist'),
keys=tf.constant([update_key], dtype=tf.uint64),
priorities=tf.constant([3], dtype=tf.float64))
self.assertIsNone(session.run(update_op))
# The updated item now has priority 3 and the other 3 items have priority 1
# each. The probability of sampling the new item should thus be 50%. We
# sample until the updated item is seen and check that the probability (and
# thus the priority) has been updated.
for _ in range(1000):
item = next(self._client.sample('dist'))[0]
if item.info.key == update_key:
self.assertEqual(item.info.probability, 0.5)
break
else:
self.fail('Updated item was not found')
class InsertOpTest(tf.test.TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls._tables, cls._server = make_tables_and_server()
cls._client = reverb_client.Client(f'localhost:{cls._server.port}')
def tearDown(self):
super().tearDown()
self._client.reset('dist')
self._client.reset('dist2')
@classmethod
def tearDownClass(cls):
super().tearDownClass()
cls._server.stop()
def setUp(self):
super().setUp()
self.data = [tf.constant([1, 2, 3], dtype=tf.int8)]
def test_checks_that_table_has_rank_1(self):
client = tf_client.TFClient(self._client.server_address)
priorities = tf.constant([1.0], dtype=tf.float64)
# Works for rank 1.
client.insert(self.data, tf.constant(['dist']), priorities)
# Does not work for rank > 1.
with self.assertRaises(ValueError):
client.insert(self.data, tf.constant([['dist']]), priorities)
# Does not work for rank < 1.
with self.assertRaises(ValueError):
client.insert(self.data, tf.constant('dist'), priorities)
def test_checks_dtype_of_table_argument(self):
client = tf_client.TFClient(self._client.server_address)
with self.assertRaises(ValueError):
client.insert(self.data, tf.constant([1]),
tf.constant([1.0], dtype=tf.float64))
def test_checks_that_priorities_argument_has_rank_1(self):
client = tf_client.TFClient(self._client.server_address)
data = [tf.constant([1, 2])]
tables = tf.constant(['dist'])
# Works for rank 1.
client.insert(data, tables, tf.constant([1.0], dtype=tf.float64))
# Does not work for rank > 1.
with self.assertRaises(ValueError):
client.insert(data, tables, tf.constant([[1.0]], dtype=tf.float64))
# Does not work for rank < 1.
with self.assertRaises(ValueError):
client.insert(data, tables, tf.constant(1.0, dtype=tf.float64))
def test_checks_that_priorities_argument_has_dtype_float64(self):
client = tf_client.TFClient(self._client.server_address)
with self.assertRaises(ValueError):
client.insert(self.data, tf.constant(['dist']),
tf.constant([1.0], dtype=tf.float32))
def test_checks_that_tables_and_priorities_arguments_have_same_shape(self):
client = tf_client.TFClient(self._client.server_address)
with self.assertRaises(ValueError):
client.insert(self.data, tf.constant(['dist', 'dist2']),
tf.constant([1.0], dtype=tf.float64))
def test_single_table_insert(self):
with self.session() as session:
client = tf_client.TFClient(self._client.server_address)
insert_op = client.insert(
data=[tf.constant([1, 2, 3], dtype=tf.int8)],
tables=tf.constant(['dist']),
priorities=tf.constant([1.0], dtype=tf.float64))
sample_op = client.sample('dist', [tf.int8])
# Check that insert op succeeds.
self.assertIsNone(session.run(insert_op))
# Check that the sampled data matches the inserted.
sample = session.run(sample_op)
self.assertLen(sample.data, 1)
np.testing.assert_equal(
np.array([1, 2, 3], dtype=np.int8), sample.data[0])
def test_multi_table_insert(self):
with self.session() as session:
client = tf_client.TFClient(self._client.server_address)
insert_op = client.insert(
data=[tf.constant([1, 2, 3], dtype=tf.int8)],
tables=tf.constant(['dist', 'dist2']),
priorities=tf.constant([1.0, 2.0], dtype=tf.float64))
sample_ops = [
client.sample('dist', [tf.int8]),
client.sample('dist2', [tf.int8])
]
# Check that insert op succeeds.
self.assertIsNone(session.run(insert_op))
# Check that the sampled data matches the inserted in all tables.
for sample_op in sample_ops:
sample = session.run(sample_op)
self.assertLen(sample.data, 1)
np.testing.assert_equal(
np.array([1, 2, 3], dtype=np.int8), sample.data[0])
if __name__ == '__main__':
tf.disable_eager_execution()
tf.test.main()
|
reverb-master
|
reverb/tf_client_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for timestep_dataset_eager."""
from absl.testing import parameterized
import numpy as np
from reverb import server as reverb_server
from reverb import timestep_dataset
import tensorflow as tf
class TimestepDatasetEagerTest(parameterized.TestCase):
@parameterized.product(
num_workers_per_iterator=[1, 3],
max_in_flight_samples_per_worker=[1, 5],
max_samples=[4],
)
def test_max_samples(self, num_workers_per_iterator,
max_in_flight_samples_per_worker, max_samples):
s = reverb_server.Server([reverb_server.Table.queue('q', 10)])
c = s.localhost_client()
for i in range(10):
c.insert(i, {'q': 1})
ds = timestep_dataset.TimestepDataset(
server_address=c.server_address,
table='q',
dtypes=tf.int64,
shapes=tf.TensorShape([]),
max_in_flight_samples_per_worker=max_in_flight_samples_per_worker,
num_workers_per_iterator=num_workers_per_iterator,
max_samples=max_samples)
# Check that it fetches exactly `max_samples` samples.
it = ds.as_numpy_iterator()
self.assertLen(list(it), max_samples)
# Check that no prefetching happened in the queue.
self.assertEqual(c.server_info()['q'].current_size, 10 - max_samples)
np.testing.assert_array_equal(
next(c.sample('q', 1))[0].data[0], np.asarray(max_samples))
if __name__ == '__main__':
tf.test.main()
|
reverb-master
|
reverb/timestep_dataset_eager_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""TFClient provides tf-ops for interacting with Reverb."""
from typing import Optional, Sequence
from reverb import replay_sample
import tensorflow.compat.v1 as tf
import tree
from reverb.cc.ops import gen_reverb_ops
class TFClient:
"""Client class for calling Reverb replay servers from a TensorFlow graph."""
def __init__(self,
server_address: str,
shared_name: Optional[str] = None,
name: str = 'reverb'):
"""Creates the client TensorFlow handle.
Args:
server_address: Address of the server.
shared_name: (Optional) If non-empty, this client will be shared under the
given name across multiple sessions.
name: Optional name for the Client operations.
"""
self._name = name
self._server_address = server_address
self._handle = gen_reverb_ops.reverb_client(
server_address=server_address, shared_name=shared_name, name=name)
@property
def server_address(self) -> str:
return self._server_address
def sample(self,
table: str,
data_dtypes,
name: Optional[str] = None) -> replay_sample.ReplaySample:
"""Samples an item from the replay.
This only allows sampling items with a data field.
Args:
table: Probability table to sample from.
data_dtypes: Dtypes of the data output. Can be nested.
name: Optional name for the Client operations.
Returns:
A ReplaySample with data nested according to data_dtypes. See ReplaySample
for more details.
"""
with tf.name_scope(name, f'{self._name}_sample', ['sample']) as scope:
key, probability, table_size, priority, times_sampled, data = (
gen_reverb_ops.reverb_client_sample(
self._handle, table, tree.flatten(data_dtypes), name=scope))
return replay_sample.ReplaySample(
info=replay_sample.SampleInfo(
key=key,
probability=probability,
table_size=table_size,
priority=priority,
times_sampled=times_sampled),
data=tree.unflatten_as(data_dtypes, data))
def insert(self,
data: Sequence[tf.Tensor],
tables: tf.Tensor,
priorities: tf.Tensor,
name: Optional[str] = None):
"""Inserts a trajectory into one or more tables.
The content of `tables` and `priorities` are zipped to create the
prioritized items. That is, an item with priority `priorities[i]` is
inserted into `tables[i]`.
Args:
data: Tensors to insert as the trajectory.
tables: Rank 1 tensor with the names of the tables to create prioritized
items in.
priorities: Rank 1 tensor with priorities of the new items.
name: Optional name for the client operation.
Returns:
A tf-op for performing the insert.
Raises:
ValueError: If tables is not a string tensor of rank 1.
ValueError: If priorities is not a float64 tensor of rank 1.
ValueError: If priorities and tables does not have the same shape.
"""
if tables.dtype != tf.string or tables.shape.rank != 1:
raise ValueError('tables must be a string tensor of rank 1')
if priorities.dtype != tf.float64 or priorities.shape.rank != 1:
raise ValueError('priorities must be a float64 tensor of rank 1')
if not tables.shape.is_compatible_with(priorities.shape):
raise ValueError('priorities and tables must have the same shape')
with tf.name_scope(name, f'{self._name}_insert', ['insert']) as scope:
return gen_reverb_ops.reverb_client_insert(
self._handle, data, tables, priorities, name=scope)
def update_priorities(self,
table: str,
keys: tf.Tensor,
priorities: tf.Tensor,
name: Optional[str] = None):
"""Creates op for updating priorities of existing items in the replay.
Not found elements for `keys` are silently ignored.
Args:
table: Probability table to update.
keys: Keys of the items to update. Must be same length as `priorities`.
priorities: New priorities for `keys`. Must be same length as `keys`.
name: Optional name for the operation.
Returns:
A tf-op for performing the update.
"""
with tf.name_scope(name, f'{self._name}_update_priorities',
['update_priorities']) as scope:
return gen_reverb_ops.reverb_client_update_priorities(
self._handle, table, keys, priorities, name=scope)
|
reverb-master
|
reverb/tf_client.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for replay_sample."""
from absl.testing import absltest
from reverb import pybind
from reverb import replay_sample
class SampleInfoTest(absltest.TestCase):
def test_has_the_correct_number_of_fields(self):
self.assertLen(replay_sample.SampleInfo._fields,
pybind.Sampler.NUM_INFO_TENSORS)
if __name__ == '__main__':
absltest.main()
|
reverb-master
|
reverb/replay_sample_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Data structures for output of client samples."""
from typing import Any, NamedTuple, Sequence, Union
import numpy as np
import tensorflow.compat.v1 as tf
class SampleInfo(NamedTuple):
"""Extra details about the sampled item.
Fields:
key: Key of the item that was sampled. Used for updating the priority.
Typically a python `int` (for output of Client.sample) or
`tf.uint64` Tensor (for output of TF Client.sample).
probability: Probability of selecting the item at the time of sampling.
A python `float` or `tf.float64` Tensor.
table_size: The total number of items present in the table at sample time.
priority: Priority of the item at the time of sampling. A python `float` or
`tf.float64` Tensor.
times_sampled: Number of times this item has been sampled (including this
time).
"""
key: Union[np.ndarray, tf.Tensor, int]
probability: Union[np.ndarray, tf.Tensor, float]
table_size: Union[np.ndarray, tf.Tensor, int]
priority: Union[np.ndarray, tf.Tensor, float]
times_sampled: Union[np.ndarray, tf.Tensor, int]
@classmethod
def tf_dtypes(cls):
"""Dtypes for (key, probability, table_size, priority, times_sampled)."""
return cls(tf.uint64, tf.double, tf.int64, tf.double, tf.int32)
@classmethod
def tf_shapes(cls):
return cls(*[tf.TensorShape([]) for _ in cls.tf_dtypes()])
@classmethod
def zeros(cls):
"""Create a SampleInfo with Python zero values for all fields.."""
return cls(0, 0.0, 0, 0.0, 0)
class ReplaySample(NamedTuple):
"""Item returned by sample operations.
Fields:
info: Details about the sampled item. Instance of `SampleInfo`.
data: Tensors for the data. If the structure is available to the sampler
then the data will be nested. If the structure is not available then the
flattened structure, i.e. a list, is used.
"""
info: SampleInfo
data: Union[Sequence[np.ndarray], Any]
|
reverb-master
|
reverb/replay_sample.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Sanity tests for the pybind.py."""
from absl.testing import absltest
from absl.testing import parameterized
import numpy as np
import reverb
TABLE_NAME = 'queue'
class TestNdArrayToTensorAndBack(parameterized.TestCase):
@classmethod
def setUpClass(cls):
super(TestNdArrayToTensorAndBack, cls).setUpClass()
cls._server = reverb.Server(tables=[reverb.Table.queue(TABLE_NAME, 1000)])
cls._client = cls._server.localhost_client()
def tearDown(self):
super(TestNdArrayToTensorAndBack, self).tearDown()
self._client.reset(TABLE_NAME)
@classmethod
def tearDownClass(cls):
super(TestNdArrayToTensorAndBack, cls).tearDownClass()
cls._server.stop()
@parameterized.parameters(
(1,),
(1.0,),
(np.arange(4).reshape([2, 2]),),
(np.array(1, dtype=np.float16),),
(np.array(1, dtype=np.float32),),
(np.array(1, dtype=np.float64),),
(np.array(1, dtype=np.int8),),
(np.array(1, dtype=np.int16),),
(np.array(1, dtype=np.int32),),
(np.array(1, dtype=np.int64),),
(np.array(1, dtype=np.uint8),),
(np.array(1, dtype=np.uint16),),
(np.array(1, dtype=np.uint32),),
(np.array(1, dtype=np.uint64),),
(np.array(True, dtype=bool),),
(np.array(1, dtype=np.complex64),),
(np.array(1, dtype=np.complex128),),
(np.array([b'a string']),),
)
def test_sanity_check(self, data):
with self._client.writer(1) as writer:
writer.append([data])
writer.create_item(TABLE_NAME, 1, 1)
sample = next(self._client.sample(TABLE_NAME))
got = sample[0].data[0]
np.testing.assert_array_equal(data, got)
def test_stress_string_memory_leak(self):
with self._client.writer(1) as writer:
for i in range(100):
writer.append(['string_' + ('a' * 100 * i)])
writer.create_item(TABLE_NAME, 1, 1)
for i in range(100):
sample = next(self._client.sample(TABLE_NAME))
got = sample[0].data[0]
np.testing.assert_array_equal(got, b'string_' + (b'a' * 100 * i))
if __name__ == '__main__':
absltest.main()
|
reverb-master
|
reverb/pybind_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for dataset."""
import threading
import time
from absl.testing import parameterized
import numpy as np
from reverb import client
from reverb import errors
from reverb import item_selectors
from reverb import rate_limiters
from reverb import replay_sample
from reverb import server as reverb_server
from reverb import timestep_dataset
import tensorflow.compat.v1 as tf
import tree
from tensorflow.python.framework import tensor_spec # pylint:disable=g-direct-tensorflow-import
def make_server():
return reverb_server.Server(tables=[
reverb_server.Table(
'dist',
sampler=item_selectors.Prioritized(priority_exponent=1),
remover=item_selectors.Fifo(),
max_size=1000000,
rate_limiter=rate_limiters.MinSize(1)),
reverb_server.Table(
'signatured',
sampler=item_selectors.Prioritized(priority_exponent=1),
remover=item_selectors.Fifo(),
max_size=1000000,
rate_limiter=rate_limiters.MinSize(1),
signature=tf.TensorSpec(dtype=tf.float32, shape=(None, None))),
reverb_server.Table(
'bounded_spec_signatured',
sampler=item_selectors.Prioritized(priority_exponent=1),
remover=item_selectors.Fifo(),
max_size=1000000,
rate_limiter=rate_limiters.MinSize(1),
# Currently only the `shape` and `dtype` of the bounded spec
# is considered during signature check.
# TODO(b/158033101): Check the boundaries as well.
signature=tensor_spec.BoundedTensorSpec(
dtype=tf.float32,
shape=(None, None),
minimum=(0.0, 0.0),
maximum=(10.0, 10.)),
),
])
class TimestepDatasetTest(tf.test.TestCase, parameterized.TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls._server = make_server()
cls._client = client.Client(f'localhost:{cls._server.port}')
def setUp(self):
super().setUp()
self._num_prev_samples = {
table: self._get_total_num_samples(table)
for table in ('dist', 'signatured', 'bounded_spec_signatured')
}
def tearDown(self):
super().tearDown()
self._client.reset('dist')
self._client.reset('signatured')
self._client.reset('bounded_spec_signatured')
@classmethod
def tearDownClass(cls):
super().tearDownClass()
cls._server.stop()
def _populate_replay(self, sequence_length=100, max_time_steps=None):
max_time_steps = max_time_steps or sequence_length
with self._client.writer(max_time_steps) as writer:
for i in range(1000):
writer.append([np.zeros((3, 3), dtype=np.float32)])
if i % 5 == 0 and i >= sequence_length:
writer.create_item(
table='dist', num_timesteps=sequence_length, priority=1)
writer.create_item(
table='signatured', num_timesteps=sequence_length, priority=1)
writer.create_item(
table='bounded_spec_signatured',
num_timesteps=sequence_length,
priority=1)
def _sample_from(self, dataset, num_samples):
iterator = dataset.make_initializable_iterator()
dataset_item = iterator.get_next()
self.evaluate(iterator.initializer)
return [self.evaluate(dataset_item) for _ in range(num_samples)]
def _get_total_num_samples(self, table: str) -> int:
table_info = self._client.server_info()[table]
return table_info.rate_limiter_info.sample_stats.completed
def _get_num_samples(self, table: str) -> int:
"""Gets the number of samples since the start of the test."""
return self._get_total_num_samples(table) - self._num_prev_samples[table]
@parameterized.named_parameters(
{
'testcase_name': 'default_values',
},
{
'testcase_name': 'num_workers_per_iterator_is_0',
'num_workers_per_iterator': 0,
'want_error': ValueError,
},
{
'testcase_name': 'num_workers_per_iterator_is_1',
'num_workers_per_iterator': 1,
},
{
'testcase_name': 'num_workers_per_iterator_is_minus_1',
'num_workers_per_iterator': -1,
},
{
'testcase_name': 'num_workers_per_iterator_is_minus_2',
'num_workers_per_iterator': -2,
'want_error': ValueError,
},
{
'testcase_name': 'max_samples_per_stream_is_0',
'max_samples_per_stream': 0,
'want_error': ValueError,
},
{
'testcase_name': 'max_samples_per_stream_is_1',
'max_samples_per_stream': 1,
},
{
'testcase_name': 'max_samples_per_stream_is_minus_1',
'max_samples_per_stream': -1,
},
{
'testcase_name': 'max_samples_per_stream_is_minus_2',
'num_workers_per_iterator': -2,
'want_error': ValueError,
},
{
'testcase_name': 'max_in_flight_samples_per_worker_is_0',
'max_in_flight_samples_per_worker': 0,
'want_error': ValueError,
},
{
'testcase_name': 'max_in_flight_samples_per_worker_is_1',
'max_in_flight_samples_per_worker': 1,
},
{
'testcase_name': 'max_in_flight_samples_per_worker_is_minus_1',
'max_in_flight_samples_per_worker': -1,
'want_error': ValueError,
},
)
def test_sampler_parameter_validation(self, **kwargs):
dtypes = (tf.float32,)
shapes = (tf.TensorShape([3, 3]),)
if 'max_in_flight_samples_per_worker' not in kwargs:
kwargs['max_in_flight_samples_per_worker'] = 100
if 'want_error' in kwargs:
error = kwargs.pop('want_error')
with self.assertRaises(error):
timestep_dataset.TimestepDataset(self._client.server_address, 'dist',
dtypes, shapes, **kwargs)
else:
timestep_dataset.TimestepDataset(self._client.server_address, 'dist',
dtypes, shapes, **kwargs)
def test_iterate(self):
self._populate_replay()
dataset = timestep_dataset.TimestepDataset(
tf.constant(self._client.server_address),
table=tf.constant('dist'),
dtypes=(tf.float32,),
shapes=(tf.TensorShape([3, 3]),),
max_in_flight_samples_per_worker=100)
got = self._sample_from(dataset, 10)
for sample in got:
self.assertIsInstance(sample, replay_sample.ReplaySample)
# A single sample is returned so the key should be a scalar int64.
self.assertIsInstance(sample.info.key, np.uint64)
np.testing.assert_array_equal(sample.data[0],
np.zeros((3, 3), dtype=np.float32))
def test_distribution_strategy(self):
self._populate_replay()
physical_devices = tf.config.list_physical_devices('CPU')
configs = tf.config.experimental.get_virtual_device_configuration(
physical_devices[0])
if configs is None:
virtual_devices = [
tf.config.experimental.VirtualDeviceConfiguration() for _ in range(4)
]
tf.config.experimental.set_virtual_device_configuration(
physical_devices[0], virtual_devices)
strategy = tf.distribute.MirroredStrategy(['/cpu:%d' % i for i in range(4)])
def timestep_dataset_fn(i):
tf.print('Creating dataset for replica; index:', i)
return timestep_dataset.TimestepDataset(
self._client.server_address,
table=tf.constant('dist'),
dtypes=(tf.float32,),
shapes=(tf.TensorShape([3, 3]),),
max_in_flight_samples_per_worker=100).take(2)
def dataset_fn(_):
return tf.data.Dataset.range(4).flat_map(timestep_dataset_fn).take(2 * 4)
ds = strategy.experimental_distribute_datasets_from_function(dataset_fn)
def check_probabilities(_, v):
probability = v.info.probability
self.assertLen(probability.values, 4)
# Don't use any math ops since tensor values seem to contain
# unaligned tensors on some systems; but tf.print doesn't check alignment.
#
# This seems to be caused by a compatibility issue where DistStrat isn't
# well tested when eager mode is disabled. So instead of treating this
# as a true TF bug, we just work around it. We can remove this hack and
# convert it to e.g. tf.assert_greater type check if/when we enable eager
# execution for these tests.
tf.print('Probability values:', probability.values)
def get_next_value(v):
return tf.distribute.get_replica_context().merge_call(
check_probabilities, args=(v,))
@tf.function
def run_strategy(ds_):
i = tf.constant(0)
for v in ds_:
strategy.run(get_next_value, args=(v,))
i += 1
return i
rs = run_strategy(ds)
# Each iteration contains 4 items - one from each replica. We take 8 items
# total, so there should be 2 iterations.
self.assertEqual(2, self.evaluate(rs))
def test_timeout_invalid_arguments(self):
with self.assertRaisesRegex(ValueError, r'must be an integer >= -1'):
timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=(tf.float32,),
shapes=(tf.TensorShape([3, 3]),),
rate_limiter_timeout_ms=-2,
max_in_flight_samples_per_worker=100)
def test_timeout(self):
dataset_0s = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=(tf.float32,),
shapes=(tf.TensorShape([3, 3]),),
rate_limiter_timeout_ms=0,
max_in_flight_samples_per_worker=100)
dataset_1s = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=(tf.float32,),
shapes=(tf.TensorShape([3, 3]),),
rate_limiter_timeout_ms=1000,
max_in_flight_samples_per_worker=100)
dataset_2s = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=(tf.float32,),
shapes=(tf.TensorShape([3, 3]),),
rate_limiter_timeout_ms=2000,
max_in_flight_samples_per_worker=100)
start_time = time.time()
with self.assertRaisesWithPredicateMatch(tf.errors.OutOfRangeError,
r'End of sequence'):
self._sample_from(dataset_0s, 1)
duration = time.time() - start_time
self.assertGreaterEqual(duration, 0)
self.assertLess(duration, 5)
start_time = time.time()
with self.assertRaisesWithPredicateMatch(tf.errors.OutOfRangeError,
r'End of sequence'):
self._sample_from(dataset_1s, 1)
duration = time.time() - start_time
self.assertGreaterEqual(duration, 1)
self.assertLess(duration, 10)
start_time = time.time()
with self.assertRaisesWithPredicateMatch(tf.errors.OutOfRangeError,
r'End of sequence'):
self._sample_from(dataset_2s, 1)
duration = time.time() - start_time
self.assertGreaterEqual(duration, 2)
self.assertLess(duration, 10)
# If we insert some data, and the rate limiter doesn't force any waiting,
# then we can ask for a timeout of 0s and still get data back.
self._populate_replay()
got = self._sample_from(dataset_0s, 2)
self.assertLen(got, 2)
@parameterized.parameters(['signatured'], ['bounded_spec_signatured'])
def test_inconsistent_signature_size(self, table_name):
self._populate_replay()
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table=table_name,
dtypes=(tf.float32, tf.float64),
shapes=(tf.TensorShape([3, 3]), tf.TensorShape([])),
max_in_flight_samples_per_worker=100)
with self.assertRaisesWithPredicateMatch(
tf.errors.InvalidArgumentError,
r'Inconsistent number of tensors requested from table \'{}\'. '
r'Requested 2 tensors, but table signature shows 1 tensors.'.format(
table_name)):
self._sample_from(dataset, 10)
@parameterized.parameters(['signatured'], ['bounded_spec_signatured'])
def test_incompatible_signature_dtype(self, table_name):
self._populate_replay()
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table=table_name,
dtypes=(tf.int64,),
shapes=(tf.TensorShape([3, 3]),),
max_in_flight_samples_per_worker=100)
with self.assertRaisesWithPredicateMatch(
tf.errors.InvalidArgumentError,
r'Requested incompatible tensor at flattened index 0 from table '
r'\'{}\'. Requested \(dtype, shape\): \(int64, \[3,3\]\). '
r'Signature \(dtype, shape\): \(float, \[\?,\?\]\)'.format(table_name)):
self._sample_from(dataset, 10)
@parameterized.parameters(['signatured'], ['bounded_spec_signatured'])
def test_incompatible_signature_shape(self, table_name):
self._populate_replay()
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table=table_name,
dtypes=(tf.float32,),
shapes=(tf.TensorShape([3]),),
max_in_flight_samples_per_worker=100)
with self.assertRaisesWithPredicateMatch(
tf.errors.InvalidArgumentError,
r'Requested incompatible tensor at flattened index 0 from table '
r'\'{}\'. Requested \(dtype, shape\): \(float, \[3\]\). '
r'Signature \(dtype, shape\): \(float, \[\?,\?\]\)'.format(table_name)):
self._sample_from(dataset, 10)
def test_incompatible_dataset_shapes_and_types_without_signature(self):
self._populate_replay()
ds_wrong_shape = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=(tf.float32,),
shapes=(tf.TensorShape([]),),
max_in_flight_samples_per_worker=100)
with self.assertRaisesRegex(
tf.errors.InvalidArgumentError,
r'Specification has \(dtype, shape\): \(float, \[\]\). '
r'Tensor has \(dtype, shape\): \(float, \[3,3\]\).'):
self._sample_from(ds_wrong_shape, 1)
@parameterized.named_parameters(
dict(testcase_name='TableDist', table_name='dist'),
dict(testcase_name='TableSignatured', table_name='signatured'),
dict(
testcase_name='TableBoundedSpecSignatured',
table_name='bounded_spec_signatured'))
def test_iterate_batched(self, table_name):
self._populate_replay()
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table=table_name,
dtypes=(tf.float32,),
shapes=(tf.TensorShape([3, 3]),),
max_in_flight_samples_per_worker=100)
dataset = dataset.batch(2, True)
got = self._sample_from(dataset, 10)
for sample in got:
self.assertIsInstance(sample, replay_sample.ReplaySample)
# The keys should be batched up like the data.
self.assertEqual(sample.info.key.shape, (2,))
np.testing.assert_array_equal(sample.data[0],
np.zeros((2, 3, 3), dtype=np.float32))
def test_iterate_nested_and_batched(self):
with self._client.writer(100) as writer:
for i in range(1000):
writer.append({
'observation': {
'data': np.zeros((3, 3), dtype=np.float32),
'extras': [
np.int64(10),
np.ones([1], dtype=np.int32),
],
},
'reward': np.zeros((10, 10), dtype=np.float32),
})
if i % 5 == 0 and i >= 100:
writer.create_item(table='dist', num_timesteps=100, priority=1)
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=(((tf.float32), (tf.int64, tf.int32)), tf.float32),
shapes=((tf.TensorShape([3, 3]), (tf.TensorShape(None),
tf.TensorShape([1]))),
tf.TensorShape([10, 10])),
max_in_flight_samples_per_worker=100)
dataset = dataset.batch(3)
structure = {
'observation': {
'data':
tf.TensorSpec([3, 3], tf.float32),
'extras': [
tf.TensorSpec([], tf.int64),
tf.TensorSpec([1], tf.int32),
],
},
'reward': tf.TensorSpec([], tf.int64),
}
got = self._sample_from(dataset, 10)
self.assertLen(got, 10)
for sample in got:
self.assertIsInstance(sample, replay_sample.ReplaySample)
transition = tree.unflatten_as(structure, tree.flatten(sample.data))
np.testing.assert_array_equal(transition['observation']['data'],
np.zeros([3, 3, 3], dtype=np.float32))
np.testing.assert_array_equal(transition['observation']['extras'][0],
np.ones([3], dtype=np.int64) * 10)
np.testing.assert_array_equal(transition['observation']['extras'][1],
np.ones([3, 1], dtype=np.int32))
np.testing.assert_array_equal(transition['reward'],
np.zeros([3, 10, 10], dtype=np.float32))
def test_multiple_iterators(self):
with self._client.writer(100) as writer:
for i in range(10):
writer.append([np.ones((81, 81), dtype=np.float32) * i])
writer.create_item(table='dist', num_timesteps=10, priority=1)
trajectory_length = 5
batch_size = 3
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=(tf.float32,),
shapes=(tf.TensorShape([81, 81]),),
max_in_flight_samples_per_worker=100)
dataset = dataset.batch(trajectory_length)
iterators = [
dataset.make_initializable_iterator() for _ in range(batch_size)
]
items = tf.stack(
[tf.squeeze(iterator.get_next().data) for iterator in iterators])
with self.session() as session:
session.run([iterator.initializer for iterator in iterators])
got = session.run(items)
self.assertEqual(got.shape, (batch_size, trajectory_length, 81, 81))
want = np.array(
[[np.ones([81, 81]) * i for i in range(trajectory_length)]] *
batch_size)
np.testing.assert_array_equal(got, want)
def test_iterate_over_blobs(self):
for _ in range(10):
self._client.insert((np.ones([3, 3], dtype=np.int32)), {'dist': 1})
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=(tf.int32,),
shapes=(tf.TensorShape([3, 3]),),
max_in_flight_samples_per_worker=100)
got = self._sample_from(dataset, 20)
self.assertLen(got, 20)
for sample in got:
self.assertIsInstance(sample, replay_sample.ReplaySample)
self.assertIsInstance(sample.info.key, np.uint64)
self.assertIsInstance(sample.info.probability, np.float64)
np.testing.assert_array_equal(sample.data[0],
np.ones((3, 3), dtype=np.int32))
@parameterized.parameters(1, 3, 7)
def test_respects_max_in_flight_samples_per_worker(
self, max_in_flight_samples_per_worker):
for _ in range(10):
self._client.insert((np.ones([3, 3], dtype=np.int32)), {'dist': 1})
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=(tf.int32,),
shapes=(tf.TensorShape([3, 3]),),
max_in_flight_samples_per_worker=max_in_flight_samples_per_worker)
iterator = dataset.make_initializable_iterator()
dataset_item = iterator.get_next()
self.evaluate(iterator.initializer)
for _ in range(100):
self.evaluate(dataset_item)
# Check that the buffer is incremented by steps of
# max_in_flight_samples_per_worker.
self.assertEqual(
self._get_num_samples('dist') % max_in_flight_samples_per_worker, 0)
def test_iterate_over_batched_blobs(self):
for _ in range(10):
self._client.insert((np.ones([3, 3], dtype=np.int32)), {'dist': 1})
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=(tf.int32,),
shapes=(tf.TensorShape([3, 3]),),
max_in_flight_samples_per_worker=100)
dataset = dataset.batch(5)
got = self._sample_from(dataset, 20)
self.assertLen(got, 20)
for sample in got:
self.assertIsInstance(sample, replay_sample.ReplaySample)
self.assertEqual(sample.info.key.shape, (5,))
np.testing.assert_array_equal(sample.data[0],
np.ones((5, 3, 3), dtype=np.int32))
def test_converts_spec_lists_into_tuples(self):
for _ in range(10):
data = [
(np.ones([1, 1], dtype=np.int32),),
[
np.ones([3, 3], dtype=np.int8),
(np.ones([2, 2], dtype=np.float64),)
],
]
self._client.insert(data, {'dist': 1})
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=[
(tf.int32,),
[
tf.int8,
(tf.float64,),
],
],
shapes=[
(tf.TensorShape([1, 1]),),
[
tf.TensorShape([3, 3]),
(tf.TensorShape([2, 2]),),
],
],
max_in_flight_samples_per_worker=100)
got = self._sample_from(dataset, 10)
for sample in got:
self.assertIsInstance(sample, replay_sample.ReplaySample)
self.assertIsInstance(sample.info.key, np.uint64)
tree.assert_same_structure(sample.data, (
(None,),
(
None,
(None,),
),
))
def test_session_is_closed_while_op_pending(self):
dataset = timestep_dataset.TimestepDataset(
self._client.server_address,
table='dist',
dtypes=tf.float32,
shapes=tf.TensorShape([]),
max_in_flight_samples_per_worker=100)
iterator = dataset.make_initializable_iterator()
item = iterator.get_next()
def _session_closer(sess, wait_time_secs):
def _fn():
time.sleep(wait_time_secs)
sess.close()
return _fn
with self.session() as sess:
sess.run(iterator.initializer)
thread = threading.Thread(target=_session_closer(sess, 3))
thread.start()
with self.assertRaises(tf.errors.CancelledError):
sess.run(item)
@parameterized.product(
num_workers_per_iterator=[1, 3],
max_in_flight_samples_per_worker=[1, 5],
max_samples=[4],
)
def test_max_samples(self, num_workers_per_iterator,
max_in_flight_samples_per_worker, max_samples):
s = reverb_server.Server([reverb_server.Table.queue('q', 10)])
c = s.localhost_client()
for i in range(10):
c.insert(i, {'q': 1})
ds = timestep_dataset.TimestepDataset(
server_address=c.server_address,
table='q',
dtypes=tf.int64,
shapes=tf.TensorShape([]),
max_in_flight_samples_per_worker=max_in_flight_samples_per_worker,
num_workers_per_iterator=num_workers_per_iterator,
max_samples=max_samples)
iterator = ds.make_one_shot_iterator()
item = iterator.get_next()
# Check that it fetches exactly 5 samples.
with self.session() as sess:
for _ in range(max_samples):
sess.run(item)
with self.assertRaises(tf.errors.OutOfRangeError):
sess.run(item)
# Check that no prefetching happened; Check that there are 5 items left in
# the queue.
self.assertEqual(c.server_info()['q'].current_size, 10 - max_samples)
np.testing.assert_array_equal(
next(c.sample('q', 1))[0].data[0], np.asarray(max_samples))
class FromTableSignatureTest(tf.test.TestCase):
def test_table_not_found(self):
server = reverb_server.Server([
reverb_server.Table.queue('table_a', 10),
reverb_server.Table.queue('table_c', 10),
reverb_server.Table.queue('table_b', 10),
])
address = f'localhost:{server.port}'
with self.assertRaisesWithPredicateMatch(
ValueError,
f'Server at {address} does not contain any table named not_found. '
f'Found: table_a, table_b, table_c.'):
timestep_dataset.TimestepDataset.from_table_signature(
address, 'not_found', 100)
def test_server_not_found(self):
with self.assertRaises(errors.DeadlineExceededError):
timestep_dataset.TimestepDataset.from_table_signature(
'localhost:1234', 'not_found', 100, get_signature_timeout_secs=1)
def test_table_does_not_have_signature(self):
server = make_server()
address = f'localhost:{server.port}'
with self.assertRaisesWithPredicateMatch(
ValueError, f'Table dist at {address} does not have a signature.'):
timestep_dataset.TimestepDataset.from_table_signature(
address, 'dist', 100)
def test_sets_dtypes_from_signature(self):
signature = {
'a': {
'b': tf.TensorSpec([3, 3], tf.float32),
'c': tf.TensorSpec([], tf.int64),
},
'x': tf.TensorSpec([None], tf.uint64),
}
server = reverb_server.Server(
[reverb_server.Table.queue('queue', 10, signature=signature)])
dataset = timestep_dataset.TimestepDataset.from_table_signature(
f'localhost:{server.port}', 'queue', 100)
self.assertDictEqual(dataset.element_spec.data, signature)
def test_sets_dtypes_from_bounded_spec_signature(self):
bounded_spec_signature = {
'a': {
'b': tensor_spec.BoundedTensorSpec([3, 3], tf.float32, 0, 3),
'c': tensor_spec.BoundedTensorSpec([], tf.int64, 0, 5),
},
}
server = reverb_server.Server([
reverb_server.Table.queue(
'queue', 10, signature=bounded_spec_signature)
])
dataset = timestep_dataset.TimestepDataset.from_table_signature(
f'localhost:{server.port}', 'queue', 100)
self.assertDictEqual(
dataset.element_spec.data, {
'a': {
'b': tf.TensorSpec([3, 3], tf.float32),
'c': tf.TensorSpec([], tf.int64),
},
})
if __name__ == '__main__':
tf.disable_eager_execution()
tf.test.main()
|
reverb-master
|
reverb/timestep_dataset_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Dataset to sample items created using the TrajectoryWriter."""
from typing import Any, List, Optional, Union
from reverb import client as reverb_client
from reverb import replay_sample
import tensorflow.compat.v1 as tf
import tree
from reverb.cc.ops import gen_reverb_ops
class TrajectoryDataset(tf.data.Dataset):
"""A tf.data.Dataset which samples trajectories from a Reverb table.
Note: The dataset returns `ReplaySample` where `data` with the structure of
`dtypes` and `shapes` and where all fields within `info` are scalars.
Note: Uses of Python lists are converted into tuples as nest used by the
tf.data API doesn't have good support for lists.
"""
def __init__(self,
server_address: Union[str, tf.Tensor],
table: Union[str, tf.Tensor],
dtypes: Any,
shapes: Any,
max_in_flight_samples_per_worker: int,
num_workers_per_iterator: int = -1,
max_samples_per_stream: int = -1,
rate_limiter_timeout_ms: int = -1,
max_samples: int = -1):
"""Constructs a new TrajectoryDataset.
Args:
server_address: Address of gRPC ReverbService.
table: Probability table to sample from.
dtypes: Dtypes of the data output. Can be nested.
shapes: Shapes of the data output. Can be nested.
max_in_flight_samples_per_worker: The number of samples requested in each
batch of samples. Higher values give higher throughput but too big
values can result in skewed sampling distributions as large number of
samples are fetched from single snapshot of the replay (followed by a
period of lower activity as the samples are consumed). A good rule of
thumb is to set this value to 2-3x times the batch size used.
num_workers_per_iterator: (Defaults to -1, i.e. auto selected) The number
of worker threads to create per dataset iterator. When the selected
table uses a FIFO sampler (i.e. a queue) then exactly 1 worker must be
used to avoid races causing invalid ordering of items. For all other
samplers, this value should be roughly equal to the number of threads
available on the CPU.
max_samples_per_stream: (Defaults to -1, i.e. auto selected) The maximum
number of samples to fetch from a stream before a new call is made.
Keeping this number low ensures that the data is fetched uniformly from
all server.
rate_limiter_timeout_ms: (Defaults to -1: infinite). Timeout (in
milliseconds) to wait on the rate limiter when sampling from the table.
If `rate_limiter_timeout_ms >= 0`, this is the timeout passed to
`Table::Sample` describing how long to wait for the rate limiter to
allow sampling. The first time that a request times out (across any of
the workers), the Dataset iterator is closed and the sequence is
considered finished.
max_samples: (Defaults to -1: infinite). The maximum number of samples to
request from the server. Once target number of samples has been fetched
and returned, the iterator is closed. This can be used to avoid the
prefetched added by the dataset.
Raises:
ValueError: If `dtypes` and `shapes` don't share the same structure.
ValueError: If `max_in_flight_samples_per_worker` is not a
positive integer.
ValueError: If `num_workers_per_iterator` is not a positive integer or -1.
ValueError: If `max_samples_per_stream` is not a positive integer or -1.
ValueError: If `rate_limiter_timeout_ms < -1`.
ValueError: If `max_samples` is not a positive integer or -1.
"""
tree.assert_same_structure(dtypes, shapes, False)
if max_in_flight_samples_per_worker < 1:
raise ValueError(
'max_in_flight_samples_per_worker (%d) must be a positive integer' %
max_in_flight_samples_per_worker)
if num_workers_per_iterator < 1 and num_workers_per_iterator != -1:
raise ValueError(
'num_workers_per_iterator (%d) must be a positive integer or -1' %
num_workers_per_iterator)
if max_samples_per_stream < 1 and max_samples_per_stream != -1:
raise ValueError(
'max_samples_per_stream (%d) must be a positive integer or -1' %
max_samples_per_stream)
if rate_limiter_timeout_ms < -1:
raise ValueError('rate_limiter_timeout_ms (%d) must be an integer >= -1' %
rate_limiter_timeout_ms)
if max_samples < 1 and max_samples != -1:
raise ValueError('max_samples (%d) must be a positive integer or -1' %
max_samples)
# Add the info fields (all scalars).
dtypes = replay_sample.ReplaySample(
info=replay_sample.SampleInfo.tf_dtypes(), data=dtypes)
shapes = replay_sample.ReplaySample(
info=replay_sample.SampleInfo.tf_shapes(), data=shapes)
# The tf.data API doesn't fully support lists so we convert all uses of
# lists into tuples.
dtypes = _convert_lists_to_tuples(dtypes)
shapes = _convert_lists_to_tuples(shapes)
self._server_address = server_address
self._table = table
self._dtypes = dtypes
self._shapes = shapes
self._max_in_flight_samples_per_worker = max_in_flight_samples_per_worker
self._num_workers_per_iterator = num_workers_per_iterator
self._max_samples_per_stream = max_samples_per_stream
self._rate_limiter_timeout_ms = rate_limiter_timeout_ms
self._max_samples = max_samples
if _is_tf1_runtime():
# Disabling to avoid errors given the different tf.data.Dataset init args
# between v1 and v2 APIs.
# pytype: disable=wrong-arg-count
super().__init__()
else:
# DatasetV2 requires the dataset as a variant tensor during init.
super().__init__(self._as_variant_tensor())
# pytype: enable=wrong-arg-count
@classmethod
def from_table_signature(cls,
server_address: str,
table: str,
max_in_flight_samples_per_worker: int,
num_workers_per_iterator: int = -1,
max_samples_per_stream: int = -1,
rate_limiter_timeout_ms: int = -1,
get_signature_timeout_secs: Optional[int] = None,
max_samples: int = -1):
"""Constructs a TrajectoryDataset using the table's signature to infer specs.
Note: The target `Table` must specify a signature which represent the entire
trajectory (as opposed to a single timestep). See `Table.__init__`
(./server.py) for more details.
Args:
server_address: Address of gRPC ReverbService.
table: Table to read the signature and sample from.
max_in_flight_samples_per_worker: See __init__ for details.
num_workers_per_iterator: See __init__ for details.
max_samples_per_stream: See __init__ for details.
rate_limiter_timeout_ms: See __init__ for details.
get_signature_timeout_secs: Timeout in seconds to wait for server to
respond when fetching the table signature. By default no timeout is set
and the call will block indefinitely if the server does not respond.
max_samples: See __init__ for details.
Returns:
TrajectoryDataset using the specs defined by the table signature to build
`shapes` and `dtypes`.
Raises:
ValueError: If `table` does not exist on server at `server_address`.
ValueError: If `table` does not have a signature.
errors.DeadlineExceededError: If `get_signature_timeout_secs` provided and
exceeded.
ValueError: See __init__.
"""
client = reverb_client.Client(server_address)
info = client.server_info(get_signature_timeout_secs)
if table not in info:
raise ValueError(
f'Server at {server_address} does not contain any table named '
f'{table}. Found: {", ".join(sorted(info.keys()))}.')
if not info[table].signature:
raise ValueError(
f'Table {table} at {server_address} does not have a signature.')
shapes = tree.map_structure(lambda x: x.shape, info[table].signature)
dtypes = tree.map_structure(lambda x: x.dtype, info[table].signature)
return cls(
server_address=server_address,
table=table,
shapes=shapes,
dtypes=dtypes,
max_in_flight_samples_per_worker=max_in_flight_samples_per_worker,
num_workers_per_iterator=num_workers_per_iterator,
max_samples_per_stream=max_samples_per_stream,
rate_limiter_timeout_ms=rate_limiter_timeout_ms,
max_samples=max_samples)
def _as_variant_tensor(self):
return gen_reverb_ops.reverb_trajectory_dataset(
server_address=self._server_address,
table=self._table,
dtypes=tree.flatten(self._dtypes),
shapes=tree.flatten(self._shapes),
max_in_flight_samples_per_worker=self._max_in_flight_samples_per_worker,
num_workers_per_iterator=self._num_workers_per_iterator,
max_samples_per_stream=self._max_samples_per_stream,
rate_limiter_timeout_ms=self._rate_limiter_timeout_ms,
max_samples=self._max_samples)
def _inputs(self) -> List[Any]:
return []
@property
def element_spec(self) -> Any:
return tree.map_structure(tf.TensorSpec, self._shapes, self._dtypes)
def _convert_lists_to_tuples(structure: Any) -> Any:
list_to_tuple_fn = lambda s: tuple(s) if isinstance(s, list) else s
# Traverse depth-first, bottom-up
return tree.traverse(list_to_tuple_fn, structure, top_down=False)
def _is_tf1_runtime() -> bool:
"""Returns True if the runtime is executing with TF1.0 APIs."""
# TODO(b/145023272): Update when/if there is a better way.
return hasattr(tf, 'to_float')
|
reverb-master
|
reverb/trajectory_dataset.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Error classes for Reverb."""
class ReverbError(Exception):
"""Base class for Reverb errors."""
pass
class DeadlineExceededError(ReverbError):
"""A call to the server timed out."""
pass
|
reverb-master
|
reverb/errors.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Implementation of the TrajectoryWriter."""
import datetime
import itertools
import re
from typing import Any, Iterator, List, MutableMapping, Optional, Sequence, Tuple, Union
import numpy as np
from reverb import errors
from reverb import pybind
import tree
class TrajectoryWriter:
"""The TrajectoryWriter is used to write data to tables at a Reverb server.
At a high level, the process of inserting trajectories can be summarized as:
* Structured data is appended to an internal buffer using the `append`
method and the caller receives a reference to each element (i.e leaf node)
in the original data.
* Compatible data referenced (i.e same dtype and compatible shapes) are
concatenated into `TrajectoryColumn`s which in turn are combined into a
trajectory and inserted into a table using the `create_item` method.
It is important to understand that the structure of the data provided to
`append` does NOT need to match the structure of the trajectory which the
sampler will receive when it samples the item. To illustrate, consider a
scenario were want to sample SARS (State-action-reward-state) style trajectory
of length 5. Furthermore, we would like a trajectory to start at every step.
It would look something like this:
```python
client = Client(...)
env = .... # Construct the environment
policy = .... # Construct the agent's policy
with client.trajectory_writer(num_keep_alive_refs=5) as writer:
for episode in range(NUM_EPISODES):
timestep = env.reset()
# You probably have strong opinions of whether the actions should be
# aligned with the step it originated from or the destination. In this
# example we'll align it with the destination state and thus we'll start
# off by appending the timestep WITHOUT an action.
writer.append({
'observation': timestep.observation,
})
while not timestep.last():
# Select the action according to your policy and act it out in the
# environment.
action = policy(timestep)
timestep = env.step(action)
# Now we have both an action and the state it resulted in. We append
# both of these together to the writer. This will result in them
# sharing the same index in `writer.history`.
writer.append({
'observation': timestep.observation,
'reward': timestep.reward,
'action': action,
})
# Once we have seen at least 5 timesteps (including the first one
# which does not have an aligned action) then we can start inserting
# items that reference the last 5 timesteps and the last 4 actions.
if writer.episode_steps >= 5:
trajectory = {
'states': writer.history['observation'][-5:],
'rewards': writer.history['reward'][-4:],
'actions': writer.history['action'][-4:],
}
writer.create_item(
table='my_table',
priority=calc_priority(trajectory),
trajectory=trajectory)
# We call `flush` to ensure that the writer does not run ahead of the
# server by more than 5 items. If the writer produces data faster than
# the server is able to process it then we would continue to build up
# items in the in-flight buffers until `end_episode` is called. This
# could result in OOM (on the server OR client) when episodes are very
# long or a very large number of clients are concurrently writing to
# the same server.
writer.flush(block_until_num_items=5)
# Block until all pending items have been sent to the server and
# inserted into 'my_table'. This also clears the buffers so history will
# once again be empty and `writer.episode_steps` is 0.
writer.end_episode()
```
"""
def __init__(self, internal_writer: pybind.TrajectoryWriter):
"""Constructor of TrajectoryWriter (must only be called by `Client`)."""
self._writer = internal_writer
# The union of the structures of all data passed to `append`. The structure
# grows everytime the provided data contains one or more fields which were
# not present in any of the data seen before.
self._structure = None
# References to all data seen since the writer was constructed or last reset
# (through end_episode). The number of columns always matches the number of
# leaf nodes in `_structure` but the order is not (necessarily) the same as
# `tree.flatten(_structure)` since the structure may evolve over time.
# Instead the mapping is controlled by `_path_to_column_index`. See
# `_flatten` and `_unflatten` for more details.
self._column_history: List[_ColumnHistory] = []
# Mapping from structured paths (i.e as received from
# `tree.flatten_with_path`) to position in `_column_history`. This is used
# in `_flatten`.
self._path_to_column_index: MutableMapping[str, int] = {}
self._path_to_column_config = {}
# Set when `append` called with `partial_step=True`. Remains set until
# `append` called with `partial_step=False`. This is used to control where
# new data references are added to the history (i.e whether a new step
# should be created).
self._last_step_is_open = False
def __enter__(self) -> 'TrajectoryWriter':
return self
def __exit__(self, exc_type, exc_value, exc_traceback):
if exc_type is None or errors.ReverbError not in exc_type.mro():
self.flush()
def __del__(self):
self.close()
@property
def history(self):
"""References to data, grouped by column and structured like appended data.
Allows recently added data references to be accesses with list indexing
semantics. However, instead of returning the raw references, the result is
wrapped in a TrajectoryColumn object before being returned to the caller.
```python
writer = TrajectoryWriter(...)
# Add three steps worth of data.
writer.append({'a': 1, 'b': 100})
writer.append({'a': 2, 'b': 200})
writer.append({'a': 3, 'b': 300})
# Create a trajectory using the _ColumnHistory helpers.
from_history = {
'all_a': writer.history['a'][:],
'first_b': writer.history['b'][0],
'last_b': writer.history['b'][-1],
'first_and_last_b': writer.history['b'][[0, -1]],
}
writer.create_item(table='name', priority=1.0, trajectory=from_history)
```
Raises:
RuntimeError: If `append` hasn't been called at least once before.
"""
if not self._column_history:
raise RuntimeError(
'history cannot be accessed before `append` is called at least once.')
return self._unflatten(self._column_history)
@property
def episode_steps(self) -> int:
"""Number of append calls since last `end_episode` call.
This does not count partial calls to append, i.e. ones with
`partial_step=True`.
"""
return self._writer.episode_steps
def configure(self, path: Tuple[Union[int, str], ...], *,
num_keep_alive_refs: int, max_chunk_length: Optional[int]):
"""Override chunking options for a single column.
Args:
path: Structured path to the column to configure.
num_keep_alive_refs: Override value for `num_keep_alive_refs` i.e the size
of the circular buffer of the most recently added data.
max_chunk_length: Override value for the chunk length used by this column.
When set to None, an auto tuned chunk length is used. When set to a
number, a constant chunk length is used.
Raises:
ValueError: If num_keep_alive_refs is < 1.
ValueError: If max_chunk_length set to a value < 1 or to a value > than
num_keep_alive_refs.
"""
if num_keep_alive_refs < 1:
raise ValueError(
f'num_keep_alive_refs ({num_keep_alive_refs}) must be a positive '
f'integer')
if max_chunk_length is not None and (
max_chunk_length < 1 or max_chunk_length > num_keep_alive_refs):
raise ValueError(
f'max_chunk_length ({max_chunk_length}) must be None or a positive '
f'integer <= num_keep_alive_refs ({num_keep_alive_refs})')
if max_chunk_length is None:
chunker_options = pybind.AutoTunedChunkerOptions(
num_keep_alive_refs=num_keep_alive_refs, throughput_weight=1.0)
else:
chunker_options = pybind.ConstantChunkerOptions(
max_chunk_length=max_chunk_length,
num_keep_alive_refs=num_keep_alive_refs)
if path in self._path_to_column_index:
self._writer.ConfigureChunker(self._path_to_column_index[path],
chunker_options)
else:
self._path_to_column_config[path] = chunker_options
def append(self, data: Any, *, partial_step: bool = False):
"""Columnwise append of data leaf nodes to internal buffers.
If `data` includes fields or sub structures which haven't been present in
any previous calls then the types and shapes of the new fields are extracted
and used to validate future `append` calls. The structure of `history` is
also updated to include the union of the structure across all `append`
calls.
When new fields are added after the first step then the newly created
history field will be filled with `None` in all preceding positions. This
results in the equal indexing across columns. That is `a[i]` and `b[i]`
references the same step in the sequence even if `b` was first observed
after `a` had already been seen.
It is possible to create a "step" using more than one `append` call by
setting the `partial_step` flag. Partial steps can be used when some parts
of the step becomes available only as a result of inserting (and learning
from) trajectories that include the fields available first (e.g learn from
the SARS trajectory to select the next action in an on-policy agent). In the
final `append` call of the step, `partial_step` must be set to False.
Failing to "close" the partial step will result in error as the same field
must NOT be provided more than once in the same step.
Args:
data: The (possibly nested) structure to make available for new items to
reference.
partial_step: If `True` then the step is not considered "done" with this
call. See above for more details. Defaults to `False`.
Raises:
ValueError: If the same column is provided more than once in the same
step.
"""
# Unless it is the first step, check that the structure is the same.
if self._structure is None:
self._update_structure(tree.map_structure(lambda _: None, data))
data_with_path_flat = tree.flatten_with_path(data)
try:
# Use our custom mapping to flatten the expanded structure into columns.
flat_column_data = self._apply_column_order(data_with_path_flat)
except KeyError:
# `data` contains fields which haven't been observed before so we need
# expand the spec using the union of the history and `data`.
self._update_structure(
_tree_union(self._structure, tree.map_structure(lambda x: None,
data)))
flat_column_data = self._apply_column_order(data_with_path_flat)
# If the last step is still open then verify that already populated columns
# are None in the new `data`.
if self._last_step_is_open:
for i, (column, column_data) in enumerate(
zip(self._column_history, flat_column_data)):
if column_data is None or column.can_set_last:
continue
raise ValueError(
f'Field {self._get_path_for_column_index(i)} has already been set '
f'in the active step by previous (partial) append call and thus '
f'must be omitted or set to None but got: {column_data}')
try:
# Flatten the data and pass it to the C++ writer for column wise append.
if partial_step:
flat_column_data_references = self._writer.AppendPartial(
flat_column_data)
else:
flat_column_data_references = self._writer.Append(flat_column_data)
except ValueError as e:
# If it wasn't a bad dtype or shape error then we'll just propagate the
# error as is.
column_idx = re.findall(r' for column (\d+)', str(e))
if len(column_idx) != 1:
raise
# The C++ layer will raise an error referencing the invalid column using
# the index of the flattened columns. This is quite hard to interpret so
# we'll reformat the error message to include the path for the field in
# the original structure instead.
new_message = str(e).replace(
f'for column {column_idx[0]}',
f'for column {self._get_path_for_column_index(int(column_idx[0]))}')
raise ValueError(new_message) from e
# Append references to respective columns. Note that we use the expanded
# structure in order to populate the columns missing from the data with
# None.
for column, data_reference in zip(self._column_history,
flat_column_data_references):
# If the last step is still open (i.e `partial_step` was set) then we
# populate that step instead of creating a new one.
if not self._last_step_is_open:
column.append(data_reference)
elif data_reference is not None:
column.set_last(data_reference)
# Save the flag so the next `append` call either populates the same step
# or begins a new step.
self._last_step_is_open = partial_step
def create_item(self, table: str, priority: float, trajectory: Any):
"""Enqueue insertion of an item into `table` referencing `trajectory`.
Note! This method does NOT BLOCK and therefore is not impacted by the table
rate limiter. To prevent unwanted runahead, `flush` must be called.
Before creating an item, `trajectory` is validated.
* Only contain `TrajectoryColumn` objects.
* All data references must be alive (i.e not yet expired).
* Data references within a column must have the same dtype and shape.
Args:
table: Name of the table to insert the item into.
priority: The priority used for determining the sample probability of the
new item.
trajectory: A structure of `TrajectoryColumn` objects. The structure is
flattened before passed to the C++ writer.
Raises:
TypeError: If trajectory is invalid.
"""
flat_trajectory = tree.flatten(trajectory)
if not all(isinstance(col, TrajectoryColumn) for col in flat_trajectory):
raise TypeError(
f'All leaves of `trajectory` must be `TrajectoryColumn` but got '
f'{trajectory}')
# Pass the flatten trajectory to the C++ writer where it will be validated
# and if successful then the item is created and enqued for the background
# worker to send to the server.
self._writer.CreateItem(table, priority,
[list(column) for column in flat_trajectory],
[column.is_squeezed for column in flat_trajectory])
def flush(self,
block_until_num_items: int = 0,
timeout_ms: Optional[int] = None):
"""Block until all but `block_until_num_items` confirmed by the server.
There are two ways that an item could be "pending":
1. Some of the data elements referenced by the item have not yet been
finalized (and compressed) as a `ChunkData`.
2. The item has been written to the gRPC stream but the response
confirming the insertion has not yet been received.
Type 1 pending items are transformed into type 2 when flush is called by
forcing (premature) chunk finalization of the data elements referenced by
the items. This will allow the background worker to write the data and items
to the gRPC stream and turn them into type 2 pending items.
The time it takes for type 2 pending items to be confirmed is primarily
due to the state of the table rate limiter. After the items have been
written to the gRPC stream then all we can do is wait (GIL is not held).
Args:
block_until_num_items: If > 0 then this many pending items will be allowed
to remain as type 1. If the number of type 1 pending items is less than
`block_until_num_items` then we simply wait until the total number of
pending items is <= `block_until_num_items`.
timeout_ms: (optional, default is no timeout) Maximum time to block for
before unblocking and raising a `DeadlineExceededError` instead. Note
that although the block is interrupted, the insertion of the items will
proceed in the background.
Raises:
ValueError: If block_until_num_items < 0.
DeadlineExceededError: If operation did not complete before the timeout.
"""
if block_until_num_items < 0:
raise ValueError(
f'block_until_num_items must be >= 0, got {block_until_num_items}')
if timeout_ms is None:
timeout_ms = -1
try:
self._writer.Flush(block_until_num_items, timeout_ms)
except RuntimeError as e:
if 'Timeout exceeded' in str(e) and timeout_ms is not None:
raise errors.DeadlineExceededError(
f'Flush call did not complete within provided timeout of '
f'{datetime.timedelta(milliseconds=timeout_ms)}')
raise
def end_episode(self,
clear_buffers: bool = True,
timeout_ms: Optional[int] = None):
"""Flush all pending items and generate a new episode ID.
Args:
clear_buffers: Whether the history should be cleared or not. Buffers
should only not be cleared when trajectories spanning multiple episodes
are used.
timeout_ms: (optional, default is no timeout) Maximum time to block for
before unblocking and raising a `DeadlineExceededError` instead. Note
that although the block is interrupted, the buffers and episode ID are
reset all the same and the insertion of the items will proceed in the
background thread.
Raises:
DeadlineExceededError: If operation did not complete before the timeout.
"""
try:
self._writer.EndEpisode(clear_buffers, timeout_ms)
except RuntimeError as e:
if 'Timeout exceeded' in str(e) and timeout_ms is not None:
raise errors.DeadlineExceededError(
f'End episode call did not complete within provided timeout of '
f'{datetime.timedelta(milliseconds=timeout_ms)}')
raise
if clear_buffers:
for column in self._column_history:
column.reset()
def close(self):
self._writer.Close()
def _apply_column_order(self, data_with_path_flat):
"""Reorders provided data according to the order of columns."""
flat_data = [None] * len(self._path_to_column_index)
for path, value in data_with_path_flat:
flat_data[self._path_to_column_index[path]] = value
return flat_data
def _unflatten(self, column_data):
structure_columns = tree.flatten(self._structure)
structure_ordered_data = [
column_data[column_id] for column_id in structure_columns
]
return tree.unflatten_as(self._structure, structure_ordered_data)
def _get_path_for_column_index(self, column_index):
return self._column_history[column_index].path()
def _maybe_create_column(self, path, column_index):
"""For a given field creates a new column if not yet existing."""
if column_index is not None:
return column_index
# New columns are always added to the back so all we need to do to expand
# the history structure is to append one column for every field added by
# this `_update_structure` call. In order to align indexing across all
# columns we init the new fields with None for all steps up until this.
column_index = len(self._column_history)
self._path_to_column_index[path] = column_index
history_length = len(self._column_history[0]) if self._column_history else 0
self._column_history.append(
_ColumnHistory(
path=path,
buffer_size=self._writer.max_num_keep_alive_refs,
history_padding=history_length))
if path in self._path_to_column_config:
self._writer.ConfigureChunker(column_index,
self._path_to_column_config[path])
return column_index
def _update_structure(self, new_structure: Any):
"""Replace the existing structure with a superset of the current one.
Since the structure is allowed to evolve over time we are unable to simply
map flattened data to column indices. For example, if the first step is
`{'a': 1, 'c': 101}` and the second step is `{'a': 2, 'b': 12, 'c': 102}`
then the flatten data would be `[1, 101]` and `[2, 12, 102]`. This will
result in invalid behaviour as the second column (index 1) would receive `c`
in the first step and `b` in the second.
To mitigate this, `_structure` represents an explicit mapping of fields to
column number containing data of a given field. The mapping is allowed to
grow over time and would in the above example be
`{'a': 0, 'c': 1}` and `{'a': 0, 'b': 2, 'c': 1}` after the first and second
step resp. Data would thus be flatten as `[1, 101]` and `[2, 102, 12]` which
means that the columns in the C++ layer only receive data from a single
field in the structure even if it evolves over time.
Args:
new_structure: The new structure to use. Must be a superset of the
previous structure.
"""
# Create columns for new paths and record column index numbers in the
# `_structure` itself.
self._structure = tree.unflatten_as(new_structure, [
self._maybe_create_column(path, column_idx)
for path, column_idx in tree.flatten_with_path(new_structure)
])
class _ColumnHistory:
"""Utility class for building `TrajectoryColumn`s from structured history."""
def __init__(self,
path: Tuple[Union[str, int], ...],
buffer_size: int,
history_padding: int = 0):
"""Constructor for _ColumnHistory.
Args:
path: A Tuple of strings and ints that represents which leaf-node this
column represents in TrajectoryWriter._structure.
buffer_size: The maximum number of values to keep in the buffer.
history_padding: The number of Nones used to forward-pad the column's
history.
"""
self._path = path
self._buffer_size = buffer_size
self._data_references: List[Optional[pybind.WeakCellRef]] = (
[None] * min(buffer_size, history_padding))
self._offset = history_padding - len(self._data_references)
def path(self):
return self._path
def append(self, ref: Optional[pybind.WeakCellRef]):
self._data_references.append(ref)
if len(self._data_references) > self._buffer_size:
self._data_references.pop(0)
self._offset += 1
def reset(self):
self._data_references = []
self._offset = 0
def set_last(self, ref: pybind.WeakCellRef):
if not self._data_references:
raise RuntimeError('set_last called on empty history column')
if self._data_references[-1] is not None:
raise RuntimeError('set_last called on already set cell')
self._data_references[-1] = ref
@property
def can_set_last(self) -> bool:
return bool(self._data_references) and self._data_references[-1] is None
def _slice(self, val: Union[int, slice]):
"""Extract item(s) as if _data_references wasn't limited in size."""
if isinstance(val, int):
if val >= 0:
val -= len(self)
if val > 0:
raise IndexError('list index out of range')
if val < -len(self._data_references):
return None
else:
return self._data_references[val]
# There is no point in shifting the indices when requesting everyting.
if val.start is None and val.stop is None:
return list(iter(self))[val]
# Turn positive indices into negative ones.
if val.start is not None and val.start >= 0:
val = slice(val.start - len(self), val.stop, val.step)
if val.stop is not None and val.stop > 0:
val = slice(val.start, val.stop - len(self), val.step)
# If the original `val` was an `int` then either return the item or None
# if the item has been deleted from the buffer.
if val.start is None:
if -len(self) < val.stop < -len(self._data_references):
return None
return self._data_references[val]
# Extract the slice from the buffer and backfill the remaining items with
# None values.
overflow = abs(val.start) - len(self._data_references)
return [None] * overflow + self._data_references[val]
def __len__(self) -> int:
return len(self._data_references) + self._offset
def __iter__(self) -> Iterator[Optional[pybind.WeakCellRef]]:
yield from itertools.repeat(None, self._offset)
yield from iter(self._data_references)
def __getitem__(self, val) -> 'TrajectoryColumn':
path = self._path + (val,)
if isinstance(val, int):
return TrajectoryColumn([self._slice(val)], squeeze=True, path=path)
elif isinstance(val, slice):
return TrajectoryColumn(self._slice(val), path=path) # pytype: disable=wrong-arg-types
elif isinstance(val, list):
return TrajectoryColumn([self._slice(x) for x in val], path=path)
else:
raise TypeError(
f'_ColumnHistory indices must be integers or slices, not {type(val)}')
def __str__(self):
name = f'{self.__class__.__module__}.{self.__class__.__name__}'
return f'{name}(path={self._path}, refs={self._data_references})'
class TrajectoryColumn:
"""Column used for building trajectories referenced by table items."""
def __init__(self,
data_references: Sequence[pybind.WeakCellRef],
*,
squeeze: bool = False,
path: Optional[Tuple[Union[str, int, slice], ...]] = None):
if squeeze and len(data_references) != 1:
raise ValueError(
f'Columns must contain exactly one data reference when squeeze set, '
f'got {len(data_references)}')
if any(ref is None for ref in data_references):
raise ValueError('TrajectoryColumns cannot contain any None data '
f'references: TrajectoryColumn at path {path} '
f'got {data_references}.')
self._data_references = tuple(data_references)
self.is_squeezed = squeeze
def __len__(self) -> int:
return len(self._data_references)
def __iter__(self) -> Iterator[pybind.WeakCellRef]:
return iter(self._data_references)
def __getitem__(self, val) -> 'TrajectoryColumn':
if isinstance(val, int):
return TrajectoryColumn([self._data_references[val]], squeeze=True)
elif isinstance(val, slice):
return TrajectoryColumn(self._data_references[val])
elif isinstance(val, list):
return TrajectoryColumn([self._data_references[x] for x in val])
else:
raise TypeError(f'TrajectoryColumn indices must be integers or slices, '
f'not {type(val)}')
@property
def shape(self) -> Tuple[Optional[int], ...]:
if self.is_squeezed:
return tuple(self._data_references[0].shape)
else:
return (len(self._data_references), *self._data_references[0].shape)
@property
def dtype(self) -> np.dtype:
return self._data_references[0].dtype
def numpy(self) -> np.ndarray:
"""Gets and stacks all the referenced data.
Data is copied from buffers in the C++ layers and may involve decompression
of already created chunks. This can be quite a memory intensive operation
when used on large arrays.
Returns:
All referenced data stacked in a single numpy array if column isn't
squeezed. If the column is squeezed then the value is returned without
stacking.
Raises:
RuntimeError: If any data reference has expired.
"""
if any(reference.expired for reference in self._data_references):
raise RuntimeError(
'Cannot convert TrajectoryColumn with expired data references to '
'numpy array.')
if self.is_squeezed:
return self._data_references[0].numpy()
return np.stack([ref.numpy() for ref in self._data_references])
def _tree_filter(source, filter_wih_path_flat):
"""Extract `filter_` from `source`."""
path_to_index = {path: i for i, (path, _) in enumerate(filter_wih_path_flat)}
flat_target = [None] * len(path_to_index)
for path, leaf in tree.flatten_with_path(source):
if path in path_to_index:
flat_target[path_to_index[path]] = leaf
return flat_target
def _is_named_tuple(x):
# Classes that look syntactically as if they inherit from `NamedTuple` in
# fact end up not doing so, so use this heuristic to detect them.
return isinstance(x, Tuple) and hasattr(x, '_fields')
def _tree_union(a, b):
"""Compute the disjunction of two trees with None or int leaves."""
if a is None or isinstance(a, int):
return a
if _is_named_tuple(a):
return type(a)(**_tree_union(a._asdict(), b._asdict()))
if isinstance(a, (List, Tuple)):
return type(a)(
_tree_union(aa, bb) for aa, bb in itertools.zip_longest(a, b))
merged = {**a}
for k, v in b.items():
if k in a:
merged[k] = _tree_union(a[k], v)
else:
merged[k] = v
return type(a)(**merged)
|
reverb-master
|
reverb/trajectory_writer.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for python server.
Note: Most of the functionality is tested through ./client_test.py. This file
only contains a few extra cases which does not fit well in the client tests.
"""
import time
from absl.testing import absltest
from absl.testing import parameterized
from reverb import item_selectors
from reverb import pybind
from reverb import rate_limiters
from reverb import server
import tensorflow as tf
TABLE_NAME = 'table'
class ServerTest(absltest.TestCase):
def test_in_process_client(self):
my_server = server.Server(
tables=[
server.Table(
name=TABLE_NAME,
sampler=item_selectors.Prioritized(1),
remover=item_selectors.Fifo(),
max_size=100,
rate_limiter=rate_limiters.MinSize(2)),
])
my_client = my_server.localhost_client()
my_client.reset(TABLE_NAME)
del my_client
my_server.stop()
def test_duplicate_priority_table_name(self):
with self.assertRaises(ValueError):
server.Server(
tables=[
server.Table(
name='test',
sampler=item_selectors.Prioritized(1),
remover=item_selectors.Fifo(),
max_size=100,
rate_limiter=rate_limiters.MinSize(2)),
server.Table(
name='test',
sampler=item_selectors.Prioritized(2),
remover=item_selectors.Fifo(),
max_size=200,
rate_limiter=rate_limiters.MinSize(1))
])
def test_no_priority_table_provided(self):
with self.assertRaises(ValueError):
server.Server(tables=[])
def test_can_sample(self):
table = server.Table(
name=TABLE_NAME,
sampler=item_selectors.Prioritized(1),
remover=item_selectors.Fifo(),
max_size=100,
max_times_sampled=1,
rate_limiter=rate_limiters.MinSize(2))
my_server = server.Server(tables=[table])
my_client = my_server.localhost_client()
self.assertFalse(table.can_sample(1))
self.assertTrue(table.can_insert(1))
my_client.insert(1, {TABLE_NAME: 1.0})
self.assertFalse(table.can_sample(1))
my_client.insert(1, {TABLE_NAME: 1.0})
for _ in range(100):
if table.info.current_size == 2:
break
time.sleep(0.01)
self.assertEqual(table.info.current_size, 2)
self.assertTrue(table.can_sample(2))
# TODO(b/153258711): This should return False since max_times_sampled=1.
self.assertTrue(table.can_sample(3))
del my_client
my_server.stop()
class TableTest(parameterized.TestCase):
def _check_selector_proto(self, expected_selector, proto_msg):
if isinstance(expected_selector, item_selectors.Uniform):
self.assertTrue(proto_msg.HasField('uniform'))
elif isinstance(expected_selector, item_selectors.Prioritized):
self.assertTrue(proto_msg.HasField('prioritized'))
elif isinstance(expected_selector, pybind.HeapSelector):
self.assertTrue(proto_msg.HasField('heap'))
elif isinstance(expected_selector, item_selectors.Fifo):
self.assertTrue(proto_msg.HasField('fifo'))
elif isinstance(expected_selector, item_selectors.Lifo):
self.assertTrue(proto_msg.HasField('lifo'))
else:
raise ValueError(f'Unknown selector: {expected_selector}')
@parameterized.product(
sampler_fn=[
item_selectors.Uniform,
lambda: item_selectors.Prioritized(1.),
item_selectors.MinHeap,
item_selectors.MaxHeap,
item_selectors.Fifo,
item_selectors.Lifo
],
remover_fn=[
item_selectors.Uniform,
lambda: item_selectors.Prioritized(1.),
item_selectors.MinHeap,
item_selectors.MaxHeap,
item_selectors.Fifo,
item_selectors.Lifo
],
rate_limiter_fn=[
lambda: rate_limiters.MinSize(10),
lambda: rate_limiters.Queue(10),
lambda: rate_limiters.SampleToInsertRatio(1.0, 10, 1.),
lambda: rate_limiters.Stack(10)
],
)
def test_table_info(self, sampler_fn, remover_fn, rate_limiter_fn):
sampler = sampler_fn()
remover = remover_fn()
rate_limiter = rate_limiter_fn()
table = server.Table(
name='table',
sampler=sampler,
remover=remover,
max_size=100,
rate_limiter=rate_limiter)
table_info = table.info
self.assertEqual('table', table_info.name)
self.assertEqual(100, table_info.max_size)
self.assertEqual(0, table_info.current_size)
self.assertEqual(0, table_info.num_episodes)
self.assertEqual(0, table_info.num_deleted_episodes)
self.assertIsNone(table_info.signature)
self._check_selector_proto(sampler, table_info.sampler_options)
self._check_selector_proto(remover, table_info.remover_options)
@parameterized.named_parameters(
(
'scalar',
tf.TensorSpec([], tf.float32),
),
(
'image',
tf.TensorSpec([3, 64, 64], tf.uint8),
),
('nested', (tf.TensorSpec([], tf.int32), {
'a': tf.TensorSpec((1, 1), tf.float64)
})),
)
def test_table_info_signature(self, signature):
table = server.Table(
name='table',
sampler=item_selectors.Fifo(),
remover=item_selectors.Fifo(),
max_size=100,
rate_limiter=rate_limiters.MinSize(10),
signature=signature)
self.assertEqual(signature, table.info.signature)
def test_replace(self):
table = server.Table(
name='table',
sampler=item_selectors.Fifo(),
remover=item_selectors.Fifo(),
max_size=100,
rate_limiter=rate_limiters.MinSize(10))
rl_info = table.info.rate_limiter_info
new_rate_limiter = rate_limiters.RateLimiter(
samples_per_insert=rl_info.samples_per_insert,
min_size_to_sample=1,
min_diff=rl_info.min_diff,
max_diff=rl_info.max_diff)
new_table = table.replace(rate_limiter=new_rate_limiter)
self.assertEqual(new_table.name, table.name)
self.assertEqual(new_table.info.rate_limiter_info.min_size_to_sample, 1)
if __name__ == '__main__':
absltest.main()
|
reverb-master
|
reverb/server_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for reverb.trajectory_writer."""
import copy
from typing import Optional
from unittest import mock
from absl.testing import absltest
from absl.testing import parameterized
import numpy as np
from reverb import client as client_lib
from reverb import errors
from reverb import pybind
from reverb import server as server_lib
from reverb import trajectory_writer
import tree
class FakeWeakCellRef:
def __init__(self, data):
self.data = data
@property
def shape(self):
return np.asarray(self.data).shape
@property
def dtype(self):
return np.asarray(self.data).dtype
@property
def expired(self):
return False
def numpy(self):
return self.data
def extract_data(column: trajectory_writer._ColumnHistory):
return [ref.data if ref else None for ref in column]
def _mock_append(x):
return [FakeWeakCellRef(y) if y is not None else None for y in x]
class TrajectoryWriterTest(parameterized.TestCase):
def setUp(self):
super().setUp()
self.items = []
def _mock_create_item(unused_table, unused_priority, refs_per_col,
squeeze_per_col):
item = []
for refs, squeeze in zip(refs_per_col, squeeze_per_col):
if squeeze:
item.append(refs[0].data)
else:
item.append(tuple([ref.data for ref in refs]))
self.items.append(tuple(item))
self.cpp_writer_mock = mock.Mock()
self.cpp_writer_mock.Append.side_effect = _mock_append
self.cpp_writer_mock.AppendPartial.side_effect = _mock_append
self.cpp_writer_mock.CreateItem.side_effect = _mock_create_item
self.cpp_writer_mock.max_num_keep_alive_refs = 10
self.writer = trajectory_writer.TrajectoryWriter(self.cpp_writer_mock)
def test_history_require_append_to_be_called_before(self):
with self.assertRaises(RuntimeError):
_ = self.writer.history
def test_history_contains_references_when_data_flat(self):
self.writer.append(0)
self.writer.append(1)
self.writer.append(2)
history = tree.map_structure(extract_data, self.writer.history)
self.assertListEqual(history, [0, 1, 2])
def test_history_contains_structured_references(self):
self.writer.append({'observation': 1, 'first_step': True})
self.writer.append({'action': 2, 'reward': 101})
self.writer.append({'action': 3, 'reward': 103})
history = self.writer.history
mapped_history = tree.map_structure(extract_data, history)
self.assertDictEqual(
{
'action': [None, 2, 3],
'first_step': [True, None, None],
'observation': [1, None, None],
'reward': [None, 101, 103]
}, mapped_history)
for path in history:
self.assertEqual(path, history[path]._path[0])
def test_history_structure_evolves_with_data(self):
self.writer.append({'x': 1, 'z': 2})
first = tree.map_structure(extract_data, self.writer.history)
self.assertDictEqual(first, {'x': [1], 'z': [2]})
self.writer.append({'z': 3, 'y': 4})
second = tree.map_structure(extract_data, self.writer.history)
self.assertDictEqual(second, {
'x': [1, None],
'z': [2, 3],
'y': [None, 4],
})
self.writer.append({'w': 5})
third = tree.map_structure(extract_data, self.writer.history)
self.assertDictEqual(
third, {
'x': [1, None, None],
'z': [2, 3, None],
'y': [None, 4, None],
'w': [None, None, 5],
})
self.writer.append({'x': 6, 'w': 7})
forth = tree.map_structure(extract_data, self.writer.history)
self.assertDictEqual(
forth, {
'x': [1, None, None, 6],
'z': [2, 3, None, None],
'y': [None, 4, None, None],
'w': [None, None, 5, 7],
})
@parameterized.named_parameters(
('tuple', (0,), (0, 1)),
('dict', {
'x': 0
}, {
'x': 0,
'y': 1
}),
('list', [0], [0, 1]),
)
def test_append_with_more_fields(self, first_step_data, second_step_data):
self.writer.append(first_step_data)
self.writer.append(second_step_data)
def test_append_forwards_flat_data_to_cpp_writer(self):
data = {'x': 1, 'y': 2}
self.writer.append(data)
self.cpp_writer_mock.Append.assert_called_with(tree.flatten(data))
def test_partial_append_appends_to_the_same_step(self):
# Create a first step and keep it open.
self.writer.append({'x': 1, 'z': 2}, partial_step=True)
first = tree.map_structure(extract_data, self.writer.history)
self.assertDictEqual(first, {'x': [1], 'z': [2]})
# Append to the same step and keep it open.
self.writer.append({'y': 4}, partial_step=True)
second = tree.map_structure(extract_data, self.writer.history)
self.assertDictEqual(second, {
'x': [1],
'z': [2],
'y': [4],
})
# Append to the same step and close it.
self.writer.append({'w': 5})
third = tree.map_structure(extract_data, self.writer.history)
self.assertDictEqual(third, {
'x': [1],
'z': [2],
'y': [4],
'w': [5],
})
# Append to a new step.
self.writer.append({'w': 6})
forth = tree.map_structure(extract_data, self.writer.history)
self.assertDictEqual(forth, {
'x': [1, None],
'z': [2, None],
'y': [4, None],
'w': [5, 6],
})
def test_columns_must_not_appear_more_than_once_in_the_same_step(self):
# Create a first step and keep it open.
self.writer.append({'x': 1, 'z': 2}, partial_step=True)
# Add another unseen column alongside an existing column with a None value.
self.writer.append({'x': None, 'y': 3}, partial_step=True)
# Provide a value for a field that has already been set in this step.
with self.assertRaisesRegex(
ValueError,
r'Field \(\'x\',\) has already been set in the active step by previous '
r'\(partial\) append call and thus must be omitted or set to None but '
r'got: 4'):
self.writer.append({'x': 4})
def test_create_item_checks_type_of_leaves(self):
self.writer.append({'x': 3, 'y': 2})
self.writer.append({'x': 3, 'y': 2})
# History automatically transforms data and thus should be valid.
self.writer.create_item(
'table',
1.0,
{
'x': self.writer.history['x'][0], # Just one step.
'y': self.writer.history['y'][:], # Two steps.
})
# But all leaves must be TrajectoryColumn.
with self.assertRaises(TypeError):
self.writer.create_item(
'table', 1.0, {
'x': self.writer.history['x'][0],
'y': self.writer.history['y'][:].numpy(),
})
def test_flush_checks_block_until_num_itmes(self):
self.writer.flush(0)
self.writer.flush(1)
with self.assertRaises(ValueError):
self.writer.flush(-1)
def test_history_can_be_indexed_by_ints(self):
self.writer.append({'x': 1})
self.writer.append({'x': 2})
self.writer.append({'x': 3})
self.writer.create_item('table', 1.0, {
'first': self.writer.history['x'][0],
'last': self.writer.history['x'][-1],
})
# Note that the columns are not tuples since the columns are squeezed.
self.assertEqual(self.items[0], (1, 3))
def test_history_can_be_indexed_by_slices(self):
self.writer.append({'x': 1})
self.writer.append({'x': 2})
self.writer.append({'x': 3})
self.writer.create_item(
'table', 1.0, {
'first_two': self.writer.history['x'][:2],
'last_two': self.writer.history['x'][-2:],
})
self.assertEqual(self.items[0], ((1, 2), (2, 3)))
def test_history_can_be_indexed_by_lists(self):
self.writer.append({'x': 1})
self.writer.append({'x': 2})
self.writer.append({'x': 3})
self.writer.create_item(
'table', 1.0, {
'first_and_last': self.writer.history['x'][[0, -1]],
'permuted': self.writer.history['x'][[1, 0, 2]],
})
self.assertEqual(self.items[0], ((1, 3), (2, 1, 3)))
def test_configure_uses_auto_tune_when_max_chunk_length_not_set(self):
self.writer.append({'x': 3, 'y': 2})
self.writer.configure(('x',), num_keep_alive_refs=2, max_chunk_length=None)
self.cpp_writer_mock.ConfigureChunker.assert_called_with(
0,
pybind.AutoTunedChunkerOptions(
num_keep_alive_refs=2, throughput_weight=1.0))
def test_configure_seen_column(self):
self.writer.append({'x': 3, 'y': 2})
self.writer.configure(('x',), num_keep_alive_refs=2, max_chunk_length=1)
self.cpp_writer_mock.ConfigureChunker.assert_called_with(
0,
pybind.ConstantChunkerOptions(
num_keep_alive_refs=2, max_chunk_length=1))
def test_configure_unseen_column(self):
self.writer.append({'x': 3, 'y': 2})
self.writer.configure(('z',), num_keep_alive_refs=2, max_chunk_length=1)
# The configure call should be delayed until the column has been observed.
self.cpp_writer_mock.ConfigureChunker.assert_not_called()
# Still not seen.
self.writer.append({'a': 4})
self.cpp_writer_mock.ConfigureChunker.assert_not_called()
self.writer.append({'z': 5})
self.cpp_writer_mock.ConfigureChunker.assert_called_with(
3,
pybind.ConstantChunkerOptions(
num_keep_alive_refs=2, max_chunk_length=1))
@parameterized.parameters(
(1, None, True),
(0, None, False),
(-1, None, False),
(1, 1, True),
(1, 0, False),
(1, -1, False),
(5, 5, True),
(4, 5, False),
)
def test_configure_validates_params(self, num_keep_alive_refs: int,
max_chunk_length: Optional[int],
valid: bool):
if valid:
self.writer.configure(('a',),
num_keep_alive_refs=num_keep_alive_refs,
max_chunk_length=max_chunk_length)
else:
with self.assertRaises(ValueError):
self.writer.configure(('a',),
num_keep_alive_refs=num_keep_alive_refs,
max_chunk_length=max_chunk_length)
def test_episode_steps(self):
server = server_lib.Server([server_lib.Table.queue('queue', 1)])
client = client_lib.Client(f'localhost:{server.port}')
writer = client.trajectory_writer(num_keep_alive_refs=1)
for _ in range(10):
# Every episode, including the first, should start at zero.
self.assertEqual(writer.episode_steps, 0)
for i in range(1, 21):
writer.append({'x': 3, 'y': 2})
# Step count should increment with each append call.
self.assertEqual(writer.episode_steps, i)
# Ending the episode should reset the step count to zero.
writer.end_episode()
def test_episode_steps_partial_step(self):
server = server_lib.Server([server_lib.Table.queue('queue', 1)])
client = client_lib.Client(f'localhost:{server.port}')
writer = client.trajectory_writer(num_keep_alive_refs=1)
for _ in range(3):
# Every episode, including the first, should start at zero.
self.assertEqual(writer.episode_steps, 0)
for i in range(1, 4):
writer.append({'x': 3}, partial_step=True)
# Step count should not increment on partial append calls.
self.assertEqual(writer.episode_steps, i - 1)
writer.append({'y': 2})
# Step count should increment after the unqualified append call.
self.assertEqual(writer.episode_steps, i)
# Ending the episode should reset the step count to zero.
writer.end_episode()
@parameterized.parameters(True, False)
def test_episode_steps_reset_on_end_episode(self, clear_buffers: bool):
server = server_lib.Server([server_lib.Table.queue('queue', 1)])
client = client_lib.Client(f'localhost:{server.port}')
# Create a writer and check that the counter starts at 0.
writer = client.trajectory_writer(num_keep_alive_refs=1)
self.assertEqual(writer.episode_steps, 0)
# Append a step and check that the counter is incremented.
writer.append([1])
self.assertEqual(writer.episode_steps, 1)
# End the episode and check the counter is reset.
writer.end_episode(clear_buffers=clear_buffers)
self.assertEqual(writer.episode_steps, 0)
def test_exit_does_not_flush_on_reverb_error(self):
# If there are no errors then flush should be called.
with mock.patch.object(self.writer, 'flush') as flush_mock:
with self.writer:
pass
flush_mock.assert_called_once()
# It flush if unrelated errors are encountered
with mock.patch.object(self.writer, 'flush') as flush_mock:
with self.assertRaises(ValueError):
with self.writer:
raise ValueError('Test')
flush_mock.assert_called_once()
# But it should not flush if Reverb raises the error.
with mock.patch.object(self.writer, 'flush') as flush_mock:
with self.assertRaises(errors.ReverbError):
with self.writer:
raise errors.DeadlineExceededError('Test')
flush_mock.assert_not_called()
def test_timeout_on_flush(self):
server = server_lib.Server([server_lib.Table.queue('queue', 1)])
client = client_lib.Client(f'localhost:{server.port}')
writer = client.trajectory_writer(num_keep_alive_refs=1)
writer.append([1])
# Table has space for one item, up to 2 more items can be queued in
# table worker queues.
# Since there isn't space for all 4 items flush should time out.
with self.assertRaises(errors.DeadlineExceededError):
for _ in range(4):
writer.create_item('queue', 1.0, writer.history[0][:])
writer.flush(timeout_ms=1)
writer.close()
server.stop()
def test_timeout_on_end_episode(self):
server = server_lib.Server([server_lib.Table.queue('queue', 1)])
client = client_lib.Client(f'localhost:{server.port}')
writer = client.trajectory_writer(num_keep_alive_refs=1)
writer.append([1])
# Table has space for one item, up to 2 more items can be queued in
# table worker queues.
# Since there isn't space for all 4 items end_episode should time out.
with self.assertRaises(errors.DeadlineExceededError):
for _ in range(4):
writer.create_item('queue', 1.0, writer.history[0][:])
writer.end_episode(clear_buffers=False, timeout_ms=1)
writer.close()
server.stop()
class TrajectoryColumnTest(parameterized.TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls._server = server_lib.Server([server_lib.Table.queue('queue', 100)])
def setUp(self):
super().setUp()
self.client = client_lib.Client(f'localhost:{self._server.port}')
@classmethod
def tearDownClass(cls):
super().tearDownClass()
cls._server.stop()
def test_dtype_of_columns_are_validated(self):
writer = self.client.trajectory_writer(num_keep_alive_refs=10)
# Define the structure with the first append.
data = {
'scalar': 1,
'nest': {
'sub': 1.0,
'sub_list': [1, 2, 3],
},
}
writer.append(data)
# Modify the type of columns and check that the error message references the
# correct path.
with self.assertRaisesRegex(
ValueError,
r'Tensor of wrong dtype provided for column \(\'scalar\',\)\. Got '
r'double but expected int64\.'):
bad_scalar = copy.deepcopy(data)
bad_scalar['scalar'] = 1.0
writer.append(bad_scalar)
with self.assertRaisesRegex(
ValueError,
r'Tensor of wrong dtype provided for column \(\'nest\', \'sub\'\)\. Got '
r'int64 but expected double\.'):
bad_nest_scalar = copy.deepcopy(data)
bad_nest_scalar['nest']['sub'] = 1
writer.append(bad_nest_scalar)
with self.assertRaisesRegex(
ValueError,
r'Tensor of wrong dtype provided for column '
r'\(\'nest\', \'sub_list\', 1\)\. Got double but expected int64\.'):
bad_nest_list = copy.deepcopy(data)
bad_nest_list['nest']['sub_list'][1] = 2.0
writer.append(bad_nest_list)
def test_shapes_of_columns_are_validated(self):
writer = self.client.trajectory_writer(num_keep_alive_refs=10)
# Define the structure with the first append.
data = {
'scalar': 1,
'nest': {
'sub': np.array([1.0, 2.0]),
'sub_list': [
np.arange(3),
np.arange(3),
np.arange(3),
],
},
}
writer.append(data)
# Modify the shapes of columns and check that the error message references
# the correct path.
with self.assertRaisesRegex(
ValueError,
r'Tensor of incompatible shape provided for column \(\'scalar\',\)\. '
r'Got \[2\] which is incompatible with \[\]\.'):
bad_scalar = copy.deepcopy(data)
bad_scalar['scalar'] = np.arange(2)
writer.append(bad_scalar)
with self.assertRaisesRegex(
ValueError,
r'Tensor of incompatible shape provided for column '
r'\(\'nest\', \'sub\'\)\. Got \[1,2\] which is incompatible with '
r'\[2\]\.'):
bad_nest = copy.deepcopy(data)
bad_nest['nest']['sub'] = data['nest']['sub'].reshape([1, 2])
writer.append(bad_nest)
with self.assertRaisesRegex(
ValueError,
r'Tensor of incompatible shape provided for column '
r'\(\'nest\', \'sub_list\', 0\)\. Got \[10\] which is incompatible '
r'with \[3\]\.'):
bad_nest_list = copy.deepcopy(data)
bad_nest_list['nest']['sub_list'][0] = np.arange(10)
writer.append(bad_nest_list)
def test_numpy(self):
writer = self.client.trajectory_writer(num_keep_alive_refs=10)
for i in range(10):
writer.append({'a': i, 'b': np.ones([3, 3], float) * i})
np.testing.assert_array_equal(writer.history['a'][:].numpy(),
np.arange(i + 1, dtype=np.int64))
np.testing.assert_array_equal(
writer.history['b'][:].numpy(),
np.stack([np.ones([3, 3], float) * x for x in range(i + 1)]))
def test_numpy_squeeze(self):
writer = self.client.trajectory_writer(num_keep_alive_refs=10)
for i in range(10):
writer.append({'a': i})
self.assertEqual(writer.history['a'][-1].numpy(), i)
def test_validates_squeeze(self):
# Exactly one is valid.
trajectory_writer.TrajectoryColumn([FakeWeakCellRef(1)], squeeze=True)
# Zero is not fine.
with self.assertRaises(ValueError):
trajectory_writer.TrajectoryColumn([], squeeze=True)
# Neither is two (or more).
with self.assertRaises(ValueError):
trajectory_writer.TrajectoryColumn(
[FakeWeakCellRef(1), FakeWeakCellRef(2)], squeeze=True)
def test_len(self):
for i in range(1, 10):
column = trajectory_writer.TrajectoryColumn([FakeWeakCellRef(1)] * i)
self.assertLen(column, i)
def test_none_raises(self):
with self.assertRaisesRegex(ValueError, r'cannot contain any None'):
trajectory_writer.TrajectoryColumn([None])
with self.assertRaisesRegex(ValueError, r'cannot contain any None'):
trajectory_writer.TrajectoryColumn([FakeWeakCellRef(1), None])
@parameterized.named_parameters(
('int', 0),
('float', 1.0),
('bool', True),
('np ()', np.zeros(())),
('np (1)', np.zeros((1))),
('np (1, 1)', np.zeros((1, 1))),
('np (3, 4, 2)', np.zeros((3, 4, 2))),
)
def test_shape(self, data):
expected_shape = np.asarray(data).shape
for i in range(1, 10):
column = trajectory_writer.TrajectoryColumn([FakeWeakCellRef(data)] * i)
self.assertEqual(column.shape, (i, *expected_shape))
def test_shape_squeezed(self):
expected_shape = (2, 5)
data = np.arange(10).reshape(*expected_shape)
column = trajectory_writer.TrajectoryColumn([FakeWeakCellRef(data)],
squeeze=True)
self.assertEqual(column.shape, expected_shape)
@parameterized.named_parameters(
('int', 0),
('float', 1.0),
('bool', True),
('np_float16', np.zeros(shape=(), dtype=np.float16)),
('np_float32', np.zeros(shape=(), dtype=np.float32)),
('np_float64', np.zeros(shape=(), dtype=np.float64)),
('np_int8', np.zeros(shape=(), dtype=np.int8)),
('np_int16', np.zeros(shape=(), dtype=np.int16)),
('np_int32', np.zeros(shape=(), dtype=np.int32)),
('np_int64', np.zeros(shape=(), dtype=np.int64)),
('np_uint8', np.zeros(shape=(), dtype=np.uint8)),
('np_uint16', np.zeros(shape=(), dtype=np.uint16)),
('np_uint32', np.zeros(shape=(), dtype=np.uint32)),
('np_uint64', np.zeros(shape=(), dtype=np.uint64)),
('np_complex64', np.zeros(shape=(), dtype=np.complex64)),
('np_complex128', np.zeros(shape=(), dtype=np.complex128)),
('np_bool', np.zeros(shape=(), dtype=bool)),
('np_object', np.zeros(shape=(), dtype=object)),
)
def test_dtype(self, data):
expected_dtype = np.asarray(data).dtype
column = trajectory_writer.TrajectoryColumn([FakeWeakCellRef(data)])
self.assertEqual(column.dtype, expected_dtype)
if __name__ == '__main__':
absltest.main()
|
reverb-master
|
reverb/trajectory_writer_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for Reverb rate limiters."""
from absl.testing import absltest
from absl.testing import parameterized
from reverb import rate_limiters
class TestSampleToInsertRatio(parameterized.TestCase):
@parameterized.named_parameters(
{
'testcase_name': 'less_than_samples_per_insert',
'samples_per_insert': 5,
'error_buffer': 4,
'want': ValueError,
},
{
'testcase_name': 'less_than_one',
'samples_per_insert': 0.5,
'error_buffer': 0.9,
'want': ValueError,
},
{
'testcase_name': 'valid',
'samples_per_insert': 0.5,
'error_buffer': 1.1,
'want': None,
},
)
def test_validates_single_number_error_buffer(self, samples_per_insert,
error_buffer, want):
if want:
with self.assertRaises(want):
rate_limiters.SampleToInsertRatio(samples_per_insert, 10, error_buffer)
else: # Should not raise any error.
rate_limiters.SampleToInsertRatio(samples_per_insert, 10, error_buffer)
@parameterized.named_parameters(
{
'testcase_name': 'range_too_small_due_to_sample_per_insert_ratio',
'min_size_to_sample': 10,
'samples_per_insert': 5,
'error_buffer': (8, 12),
'want': ValueError,
},
{
'testcase_name': 'range_smaller_than_2',
'min_size_to_sample': 10,
'samples_per_insert': 0.1,
'error_buffer': (9.5, 10.5),
'want': ValueError,
},
{
'testcase_name': 'range_below_min_size_to_sample',
'min_size_to_sample': 10,
'samples_per_insert': 1,
'error_buffer': (5, 9),
'want': None,
},
{
'testcase_name': 'range_above_min_size_to_sample',
'min_size_to_sample': 10,
'samples_per_insert': 1,
'error_buffer': (11, 15),
'want': ValueError,
},
{
'testcase_name': 'min_size_to_sample_smaller_than_1',
'min_size_to_sample': 0,
'samples_per_insert': 1,
'error_buffer': (-100, 100),
'want': ValueError,
},
{
'testcase_name': 'valid',
'min_size_to_sample': 10,
'samples_per_insert': 1,
'error_buffer': (7, 12),
'want': None,
},
)
def test_validates_explicit_range_error_buffer(self, min_size_to_sample,
samples_per_insert,
error_buffer, want):
if want:
with self.assertRaises(want):
rate_limiters.SampleToInsertRatio(samples_per_insert,
min_size_to_sample, error_buffer)
else: # Should not raise any error.
rate_limiters.SampleToInsertRatio(samples_per_insert, min_size_to_sample,
error_buffer)
@parameterized.named_parameters(
{
'testcase_name': 'valid',
'samples_per_insert': 1,
'want': None,
},
{
'testcase_name': 'zero',
'samples_per_insert': 0,
'want': ValueError,
},
{
'testcase_name': 'negative',
'samples_per_insert': -1,
'want': ValueError,
},
)
def test_validates_samples_per_insert(self, samples_per_insert, want):
if want:
with self.assertRaises(want):
rate_limiters.SampleToInsertRatio(samples_per_insert, 10, 100)
else:
rate_limiters.SampleToInsertRatio(samples_per_insert, 10, 100)
class TestMinSize(parameterized.TestCase):
@parameterized.parameters(
(-1, True),
(0, True),
(1, False),
)
def test_raises_if_min_size_lt_1(self, min_size_to_sample, want_error):
if want_error:
with self.assertRaises(ValueError):
rate_limiters.MinSize(min_size_to_sample)
else:
rate_limiters.MinSize(min_size_to_sample)
if __name__ == '__main__':
absltest.main()
|
reverb-master
|
reverb/rate_limiters_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for python client."""
import collections
import multiprocessing.dummy as multithreading
import pickle
import time
from absl.testing import absltest
import numpy as np
import portpicker
from reverb import client
from reverb import errors
from reverb import item_selectors
from reverb import rate_limiters
from reverb import server
import tensorflow.compat.v1 as tf
import tree
TABLE_NAME = 'table'
NESTED_SIGNATURE_TABLE_NAME = 'nested_signature_table'
SIMPLE_QUEUE_NAME = 'simple_queue'
QUEUE_SIGNATURE = {
'a': tf.TensorSpec(dtype=tf.int64, shape=(3,)),
'b': tf.TensorSpec(dtype=tf.float32, shape=(3, 2, 2)),
}
class ClientTest(absltest.TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.tables = [
server.Table(
name=TABLE_NAME,
sampler=item_selectors.Prioritized(1),
remover=item_selectors.Fifo(),
max_size=1000,
rate_limiter=rate_limiters.MinSize(3),
signature=tf.TensorSpec(dtype=tf.int64, shape=[]),
),
server.Table.queue(
name=NESTED_SIGNATURE_TABLE_NAME,
max_size=10,
signature=QUEUE_SIGNATURE,
),
server.Table.queue(SIMPLE_QUEUE_NAME, 10),
]
cls.server = server.Server(tables=cls.tables)
cls.client = cls.server.localhost_client()
def tearDown(self):
self.client.reset(TABLE_NAME)
self.client.reset(NESTED_SIGNATURE_TABLE_NAME)
self.client.reset(SIMPLE_QUEUE_NAME)
super().tearDown()
@classmethod
def tearDownClass(cls):
cls.server.stop()
super().tearDownClass()
def wait_for_table_size(self, size):
for _ in range(100):
if self.tables[0].info.current_size == size:
break
time.sleep(0.01)
self.assertEqual(self.tables[0].info.current_size, size)
def _get_sample_frequency(self, n=10000):
keys = [sample[0].info.key for sample in self.client.sample(TABLE_NAME, n)]
counter = collections.Counter(keys)
return [count / n for _, count in counter.most_common()]
def test_sample_sets_table_size(self):
for i in range(1, 11):
self.client.insert(i, {TABLE_NAME: 1.0})
if i >= 3:
sample = next(self.client.sample(TABLE_NAME, 1))[0]
self.assertEqual(sample.info.table_size, i)
self.wait_for_table_size(10)
def test_sample_sets_probability(self):
for i in range(1, 11):
self.client.insert(i, {TABLE_NAME: 1.0})
if i >= 3:
sample = next(self.client.sample(TABLE_NAME, 1))[0]
self.assertAlmostEqual(sample.info.probability, 1.0 / i, 0.01)
def test_sample_sets_priority(self):
# Set the test context by manually mutating priorities to known ones.
for i in range(10):
self.client.insert(i, {TABLE_NAME: 1000.0})
self.wait_for_table_size(10)
def _sample_priorities(n=100):
return {
sample[0].info.key: sample[0].info.priority
for sample in self.client.sample(TABLE_NAME, n)
}
original_priorities = _sample_priorities(n=100)
self.assertNotEmpty(original_priorities)
self.assertSequenceAlmostEqual([1000.0] * len(original_priorities),
original_priorities.values())
expected_priorities = {
key: float(i) for i, key in enumerate(original_priorities)
}
self.client.mutate_priorities(TABLE_NAME, updates=expected_priorities)
# Resample and check priorities.
sampled_priorities = _sample_priorities(n=100)
self.assertNotEmpty(sampled_priorities)
for key, priority in sampled_priorities.items():
if key in expected_priorities:
self.assertAlmostEqual(expected_priorities[key], priority)
def test_insert_raises_if_priorities_empty(self):
with self.assertRaises(ValueError):
self.client.insert([1], {})
def test_insert(self):
self.client.insert(1, {TABLE_NAME: 1.0}) # This should be sampled often.
self.client.insert(2, {TABLE_NAME: 0.1}) # This should be sampled rarely.
self.client.insert(3, {TABLE_NAME: 0.0}) # This should never be sampled.
self.wait_for_table_size(3)
freqs = self._get_sample_frequency()
self.assertLen(freqs, 2)
self.assertAlmostEqual(freqs[0], 0.9, delta=0.05)
self.assertAlmostEqual(freqs[1], 0.1, delta=0.05)
def test_writer_raises_if_max_sequence_length_lt_1(self):
with self.assertRaises(ValueError):
self.client.writer(0)
def test_writer_raises_if_chunk_length_lt_1(self):
self.client.writer(2, chunk_length=1) # Should be fine.
for chunk_length in [0, -1]:
with self.assertRaises(ValueError):
self.client.writer(2, chunk_length=chunk_length)
def test_writer_raises_if_chunk_length_gt_max_sequence_length(self):
self.client.writer(2, chunk_length=1) # lt should be fine.
self.client.writer(2, chunk_length=2) # eq should be fine.
with self.assertRaises(ValueError):
self.client.writer(2, chunk_length=3)
def test_writer_raises_if_max_in_flight_items_lt_1(self):
self.client.writer(1, max_in_flight_items=1)
self.client.writer(1, max_in_flight_items=2)
with self.assertRaises(ValueError):
self.client.writer(1, max_in_flight_items=-1)
def test_writer_works_with_no_retries(self):
# If the server responds correctly, the writer ignores the no retries arg.
writer = self.client.writer(2)
writer.append([0])
writer.create_item(TABLE_NAME, 1, 1.0)
writer.close(retry_on_unavailable=False)
def test_writer(self):
with self.client.writer(2) as writer:
writer.append([0])
writer.create_item(TABLE_NAME, 1, 1.0)
writer.append([1])
writer.create_item(TABLE_NAME, 2, 1.0)
writer.append([2])
writer.create_item(TABLE_NAME, 1, 1.0)
writer.append_sequence([np.array([3, 4])])
writer.create_item(TABLE_NAME, 2, 1.0)
freqs = self._get_sample_frequency()
self.assertLen(freqs, 4)
for freq in freqs:
self.assertAlmostEqual(freq, 0.25, delta=0.05)
def test_write_and_sample_different_shapes_and_dtypes(self):
trajectories = [
np.ones([], np.int64),
np.ones([2, 2], np.float32),
np.ones([3, 3], np.int32),
]
for trajectory in trajectories:
self.client.insert(trajectory, {SIMPLE_QUEUE_NAME: 1.0})
for i, [sample] in enumerate(self.client.sample(SIMPLE_QUEUE_NAME, 3)):
np.testing.assert_array_equal(trajectories[i], sample.data[0])
def test_mutate_priorities_update(self):
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
before = self._get_sample_frequency()
self.assertLen(before, 3)
for freq in before:
self.assertAlmostEqual(freq, 0.33, delta=0.05)
key = next(self.client.sample(TABLE_NAME, 1))[0].info.key
self.client.mutate_priorities(TABLE_NAME, updates={key: 0.5})
after = self._get_sample_frequency()
self.assertLen(after, 3)
self.assertAlmostEqual(after[0], 0.4, delta=0.05)
self.assertAlmostEqual(after[1], 0.4, delta=0.05)
self.assertAlmostEqual(after[2], 0.2, delta=0.05)
def test_mutate_priorities_delete(self):
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
before = self._get_sample_frequency()
self.assertLen(before, 4)
key = next(self.client.sample(TABLE_NAME, 1))[0].info.key
self.client.mutate_priorities(TABLE_NAME, deletes=[key])
after = self._get_sample_frequency()
self.assertLen(after, 3)
def test_reset(self):
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
keys_before = set(
sample[0].info.key for sample in self.client.sample(TABLE_NAME, 1000))
self.assertLen(keys_before, 3)
self.client.reset(TABLE_NAME)
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
keys_after = set(
sample[0].info.key for sample in self.client.sample(TABLE_NAME, 1000))
self.assertLen(keys_after, 3)
self.assertTrue(keys_after.isdisjoint(keys_before))
def test_server_info(self):
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
self.client.insert([0], {TABLE_NAME: 1.0})
list(self.client.sample(TABLE_NAME, 1))
server_info = self.client.server_info()
self.assertLen(server_info, 3)
self.assertIn(TABLE_NAME, server_info)
table = server_info[TABLE_NAME]
self.assertEqual(table.current_size, 3)
self.assertEqual(table.num_unique_samples, 1)
self.assertEqual(table.max_size, 1000)
self.assertEqual(table.sampler_options.prioritized.priority_exponent, 1)
self.assertTrue(table.remover_options.fifo)
self.assertEqual(table.signature, tf.TensorSpec(dtype=tf.int64, shape=[]))
self.assertIn(NESTED_SIGNATURE_TABLE_NAME, server_info)
queue = server_info[NESTED_SIGNATURE_TABLE_NAME]
self.assertEqual(queue.current_size, 0)
self.assertEqual(queue.num_unique_samples, 0)
self.assertEqual(queue.max_size, 10)
self.assertTrue(queue.sampler_options.fifo)
self.assertTrue(queue.remover_options.fifo)
self.assertEqual(queue.signature, QUEUE_SIGNATURE)
self.assertIn(SIMPLE_QUEUE_NAME, server_info)
info = server_info[SIMPLE_QUEUE_NAME]
self.assertEqual(info.current_size, 0)
self.assertEqual(info.num_unique_samples, 0)
self.assertEqual(info.max_size, 10)
self.assertTrue(info.sampler_options.fifo)
self.assertTrue(info.remover_options.fifo)
self.assertIsNone(info.signature)
def test_sample_trajectory_with_signature(self):
with self.client.trajectory_writer(3) as writer:
for _ in range(3):
writer.append({
'a': np.ones([], np.int64),
'b': np.ones([2, 2], np.float32),
})
writer.create_item(
table=NESTED_SIGNATURE_TABLE_NAME,
priority=1.0,
trajectory={
'a': writer.history['a'][:],
'b': writer.history['b'][:],
})
sample = next(self.client.sample(NESTED_SIGNATURE_TABLE_NAME,
emit_timesteps=False,
unpack_as_table_signature=True))
# The data should be be unpacked as the structure of the table.
want = {
'a': np.ones([3], np.int64),
'b': np.ones([3, 2, 2], np.float32),
}
tree.map_structure(np.testing.assert_array_equal, sample.data, want)
# The info fields should all be scalars (i.e not batched by time).
self.assertIsInstance(sample.info.key, int)
self.assertIsInstance(sample.info.probability, float)
self.assertIsInstance(sample.info.table_size, int)
self.assertIsInstance(sample.info.priority, float)
def test_sample_trajectory_without_signature(self):
with self.client.trajectory_writer(3) as writer:
for _ in range(3):
writer.append({
'a': np.ones([], np.int64),
'b': np.ones([2, 2], np.float32),
})
writer.create_item(
table=SIMPLE_QUEUE_NAME,
priority=1.0,
trajectory={
'a': writer.history['a'][:],
'b': writer.history['b'][:],
})
sample = next(self.client.sample(SIMPLE_QUEUE_NAME,
emit_timesteps=False,
unpack_as_table_signature=True))
# The data should be flat as the table has no signature. Each element within
# the flat data should represent the entire column (i.e not just one step).
want = [np.ones([3], np.int64), np.ones([3, 2, 2], np.float32)]
tree.map_structure(np.testing.assert_array_equal, sample.data, want)
# The info fields should all be scalars (i.e not batched by time).
self.assertIsInstance(sample.info.key, int)
self.assertIsInstance(sample.info.probability, float)
self.assertIsInstance(sample.info.table_size, int)
self.assertIsInstance(sample.info.priority, float)
def test_sample_trajectory_as_flat_data(self):
with self.client.trajectory_writer(3) as writer:
for _ in range(3):
writer.append({
'a': np.ones([], np.int64),
'b': np.ones([2, 2], np.float32),
})
writer.create_item(
table=NESTED_SIGNATURE_TABLE_NAME,
priority=1.0,
trajectory={
'a': writer.history['a'][:],
'b': writer.history['b'][:],
})
sample = next(self.client.sample(NESTED_SIGNATURE_TABLE_NAME,
emit_timesteps=False,
unpack_as_table_signature=False))
# The table has a signature but we requested the data to be flat.
want = [np.ones([3], np.int64), np.ones([3, 2, 2], np.float32)]
tree.map_structure(np.testing.assert_array_equal, sample.data, want)
# The info fields should all be scalars (i.e not batched by time).
self.assertIsInstance(sample.info.key, int)
self.assertIsInstance(sample.info.probability, float)
self.assertIsInstance(sample.info.table_size, int)
self.assertIsInstance(sample.info.priority, float)
def test_sample_trajectory_written_with_insert(self):
self.client.insert(np.ones([3, 3], np.int32), {SIMPLE_QUEUE_NAME: 1.0})
sample = next(self.client.sample(SIMPLE_QUEUE_NAME,
emit_timesteps=False))
# An extra batch dimension should have been added to the inserted data as
# it is a trajectory of length 1.
want = [np.ones([1, 3, 3], np.int32)]
tree.map_structure(np.testing.assert_array_equal, sample.data, want)
# The info fields should all be scalars (i.e not batched by time).
self.assertIsInstance(sample.info.key, int)
self.assertIsInstance(sample.info.probability, float)
self.assertIsInstance(sample.info.table_size, int)
self.assertIsInstance(sample.info.priority, float)
def test_sample_trajectory_written_with_legacy_writer(self):
with self.client.writer(3) as writer:
for i in range(3):
writer.append([i, np.ones([2, 2], np.float64)])
writer.create_item(SIMPLE_QUEUE_NAME, 3, 1.0)
sample = next(self.client.sample(SIMPLE_QUEUE_NAME,
emit_timesteps=False))
# The time dimension should have been added to all fields.
want = [np.array([0, 1, 2]), np.ones([3, 2, 2], np.float64)]
tree.map_structure(np.testing.assert_array_equal, sample.data, want)
# The info fields should all be scalars (i.e not batched by time).
self.assertIsInstance(sample.info.key, int)
self.assertIsInstance(sample.info.probability, float)
self.assertIsInstance(sample.info.table_size, int)
self.assertIsInstance(sample.info.priority, float)
def test_server_info_timeout(self):
try:
# Setup a client that doesn't actually connect to anything.
dummy_port = portpicker.pick_unused_port()
dummy_client = client.Client(f'localhost:{dummy_port}')
with self.assertRaises(
errors.DeadlineExceededError,
msg='ServerInfo call did not complete within provided timeout of 1s'):
dummy_client.server_info(timeout=1)
finally:
portpicker.return_port(dummy_port)
def test_pickle(self):
loaded_client = pickle.loads(pickle.dumps(self.client))
self.assertEqual(loaded_client._server_address, self.client._server_address)
loaded_client.insert([0], {TABLE_NAME: 1.0})
self.wait_for_table_size(1)
def test_multithreaded_writer_using_flush(self):
# Ensure that we don't have any errors caused by multithreaded use of
# writers or clients.
pool = multithreading.Pool(64)
def _write(i):
with self.client.writer(1) as writer:
writer.append([i])
# Make sure that flush before create_item doesn't create trouble.
writer.flush()
writer.create_item(TABLE_NAME, 1, 1.0)
writer.flush()
for _ in range(5):
pool.map(_write, list(range(128)))
self.wait_for_table_size(640)
pool.close()
pool.join()
def test_multithreaded_writer_using_scope(self):
# Ensure that we don't have any errors caused by multithreaded use of
# writers or clients.
pool = multithreading.Pool(64)
def _write(i):
with self.client.writer(1) as writer:
writer.append([i])
writer.create_item(TABLE_NAME, 1, 1.0)
for _ in range(5):
pool.map(_write, list(range(256)))
info = self.client.server_info()[TABLE_NAME]
self.assertEqual(info.current_size, 1000)
pool.close()
pool.join()
def test_validates_trajectory_writer_config(self):
with self.assertRaises(ValueError):
self.client.trajectory_writer(0)
with self.assertRaises(ValueError):
self.client.trajectory_writer(-1)
if __name__ == '__main__':
absltest.main()
|
reverb-master
|
reverb/client_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Dataset that transforms a dataset applying patterns."""
from typing import Any, Callable, Sequence
from reverb import replay_sample
from reverb import structured_writer
import tensorflow as tf
import tree
from reverb.cc import patterns_pb2
from reverb.cc.ops import gen_reverb_ops
# pylint: disable=g-direct-tensorflow-import
from tensorflow.python.data.ops import dataset_ops
from tensorflow.python.data.ops import structured_function
# pylint: enable=g-direct-tensorflow-import
class PatternDataset(dataset_ops.UnaryDataset):
"""A tf.data.Dataset that applies reverb patterns to an input dataset.
Given a dataset (stream) of steps, this dataset will produce trajectories
in the same way as the steps were added to a Reverb StructuredWriter and
then sampled.
TODO(sabela): Add examples.
Note that this dataset can only be used in eager mode (i.e., not TF1 support).
"""
def __init__(self,
input_dataset: tf.data.Dataset,
configs: Sequence[patterns_pb2.StructuredWriterConfig],
respect_episode_boundaries: bool,
is_end_of_episode: Callable[[Any], bool]):
"""Constructs a dataset applying the configs to the input dataset.
Args:
input_dataset: Dataset to apply the patterns to. It is expected to be a
flat dataset (e.g., if you have a dataset of episodes, it has to be
flattened into a dataset of steps).
configs: Patterns to apply to the input dataset in order to construct
trajectories.
respect_episode_boundaries: If True, it won't create trajectories that
cross episode boudaries.
is_end_of_episode: Function that is applied to every step and returns if
the step is the last of an episode.
Returns:
A dataset of trajectories.
"""
signature = structured_writer.infer_signature(configs,
input_dataset.element_spec)
self._shapes = tree.map_structure(lambda x: x.shape, signature)
self._dtypes = tree.map_structure(lambda x: x.dtype, signature)
self._input_dataset = input_dataset
wrapped_func = structured_function.StructuredFunctionWrapper(
is_end_of_episode,
transformation_name='ReverbPatternDataset_IsEndOfEpisode',
dataset=input_dataset,
use_legacy_function=False)
if not wrapped_func.output_structure.is_compatible_with(
tf.TensorSpec([], tf.bool)):
raise ValueError(
f'Invalid `is_end_of_episode`. `is_end_of_episode` must return `bool`, '
f'but its return type is {wrapped_func.output_structure}.')
self._is_end_of_episode = wrapped_func
history_length = 0
serialized_configs = []
for proto in configs:
for node in proto.flat:
history_length = max(
history_length, abs(min(node.start, node.stop)))
# The buffers must contain enough steps for the pattern to be applied.
# We therefore check if the config already contains a
# condition that ensures that the config is not applied prematurely.
# If none of the existing conditions fulfill this responsibility then
# we create and add one to the config.
has_buffer_len_condition = False
for condition in proto.conditions:
if condition.buffer_length and condition.ge >= history_length:
has_buffer_len_condition = True
break
if not has_buffer_len_condition:
new_cond = patterns_pb2.Condition(
buffer_length=True, ge=history_length)
proto.conditions.append(new_cond)
serialized_configs.append(proto.SerializeToString())
variant_tensor = gen_reverb_ops.reverb_pattern_dataset(
input_dataset._variant_tensor, # pylint: disable=protected-access
other_arguments=self._is_end_of_episode.function.captured_inputs,
is_end_of_episode=self._is_end_of_episode.function,
dtypes=tree.flatten(self._dtypes),
shapes=tree.flatten(self._shapes),
configs=serialized_configs,
clear_after_episode=respect_episode_boundaries)
super(PatternDataset, self).__init__(input_dataset, variant_tensor)
@property
def element_spec(self) -> Any:
return tree.map_structure(tf.TensorSpec, self._shapes, self._dtypes)
def pattern_dataset_with_info(
input_dataset: tf.data.Dataset,
configs: Sequence[patterns_pb2.StructuredWriterConfig],
respect_episode_boundaries: bool,
is_end_of_episode: Callable[[Any], bool]) -> tf.data.Dataset:
"""Constructs a PatternDataset and obtains the output as ReplaySamples.
To construct the ReplaySample, it adds a SampleInfo that contains zeros.
Args:
input_dataset: Dataset to apply the patterns to. It is expected to be a
flat dataset (e.g., if you have a dataset of episodes, it has to be
flattened into a dataset of steps).
configs: Patterns to apply to the input dataset in order to construct
trajectories.
respect_episode_boundaries: If True, it won't create trajectories that
cross episode boudaries.
is_end_of_episode: Function that is applied to every step and returns if
the step is the last of an episode.
Returns:
A dataset of ReplaySamples where the info of each sample contains zeros
and the data corresponds to the trajectories generated by applying the
patterns.
"""
pattern_dataset = PatternDataset(input_dataset, configs,
respect_episode_boundaries,
is_end_of_episode)
@tf.function
def build_replay_sample(data):
return replay_sample.ReplaySample(
info=replay_sample.SampleInfo.zeros(), data=data)
return pattern_dataset.map(build_replay_sample)
|
reverb-master
|
reverb/pattern_dataset.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Define Reverb version information."""
# TODO(b/156099713): Improve how versioning is handled.
# We follow Semantic Versioning (https://semver.org/)
_MAJOR_VERSION = '0'
_MINOR_VERSION = '13'
_PATCH_VERSION = '0'
# When building releases, we can update this value on the release branch to
# reflect the current release candidate ('rc0', 'rc1') or, finally, the official
# stable release (indicated by `_REL_SUFFIX = ''`). Outside the context of a
# release branch, the current version is by default assumed to be a
# 'development' version, labeled 'dev'.
_DEV_SUFFIX = 'dev'
_REL_SUFFIX = 'rc0'
# Example, '0.5.0rc0'
__version__ = '.'.join([
_MAJOR_VERSION,
_MINOR_VERSION,
_PATCH_VERSION,
])
__dev_version__ = '{}.{}'.format(__version__, _DEV_SUFFIX)
__rel_version__ = '{}{}'.format(__version__, _REL_SUFFIX)
|
reverb-master
|
reverb/pip_package/reverb_version.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Build and installs dm-reverb."""
import argparse
import codecs
import datetime
import fnmatch
import os
import sys
from setuptools import find_packages
from setuptools import setup
from setuptools.command.install import install as InstallCommandBase
from setuptools.dist import Distribution
import reverb_version
# Defaults if doing a release build.
TENSORFLOW_VERSION = 'tensorflow~=2.7.0'
class BinaryDistribution(Distribution):
def has_ext_modules(self):
return True
def find_files(pattern, root):
"""Return all the files matching pattern below root dir."""
for dirpath, _, files in os.walk(root):
for filename in fnmatch.filter(files, pattern):
yield os.path.join(dirpath, filename)
class InstallCommand(InstallCommandBase):
"""Override the dir where the headers go."""
def finalize_options(self):
ret = super().finalize_options()
# We need to set this manually because we are not using setuptools to
# compile the shared libraries we are distributing.
self.install_lib = self.install_platlib
return ret
class SetupToolsHelper(object):
"""Helper to execute `setuptools.setup()`."""
def __init__(self, release=False, tf_version_override=None):
"""Initialize ReleaseBuilder class.
Args:
release: True to do a release build. False for a nightly build.
tf_version_override: Set to override the tf_version dependency.
"""
self.release = release
self.tf_version_override = tf_version_override
def _get_version(self):
"""Returns the version and project name to associate with the build."""
if self.release:
project_name = 'dm-reverb'
version = reverb_version.__rel_version__
else:
project_name = 'dm-reverb-nightly'
version = reverb_version.__dev_version__
version += datetime.datetime.now().strftime('%Y%m%d')
return version, project_name
def _get_required_packages(self):
"""Returns list of required packages."""
required_packages = [
'dataclasses; python_version < "3.7.0"', # Back-port for Python 3.6.
'dm-tree',
'portpicker',
]
return required_packages
def _get_tensorflow_packages(self):
"""Returns list of required packages if using reverb."""
tf_packages = []
if self.release:
tf_version = TENSORFLOW_VERSION
else:
tf_version = 'tf-nightly'
# Overrides required versions if tf_version_override is set.
if self.tf_version_override:
tf_version = self.tf_version_override
tf_packages.append(tf_version)
return tf_packages
def run_setup(self):
# Builds the long description from the README.
root_path = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(root_path, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
version, project_name = self._get_version()
setup(
name=project_name,
version=version,
description=('Reverb is an efficient and easy-to-use data storage and '
'transport system designed for machine learning research.'),
long_description=long_description,
long_description_content_type='text/markdown',
author='DeepMind',
author_email='DeepMind <[email protected]>',
url='https://github.com/deepmind/reverb',
license='Apache 2.0',
packages=find_packages(),
headers=list(find_files('*.proto', 'reverb')),
include_package_data=True,
install_requires=self._get_required_packages(),
extras_require={
'tensorflow': self._get_tensorflow_packages(),
},
distclass=BinaryDistribution,
cmdclass={
'install': InstallCommand,
},
entry_points={
'console_scripts': [
'reverb_server=reverb.server_executable.server_main:app_run_main'
],
},
python_requires='>=3',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
],
keywords='tensorflow deepmind reinforcement learning machine replay jax',
)
if __name__ == '__main__':
# Hide argparse help so `setuptools.setup` help prints. This pattern is an
# improvement over using `sys.argv` and then `sys.argv.remove`, which also
# did not provide help about custom arguments.
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument(
'--release',
action='store_true',
help='Pass as true to do a release build')
parser.add_argument(
'--tf-version',
type=str,
default=None,
help='Overrides TF version required when Reverb is installed, e.g.'
'tensorflow==2.5.0')
FLAGS, unparsed = parser.parse_known_args()
# Go forward with only non-custom flags.
sys.argv.clear()
# Downstream `setuptools.setup` expects args to start at the second element.
unparsed.insert(0, 'foo')
sys.argv.extend(unparsed)
setup_tools_helper = SetupToolsHelper(release=FLAGS.release,
tf_version_override=FLAGS.tf_version)
setup_tools_helper.run_setup()
|
reverb-master
|
reverb/pip_package/setup.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Python wrappers for building checkpointers."""
import abc
import tempfile
from typing import Optional
import numpy # pylint: disable=unused-import
from reverb import pybind
class CheckpointerBase(metaclass=abc.ABCMeta):
"""Base class for Python wrappers of the Checkpointer."""
@abc.abstractmethod
def internal_checkpointer(self) -> pybind.Checkpointer:
"""Creates the actual Checkpointer-object used by the C++ layer."""
class DefaultCheckpointer(CheckpointerBase):
"""Base class for storing checkpoints to as recordIO files.."""
def __init__(self,
path: str,
group: str = '',
fallback_checkpoint_path: Optional[str] = None):
"""Constructor of DefaultCheckpointer.
Args:
path: Root directory to store checkpoints in.
group: MDB group to set as "group" of checkpoint directory. If empty
(default) then no group is set.
fallback_checkpoint_path: (Optional) path to the actual checkpoint.
The checkpointer first attempts to load from the root directory (path)
and, then, iff the root directory is empty it loads the fallback
checkpoint. This way we are effectively using the fallback checkpoint as
a way to initialise the service with a checkpoint generated by another
experiment. Note: unlike `path`, `fallback_checkpoint_path` has to be
the path to the actual checkpoint and not a directory from which to
reload a checkpoint.
"""
self.path = path
self.group = group
self.fallback_checkpoint_path = fallback_checkpoint_path
def internal_checkpointer(self) -> pybind.Checkpointer:
"""Creates the actual Checkpointer-object used by the C++ layer."""
return pybind.create_default_checkpointer(self.path, self.group,
self.fallback_checkpoint_path)
class TempDirCheckpointer(DefaultCheckpointer):
"""Stores and loads checkpoints from a temporary directory."""
def __init__(self):
super().__init__(tempfile.mkdtemp())
|
reverb-master
|
reverb/platform/checkpointers_lib.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for shared checkpointer utilities."""
from absl.testing import absltest
from reverb import pybind
from reverb.platform import checkpointers_lib
class TempDirCheckpointer(absltest.TestCase):
def test_constructs_internal_checkpointer(self):
checkpointer = checkpointers_lib.TempDirCheckpointer()
self.assertIsInstance(checkpointer.internal_checkpointer(),
pybind.Checkpointer)
if __name__ == '__main__':
absltest.main()
|
reverb-master
|
reverb/platform/checkpointers_lib_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Helpers for loading dynamic library files."""
import sys
import six
import tensorflow as tf
UNDEFINED_SYMBOL_ERROR_MESSAGE = """
Attempted to load a reverb dynamic library, but it could not find the required
symbols inside of TensorFlow. This commonly occurs when your version of
tensorflow and reverb are mismatched. For example, if you are using the python
package 'tf-nightly', make sure you use the python package 'dm-reverb-nightly'
built on the same or the next night. If you are using a release version package
'tensorflow', use a release package 'dm-reverb' built to be compatible with
that exact version. If all else fails, file a github issue on deepmind/reverb.
Current installed version of tensorflow: {tf_version}.
""".format(tf_version=tf.__version__)
def reraise_wrapped_error(error: Exception):
"""Wraps failures with better error messages.
Args:
error: The exception. We must be inside a raise.
Raises:
ImportError: Typically if there is a version mismatch.
"""
if 'undefined symbol' in str(error).lower():
six.reraise(ImportError,
ImportError('%s\nOrignal error:\n%s' % (
UNDEFINED_SYMBOL_ERROR_MESSAGE, error)),
sys.exc_info()[2])
raise error
|
reverb-master
|
reverb/platform/default/load_op_library.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Module to check that the TF version is sufficient for Reverb.
Note: We need to put some imports inside a function call below, and the
function call needs to come before the *actual* imports that populate the
reverb namespace. Hence, we disable this lint check throughout the file.
"""
import distutils.version
# pylint: disable=g-import-not-at-top
def ensure_tf_version():
"""Attempt to import tensorflow, and ensure its version is sufficient.
Note: This function must be executed before Reverb is imported as Reverb will
attempt to import TensorFlow.
Raises:
ImportError: If either tensorflow is not importable or its version is
inadequate.
"""
try:
import tensorflow as tf
except ImportError:
print('\n\nFailed to import TensorFlow. Please note that TensorFlow is not '
'installed by default when you install Reverb. This is so that '
'users can decide whether to install the GPU-enabled TensorFlow '
'package. To use Reverb, please install the most recent version '
'of TensorFlow, by following instructions at '
'https://tensorflow.org/install.\n\n')
raise
#
# Update this whenever we need to depend on a newer TensorFlow release.
#
required_tensorflow_version = '2.3.0'
version = tf.version.VERSION
if (distutils.version.LooseVersion(version) <
distutils.version.LooseVersion(required_tensorflow_version)):
raise ImportError(
'This version of Reverb requires TensorFlow '
'version >= {required}; Detected an installation of version {present}. '
'Please upgrade TensorFlow to proceed.'.format(
required=required_tensorflow_version,
present=version))
|
reverb-master
|
reverb/platform/default/ensure_tf_install.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Python wrappers for building checkpointers."""
from typing import Optional
from reverb.platform import checkpointers_lib
CheckpointerBase = checkpointers_lib.CheckpointerBase
DefaultCheckpointer = checkpointers_lib.DefaultCheckpointer
TempDirCheckpointer = checkpointers_lib.TempDirCheckpointer
def default_checkpointer(group: Optional[str] = None) -> CheckpointerBase:
del group
return TempDirCheckpointer()
|
reverb-master
|
reverb/platform/default/checkpointers.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Get server configuration (constructor args) from textproto cli arg.
"""
from absl import flags
from reverb.server_executable import reverb_config_pb2
from google.protobuf import text_format
_CONFIG = flags.DEFINE_string(
"config", None, "Reverb server config in textproto format",
required=True)
def get_server_config_proto() -> reverb_config_pb2.ReverbServerConfig:
config_proto = reverb_config_pb2.ReverbServerConfig()
text_format.Parse(_CONFIG.value, config_proto)
return config_proto
|
reverb-master
|
reverb/platform/default/server_main_command_line_args.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Functions that will help construct a reverb.Server from protos.
"""
from typing import Sequence
import reverb
from reverb import reverb_types
from reverb.cc import schema_pb2
from reverb.cc.checkpointing import checkpoint_pb2
def selector_from_proto(
s: schema_pb2.KeyDistributionOptions
) -> reverb_types.SelectorType:
"""Convert protobuf to reverb_types.SelectorType."""
if s.fifo:
return reverb.selectors.Fifo()
elif s.uniform:
return reverb.selectors.Uniform()
elif s.lifo:
return reverb.selectors.Lifo()
elif s.WhichOneof('distribution') == 'heap':
if s.heap.min_heap:
return reverb.selectors.MinHeap()
else:
return reverb.selectors.MaxHeap()
elif s.WhichOneof('distribution') == 'prioritized':
return reverb.selectors.Prioritized(
s.prioritized.priority_exponent)
else:
simple_booleans_options = ('fifo', 'lifo', 'uniform')
if s.WhichOneof('distribution') in simple_booleans_options:
raise ValueError(f'distribution={s.WhichOneof("distribution")}'
' but the associated boolean value is false.')
else:
raise NotImplementedError(
f'distribution={s.WhichOneof("distribution")}')
def rate_limiter_from_proto(
proto: checkpoint_pb2.RateLimiterCheckpoint
) -> reverb.rate_limiters.RateLimiter:
return reverb.rate_limiters.RateLimiter(
samples_per_insert=proto.samples_per_insert,
min_size_to_sample=proto.min_size_to_sample,
min_diff=proto.min_diff,
max_diff=proto.max_diff)
def tables_from_proto(
configs: Sequence[checkpoint_pb2.PriorityTableCheckpoint]
) -> Sequence[reverb.Table]:
"""Convert protobuf to reverb.Table."""
tables = []
for config in configs:
tables.append(
reverb.Table(
name=config.table_name,
sampler=selector_from_proto(config.sampler),
remover=selector_from_proto(config.remover),
max_size=config.max_size,
rate_limiter=rate_limiter_from_proto(config.rate_limiter),
max_times_sampled=config.max_times_sampled,
))
return tables
|
reverb-master
|
reverb/server_executable/server_from_proto.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Re-usable Reverb server that can be packaged as a binary.
It is functionally equivalent to instantiating the reverb.Server
class, but instead of the user's configuration coming from constructor
arguments, it comes from a command-line argument in textproto format.
"""
from absl import app
from absl import flags
from absl import logging
import reverb
from reverb.platform.default import server_main_command_line_args
from reverb.server_executable import server_from_proto
FLAGS = flags.FLAGS
def main(unused_argv):
config_proto = (
server_main_command_line_args.get_server_config_proto())
port = config_proto.port
table_configs = server_from_proto.tables_from_proto(
config_proto.tables)
logging.info('Configuring reverb for %d tables', len(table_configs))
server = reverb.Server(tables=table_configs, port=port)
logging.info('Reverb started.')
server.wait()
# This is used as entry point for the console_script defined in
# setup.py
def app_run_main():
app.run(main)
if __name__ == '__main__':
app_run_main()
|
reverb-master
|
reverb/server_executable/server_main.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for server_from_proto."""
from absl.testing import absltest
from absl.testing import parameterized
import reverb
from reverb.server_executable import server_from_proto
from reverb.cc import schema_pb2
from reverb.cc.checkpointing import checkpoint_pb2
class ServerFromProtoTest(parameterized.TestCase):
@parameterized.named_parameters(
('fifo', 'fifo', reverb.selectors.Fifo),
('lifo', 'lifo', reverb.selectors.Lifo),
('uniform', 'uniform', reverb.selectors.Uniform))
def test_selector_from_proto(self, selector_proto_field,
expected_selector):
selector_proto = schema_pb2.KeyDistributionOptions()
setattr(selector_proto, selector_proto_field, True)
selector = server_from_proto.selector_from_proto(selector_proto)
self.assertIsInstance(selector, expected_selector)
def test_prioritized_selector_from_proto(self):
selector_proto = schema_pb2.KeyDistributionOptions()
selector_proto.prioritized.priority_exponent = 2
selector = server_from_proto.selector_from_proto(selector_proto)
self.assertIsInstance(selector, reverb.selectors.Prioritized)
@parameterized.named_parameters(
('min_heap', True, reverb.selectors.MinHeap),
('max_heap', False, reverb.selectors.MaxHeap))
def test_heap_selector_from_proto(self, is_min_heap,
expected_selector_builder):
selector_proto = schema_pb2.KeyDistributionOptions()
selector_proto.heap.min_heap = is_min_heap
selector = server_from_proto.selector_from_proto(selector_proto)
self.assertIsInstance(selector, type(expected_selector_builder()))
def test_rate_limiter_from_proto(self):
rate_limiter_proto = checkpoint_pb2.RateLimiterCheckpoint()
rate_limiter_proto.samples_per_insert = 1
rate_limiter_proto.min_size_to_sample = 2
rate_limiter_proto.min_diff = -100
rate_limiter_proto.max_diff = 120
rate_limiter = server_from_proto.rate_limiter_from_proto(
rate_limiter_proto)
self.assertIsInstance(rate_limiter,
reverb.rate_limiters.RateLimiter)
def test_table_from_proto(self):
table_proto = checkpoint_pb2.PriorityTableCheckpoint()
table_proto.table_name = 'test_table'
table_proto.max_size = 101
table_proto.max_times_sampled = 200
table_proto.rate_limiter.min_diff = -100
table_proto.rate_limiter.max_diff = 200
table_proto.rate_limiter.samples_per_insert = 10
table_proto.rate_limiter.min_size_to_sample = 1
table_proto.sampler.lifo = True
table_proto.remover.fifo = True
config = [
table_proto
]
tables = server_from_proto.tables_from_proto(config)
self.assertLen(tables, 1)
self.assertIsInstance(tables[0], reverb.Table)
self.assertEqual(tables[0].name, table_proto.table_name)
table_info = tables[0].info
self.assertEqual(table_info.max_size, table_proto.max_size)
self.assertEqual(table_info.max_times_sampled,
table_proto.max_times_sampled)
# The rate limiter objects do not have quite the same structure.
self.assertEqual(table_info.rate_limiter_info.max_diff,
table_proto.rate_limiter.max_diff)
self.assertEqual(table_info.rate_limiter_info.min_diff,
table_proto.rate_limiter.min_diff)
self.assertEqual(table_info.rate_limiter_info.samples_per_insert,
table_proto.rate_limiter.samples_per_insert)
self.assertEqual(table_info.rate_limiter_info.min_size_to_sample,
table_proto.rate_limiter.min_size_to_sample)
self.assertEqual(table_info.sampler_options.lifo,
table_proto.sampler.lifo)
self.assertEqual(table_info.remover_options.fifo,
table_proto.remover.fifo)
if __name__ == '__main__':
absltest.main()
|
reverb-master
|
reverb/server_executable/server_from_proto_test.py
|
# Copyright 2019 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
|
reverb-master
|
reverb/cc/opensource/__init__.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Constants for reference_checkpoint."""
from ml_collections import config_dict
from diplomacy.environment import province_order
from diplomacy.network import network
def get_config() -> config_dict.ConfigDict:
"""Returns network config."""
config = config_dict.ConfigDict()
config.network_class = network.Network
config.network_kwargs = config_dict.create(
rnn_ctor=network.RelationalOrderDecoder,
rnn_kwargs=dict(
adjacency=network.normalize_adjacency(
province_order.build_adjacency(
province_order.get_mdf_content(
province_order.MapMDF.STANDARD_MAP))),
filter_size=64,
num_cores=4,
),
name="delta",
num_players=7,
area_mdf=province_order.MapMDF.BICOASTAL_MAP,
province_mdf=province_order.MapMDF.STANDARD_MAP,
is_training=False,
shared_filter_size=160,
player_filter_size=160,
num_shared_cores=12,
num_player_cores=3,
value_mlp_hidden_layer_sizes=(256,),
actions_since_last_moves_embedding_size=10)
return config
|
diplomacy-main
|
network/config.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Network to play no-press Diplomacy.
Comments referring to tensor shapes use the following abbreviations:
B := batch size
T := learners unroll length.
PLAYERS := num players
REP_SIZE := generic representation size for an entity.
NUM_AREAS := observation_utils.NUM_AREAS
NUM_PROVINCES := observation_utils.NUM_PROVINCES
MAX_ACTION_INDEX := action_utils.MAX_ACTION_INDEX
MAX_ORDERS := action_utils.MAX_ORDERS
"""
import collections
import functools
from typing import Any, Dict, NamedTuple, Optional, Sequence, Tuple
import haiku as hk
import jax
import jax.numpy as jnp
import numpy as np
import tree
from diplomacy.environment import action_utils
from diplomacy.environment import observation_transformation
from diplomacy.environment import observation_utils as utils
from diplomacy.environment import province_order
from diplomacy.environment import tree_utils
def normalize_adjacency(adjacency: np.ndarray) -> np.ndarray:
"""Computes the symmetric normalized Laplacian of an adjacency matrix.
Symmetric normalized Laplacians are the representation of choice for graphs in
GraphConvNets (see https://arxiv.org/pdf/1609.02907.pdf).
Args:
adjacency: map adjacency matrix without self-connections.
Returns:
Symmetric normalized Laplacian matrix of adjacency.
"""
adjacency += np.eye(*adjacency.shape)
d = np.diag(np.power(adjacency.sum(axis=1), -0.5))
return d.dot(adjacency).dot(d)
class EncoderCore(hk.Module):
"""Graph Network with non-shared weights across nodes.
The input to this network is organized by area and the topology is described
by the symmetric normalized Laplacian of an adjacency matrix.
"""
def __init__(self,
adjacency: jnp.ndarray,
*,
filter_size: int = 32,
batch_norm_config: Optional[Dict[str, Any]] = None,
name: str = "encoder_core"):
"""Constructor.
Args:
adjacency: [NUM_AREAS, NUM_AREAS] symmetric normalized Laplacian of the
adjacency matrix.
filter_size: output size of per-node linear layer.
batch_norm_config: config dict for hk.BatchNorm.
name: a name for the module.
"""
super().__init__(name=name)
self._adjacency = adjacency
self._filter_size = filter_size
bnc = dict(decay_rate=0.9, eps=1e-5, create_scale=True, create_offset=True)
bnc.update(batch_norm_config or {})
self._bn = hk.BatchNorm(**bnc)
def __call__(self,
tensors: jnp.ndarray,
*,
is_training: bool = False) -> jnp.ndarray:
"""One round of message passing.
Output nodes are represented as the concatenation of the sum of incoming
messages and the message sent.
Args:
tensors: [B, NUM_AREAS, REP_SIZE]
is_training: Whether this is during training.
Returns:
[B, NUM_AREAS, 2 * self._filter_size]
"""
w = hk.get_parameter(
"w", shape=tensors.shape[-2:] + (self._filter_size,),
init=hk.initializers.VarianceScaling())
messages = jnp.einsum("bni,nij->bnj", tensors, w)
tensors = jnp.matmul(self._adjacency, messages)
tensors = jnp.concatenate([tensors, messages], axis=-1)
tensors = self._bn(tensors, is_training=is_training)
return jax.nn.relu(tensors)
class BoardEncoder(hk.Module):
"""Encode board state.
Constructs a representation of the board state, organized per-area. The output
depends on the season in the game, the specific power (player) we are
considering as well as the number of builds for this player.
Both season and player are embedded before being included in the
representation.
We first construct a "shared representation", which does not depend on the
specific player, and then include player in the later layers.
"""
def __init__(self,
adjacency: jnp.ndarray,
*,
shared_filter_size: int = 32,
player_filter_size: int = 32,
num_shared_cores: int = 8,
num_player_cores: int = 8,
num_players: int = 7,
num_seasons: int = utils.NUM_SEASONS,
player_embedding_size: int = 16,
season_embedding_size: int = 16,
min_init_embedding: float = -1.0,
max_init_embedding: float = 1.0,
batch_norm_config: Optional[Dict[str, Any]] = None,
name: str = "board_encoder"):
"""Constructor.
Args:
adjacency: [NUM_AREAS, NUM_AREAS] symmetric normalized Laplacian of the
adjacency matrix.
shared_filter_size: filter_size of each EncoderCore for shared layers.
player_filter_size: filter_size of each EncoderCore for player-specific
layers.
num_shared_cores: number of shared layers, or rounds of message passing.
num_player_cores: number of player-specific layers, or rounds of message
passing.
num_players: number of players.
num_seasons: number of seasons.
player_embedding_size: size of player embedding.
season_embedding_size: size of season embedding.
min_init_embedding: min value for hk.initializers.RandomUniform for player
and season embedding.
max_init_embedding: max value for hk.initializers.RandomUnifor for player
and season embedding.
batch_norm_config: config dict for hk.BatchNorm.
name: a name for this module.
"""
super().__init__(name=name)
self._num_players = num_players
self._season_embedding = hk.Embed(
num_seasons,
season_embedding_size,
w_init=hk.initializers.RandomUniform(min_init_embedding,
max_init_embedding))
self._player_embedding = hk.Embed(
num_players,
player_embedding_size,
w_init=hk.initializers.RandomUniform(min_init_embedding,
max_init_embedding))
make_encoder = functools.partial(
EncoderCore,
adjacency, batch_norm_config=batch_norm_config)
self._shared_encode = make_encoder(filter_size=shared_filter_size)
self._shared_core = [
make_encoder(filter_size=shared_filter_size)
for _ in range(num_shared_cores)
]
self._player_encode = make_encoder(filter_size=player_filter_size)
self._player_core = [
make_encoder(filter_size=player_filter_size)
for _ in range(num_player_cores)
]
bnc = dict(decay_rate=0.9, eps=1e-5, create_scale=True, create_offset=True)
bnc.update(batch_norm_config or {})
self._bn = hk.BatchNorm(**bnc)
def __call__(self,
state_representation: jnp.ndarray,
season: jnp.ndarray,
build_numbers: jnp.ndarray,
is_training: bool = False) -> jnp.ndarray:
"""Encoder board state.
Args:
state_representation: [B, NUM_AREAS, REP_SIZE].
season: [B, 1].
build_numbers: [B, 1].
is_training: Whether this is during training.
Returns:
[B, NUM_AREAS, 2 * self._player_filter_size].
"""
season_context = jnp.tile(
self._season_embedding(season)[:, None], (1, utils.NUM_AREAS, 1))
build_numbers = jnp.tile(build_numbers[:, None].astype(jnp.float32),
(1, utils.NUM_AREAS, 1))
state_representation = jnp.concatenate(
[state_representation, season_context, build_numbers], axis=-1)
representation = self._shared_encode(
state_representation, is_training=is_training)
for layer in self._shared_core:
representation += layer(representation, is_training=is_training)
player_context = jnp.tile(
self._player_embedding.embeddings[None, :, None, :],
(season.shape[0], 1, utils.NUM_AREAS, 1))
representation = jnp.tile(representation[:, None],
(1, self._num_players, 1, 1))
representation = jnp.concatenate([representation, player_context], axis=3)
representation = hk.BatchApply(self._player_encode)(
representation, is_training=is_training)
for layer in self._player_core:
representation += hk.BatchApply(layer)(
representation, is_training=is_training)
return self._bn(representation, is_training=is_training)
class RecurrentOrderNetworkInput(NamedTuple):
average_area_representation: jnp.ndarray
legal_actions_mask: jnp.ndarray
teacher_forcing: jnp.ndarray
previous_teacher_forcing_action: jnp.ndarray
temperature: jnp.ndarray
def previous_action_from_teacher_or_sample(
teacher_forcing: jnp.ndarray,
previous_teacher_forcing_action: jnp.ndarray,
previous_sampled_action_index: jnp.ndarray):
# Get previous action, from input (for teacher forcing) or state.
return jnp.where(
teacher_forcing, previous_teacher_forcing_action,
jnp.asarray(action_utils.shrink_actions(
action_utils.POSSIBLE_ACTIONS))[previous_sampled_action_index])
def one_hot_provinces_for_all_actions():
return jax.nn.one_hot(
jnp.asarray(action_utils.ordered_province(action_utils.POSSIBLE_ACTIONS)),
utils.NUM_PROVINCES)
def blocked_provinces_and_actions(
previous_action: jnp.ndarray,
previous_blocked_provinces: jnp.ndarray):
"""Calculate which provinces and actions are illegal."""
# Compute which provinces are blocked by past decisions.
updated_blocked_provinces = jnp.maximum(
previous_blocked_provinces, ordered_provinces_one_hot(previous_action))
blocked_actions = jnp.squeeze(
jnp.matmul(one_hot_provinces_for_all_actions(),
updated_blocked_provinces[..., None]), axis=-1)
blocked_actions *= jnp.logical_not(
jnp.asarray(is_waive(action_utils.POSSIBLE_ACTIONS)))
return updated_blocked_provinces, blocked_actions
def sample_from_logits(
logits: jnp.ndarray,
legal_action_mask: jnp.ndarray,
temperature: jnp.ndarray,):
"""Sample from logits respecting a legal actions mask."""
deterministic_logits = jnp.where(
jax.nn.one_hot(
jnp.argmax(logits, axis=-1),
num_classes=action_utils.MAX_ACTION_INDEX,
dtype=jnp.bool_), 0,
jnp.finfo(jnp.float32).min)
stochastic_logits = jnp.where(legal_action_mask,
logits / temperature,
jnp.finfo(jnp.float32).min)
logits_for_sampling = jnp.where(
jnp.equal(temperature, 0.0),
deterministic_logits,
stochastic_logits)
# Sample an action for the current province and update the state so that
# following orders can be conditioned on this decision.
key = hk.next_rng_key()
return jax.random.categorical(
key, logits_for_sampling, axis=-1)
class RelationalOrderDecoderState(NamedTuple):
prev_orders: jnp.ndarray
blocked_provinces: jnp.ndarray
sampled_action_index: jnp.ndarray
class RelationalOrderDecoder(hk.RNNCore):
"""RelationalOrderDecoder.
Relational Order Decoders (ROD)s output order logits for a unit, based on the
current board representation, and the orders selected for other units so far.
"""
def __init__(self,
adjacency: jnp.ndarray,
*,
filter_size: int = 32,
num_cores: int = 4,
batch_norm_config: Optional[Dict[str, Any]] = None,
name: str = "relational_order_decoder"):
"""Constructor.
Args:
adjacency: [NUM_PROVINCES, NUM_PROVINCES] symmetric normalized Laplacian
of the per-province adjacency matrix.
filter_size: filter_size for relational cores
num_cores: number of relational cores
batch_norm_config: config dict for hk.BatchNorm
name: module's name.
"""
super().__init__(name=name)
self._filter_size = filter_size
self._encode = EncoderCore(
adjacency,
filter_size=self._filter_size,
batch_norm_config=batch_norm_config)
self._cores = []
for _ in range(num_cores):
self._cores.append(
EncoderCore(
adjacency,
filter_size=self._filter_size,
batch_norm_config=batch_norm_config))
self._projection_size = 2 * self._filter_size # (nodes, messages)
bnc = dict(decay_rate=0.9, eps=1e-5, create_scale=True, create_offset=True)
bnc.update(batch_norm_config or {})
self._bn = hk.BatchNorm(**bnc)
def _scatter_to_province(self, vector: jnp.ndarray,
scatter: jnp.ndarray) -> jnp.ndarray:
"""Scatters vector to its province location in inputs.
Args:
vector: [B*PLAYERS, REP_SIZE]
scatter: [B*PLAYER, NUM_PROVINCES] -- one-hot encoding.
Returns:
[B*PLAYERS, NUM_AREAS, REP_SIZE] where vectors has been added in the
location prescribed by scatter.
"""
return vector[:, None, :] * scatter[..., None]
def _gather_province(self, inputs: jnp.ndarray,
gather: jnp.ndarray) -> jnp.ndarray:
"""Gathers specific province location from inputs.
Args:
inputs: [B*PLAYERS, NUM_PROVINCES, REP_SIZE]
gather: [B*PLAYERS, NUM_PROVINCES] -- one-hot encoding
Returns:
[B*PLAYERS, REP_SIZE] gathered from inputs.
"""
return jnp.sum(inputs * gather[..., None], axis=1)
def _relational_core(self,
previous_orders: jnp.ndarray,
board_representation,
is_training: bool = False):
"""Apply relational core to current province and previous decisions."""
inputs = jnp.concatenate([previous_orders, board_representation], axis=-1)
representation = self._encode(inputs, is_training=is_training)
for core in self._cores:
representation += core(representation, is_training=is_training)
return self._bn(representation, is_training=is_training)
def __call__(
self,
inputs: RecurrentOrderNetworkInput,
prev_state: RelationalOrderDecoderState,
*,
is_training: bool = False,
) -> Tuple[jnp.ndarray, RelationalOrderDecoderState]:
"""Issue an order based on board representation and previous decisions.
Args:
inputs: RecurrentOrderNetworkInput(
average_area_representation <-- [B*PLAYERS, REP_SIZE],
legal_actions_mask <-- [B*PLAYERS, MAX_ACTION_INDEX],
teacher_forcing <-- [B*PLAYERS],
previous_teacher_forcing_action <-- [B*PLAYERS],
temperature <-- [B*PLAYERS, 1]
)
prev_state: RelationalOrderDecoderState(
prev_orders <-- [B*PLAYERS, NUM_PROVINCES, 2 * self._filter_size],
blocked_provinces <-- [B*PLAYERS, NUM_PROVINCES],
sampled_action_index <-- [B*PLAYER]
)
is_training: Whether this is during training.
Returns:
logits with shape [B*PLAYERS, MAX_ACTION_INDEX],
updated RelationalOrderDecoderState shapes as above
"""
projection = hk.get_parameter(
"projection",
shape=(action_utils.MAX_ACTION_INDEX, self._projection_size),
init=hk.initializers.VarianceScaling())
previous_action = previous_action_from_teacher_or_sample(
inputs.teacher_forcing,
inputs.previous_teacher_forcing_action,
prev_state.sampled_action_index,)
updated_blocked_provinces, blocked_actions = blocked_provinces_and_actions(
previous_action, prev_state.blocked_provinces)
# Construct representation of previous order.
previous_order_representation = (previous_action[:, None] > 0) * projection[
previous_action >> (action_utils.ACTION_INDEX_START - 32)]
legal_actions_provinces = (
jnp.matmul(inputs.legal_actions_mask,
one_hot_provinces_for_all_actions()) > 0)
# Place the representation of the province currently under consideration in
# the appropriate slot in the graph.
scattered_board_representation = jnp.array(0.0) + self._scatter_to_province(
inputs.average_area_representation,
legal_actions_provinces)
# Place previous order in the appropriate slot in the graph.
scattered_previous_orders = (
prev_state.prev_orders + self._scatter_to_province(
previous_order_representation,
jax.nn.one_hot(
ordered_provinces(previous_action),
utils.NUM_PROVINCES)))
# Construct order logits conditional on province representation and previous
# orders.
board_representation = self._relational_core(
scattered_previous_orders,
scattered_board_representation,
is_training=is_training)
province_representation = self._gather_province(
board_representation, legal_actions_provinces)
order_logits = jnp.matmul(province_representation, projection.T)
# Eliminate illegal actions
is_legal_action = inputs.legal_actions_mask * (blocked_actions == 0)
order_logits = jnp.where(is_legal_action, order_logits,
jnp.finfo(jnp.float32).min)
action_index = sample_from_logits(order_logits, is_legal_action,
inputs.temperature)
return order_logits, RelationalOrderDecoderState(
prev_orders=scattered_previous_orders,
blocked_provinces=updated_blocked_provinces,
sampled_action_index=action_index
)
def initial_state(
self,
batch_size: int,
dtype: np.dtype = jnp.float32) -> RelationalOrderDecoderState:
return RelationalOrderDecoderState(
prev_orders=jnp.zeros(
shape=(batch_size, utils.NUM_PROVINCES, 2 * self._filter_size),
dtype=dtype),
blocked_provinces=jnp.zeros(
shape=(batch_size, utils.NUM_PROVINCES), dtype=dtype),
sampled_action_index=jnp.zeros(
shape=(batch_size,), dtype=jnp.int32),
)
def ordered_provinces(actions: jnp.ndarray):
return jnp.bitwise_and(
jnp.right_shift(actions, action_utils.ACTION_ORDERED_PROVINCE_START),
(1 << action_utils.ACTION_PROVINCE_BITS) - 1)
def is_waive(actions: jnp.ndarray):
return jnp.equal(jnp.bitwise_and(
jnp.right_shift(actions, action_utils.ACTION_ORDER_START),
(1 << action_utils.ACTION_ORDER_BITS) - 1), action_utils.WAIVE)
def loss_from_logits(logits, actions, discounts):
"""Returns cross-entropy loss, unless actions are None; then it's entropy."""
if actions is not None:
action_indices = actions >> (action_utils.ACTION_INDEX_START - 32)
loss = jnp.take_along_axis(
-jax.nn.log_softmax(logits), action_indices[..., None],
axis=-1).squeeze(-1)
# Only look at loss for actual actions.
loss = jnp.where(actions > 0, loss, 0)
else:
loss = (jax.nn.softmax(logits) * -jax.nn.log_softmax(logits)).sum(-1)
loss = loss.sum(3)
# Only look at adequate players.
loss *= discounts
return loss.mean()
def ordered_provinces_one_hot(actions, dtype=jnp.float32):
provinces = jax.nn.one_hot(
action_utils.ordered_province(actions), utils.NUM_PROVINCES, dtype=dtype)
provinces *= ((actions > 0) & ~action_utils.is_waive(actions)).astype(
dtype)[..., None]
return provinces
def reorder_actions(actions, areas, season):
"""Reorder actions to match area ordering."""
area_provinces = jax.nn.one_hot(
[utils.province_id_and_area_index(a)[0] for a in range(utils.NUM_AREAS)],
utils.NUM_PROVINCES,
dtype=jnp.float32)
provinces = jnp.tensordot(areas.astype(jnp.float32), area_provinces,
(-1, 0)).astype(jnp.int32)
action_provinces = ordered_provinces_one_hot(actions, jnp.int32)
ordered_actions = jnp.sum(
jnp.sum(actions[..., None] * action_provinces, -2, keepdims=True) *
provinces, -1)
n_actions_found = jnp.sum(
jnp.sum(action_provinces, -2, keepdims=True) * provinces, -1)
# `actions` has `-1`s for missing actions.
ordered_actions += n_actions_found - 1
is_build = jnp.equal(season[..., None, None], utils.Season.BUILDS.value)
tile_multiples = (1, 1) + actions.shape[2:]
skip_reorder = jnp.tile(is_build, tile_multiples)
reordered_actions = jnp.where(skip_reorder, actions, ordered_actions)
return reordered_actions
class Network(hk.Module):
"""Policy and Value Networks for Diplomacy.
This network processes the board state to produce action and values for a full
turn of Diplomacy.
In Diplomacy, at each turn, all players submit orders for all the units they
control. This Network outputs orders for each unit, one by one. Orders for
later units depend on decisoins made previously. We organize this as follows:
shared_inference: computations shared by all units (e.g. encode board).
initial_inference: set up initial state to implement inter-unit dependence.
step_inference: compute order for one unit.
inference: full turn inference (organizes other methods in obvious ways).
"""
@classmethod
def initial_inference_params_and_state(
cls, constructor_kwargs, rng, num_players):
def _inference(observations):
network = cls(**constructor_kwargs) # pytype: disable=not-instantiable
return network.inference(observations)
inference_fn = hk.transform_with_state(_inference)
params, net_state = inference_fn.init(
rng, tree_utils.tree_expand_dims(
cls.get_observation_transformer(constructor_kwargs
).zero_observation(num_players)))
return params, net_state
@classmethod
def get_observation_transformer(cls, class_constructor_kwargs, rng_key=None):
del class_constructor_kwargs # Unused
return observation_transformation.GeneralObservationTransformer(
rng_key=rng_key)
@classmethod
def zero_observation(cls, class_constructor_kwargs, num_players):
return cls.get_observation_transformer(
class_constructor_kwargs).zero_observation(num_players)
def __init__(
self,
*,
rnn_ctor,
rnn_kwargs,
name: str = "delta",
num_players: int = 7,
area_mdf: province_order.MapMDF = province_order.MapMDF.BICOASTAL_MAP,
province_mdf: province_order.MapMDF = province_order.MapMDF.STANDARD_MAP,
is_training: bool = False,
shared_filter_size: int = 32,
player_filter_size: int = 32,
num_shared_cores: int = 8,
num_player_cores: int = 8,
value_mlp_hidden_layer_sizes: Sequence[int] = (256,),
actions_since_last_moves_embedding_size: int = 10,
batch_norm_config: Optional[Dict[str, Any]] = None,
):
"""Constructor.
Args:
rnn_ctor: Constructor for the RNN. The RNN will be constructed as
`rnn_ctor(batch_norm_config=batch_norm_config, **rnn_kwargs)`.
rnn_kwargs: kwargs for the RNN.
name: a name for this module.
num_players: number of players in the game, usually 7 (standard Diplomacy)
or 2 (1v1 Diplomacy).
area_mdf: path to mdf file containing a description of the board organized
by area (e.g. Spain, Spain North Coast and Spain South Coast).
province_mdf: path to mdf file containing a description of the board
organized by province (e.g. Spain).
is_training: whether this is a training instance.
shared_filter_size: filter size in BoardEncoder, shared (across players)
layers.
player_filter_size: filter size in BoardEncoder, player specific layers.
num_shared_cores: depth of BoardEncoder, shared (across players) layers.
num_player_cores: depth of BoardEncoder, player specific layers.
value_mlp_hidden_layer_sizes: sizes for value head. Output layer with size
num_players is appended by this module.
actions_since_last_moves_embedding_size: embedding size for last moves
actions.
batch_norm_config: kwargs for batch norm, eg the cross_replica_axis.
"""
super().__init__()
self._area_adjacency = normalize_adjacency(
province_order.build_adjacency(
province_order.get_mdf_content(area_mdf)))
self._province_adjacency = normalize_adjacency(
province_order.build_adjacency(
province_order.get_mdf_content(province_mdf)))
self._is_training = is_training
self._moves_actions_encoder = hk.Embed(
action_utils.MAX_ACTION_INDEX + 1,
actions_since_last_moves_embedding_size)
self._board_encoder = BoardEncoder(
self._area_adjacency,
shared_filter_size=shared_filter_size,
player_filter_size=player_filter_size,
num_shared_cores=num_shared_cores,
num_player_cores=num_player_cores,
batch_norm_config=batch_norm_config)
self._last_moves_encoder = BoardEncoder(
self._area_adjacency,
shared_filter_size=shared_filter_size,
player_filter_size=player_filter_size,
num_shared_cores=num_shared_cores,
num_player_cores=num_player_cores,
batch_norm_config=batch_norm_config)
self._rnn = rnn_ctor(batch_norm_config=batch_norm_config, **rnn_kwargs)
self._value_mlp = hk.nets.MLP(
output_sizes=list(value_mlp_hidden_layer_sizes) + [num_players])
def loss_info(
self,
step_types: jnp.ndarray, # [B,T+1].
rewards: jnp.ndarray, # [B,T+1].
discounts: jnp.ndarray, # [B,T+1].
observations: Tuple[ # Batch dimensions [B,T+1].
Dict[str, jnp.ndarray], Dict[str, jnp.ndarray], jnp.ndarray],
step_outputs: Dict[str, Any] # Batch dimensions [B, T].
) -> Dict[str, jnp.ndarray]:
"""Losses to update the network's policy given a batch of experience.
`(step_type[i], rewards[i], observations[i])` is the `actions[i]`. In
other words, the reward accumulated over this sequence is
`sum(rewards[1:])`, obtained by taking actions `actions`. The
observation at the end of the sequence (resulting from
`step_outputs.actions[-1]`) is `observations[-1]`.
Args:
step_types: tensor of step types.
rewards: tensor of rewards.
discounts: tensor of discounts.
observations: observations, in format given by observation_transform. This
is a tuple (initial_observation, step_observations, num_actions). Within
a turn step_observations are stacked for each step.
step_outputs: tensor of network outputs produced by inference.
Returns:
dict of logging outputs, including per-batch per-timestep losses.
"""
del step_types, rewards # unused
observations = tree.map_structure(lambda xs: xs[:, :-1], observations)
discounts = discounts[:, :-1]
returns = step_outputs["returns"]
initial_observation, step_observations, sequence_lengths = observations
# Losses are always built with temperature 1.0
step_observations["temperature"] = jnp.ones_like(
step_observations["temperature"])
# Reorder the actions to match with the legal_actions ordering.
actions = reorder_actions(
step_outputs["actions"],
season=initial_observation["season"],
areas=step_observations["areas"])
# Get all but the last order for teacher forcing.
last_action = actions[..., :-1]
# Pad the previous action with -1 for the first order, as that is
# never forced.
last_action = jnp.concatenate(
[-jnp.ones_like(last_action[:, :, :, :1]), last_action], axis=3)
# Set teacher forcing actions.
step_observations["last_action"] = last_action
(initial_outputs, step_outputs) = hk.BatchApply(
functools.partial(self.inference, all_teacher_forcing=True))(
(initial_observation, step_observations, sequence_lengths))
policy_logits = step_outputs["logits"]
value_logits = initial_outputs["value_logits"]
policy_loss = loss_from_logits(policy_logits, actions, discounts)
policy_entropy = loss_from_logits(policy_logits, None, discounts)
value_loss = -(jax.nn.log_softmax(value_logits) *
returns).sum(-1) * jnp.max(discounts, -1)
returns_entropy = -(
jnp.sum(returns * jnp.log(returns + 1e-7), -1) * jnp.max(discounts, -1))
loss = policy_loss + value_loss
# Get accuracy.
labels = (
jnp.asarray(action_utils.shrink_actions(
action_utils.POSSIBLE_ACTIONS)) == actions[..., None])
greedy_prediction = jnp.argmax(policy_logits, axis=-1)
gathered_labels = jnp.take_along_axis(
labels.astype(jnp.float32), greedy_prediction[..., None],
-1).squeeze(-1)
accuracy = jnp.count_nonzero(
gathered_labels, axis=(2, 3)).astype(jnp.float32)
accuracy_weights = jnp.count_nonzero(
labels, axis=(2, 3, 4)).astype(jnp.float32)
accuracy = jnp.sum(accuracy) / jnp.sum(accuracy_weights)
# Get full-move accuracy.
nonempty = jnp.any(labels, (-1, -2))
whole_correct = jnp.equal(
jnp.count_nonzero(gathered_labels, -1),
jnp.count_nonzero(labels, (-1, -2)))
whole_accuracy = jnp.count_nonzero(whole_correct
& nonempty, 2).astype(jnp.float32)
whole_accuracy_weights = jnp.count_nonzero(
nonempty, axis=2).astype(jnp.float32)
whole_accuracy = jnp.sum(whole_accuracy) / jnp.sum(whole_accuracy_weights)
# For comparison, calculate the loss from a uniform random agent.
ur_policy_logits = jnp.finfo(
jnp.float32).min * (1 - step_observations["legal_actions_mask"])
ur_policy_logits = jnp.broadcast_to(ur_policy_logits, policy_logits.shape)
ur_policy_loss = loss_from_logits(ur_policy_logits, actions, discounts)
ur_value_loss = -(jax.nn.log_softmax(jnp.zeros_like(value_logits)) *
returns).sum(-1) * jnp.max(discounts, -1)
loss_dict = {
"policy_loss": policy_loss,
"policy_entropy": policy_entropy,
"value_loss": value_loss,
"total_loss": loss,
"returns_entropy": returns_entropy,
"uniform_random_policy_loss": ur_policy_loss,
"uniform_random_value_loss": ur_value_loss,
"uniform_random_total_loss": ur_value_loss + ur_policy_loss,
"accuracy": accuracy,
"accuracy_weight": jnp.sum(accuracy_weights),
"whole_accuracy": whole_accuracy,
"whole_accuracy_weight": jnp.sum(whole_accuracy_weights),
}
return tree.map_structure(jnp.mean, loss_dict)
def loss(self, step_types, rewards, discounts, observations,
step_outputs) -> jnp.ndarray:
"""Imitation learning loss."""
losses = self.loss_info(step_types, rewards, discounts, observations,
step_outputs)
return losses["total_loss"]
def shared_rep(
self, initial_observation: Dict[str, jnp.ndarray]
) -> Tuple[Dict[str, jnp.ndarray], jnp.ndarray]:
"""Processing shared by all units that require an order.
Encodes board state, season and previous moves and implements.
Computes value head.
Args:
initial_observation: see initial_observation_spec.
Returns:
value information and shared board representation.
"""
# Stitch together board current situation and past moves.
season = initial_observation["season"]
build_numbers = initial_observation["build_numbers"]
board = initial_observation["board_state"]
last_moves = initial_observation["last_moves_phase_board_state"]
moves_actions = jnp.sum(
self._moves_actions_encoder(
1 + initial_observation["actions_since_last_moves_phase"]),
axis=-2)
last_moves = jnp.concatenate([last_moves, moves_actions], axis=-1)
# Compute board representation.
# [B, PLAYERS, NUM_AREAS, REP_SIZE]
board_representation = self._board_encoder(
board, season, build_numbers, is_training=self._is_training)
last_moves_representation = self._last_moves_encoder(
last_moves, season, build_numbers, is_training=self._is_training)
area_representation = jnp.concatenate(
[board_representation, last_moves_representation], axis=-1)
# Compute value head.
value_logits = self._value_mlp(jnp.mean(area_representation, axis=(1, 2)))
return (collections.OrderedDict(
value_logits=value_logits,
values=jax.nn.softmax(value_logits)), area_representation)
def initial_inference(
self, shared_rep: jnp.ndarray, player: jnp.ndarray
) -> Tuple[Dict[str, jnp.ndarray], Any]:
"""Set up initial state to implement inter-unit dependence."""
batch_size = shared_rep.shape[0]
return (jax.vmap(functools.partial(jnp.take, axis=0))(shared_rep,
player.squeeze(1)),
self._rnn.initial_state(batch_size=batch_size))
def step_inference(
self,
step_observation: Dict[str, jnp.ndarray],
inference_internal_state: Any,
all_teacher_forcing: bool = False
) -> Tuple[Dict[str, jnp.ndarray], Tuple[jnp.ndarray,
Any]]:
"""Computes logits for 1 unit that requires order.
Args:
step_observation: see step_observation_spec.
inference_internal_state: Board representation for each player and
RelationalOrderDecoder previous state.
all_teacher_forcing: Whether to leave sampled actions out of the
inference state (for a learning speed boost).
Returns:
action information for this unit, updated inference_internal_state
"""
area_representation, rnn_state = inference_internal_state
average_area_representation = jnp.matmul(
step_observation["areas"][:, None].astype(np.float32),
area_representation).squeeze(1) / utils.NUM_AREAS
inputs = RecurrentOrderNetworkInput(
average_area_representation=average_area_representation,
legal_actions_mask=step_observation["legal_actions_mask"],
teacher_forcing=step_observation["last_action"] != 0,
previous_teacher_forcing_action=step_observation["last_action"],
temperature=step_observation["temperature"],
)
logits, updated_rnn_state = self._rnn(
inputs, rnn_state, is_training=self._is_training)
policy = jax.nn.softmax(logits)
legal_action_mask = logits > jnp.finfo(jnp.float32).min
actions = jnp.take_along_axis(
jnp.asarray(action_utils.shrink_actions(
action_utils.POSSIBLE_ACTIONS))[None],
updated_rnn_state.sampled_action_index[..., None],
axis=1).squeeze(1)
if all_teacher_forcing:
updated_rnn_state = updated_rnn_state._replace(
sampled_action_index=jnp.zeros_like(
updated_rnn_state.sampled_action_index))
next_inference_internal_state = (area_representation, updated_rnn_state)
return collections.OrderedDict(
actions=actions,
legal_action_mask=legal_action_mask,
policy=policy,
logits=logits), next_inference_internal_state
def inference(
self,
observation: Tuple[Dict[str, jnp.ndarray], Dict[str, jnp.ndarray],
jnp.ndarray],
num_copies_each_observation: Optional[Tuple[int]] = None,
all_teacher_forcing: bool = False,
) -> Tuple[Dict[str, jnp.ndarray], Dict[str, jnp.ndarray]]:
"""Computes value estimates and actions for the full turn.
Args:
observation: see observation_spec.
num_copies_each_observation: How many times to copy each observation. This
allows us to produce multiple samples for the same state without
recalculating the deterministic part of the Network.
all_teacher_forcing: Whether to leave sampled actions out of the
inference state (for a learning speed boost).
Returns:
Value and action information for the full turn.
"""
initial_observation, step_observations, seq_lengths = observation
num_players = int(seq_lengths.shape[1])
initial_outputs, shared_rep = self.shared_rep(initial_observation)
initial_inference_states_list = []
batch_dim = jnp.shape(seq_lengths)[0]
for player in range(num_players):
player_tensor = jnp.full((1, 1), player)
player_tensor = jnp.tile(player_tensor, (batch_dim, 1))
initial_inference_states_list.append(
self.initial_inference(shared_rep, player_tensor))
initial_inference_states = tree.map_structure(
lambda *x: jnp.stack(x, axis=1), *initial_inference_states_list)
rnn_inputs = (step_observations, seq_lengths, initial_inference_states)
# Replicate the inputs to the RNN according to num_copies_each_observation.
if num_copies_each_observation is not None:
num_copies = np.array(num_copies_each_observation)
rnn_inputs = tree.map_structure(
lambda x: jnp.repeat(x, num_copies, axis=0), rnn_inputs)
def _apply_rnn_one_player(
player_step_observations, # [B, 17, ...]
player_sequence_length, # [B]
player_initial_state): # [B]
player_step_observations = tree.map_structure(jnp.asarray,
player_step_observations)
def apply_one_step(state, i):
output, next_state = self.step_inference(
tree.map_structure(lambda x: x[:, i], player_step_observations),
state,
all_teacher_forcing=all_teacher_forcing)
def update(x, y, i=i):
return jnp.where(
i >= player_sequence_length[np.s_[:,] + (None,) * (x.ndim - 1)],
x, y)
state = tree.map_structure(update, state, next_state)
zero_output = tree.map_structure(jnp.zeros_like, output)
return state, tree.map_structure(update, zero_output, output)
_, outputs = hk.scan(apply_one_step, player_initial_state,
jnp.arange(action_utils.MAX_ORDERS))
return tree.map_structure(lambda x: x.swapaxes(0, 1), outputs)
outputs = hk.BatchApply(_apply_rnn_one_player)(*rnn_inputs)
return initial_outputs, outputs
|
diplomacy-main
|
network/network.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Parameter provider for JAX networks."""
import io
from typing import Any, Dict, Optional, Tuple
from absl import logging
import dill
import haiku as hk
import jax
import jax.numpy as jnp
import numpy as np
import tree
from diplomacy.environment import action_utils
from diplomacy.environment import tree_utils
def apply_unbatched(f, *args, **kwargs):
batched = f(*tree_utils.tree_expand_dims(args),
**tree_utils.tree_expand_dims(kwargs))
return tree.map_structure(lambda arr: np.squeeze(arr, axis=0), batched)
def fix_waives(action_list):
"""Fix action_list so that there is at most one waive, with that at the end.
This means that build lists are invariant to order, and can be a fixed length.
Args:
action_list: a list of actions.
Returns:
A copy of action_list, modified so that any waives are truncated to 1
and moved to the end.
"""
non_waive_actions = [a for a in action_list if not action_utils.is_waive(a)]
waive_actions = [a for a in action_list if action_utils.is_waive(a)]
if waive_actions:
# Return non-waives, then one waive.
return non_waive_actions + waive_actions[:1]
return non_waive_actions
def fix_actions(actions_lists):
"""Fixes network action outputs to be compatible with game_runners.
Args:
actions_lists: Actions for all powers in a single board state (i.e. output
of a single inference call). Note that these are shrunk actions
(see action_utils.py).
Returns:
A sanitised actions_lists suitable for stepping the environment
"""
non_zero_actions = []
for single_power_actions in actions_lists:
non_zero_actions.append([])
for unit_action in single_power_actions:
if unit_action != 0:
non_zero_actions[-1].append(
action_utils.POSSIBLE_ACTIONS[unit_action >> 16])
# Fix waives.
final_actions = [
fix_waives(single_power_actions)
for single_power_actions in non_zero_actions
]
return final_actions
class ParameterProvider:
"""Loads and exposes network params that have been saved to disk."""
def __init__(self, file_handle: io.IOBase):
self._params, self._net_state, self._step = dill.load(file_handle)
def params_for_actor(self) -> Tuple[hk.Params, hk.Params, jnp.ndarray]:
"""Provides parameters for a SequenceNetworkHandler."""
return self._params, self._net_state, self._step
class SequenceNetworkHandler:
"""Plays Diplomacy with a Network as policy.
This class turns a Network into a Diplomacy bot by forwarding observations,
and receiving policy outputs. It handles the network parameters, batching and
observation processing.
"""
def __init__(self,
network_cls,
network_config: Dict[str, Any],
rng_seed: Optional[int],
parameter_provider: ParameterProvider):
if rng_seed is None:
rng_seed = np.random.randint(2**16)
logging.info("RNG seed %s", rng_seed)
self._rng_key = jax.random.PRNGKey(rng_seed)
self._network_cls = network_cls
self._network_config = network_config
self._rng_key, subkey = jax.random.split(self._rng_key)
self._observation_transformer = network_cls.get_observation_transformer(
network_config, subkey
)
def transform(fn_name, static_argnums=()):
def fwd(*args, **kwargs):
net = network_cls(**network_config)
fn = getattr(net, fn_name)
return fn(*args, **kwargs)
apply = hk.transform_with_state(fwd).apply
return jax.jit(apply, static_argnums=static_argnums)
self._parameter_provider = parameter_provider
# The inference method of our Network does not modify its arguments, Jax can
# exploit this information when jitting this method to make it more
# efficient. Network.inference takes 4 arguments.
self._network_inference = transform("inference", 4)
self._network_shared_rep = transform("shared_rep")
self._network_initial_inference = transform("initial_inference")
self._network_step_inference = transform("step_inference")
self._network_loss_info = transform("loss_info")
self._params = None
self._state = None
self._step_counter = -1
def reset(self):
if self._parameter_provider:
learner_state = self._parameter_provider.params_for_actor()
(self._params, self._state, self._step_counter) = learner_state
def _apply_transform(self, transform, *args, **kwargs):
self._rng_key, subkey = jax.random.split(self._rng_key)
output, unused_state = transform(
self._params, self._state, subkey, *args, **kwargs)
return tree.map_structure(np.asarray, output)
def batch_inference(self, observation, num_copies_each_observation=None):
"""Do inference on unbatched observation and state."""
if num_copies_each_observation is not None:
# Cast this to a tuple so that static_argnums recognises it as unchanged
# and doesn't recompile.
num_copies_each_observation = tuple(num_copies_each_observation)
initial_output, step_output = self._apply_transform(
self._network_inference, observation, num_copies_each_observation)
final_actions = [
fix_actions(single_board_actions)
for single_board_actions in step_output["actions"]
]
return (initial_output, step_output), final_actions
def compute_losses(self, *args, **kwargs):
return self._apply_transform(self._network_loss_info, *args, **kwargs)
def inference(self, *args, **kwargs):
outputs, (final_actions,) = apply_unbatched(self.batch_inference, *args,
**kwargs)
return outputs, final_actions
def batch_loss_info(self, step_types, rewards, discounts, observations,
step_outputs):
return tree.map_structure(
np.asarray,
self._network_loss_info(step_types, rewards, discounts, observations,
step_outputs))
@property
def step_counter(self):
return self._step_counter
def observation_transform(self, *args, **kwargs):
return self._observation_transformer.observation_transform(
*args, **kwargs)
def zero_observation(self, *args, **kwargs):
return self._observation_transformer.zero_observation(*args, **kwargs)
def observation_spec(self, num_players):
return self._observation_transformer.observation_spec(num_players)
def variables(self):
return self._params
|
diplomacy-main
|
network/parameter_provider.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Agent which steps using a network."""
from typing import Any, Sequence, Tuple
import numpy as np
from diplomacy.environment import observation_utils as utils
class Policy:
"""Agent which delegates stepping and updating to a network."""
def __init__(
self,
network_handler,
num_players,
temperature,
calculate_all_policies=False):
"""Ctor.
Args:
network_handler: network.network.NetworkHandler
num_players: Number of players in game (i.e. 7)
temperature: Policy sampling temperature (0.1 was used for evaluation in
paper)
calculate_all_policies: Whether to calculate policy for all players
regardless of the slots_list argument to actions method. Does not affect
the sampled policy, but adds more data to the step_outputs
"""
self._network_handler = network_handler
self._num_players = num_players
self._obs_transform_state = None
self._temperature = temperature
self._str = f'OnPolicy(t={self._temperature})'
self._calculate_all_policies = calculate_all_policies
def __str__(self):
return self._str
def reset(self):
self._obs_transform_state = None
self._network_handler.reset()
def actions(
self, slots_list: Sequence[int], observation: utils.Observation,
legal_actions: Sequence[np.ndarray]
) -> Tuple[Sequence[Sequence[int]], Any]:
"""Produce a list of lists of actions.
Args:
slots_list: the slots this policy should produce actions for.
observation: observations from the environment.
legal_actions: the legal actions for every player in the game.
Returns:
- a len(slots_list) sequence of sequences of actions, each with the
actions for the corresponding entry of slots_list.
- Arbitrary step_outputs containing facts about the step
"""
slots_to_calculate = (list(range(self._num_players)) if
self._calculate_all_policies else slots_list)
(transformed_obs,
self._obs_transform_state) = self._network_handler.observation_transform(
observation=observation,
legal_actions=legal_actions,
slots_list=slots_to_calculate,
prev_state=self._obs_transform_state,
temperature=self._temperature)
(initial_outs, step_outs), final_actions = self._network_handler.inference(
transformed_obs)
return [final_actions[i] for i in slots_list], {
'values': initial_outs['values'],
'policy': step_outs['policy'],
'actions': step_outs['actions']
}
|
diplomacy-main
|
network/network_policy.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tests basic functionality of the networks defined in network.py."""
from absl.testing import absltest
from absl.testing import parameterized
import haiku as hk
import jax
import numpy as np
import optax
import tree
from diplomacy.environment import action_utils
from diplomacy.environment import observation_utils as utils
from diplomacy.environment import province_order
from diplomacy.network import network
def _random_adjacency_matrix(num_nodes: int) -> np.ndarray:
adjacency = np.random.randint(0, 2, size=(num_nodes, num_nodes))
adjacency = adjacency + adjacency.T
adjacency = np.clip(adjacency, 0, 1)
adjacency[np.diag_indices(adjacency.shape[0])] = 0
return network.normalize_adjacency(
adjacency.astype(np.float32))
def test_network_rod_kwargs(filter_size=8, is_training=True):
province_adjacency = network.normalize_adjacency(
province_order.build_adjacency(
province_order.get_mdf_content(province_order.MapMDF.STANDARD_MAP)))
rod_kwargs = dict(
adjacency=province_adjacency,
filter_size=filter_size,
num_cores=2,)
network_kwargs = dict(
rnn_ctor=network.RelationalOrderDecoder,
rnn_kwargs=rod_kwargs,
is_training=is_training,
shared_filter_size=filter_size,
player_filter_size=filter_size,
num_shared_cores=2,
num_player_cores=2,
value_mlp_hidden_layer_sizes=[filter_size]
)
return network_kwargs
class NetworkTest(parameterized.TestCase):
@parameterized.named_parameters([
('training', True),
('testing', False),
])
@hk.testing.transform_and_run
def test_encoder_core(self, is_training):
batch_size = 10
num_nodes = 5
input_size = 4
filter_size = 8
expected_output_size = 2 * filter_size # concat(edges, nodes)
adjacency = _random_adjacency_matrix(num_nodes)
tensors = np.random.randn(batch_size, num_nodes, input_size)
model = network.EncoderCore(
adjacency=adjacency, filter_size=filter_size)
if not is_training:
# ensure moving averages are created
model(tensors, is_training=True)
output_tensors = model(tensors, is_training=is_training)
self.assertTupleEqual(output_tensors.shape,
(batch_size, num_nodes, expected_output_size))
@parameterized.named_parameters([
('training', True),
('testing', False),
])
@hk.testing.transform_and_run
def test_board_encoder(self, is_training):
batch_size = 10
input_size = 4
filter_size = 8
num_players = 7
expected_output_size = 2 * filter_size # concat(edges, nodes)
adjacency = _random_adjacency_matrix(utils.NUM_AREAS)
state_representation = np.random.randn(batch_size, utils.NUM_AREAS,
input_size)
season = np.random.randint(0, utils.NUM_SEASONS, size=(batch_size,))
build_numbers = np.random.randint(0, 5, size=(batch_size, num_players))
model = network.BoardEncoder(
adjacency=adjacency,
player_filter_size=filter_size,
num_players=num_players,
num_seasons=utils.NUM_SEASONS)
if not is_training:
model(
state_representation, season, build_numbers,
is_training=True) # ensure moving averages are created
output_tensors = model(
state_representation, season, build_numbers, is_training=is_training)
self.assertTupleEqual(
output_tensors.shape,
(batch_size, num_players, utils.NUM_AREAS, expected_output_size))
@parameterized.named_parameters([
('training', True),
('testing', False),
])
@hk.testing.transform_and_run
def test_relational_order_decoder(self, is_training):
batch_size = 10
num_players = 7
adjacency = _random_adjacency_matrix(utils.NUM_PROVINCES)
relational_order_decoder = network.RelationalOrderDecoder(
adjacency)
input_sequence = network.RecurrentOrderNetworkInput(
average_area_representation=np.zeros(
shape=(batch_size * num_players, action_utils.MAX_ORDERS, 64),
dtype=np.float32),
legal_actions_mask=np.zeros(
shape=(batch_size * num_players, action_utils.MAX_ORDERS,
action_utils.MAX_ACTION_INDEX),
dtype=np.uint8),
teacher_forcing=np.zeros(
shape=(batch_size * num_players, action_utils.MAX_ORDERS),
dtype=bool),
previous_teacher_forcing_action=np.zeros(
shape=(batch_size * num_players, action_utils.MAX_ORDERS),
dtype=np.int32),
temperature=np.zeros(
shape=(batch_size * num_players, action_utils.MAX_ORDERS, 1),
dtype=np.float32),
)
state = relational_order_decoder.initial_state(batch_size=batch_size *
num_players)
if not is_training:
relational_order_decoder(
tree.map_structure(lambda s: s[:, 0], input_sequence),
state,
is_training=True) # ensure moving averages are created
for t in range(action_utils.MAX_ORDERS):
outputs, state = relational_order_decoder(
tree.map_structure(
lambda s: s[:, t], # pylint: disable=cell-var-from-loop
input_sequence),
state,
is_training=is_training)
self.assertTupleEqual(
outputs.shape,
(batch_size * num_players, action_utils.MAX_ACTION_INDEX))
@hk.testing.transform_and_run
def test_shared_rep(self):
batch_size = 10
num_players = 7
filter_size = 8
expected_output_size = (4 * filter_size
) # (edges + nodes) * (board + alliance)
network_kwargs = test_network_rod_kwargs(filter_size=filter_size)
net = network.Network(**network_kwargs)
initial_observations, _, _ = network.Network.zero_observation(
network_kwargs, num_players=num_players)
batched_initial_observations = tree.map_structure(
lambda x: np.repeat(x[None, ...], batch_size, axis=0),
initial_observations)
value, representation = net.shared_rep(batched_initial_observations)
self.assertTupleEqual(value['value_logits'].shape,
(batch_size, num_players))
self.assertTupleEqual(value['values'].shape, (batch_size, num_players))
self.assertTupleEqual(
representation.shape,
(batch_size, num_players, utils.NUM_AREAS, expected_output_size))
@hk.testing.transform_and_run
def test_inference(self):
batch_size = 2
copies = [2, 3]
num_players = 7
network_kwargs = test_network_rod_kwargs()
net = network.Network(**network_kwargs)
observations = network.Network.zero_observation(
network_kwargs, num_players=num_players)
batched_observations = tree.map_structure(
lambda x: np.repeat(x[None, ...], batch_size, axis=0), observations)
initial_outputs, step_outputs = net.inference(batched_observations, copies)
self.assertTupleEqual(initial_outputs['values'].shape,
(batch_size, num_players))
self.assertTupleEqual(initial_outputs['value_logits'].shape,
(batch_size, num_players))
self.assertTupleEqual(step_outputs['actions'].shape,
(sum(copies), num_players, action_utils.MAX_ORDERS))
self.assertTupleEqual(step_outputs['legal_action_mask'].shape,
(sum(copies), num_players, action_utils.MAX_ORDERS,
action_utils.MAX_ACTION_INDEX))
self.assertTupleEqual(step_outputs['policy'].shape,
(sum(copies), num_players, action_utils.MAX_ORDERS,
action_utils.MAX_ACTION_INDEX))
self.assertTupleEqual(step_outputs['logits'].shape,
(sum(copies), num_players, action_utils.MAX_ORDERS,
action_utils.MAX_ACTION_INDEX))
@hk.testing.transform_and_run
def test_loss_info(self):
batch_size = 4
time_steps = 2
num_players = 7
network_kwargs = test_network_rod_kwargs()
net = network.Network(**network_kwargs)
observations = network.Network.zero_observation(
network_kwargs, num_players=num_players)
sequence_observations = tree.map_structure(
lambda x: np.repeat(x[None, ...], time_steps + 1, axis=0), observations)
batched_observations = tree.map_structure(
lambda x: np.repeat(x[None, ...], batch_size, axis=0),
sequence_observations)
rewards = np.zeros(
shape=(batch_size, time_steps + 1, num_players), dtype=np.float32)
discounts = np.zeros(
shape=(batch_size, time_steps + 1, num_players), dtype=np.float32)
actions = np.zeros(
shape=(batch_size, time_steps, num_players, action_utils.MAX_ORDERS),
dtype=np.int32)
returns = np.zeros(
shape=(batch_size, time_steps, num_players), dtype=np.float32)
loss_info = net.loss_info(
step_types=None,
rewards=rewards,
discounts=discounts,
observations=batched_observations,
step_outputs={
'actions': actions,
'returns': returns
})
expected_keys = [
'policy_loss',
'policy_entropy',
'value_loss',
'total_loss',
'returns_entropy',
'uniform_random_policy_loss',
'uniform_random_value_loss',
'uniform_random_total_loss',
'accuracy',
'accuracy_weight',
'whole_accuracy',
'whole_accuracy_weight',
]
self.assertSetEqual(set(loss_info), set(expected_keys))
for value in loss_info.values():
self.assertTupleEqual(value.shape, tuple())
def test_inference_not_is_training(self):
"""Tests inferring with is_training set to False."""
batch_size = 4
time_steps = 2
num_players = 7
network_kwargs = test_network_rod_kwargs()
observations = network.Network.zero_observation(
network_kwargs, num_players=num_players)
sequence_observations = tree.map_structure(
lambda x: np.repeat(x[None, ...], time_steps + 1, axis=0), observations)
batched_observations = tree.map_structure(
lambda x: np.repeat(x[None, ...], batch_size, axis=0),
sequence_observations)
rewards = np.zeros(
shape=(batch_size, time_steps + 1, num_players), dtype=np.float32)
discounts = np.zeros(
shape=(batch_size, time_steps + 1, num_players), dtype=np.float32)
actions = np.zeros(
shape=(batch_size, time_steps, num_players, action_utils.MAX_ORDERS),
dtype=np.int32)
returns = np.zeros(
shape=(batch_size, time_steps, num_players), dtype=np.float32)
rng = jax.random.PRNGKey(42)
step_outputs = {'actions': actions, 'returns': returns}
def _loss_info(unused_step_types, rewards, discounts, observations,
step_outputs):
net = network.Network(**test_network_rod_kwargs())
return net.loss_info(None, rewards, discounts, observations, step_outputs)
# Get parameters from a training network.
loss_module = hk.transform_with_state(_loss_info)
params, loss_state = loss_module.init(rng, None, rewards, discounts,
batched_observations, step_outputs)
def inference(observations, num_copies_each_observation):
net = network.Network(**test_network_rod_kwargs(is_training=False))
return net.inference(observations, num_copies_each_observation)
# Do inference on a test time network.
inference_module = hk.transform_with_state(inference)
inference_module.apply(params, loss_state, rng, sequence_observations, None)
def test_take_gradients(self):
"""Test applying a gradient update step."""
batch_size = 4
time_steps = 2
num_players = 7
network_kwargs = test_network_rod_kwargs()
observations = network.Network.zero_observation(
network_kwargs, num_players=num_players)
sequence_observations = tree.map_structure(
lambda x: np.repeat(x[None, ...], time_steps + 1, axis=0), observations)
batched_observations = tree.map_structure(
lambda x: np.repeat(x[None, ...], batch_size, axis=0),
sequence_observations)
rewards = np.zeros(
shape=(batch_size, time_steps + 1, num_players), dtype=np.float32)
discounts = np.zeros(
shape=(batch_size, time_steps + 1, num_players), dtype=np.float32)
actions = np.zeros(
shape=(batch_size, time_steps, num_players, action_utils.MAX_ORDERS),
dtype=np.int32)
returns = np.zeros(
shape=(batch_size, time_steps, num_players), dtype=np.float32)
rng = jax.random.PRNGKey(42)
step_outputs = {'actions': actions, 'returns': returns}
def _loss_info(unused_step_types, rewards, discounts, observations,
step_outputs):
net = network.Network(**test_network_rod_kwargs())
return net.loss_info(None, rewards, discounts, observations, step_outputs)
loss_module = hk.transform_with_state(_loss_info)
params, loss_state = loss_module.init(rng, None, rewards, discounts,
batched_observations, step_outputs)
def _loss(params, state, rng, rewards, discounts, observations,
step_outputs):
losses, state = loss_module.apply(params, state, rng, None, rewards,
discounts, observations, step_outputs)
total_loss = losses['total_loss'].mean()
return total_loss, (losses, state)
(_, (_, loss_state)), grads = jax.value_and_grad(
_loss, has_aux=True)(params, loss_state, rng, rewards, discounts,
batched_observations, step_outputs)
opt_init, opt_update = optax.adam(0.001)
opt_state = opt_init(params)
updates, opt_state = opt_update(grads, opt_state)
params = optax.apply_updates(params, updates)
if __name__ == '__main__':
absltest.main()
|
diplomacy-main
|
tests/network_test.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tests the action conversions defined in mila_actions.py."""
import collections
from absl.testing import absltest
from diplomacy.environment import action_list
from diplomacy.environment import action_utils
from diplomacy.environment import human_readable_actions
from diplomacy.environment import mila_actions
class MilaActionsTest(absltest.TestCase):
def test_inversion_dm_actions(self):
"""Tests converting a DM to MILA to DM action recovers original action."""
for original_action in action_list.POSSIBLE_ACTIONS:
possible_mila_actions = mila_actions.action_to_mila_actions(
original_action)
for mila_action in possible_mila_actions:
self.assertIn(
original_action,
mila_actions.mila_action_to_possible_actions(mila_action),
f'{mila_actions} does not map to set including dm action '
f'{human_readable_actions.action_string(original_action, None)}')
def test_inversion_mila_actions(self):
"""Tests converting a MILA to DM to MILA action recovers original action."""
for original_action in action_list.MILA_ACTIONS_LIST:
possible_dm_actions = mila_actions.mila_action_to_possible_actions(
original_action)
for dm_action in possible_dm_actions:
self.assertIn(
original_action,
mila_actions.action_to_mila_actions(dm_action),
f'{human_readable_actions.action_string(dm_action, None)} '
f'does not map to set including mila action {original_action}')
def test_all_mila_actions_have_dm_action(self):
for mila_action in action_list.MILA_ACTIONS_LIST:
dm_actions = mila_actions.mila_action_to_possible_actions(mila_action)
self.assertNotEmpty(dm_actions,
f'mila_action {mila_action} has no dm_action')
def test_only_disband_remove_ambiguous_mila_actions(self):
for mila_action in action_list.MILA_ACTIONS_LIST:
dm_actions = mila_actions.mila_action_to_possible_actions(mila_action)
if len(dm_actions) > 1:
self.assertLen(dm_actions, 2, f'{mila_action} gives >2 dm_actions')
orders = {action_utils.action_breakdown(dm_action)[0]
for dm_action in dm_actions}
self.assertEqual(
orders, {action_utils.REMOVE, action_utils.DISBAND},
f'{mila_action} ambiguous but not a disband/remove action')
def test_all_dm_actions_have_possible_mila_action_count(self):
"""DM actions correspond to possibly multiple MILA actions.
This is because they do not specify unit type or coast when it is possible
to infer from the board.
There are 1, 2 or 3 possible unit descriptions (for an army and/or a fleet
or two possible fleets in a bicoastal province) and up to 2 units specified
in an action. Furthermore, no action can involve two fleets in bicoastal
provinces, so the possible mila_action counts are 1, 2, 3, 4, or 6.
"""
for action in action_list.POSSIBLE_ACTIONS:
mila_actions_list = mila_actions.action_to_mila_actions(action)
self.assertIn(
len(mila_actions_list), {1, 2, 3, 4, 6},
f'action {action} gives {len(mila_actions_list)} '
'mila_actions, which cannot be correct')
def test_expected_number_missing_mila_actions(self):
"""Tests MILA actions misses no actions except known convoy-related ones.
The Mila actions list does not allow long convoys, or include any convoy
actions that cannot affect the adjudication (e.g. ADR C ALB-TUN)
We test these explain every situation where the actions we make are not in
action_list.MILA_ACTIONS_LIST.
"""
mila_actions_to_dm_actions = collections.defaultdict(list)
long_convoys = set()
for action in action_list.POSSIBLE_ACTIONS:
mila_action_list = mila_actions.action_to_mila_actions(action)
for mila_action in mila_action_list:
mila_actions_to_dm_actions[mila_action].append(action)
if mila_action not in action_list.MILA_ACTIONS_LIST:
order, p1, p2, p3 = action_utils.action_breakdown(action)
if order == action_utils.CONVOY_TO:
long_convoys.add((p1, p2))
reasons_for_illegal_mila_action = {
'Long convoy to': 0,
'Long convoy': 0,
'Other convoy': 0,
'Support long convoy to': 0,
'Support alternative convoy too long': 0,
'Unknown': 0,
}
for mila_action in mila_actions_to_dm_actions:
if mila_action not in action_list.MILA_ACTIONS_LIST:
deepmind_action = mila_actions_to_dm_actions[mila_action][0]
order, p1, p2, p3 = action_utils.action_breakdown(deepmind_action)
if order == action_utils.CONVOY_TO:
# Manually checked that all of these are just long convoys (and
# otherwise are well formatted actions)
reasons_for_illegal_mila_action['Long convoy to'] += 1
elif order == action_utils.CONVOY:
if (p3, p2) in long_convoys:
reasons_for_illegal_mila_action['Long convoy'] += 1
continue
else:
# Manually checked, these are all well formatted.
# They are irrelevant convoys, e.g. ADR C ALB-TUN
# or they are relevant but only on long routes,
# e.g. F IRI C StP-LVP, which is only relevant on the long route
# BAR-NWG-NTH-ECH-IRI
reasons_for_illegal_mila_action['Other convoy'] += 1
continue
elif order == action_utils.SUPPORT_MOVE_TO:
if (p3, p2) in long_convoys:
reasons_for_illegal_mila_action['Support long convoy to'] += 1
else:
# These have all been checked manually. What's happening is
# something like F NAO S A StP - LVP. Mila's convoy rules mean that
# the only way they allow this convoy is if NAO is part of the
# route. The original game allows a longer convoy route, and so the
# support is valid
reasons_for_illegal_mila_action[
'Support alternative convoy too long'] += 1
else:
reasons_for_illegal_mila_action['Unknown'] += 1
expected_counts = {'Long convoy to': 374,
'Long convoy': 4238,
'Other convoy': 2176,
'Support long convoy to': 2565,
'Support alternative convoy too long': 27,
'Unknown': 0}
self.assertEqual(reasons_for_illegal_mila_action, expected_counts,
'unexpected number of actions not in MILA list')
if __name__ == '__main__':
absltest.main()
|
diplomacy-main
|
tests/mila_actions_test.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Tests for observation format."""
import abc
import collections
import functools
from typing import Any, Dict, Sequence, Tuple
from absl.testing import absltest
import numpy as np
import tree
from diplomacy.environment import diplomacy_state
from diplomacy.environment import game_runner
from diplomacy.environment import observation_utils as utils
from diplomacy.network import config
from diplomacy.network import network_policy
from diplomacy.network import parameter_provider
def construct_observations(obs: collections.OrderedDict) -> utils.Observation:
"""Reconstructs utils.Observations from base-types.
Reference observations are provided in observations.npz using base-types
and numpy arrays only. This is so that users can load and inspect the file's
content. This method reconstructs the Observation tuple required by our tests.
Args:
obs: element of the sequence contained in observations.npz.
Returns:
reconstructed Observation tuple expected in our tests.
"""
obs['season'] = utils.Season(obs['season'])
return utils.Observation(**obs)
def sort_last_moves(
obs: Sequence[utils.Observation]) -> Sequence[utils.Observation]:
"""Sort the last moves observation to make test permutation invariant."""
return [utils.Observation(o.season, o.board, o.build_numbers,
sorted(o.last_actions)) for o in obs]
class FixedPlayPolicy(network_policy.Policy):
def __init__(
self,
actions_outputs: Sequence[Tuple[Sequence[Sequence[int]], Any]]
) -> None:
self._actions_outputs = actions_outputs
self._num_actions_calls = 0
def __str__(self) -> str:
return 'FixedPlayPolicy'
def reset(self) -> None:
pass
def actions(
self, slots_list: Sequence[int], observation: utils.Observation,
legal_actions: Sequence[np.ndarray]
) -> Tuple[Sequence[Sequence[int]], Any]:
del slots_list, legal_actions # unused.
action_output = self._actions_outputs[self._num_actions_calls]
self._num_actions_calls += 1
return action_output
class ObservationTest(absltest.TestCase, metaclass=abc.ABCMeta):
@abc.abstractmethod
def get_diplomacy_state(self) -> diplomacy_state.DiplomacyState:
pass
@abc.abstractmethod
def get_parameter_provider(self) -> parameter_provider.ParameterProvider:
"""Loads params.npz and returns ParameterProvider based on its content.
A sample implementation is as follows:
```
def get_parameter_provider(self) -> parameter_provider.ParameterProvider:
with open('path/to/sl_params.npz', 'rb') as f:
provider = parameter_provider.ParameterProvider(f)
return provider
```
"""
pass
@abc.abstractmethod
def get_reference_observations(self) -> Sequence[collections.OrderedDict]:
"""Loads and returns the content of observations.npz.
A sample implementation is as follows:
```
def get_reference_observations(self) -> Sequence[collections.OrderedDict]:
with open('path/to/observations.npz', 'rb') as f:
observations = dill.load(f)
return observations
```
"""
pass
@abc.abstractmethod
def get_reference_legal_actions(self) -> Sequence[np.ndarray]:
"""Loads and returns the content of legal_actions.npz.
A sample implementation is as follows:
```
def get_reference_observations(self) -> Sequence[collections.OrderedDict]:
with open('path/to/legal_actions.npz', 'rb') as f:
legal_actions = dill.load(f)
return legal_actions
```
"""
pass
@abc.abstractmethod
def get_reference_step_outputs(self) -> Sequence[Dict[str, Any]]:
"""Loads and returns the content of step_outputs.npz.
A sample implementation is as follows:
```
def get_reference_step_outputs(self) -> Sequence[Dict[str, Any]]:
with open('path/to/step_outputs.npz', 'rb') as f:
step_outputs = dill.load(f)
return step_outputs
```
"""
pass
@abc.abstractmethod
def get_actions_outputs(
self
) -> Sequence[Tuple[Sequence[Sequence[int]], Any]]:
"""Loads and returns the content of actions_outputs.npz.
A sample implementation is as follows:
```
def get_reference_observations(self) -> Sequence[collections.OrderedDict]:
with open('path/to/actions_outputs.npz', 'rb') as f:
actions_outputs = dill.load(f)
return actions_outputs
```
"""
pass
def test_network_play(self):
"""Tests network loads correctly by playing 10 turns of a Diplomacy game.
A failure of this test might mean that any of the following are true:
1. The behavior of the user's DiplomacyState does not match our internal
Diplomacy adjudicator. If so, test_fixed_play will also fail.
2. The network loading is incorrect.
"""
network_info = config.get_config()
provider = self.get_parameter_provider()
network_handler = parameter_provider.SequenceNetworkHandler(
network_cls=network_info.network_class,
network_config=network_info.network_kwargs,
parameter_provider=provider,
rng_seed=42)
network_policy_instance = network_policy.Policy(
network_handler=network_handler,
num_players=7,
temperature=0.2,
calculate_all_policies=True)
fixed_policy_instance = FixedPlayPolicy(self.get_actions_outputs())
trajectory = game_runner.run_game(state=self.get_diplomacy_state(),
policies=(fixed_policy_instance,
network_policy_instance),
slots_to_policies=[0] * 7,
max_length=10)
tree.map_structure(
np.testing.assert_array_equal,
sort_last_moves([construct_observations(o)
for o in self.get_reference_observations()]),
sort_last_moves(trajectory.observations))
tree.map_structure(np.testing.assert_array_equal,
self.get_reference_legal_actions(),
trajectory.legal_actions)
tree.map_structure(
functools.partial(np.testing.assert_array_almost_equal, decimal=5),
self.get_reference_step_outputs(),
trajectory.step_outputs)
def test_fixed_play(self):
"""Tests the user's implementation of a Diplomacy adjudicator.
A failure of this test indicates that the behavior of the user's
DiplomacyState does not match our internal Diplomacy adjudicator.
"""
policy_instance = FixedPlayPolicy(self.get_actions_outputs())
trajectory = game_runner.run_game(state=self.get_diplomacy_state(),
policies=(policy_instance,),
slots_to_policies=[0] * 7,
max_length=10)
tree.map_structure(
np.testing.assert_array_equal,
sort_last_moves([construct_observations(o)
for o in self.get_reference_observations()]),
sort_last_moves(trajectory.observations))
tree.map_structure(np.testing.assert_array_equal,
self.get_reference_legal_actions(),
trajectory.legal_actions)
|
diplomacy-main
|
tests/observation_test.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""List of possible actions.
List of all possible actions -- legal and illegal, and represented as outlined
in actions.py, and in the README -- that a single unit can take.
"""
import numpy as np
POSSIBLE_ACTIONS = np.asarray((
0x0000000000000003,
0x0001000000000008,
0x000200000000000c,
0x000300000000000d,
0x0004000000000203,
0x0005000000000208,
0x000600000000020c,
0x0007000000000403,
0x0008000000000404,
0x0009000000000405,
0x000a000000000408,
0x000b000000000409,
0x000c00000000040c,
0x000d000000000603,
0x000e000000000608,
0x000f00000000060c,
0x0010000000000803,
0x0011000000000804,
0x0012000000000805,
0x0013000000000808,
0x0014000000000809,
0x001500000000080c,
0x0016000000000a03,
0x0017000000000a04,
0x0018000000000a05,
0x0019000000000a08,
0x001a000000000a09,
0x001b000000000a0c,
0x001c000000000c03,
0x001d000000000c08,
0x001e000000000c0c,
0x001f000000000e03,
0x0020000000000e08,
0x0021000000000e0a,
0x0022000000000e0c,
0x0023000000001003,
0x0024000000001008,
0x002500000000100a,
0x002600000000100c,
0x0027000000001203,
0x0028000000001204,
0x0029000000001205,
0x002a000000001208,
0x002b000000001209,
0x002c00000000120a,
0x002d00000000120c,
0x002e000000001403,
0x002f000000001408,
0x003000000000140a,
0x003100000000140c,
0x0032000000001603,
0x0033000000001608,
0x003400000000160c,
0x0035000000001803,
0x0036000000001804,
0x0037000000001805,
0x0038000000001808,
0x0039000000001809,
0x003a00000000180a,
0x003b00000000180c,
0x003c000000001a03,
0x003d000000001a08,
0x003e000000001a0a,
0x003f000000001a0c,
0x0040000000001c03,
0x0041000000001c08,
0x0042000000001c0c,
0x0043000000001e03,
0x0044000000001e08,
0x0045000000001e0c,
0x0046000000002003,
0x0047000000002008,
0x004800000000200c,
0x0049000000002203,
0x004a000000002208,
0x004b00000000220c,
0x004c000000002403,
0x004d000000002408,
0x004e00000000240c,
0x004f000000002603,
0x0050000000002608,
0x005100000000260c,
0x0052000000002803,
0x0053000000002808,
0x005400000000280c,
0x0055000000002a03,
0x0056000000002a08,
0x0057000000002a0c,
0x0058000000002c03,
0x0059000000002c08,
0x005a000000002c0c,
0x005b000000002e03,
0x005c000000002e08,
0x005d000000002e0c,
0x005e000000003003,
0x005f000000003008,
0x006000000000300c,
0x0061000000003203,
0x0062000000003208,
0x006300000000320c,
0x0064000000003403,
0x0065000000003408,
0x006600000000340c,
0x0067000000003603,
0x0068000000003608,
0x006900000000360c,
0x006a000000003803,
0x006b000000003808,
0x006c00000000380c,
0x006d000000003a03,
0x006e000000003a08,
0x006f000000003a0c,
0x0070000000003c03,
0x0071000000003c08,
0x0072000000003c0c,
0x0073000000003e03,
0x0074000000003e08,
0x0075000000003e0c,
0x0076000000004003,
0x0077000000004008,
0x007800000000400c,
0x0079000000004203,
0x007a000000004208,
0x007b00000000420c,
0x007c000000004403,
0x007d000000004408,
0x007e00000000440c,
0x007f000000004603,
0x0080000000004608,
0x008100000000460c,
0x0082000000004803,
0x0083000000004808,
0x008400000000480c,
0x0085000000004a03,
0x0086000000004a08,
0x0087000000004a0c,
0x0088000000004c03,
0x0089000000004c08,
0x008a000000004c0c,
0x008b000000004e03,
0x008c000000004e08,
0x008d000000004e0c,
0x008e000000005003,
0x008f000000005008,
0x009000000000500c,
0x0091000000005203,
0x0092000000005208,
0x009300000000520c,
0x0094000000005403,
0x0095000000005408,
0x009600000000540c,
0x0097000000005603,
0x0098000000005608,
0x009900000000560c,
0x009a000000005803,
0x009b000000005808,
0x009c00000000580c,
0x009d000000005a03,
0x009e000000005a08,
0x009f000000005a0c,
0x00a0000000005c03,
0x00a1000000005c08,
0x00a2000000005c0c,
0x00a3000000005e03,
0x00a4000000005e08,
0x00a5000000005e0c,
0x00a6000000006003,
0x00a7000000006008,
0x00a800000000600a,
0x00a900000000600b,
0x00aa00000000600c,
0x00ab000000006203,
0x00ac000000006208,
0x00ad00000000620c,
0x00ae000000006403,
0x00af000000006408,
0x00b000000000640a,
0x00b100000000640b,
0x00b200000000640c,
0x00b3000000006603,
0x00b4000000006608,
0x00b500000000660a,
0x00b600000000660b,
0x00b700000000660c,
0x00b8000000006803,
0x00b9000000006808,
0x00ba00000000680a,
0x00bb00000000680b,
0x00bc00000000680c,
0x00bd000000006a03,
0x00be000000006a08,
0x00bf000000006a0c,
0x00c0000000006c03,
0x00c1000000006c08,
0x00c2000000006c0a,
0x00c3000000006c0b,
0x00c4000000006c0c,
0x00c5000000006e03,
0x00c6000000006e08,
0x00c7000000006e0c,
0x00c8000000007003,
0x00c9000000007008,
0x00ca00000000700c,
0x00cb000000007203,
0x00cc000000007208,
0x00cd00000000720a,
0x00ce00000000720b,
0x00cf00000000720c,
0x00d0000000007403,
0x00d1000000007408,
0x00d200000000740a,
0x00d300000000740b,
0x00d400000000740c,
0x00d5000000007603,
0x00d6000000007608,
0x00d700000000760a,
0x00d800000000760b,
0x00d900000000760c,
0x00da000000007803,
0x00db000000007808,
0x00dc00000000780a,
0x00dd00000000780b,
0x00de00000000780c,
0x00df000000007a03,
0x00e0000000007a08,
0x00e1000000007a0a,
0x00e2000000007a0b,
0x00e3000000007a0c,
0x00e4000000007c03,
0x00e5000000007c08,
0x00e6000000007c0c,
0x00e7000000007e03,
0x00e8000000007e08,
0x00e9000000007e0c,
0x00ea000000008003,
0x00eb000000008008,
0x00ec00000000800a,
0x00ed00000000800b,
0x00ee00000000800c,
0x00ef000000008203,
0x00f0000000008208,
0x00f100000000820c,
0x00f2000000008403,
0x00f3000000008408,
0x00f400000000840a,
0x00f500000000840b,
0x00f600000000840c,
0x00f7000000008603,
0x00f8000000008608,
0x00f900000000860a,
0x00fa00000000860b,
0x00fb00000000860c,
0x00fc000000008803,
0x00fd000000008808,
0x00fe00000000880c,
0x00ff000000008a03,
0x0100000000008a08,
0x0101000000008a0a,
0x0102000000008a0b,
0x0103000000008a0c,
0x0104000000008c03,
0x0105000000008c08,
0x0106000000008c0c,
0x0107000000008e03,
0x0108000000008e08,
0x0109000000008e0a,
0x010a000000008e0b,
0x010b000000008e0c,
0x010c000000009003,
0x010d000000009008,
0x010e00000000900c,
0x010f000000009203,
0x0110000000009208,
0x011100000000920c,
0x0112000000009403,
0x0113000000009408,
0x011400000000940a,
0x011500000000940b,
0x011600000000940c,
0x011700000000950b,
0x0118000000020604,
0x0119000000020605,
0x011a000000020609,
0x011b000000021204,
0x011c000000021205,
0x011d000000021209,
0x011e000000021404,
0x011f000000021405,
0x0120000000021409,
0x0121000000024c04,
0x0122000000024c05,
0x0123000000024c09,
0x0124000000025204,
0x0125000000025205,
0x0126000000025209,
0x0127000000026204,
0x0128000000026205,
0x0129000000026209,
0x012a000000027804,
0x012b000000027805,
0x012c000000027809,
0x012d000000040004,
0x012e000000040005,
0x012f000000040009,
0x0130000000040804,
0x0131000000040805,
0x0132000000040806,
0x0133000000040809,
0x0134000000040c04,
0x0135000000040c05,
0x0136000000040c06,
0x0137000000040c09,
0x0138000000040e04,
0x0139000000040e05,
0x013a000000040e06,
0x013b000000040e09,
0x013c000000041804,
0x013d000000041805,
0x013e000000041806,
0x013f000000041809,
0x0140000000041a04,
0x0141000000041a05,
0x0142000000041a06,
0x0143000000041a09,
0x0144000000048204,
0x0145000000048205,
0x0146000000048206,
0x0147000000048209,
0x0148000000060204,
0x0149000000060205,
0x014a000000060209,
0x014b000000061204,
0x014c000000061205,
0x014d000000061209,
0x014e000000066204,
0x014f000000066205,
0x0150000000066209,
0x0151000000067004,
0x0152000000067005,
0x0153000000067009,
0x0154000000067204,
0x0155000000067205,
0x0156000000067209,
0x0157000000080004,
0x0158000000080005,
0x0159000000080009,
0x015a000000080404,
0x015b000000080405,
0x015c000000080406,
0x015d000000080409,
0x015e000000081204,
0x015f000000081205,
0x0160000000081206,
0x0161000000081209,
0x0162000000081a04,
0x0163000000081a05,
0x0164000000081a06,
0x0165000000081a09,
0x0166000000085604,
0x0167000000085605,
0x0168000000085606,
0x0169000000085609,
0x016a000000086404,
0x016b000000086405,
0x016c000000086406,
0x016d000000086409,
0x016e0000000a0004,
0x016f0000000a0005,
0x01700000000a0009,
0x01710000000a1204,
0x01720000000a1205,
0x01730000000a1206,
0x01740000000a1209,
0x01750000000a1804,
0x01760000000a1805,
0x01770000000a1806,
0x01780000000a1809,
0x01790000000a5404,
0x017a0000000a5405,
0x017b0000000a5406,
0x017c0000000a5409,
0x017d0000000a8a04,
0x017e0000000a8a05,
0x017f0000000a8a06,
0x01800000000a8a09,
0x01810000000a8e04,
0x01820000000a8e05,
0x01830000000a8e06,
0x01840000000a8e09,
0x01850000000c0404,
0x01860000000c0405,
0x01870000000c0409,
0x01880000000c1004,
0x01890000000c1005,
0x018a0000000c1009,
0x018b0000000c1a04,
0x018c0000000c1a05,
0x018d0000000c1a09,
0x018e0000000c8204,
0x018f0000000c8205,
0x01900000000c8209,
0x01910000000c8404,
0x01920000000c8405,
0x01930000000c8409,
0x01940000000e0404,
0x01950000000e0405,
0x01960000000e0409,
0x01970000000e1604,
0x01980000000e1605,
0x01990000000e1609,
0x019a0000000e1804,
0x019b0000000e1805,
0x019c0000000e1809,
0x019d0000000e8204,
0x019e0000000e8205,
0x019f0000000e8209,
0x01a00000000e8a04,
0x01a10000000e8a05,
0x01a20000000e8a09,
0x01a3000000100c04,
0x01a4000000100c05,
0x01a5000000100c09,
0x01a6000000101a04,
0x01a7000000101a05,
0x01a8000000101a09,
0x01a9000000104e04,
0x01aa000000104e05,
0x01ab000000104e09,
0x01ac000000108404,
0x01ad000000108405,
0x01ae000000108409,
0x01af000000109404,
0x01b0000000109405,
0x01b1000000109409,
0x01b2000000120004,
0x01b3000000120005,
0x01b4000000120009,
0x01b5000000120204,
0x01b6000000120205,
0x01b7000000120206,
0x01b8000000120209,
0x01b9000000120604,
0x01ba000000120605,
0x01bb000000120606,
0x01bc000000120609,
0x01bd000000120804,
0x01be000000120805,
0x01bf000000120806,
0x01c0000000120809,
0x01c1000000120a04,
0x01c2000000120a05,
0x01c3000000120a06,
0x01c4000000120a09,
0x01c5000000126404,
0x01c6000000126405,
0x01c7000000126406,
0x01c8000000126409,
0x01c9000000127204,
0x01ca000000127205,
0x01cb000000127206,
0x01cc000000127209,
0x01cd000000140204,
0x01ce000000140205,
0x01cf000000140209,
0x01d0000000144c04,
0x01d1000000144c05,
0x01d2000000144c09,
0x01d3000000145204,
0x01d4000000145205,
0x01d5000000145209,
0x01d6000000146604,
0x01d7000000146605,
0x01d8000000146609,
0x01d9000000160e04,
0x01da000000160e05,
0x01db000000160e09,
0x01dc000000164204,
0x01dd000000164205,
0x01de000000164209,
0x01df000000166e04,
0x01e0000000166e05,
0x01e1000000166e09,
0x01e2000000168204,
0x01e3000000168205,
0x01e4000000168209,
0x01e5000000168a04,
0x01e6000000168a05,
0x01e7000000168a09,
0x01e8000000169004,
0x01e9000000169005,
0x01ea000000169009,
0x01eb000000180004,
0x01ec000000180005,
0x01ed000000180009,
0x01ee000000180404,
0x01ef000000180405,
0x01f0000000180406,
0x01f1000000180409,
0x01f2000000180a04,
0x01f3000000180a05,
0x01f4000000180a06,
0x01f5000000180a09,
0x01f6000000180e04,
0x01f7000000180e05,
0x01f8000000180e06,
0x01f9000000180e09,
0x01fa000000188a04,
0x01fb000000188a05,
0x01fc000000188a06,
0x01fd000000188a09,
0x01fe0000001a0404,
0x01ff0000001a0405,
0x02000000001a0409,
0x02010000001a0804,
0x02020000001a0805,
0x02030000001a0809,
0x02040000001a0c04,
0x02050000001a0c05,
0x02060000001a0c09,
0x02070000001a1004,
0x02080000001a1005,
0x02090000001a1009,
0x020a0000001a4e04,
0x020b0000001a4e05,
0x020c0000001a4e09,
0x020d0000001a5604,
0x020e0000001a5605,
0x020f0000001a5609,
0x02100000001c3004,
0x02110000001c3005,
0x02120000001c3009,
0x02130000001c4204,
0x02140000001c4205,
0x02150000001c4209,
0x02160000001c4404,
0x02170000001c4405,
0x02180000001c4409,
0x02190000001c8a04,
0x021a0000001c8a05,
0x021b0000001c8a09,
0x021c0000001c8e04,
0x021d0000001c8e05,
0x021e0000001c8e09,
0x021f0000001e2604,
0x02200000001e2605,
0x02210000001e2609,
0x02220000001e3004,
0x02230000001e3005,
0x02240000001e3009,
0x02250000001e6804,
0x02260000001e6805,
0x02270000001e6809,
0x02280000001e6e04,
0x02290000001e6e05,
0x022a0000001e6e09,
0x022b0000001e8604,
0x022c0000001e8605,
0x022d0000001e8609,
0x022e0000001e9004,
0x022f0000001e9005,
0x02300000001e9009,
0x0231000000202a04,
0x0232000000202a05,
0x0233000000202a09,
0x0234000000204e04,
0x0235000000204e05,
0x0236000000204e09,
0x0237000000205604,
0x0238000000205605,
0x0239000000205609,
0x023a000000206404,
0x023b000000206405,
0x023c000000206409,
0x023d000000206a04,
0x023e000000206a05,
0x023f000000206a09,
0x0240000000207204,
0x0241000000207205,
0x0242000000207209,
0x0243000000208804,
0x0244000000208805,
0x0245000000208809,
0x0246000000223a04,
0x0247000000223a05,
0x0248000000223a09,
0x0249000000227c04,
0x024a000000227c05,
0x024b000000227c09,
0x024c000000229404,
0x024d000000229405,
0x024e000000229409,
0x024f000000244604,
0x0250000000244605,
0x0251000000244609,
0x0252000000246004,
0x0253000000246005,
0x0254000000246009,
0x0255000000246804,
0x0256000000246805,
0x0257000000246809,
0x0258000000248204,
0x0259000000248205,
0x025a000000248209,
0x025b000000248404,
0x025c000000248405,
0x025d000000248409,
0x025e000000249004,
0x025f000000249005,
0x0260000000249009,
0x0261000000261e04,
0x0262000000261e05,
0x0263000000261e09,
0x0264000000263004,
0x0265000000263005,
0x0266000000263009,
0x0267000000265804,
0x0268000000265805,
0x0269000000265809,
0x026a000000268604,
0x026b000000268605,
0x026c000000268609,
0x026d000000283204,
0x026e000000283205,
0x026f000000283209,
0x0270000000283404,
0x0271000000283405,
0x0272000000283409,
0x0273000000283804,
0x0274000000283805,
0x0275000000283809,
0x0276000000285204,
0x0277000000285205,
0x0278000000285209,
0x0279000000285c04,
0x027a000000285c05,
0x027b000000285c09,
0x027c000000286204,
0x027d000000286205,
0x027e000000286209,
0x027f000000286604,
0x0280000000286605,
0x0281000000286609,
0x0282000000287404,
0x0283000000287405,
0x0284000000287409,
0x02850000002a2004,
0x02860000002a2005,
0x02870000002a2009,
0x02880000002a4a04,
0x02890000002a4a05,
0x028a0000002a4a09,
0x028b0000002a4e04,
0x028c0000002a4e05,
0x028d0000002a4e09,
0x028e0000002a8804,
0x028f0000002a8805,
0x02900000002a8809,
0x02910000002a9404,
0x02920000002a9405,
0x02930000002a9409,
0x02940000002c3e04,
0x02950000002c3e05,
0x02960000002c3e09,
0x02970000002c4004,
0x02980000002c4005,
0x02990000002c4009,
0x029a0000002c5404,
0x029b0000002c5405,
0x029c0000002c5409,
0x029d0000002c5a04,
0x029e0000002c5a05,
0x029f0000002c5a09,
0x02a00000002c7804,
0x02a10000002c7805,
0x02a20000002c7809,
0x02a30000002c9204,
0x02a40000002c9205,
0x02a50000002c9209,
0x02a60000002e3804,
0x02a70000002e3805,
0x02a80000002e3809,
0x02a90000002e6a04,
0x02aa0000002e6a05,
0x02ab0000002e6a09,
0x02ac0000002e7004,
0x02ad0000002e7005,
0x02ae0000002e7009,
0x02af0000002e7204,
0x02b00000002e7205,
0x02b10000002e7209,
0x02b2000000301c04,
0x02b3000000301c05,
0x02b4000000301c09,
0x02b5000000301e04,
0x02b6000000301e05,
0x02b7000000301e09,
0x02b8000000302604,
0x02b9000000302605,
0x02ba000000302609,
0x02bb000000303e04,
0x02bc000000303e05,
0x02bd000000303e09,
0x02be000000304204,
0x02bf000000304205,
0x02c0000000304209,
0x02c1000000304404,
0x02c2000000304405,
0x02c3000000304409,
0x02c4000000306e04,
0x02c5000000306e05,
0x02c6000000306e09,
0x02c7000000307a04,
0x02c8000000307a05,
0x02c9000000307a09,
0x02ca000000308c04,
0x02cb000000308c05,
0x02cc000000308c09,
0x02cd000000322804,
0x02ce000000322805,
0x02cf000000322809,
0x02d0000000323404,
0x02d1000000323405,
0x02d2000000323409,
0x02d3000000323604,
0x02d4000000323605,
0x02d5000000323609,
0x02d6000000325c04,
0x02d7000000325c05,
0x02d8000000325c09,
0x02d9000000327604,
0x02da000000327605,
0x02db000000327609,
0x02dc000000342804,
0x02dd000000342805,
0x02de000000342809,
0x02df000000343204,
0x02e0000000343205,
0x02e1000000343209,
0x02e2000000343604,
0x02e3000000343605,
0x02e4000000343609,
0x02e5000000344004,
0x02e6000000344005,
0x02e7000000344009,
0x02e8000000344c04,
0x02e9000000344c05,
0x02ea000000344c09,
0x02eb000000345004,
0x02ec000000345005,
0x02ed000000345009,
0x02ee000000346604,
0x02ef000000346605,
0x02f0000000346609,
0x02f1000000347e04,
0x02f2000000347e05,
0x02f3000000347e09,
0x02f4000000349204,
0x02f5000000349205,
0x02f6000000349209,
0x02f7000000363204,
0x02f8000000363205,
0x02f9000000363209,
0x02fa000000363404,
0x02fb000000363405,
0x02fc000000363409,
0x02fd000000363a04,
0x02fe000000363a05,
0x02ff000000363a09,
0x0300000000364804,
0x0301000000364805,
0x0302000000364809,
0x0303000000367604,
0x0304000000367605,
0x0305000000367609,
0x0306000000382804,
0x0307000000382805,
0x0308000000382809,
0x0309000000382e04,
0x030a000000382e05,
0x030b000000382e09,
0x030c000000383a04,
0x030d000000383a05,
0x030e000000383a09,
0x030f000000383c04,
0x0310000000383c05,
0x0311000000383c09,
0x0312000000385e04,
0x0313000000385e05,
0x0314000000385e09,
0x0315000000386204,
0x0316000000386205,
0x0317000000386209,
0x0318000000386a04,
0x0319000000386a05,
0x031a000000386a09,
0x031b000000386c04,
0x031c000000386c05,
0x031d000000386c09,
0x031e000000387004,
0x031f000000387005,
0x0320000000387009,
0x0321000000387404,
0x0322000000387405,
0x0323000000387409,
0x0324000000387c04,
0x0325000000387c05,
0x0326000000387c09,
0x03270000003a2204,
0x03280000003a2205,
0x03290000003a2209,
0x032a0000003a3604,
0x032b0000003a3605,
0x032c0000003a3609,
0x032d0000003a3804,
0x032e0000003a3805,
0x032f0000003a3809,
0x03300000003a4804,
0x03310000003a4805,
0x03320000003a4809,
0x03330000003a6c04,
0x03340000003a6c05,
0x03350000003a6c09,
0x03360000003a7c04,
0x03370000003a7c05,
0x03380000003a7c09,
0x03390000003c3804,
0x033a0000003c3805,
0x033b0000003c3809,
0x033c0000003c6a04,
0x033d0000003c6a05,
0x033e0000003c6a09,
0x033f0000003c7c04,
0x03400000003c7c05,
0x03410000003c7c09,
0x03420000003c8804,
0x03430000003c8805,
0x03440000003c8809,
0x03450000003e2c04,
0x03460000003e2c05,
0x03470000003e2c09,
0x03480000003e3004,
0x03490000003e3005,
0x034a0000003e3009,
0x034b0000003e4004,
0x034c0000003e4005,
0x034d0000003e4009,
0x034e0000003e5a04,
0x034f0000003e5a05,
0x03500000003e5a09,
0x03510000003e7a04,
0x03520000003e7a05,
0x03530000003e7a09,
0x03540000003e8004,
0x03550000003e8005,
0x03560000003e8009,
0x03570000003e8c04,
0x03580000003e8c05,
0x03590000003e8c09,
0x035a000000402c04,
0x035b000000402c05,
0x035c000000402c09,
0x035d000000403404,
0x035e000000403405,
0x035f000000403409,
0x0360000000403e04,
0x0361000000403e05,
0x0362000000403e09,
0x0363000000405004,
0x0364000000405005,
0x0365000000405009,
0x0366000000408c04,
0x0367000000408c05,
0x0368000000408c09,
0x0369000000409204,
0x036a000000409205,
0x036b000000409209,
0x036c000000421604,
0x036d000000421605,
0x036e000000421609,
0x036f000000421c04,
0x0370000000421c05,
0x0371000000421c09,
0x0372000000423004,
0x0373000000423005,
0x0374000000423009,
0x0375000000424401,
0x0376000000424801,
0x0377000000424c01,
0x0378000000425001,
0x0379000000425201,
0x037a000000425401,
0x037b000000425801,
0x037c000000425a01,
0x037d000000425c01,
0x037e000000425e01,
0x037f000000426201,
0x0380000000426601,
0x0381000000426801,
0x0382000000426a01,
0x0383000000426c01,
0x0384000000426e01,
0x0385000000426e04,
0x0386000000426e05,
0x0387000000426e09,
0x0388000000427001,
0x0389000000427201,
0x038a000000427401,
0x038b000000427601,
0x038c000000427801,
0x038d000000427a01,
0x038e000000427c01,
0x038f000000427e01,
0x0390000000428001,
0x0391000000428601,
0x0392000000428801,
0x0393000000428a01,
0x0394000000428a04,
0x0395000000428a05,
0x0396000000428a09,
0x0397000000428c01,
0x0398000000428e01,
0x0399000000429001,
0x039a000000429201,
0x039b000000429401,
0x039c000000441c04,
0x039d000000441c05,
0x039e000000441c09,
0x039f000000443004,
0x03a0000000443005,
0x03a1000000443009,
0x03a2000000444201,
0x03a3000000444801,
0x03a4000000444c01,
0x03a5000000445001,
0x03a6000000445201,
0x03a7000000445401,
0x03a8000000445801,
0x03a9000000445a01,
0x03aa000000445c01,
0x03ab000000445e01,
0x03ac000000446201,
0x03ad000000446601,
0x03ae000000446801,
0x03af000000446a01,
0x03b0000000446c01,
0x03b1000000446e01,
0x03b2000000447001,
0x03b3000000447201,
0x03b4000000447401,
0x03b5000000447601,
0x03b6000000447801,
0x03b7000000447a01,
0x03b8000000447a04,
0x03b9000000447a05,
0x03ba000000447a09,
0x03bb000000447c01,
0x03bc000000447e01,
0x03bd000000448001,
0x03be000000448004,
0x03bf000000448005,
0x03c0000000448009,
0x03c1000000448601,
0x03c2000000448801,
0x03c3000000448a01,
0x03c4000000448c01,
0x03c5000000448e01,
0x03c6000000448e04,
0x03c7000000448e05,
0x03c8000000448e09,
0x03c9000000449001,
0x03ca000000449201,
0x03cb000000449401,
0x03cc000000462404,
0x03cd000000462405,
0x03ce000000462409,
0x03cf000000465804,
0x03d0000000465805,
0x03d1000000465809,
0x03d2000000466001,
0x03d3000000466004,
0x03d4000000466005,
0x03d5000000466009,
0x03d6000000466801,
0x03d7000000468201,
0x03d8000000468401,
0x03d9000000468404,
0x03da000000468405,
0x03db000000468409,
0x03dc000000468604,
0x03dd000000468605,
0x03de000000468609,
0x03df000000469001,
0x03e0000000483604,
0x03e1000000483605,
0x03e2000000483609,
0x03e3000000483a04,
0x03e4000000483a05,
0x03e5000000483a09,
0x03e6000000484201,
0x03e7000000484401,
0x03e8000000484c01,
0x03e9000000485001,
0x03ea000000485201,
0x03eb000000485401,
0x03ec000000485801,
0x03ed000000485a01,
0x03ee000000485c01,
0x03ef000000485e01,
0x03f0000000486201,
0x03f1000000486601,
0x03f2000000486801,
0x03f3000000486a01,
0x03f4000000486c01,
0x03f5000000486c04,
0x03f6000000486c05,
0x03f7000000486c09,
0x03f8000000486e01,
0x03f9000000487001,
0x03fa000000487201,
0x03fb000000487401,
0x03fc000000487601,
0x03fd000000487604,
0x03fe000000487605,
0x03ff000000487609,
0x0400000000487801,
0x0401000000487a01,
0x0402000000487c01,
0x0403000000487e01,
0x0404000000488001,
0x0405000000488601,
0x0406000000488801,
0x0407000000488a01,
0x0408000000488c01,
0x0409000000488e01,
0x040a000000489001,
0x040b000000489201,
0x040c000000489401,
0x040d0000004a2a04,
0x040e0000004a2a05,
0x040f0000004a2a09,
0x04100000004a4e01,
0x04110000004a5601,
0x04120000004a6401,
0x04130000004a6a01,
0x04140000004a7201,
0x04150000004a7c04,
0x04160000004a7c05,
0x04170000004a7c09,
0x04180000004a8801,
0x04190000004a8804,
0x041a0000004a8805,
0x041b0000004a8809,
0x041c0000004a9401,
0x041d0000004a9404,
0x041e0000004a9405,
0x041f0000004a9409,
0x04200000004c0204,
0x04210000004c0205,
0x04220000004c0209,
0x04230000004c1404,
0x04240000004c1405,
0x04250000004c1409,
0x04260000004c3404,
0x04270000004c3405,
0x04280000004c3409,
0x04290000004c4201,
0x042a0000004c4401,
0x042b0000004c4801,
0x042c0000004c5001,
0x042d0000004c5201,
0x042e0000004c5401,
0x042f0000004c5801,
0x04300000004c5a01,
0x04310000004c5c01,
0x04320000004c5e01,
0x04330000004c6201,
0x04340000004c6601,
0x04350000004c6604,
0x04360000004c6605,
0x04370000004c6609,
0x04380000004c6801,
0x04390000004c6a01,
0x043a0000004c6c01,
0x043b0000004c6e01,
0x043c0000004c7001,
0x043d0000004c7201,
0x043e0000004c7401,
0x043f0000004c7601,
0x04400000004c7801,
0x04410000004c7804,
0x04420000004c7805,
0x04430000004c7809,
0x04440000004c7a01,
0x04450000004c7c01,
0x04460000004c7e01,
0x04470000004c8001,
0x04480000004c8601,
0x04490000004c8801,
0x044a0000004c8a01,
0x044b0000004c8c01,
0x044c0000004c8e01,
0x044d0000004c9001,
0x044e0000004c9201,
0x044f0000004c9204,
0x04500000004c9205,
0x04510000004c9209,
0x04520000004c9401,
0x04530000004e1004,
0x04540000004e1005,
0x04550000004e1009,
0x04560000004e1a04,
0x04570000004e1a05,
0x04580000004e1a09,
0x04590000004e2004,
0x045a0000004e2005,
0x045b0000004e2009,
0x045c0000004e2a04,
0x045d0000004e2a05,
0x045e0000004e2a09,
0x045f0000004e4a01,
0x04600000004e5601,
0x04610000004e5604,
0x04620000004e5605,
0x04630000004e5609,
0x04640000004e6401,
0x04650000004e6a01,
0x04660000004e7201,
0x04670000004e8801,
0x04680000004e9401,
0x04690000004e9404,
0x046a0000004e9405,
0x046b0000004e9409,
0x046c000000503404,
0x046d000000503405,
0x046e000000503409,
0x046f000000504004,
0x0470000000504005,
0x0471000000504009,
0x0472000000504201,
0x0473000000504401,
0x0474000000504801,
0x0475000000504c01,
0x0476000000505201,
0x0477000000505401,
0x0478000000505801,
0x0479000000505a01,
0x047a000000505c01,
0x047b000000505e01,
0x047c000000506201,
0x047d000000506601,
0x047e000000506801,
0x047f000000506a01,
0x0480000000506c01,
0x0481000000506e01,
0x0482000000507001,
0x0483000000507201,
0x0484000000507401,
0x0485000000507601,
0x0486000000507801,
0x0487000000507a01,
0x0488000000507c01,
0x0489000000507e01,
0x048a000000508001,
0x048b000000508601,
0x048c000000508801,
0x048d000000508a01,
0x048e000000508c01,
0x048f000000508c04,
0x0490000000508c05,
0x0491000000508c09,
0x0492000000508e01,
0x0493000000509001,
0x0494000000509201,
0x0495000000509401,
0x0496000000520204,
0x0497000000520205,
0x0498000000520209,
0x0499000000521404,
0x049a000000521405,
0x049b000000521409,
0x049c000000522804,
0x049d000000522805,
0x049e000000522809,
0x049f000000524201,
0x04a0000000524401,
0x04a1000000524801,
0x04a2000000524c01,
0x04a3000000525001,
0x04a4000000525401,
0x04a5000000525801,
0x04a6000000525a01,
0x04a7000000525c01,
0x04a8000000525e01,
0x04a9000000526201,
0x04aa000000526204,
0x04ab000000526205,
0x04ac000000526209,
0x04ad000000526601,
0x04ae000000526604,
0x04af000000526605,
0x04b0000000526609,
0x04b1000000526801,
0x04b2000000526a01,
0x04b3000000526c01,
0x04b4000000526e01,
0x04b5000000527001,
0x04b6000000527201,
0x04b7000000527401,
0x04b8000000527601,
0x04b9000000527801,
0x04ba000000527a01,
0x04bb000000527c01,
0x04bc000000527e01,
0x04bd000000528001,
0x04be000000528601,
0x04bf000000528801,
0x04c0000000528a01,
0x04c1000000528c01,
0x04c2000000528e01,
0x04c3000000529001,
0x04c4000000529201,
0x04c5000000529401,
0x04c6000000540a04,
0x04c7000000540a05,
0x04c8000000540a09,
0x04c9000000542c04,
0x04ca000000542c05,
0x04cb000000542c09,
0x04cc000000544201,
0x04cd000000544401,
0x04ce000000544801,
0x04cf000000544c01,
0x04d0000000545001,
0x04d1000000545201,
0x04d2000000545801,
0x04d3000000545a01,
0x04d4000000545a04,
0x04d5000000545a05,
0x04d6000000545a09,
0x04d7000000545c01,
0x04d8000000545e01,
0x04d9000000546201,
0x04da000000546601,
0x04db000000546801,
0x04dc000000546a01,
0x04dd000000546c01,
0x04de000000546e01,
0x04df000000547001,
0x04e0000000547201,
0x04e1000000547401,
0x04e2000000547601,
0x04e3000000547801,
0x04e4000000547804,
0x04e5000000547805,
0x04e6000000547809,
0x04e7000000547a01,
0x04e8000000547c01,
0x04e9000000547e01,
0x04ea000000548001,
0x04eb000000548601,
0x04ec000000548801,
0x04ed000000548a01,
0x04ee000000548c01,
0x04ef000000548e01,
0x04f0000000548e04,
0x04f1000000548e05,
0x04f2000000548e09,
0x04f3000000549001,
0x04f4000000549201,
0x04f5000000549401,
0x04f6000000560804,
0x04f7000000560805,
0x04f8000000560809,
0x04f9000000561a04,
0x04fa000000561a05,
0x04fb000000561a09,
0x04fc000000562004,
0x04fd000000562005,
0x04fe000000562009,
0x04ff000000564a01,
0x0500000000564e01,
0x0501000000564e04,
0x0502000000564e05,
0x0503000000564e09,
0x0504000000566401,
0x0505000000566404,
0x0506000000566405,
0x0507000000566409,
0x0508000000566a01,
0x0509000000567201,
0x050a000000568801,
0x050b000000569401,
0x050c000000582604,
0x050d000000582605,
0x050e000000582609,
0x050f000000584201,
0x0510000000584401,
0x0511000000584604,
0x0512000000584605,
0x0513000000584609,
0x0514000000584801,
0x0515000000584c01,
0x0516000000585001,
0x0517000000585201,
0x0518000000585401,
0x0519000000585a01,
0x051a000000585c01,
0x051b000000585e01,
0x051c000000586201,
0x051d000000586601,
0x051e000000586801,
0x051f000000586a01,
0x0520000000586c01,
0x0521000000586e01,
0x0522000000587001,
0x0523000000587201,
0x0524000000587401,
0x0525000000587601,
0x0526000000587801,
0x0527000000587a01,
0x0528000000587c01,
0x0529000000587e01,
0x052a000000588001,
0x052b000000588601,
0x052c000000588604,
0x052d000000588605,
0x052e000000588609,
0x052f000000588801,
0x0530000000588a01,
0x0531000000588c01,
0x0532000000588e01,
0x0533000000589001,
0x0534000000589201,
0x0535000000589401,
0x05360000005a2c04,
0x05370000005a2c05,
0x05380000005a2c09,
0x05390000005a3e04,
0x053a0000005a3e05,
0x053b0000005a3e09,
0x053c0000005a4201,
0x053d0000005a4401,
0x053e0000005a4801,
0x053f0000005a4c01,
0x05400000005a5001,
0x05410000005a5201,
0x05420000005a5401,
0x05430000005a5404,
0x05440000005a5405,
0x05450000005a5409,
0x05460000005a5801,
0x05470000005a5c01,
0x05480000005a5e01,
0x05490000005a6201,
0x054a0000005a6601,
0x054b0000005a6801,
0x054c0000005a6a01,
0x054d0000005a6c01,
0x054e0000005a6e01,
0x054f0000005a7001,
0x05500000005a7201,
0x05510000005a7401,
0x05520000005a7601,
0x05530000005a7801,
0x05540000005a7a01,
0x05550000005a7c01,
0x05560000005a7e01,
0x05570000005a8001,
0x05580000005a8004,
0x05590000005a8005,
0x055a0000005a8009,
0x055b0000005a8601,
0x055c0000005a8801,
0x055d0000005a8a01,
0x055e0000005a8c01,
0x055f0000005a8e01,
0x05600000005a8e04,
0x05610000005a8e05,
0x05620000005a8e09,
0x05630000005a9001,
0x05640000005a9201,
0x05650000005a9401,
0x05660000005c2804,
0x05670000005c2805,
0x05680000005c2809,
0x05690000005c3204,
0x056a0000005c3205,
0x056b0000005c3209,
0x056c0000005c4201,
0x056d0000005c4401,
0x056e0000005c4801,
0x056f0000005c4c01,
0x05700000005c5001,
0x05710000005c5201,
0x05720000005c5401,
0x05730000005c5801,
0x05740000005c5a01,
0x05750000005c5e01,
0x05760000005c5e04,
0x05770000005c5e05,
0x05780000005c5e09,
0x05790000005c6201,
0x057a0000005c6601,
0x057b0000005c6801,
0x057c0000005c6a01,
0x057d0000005c6c01,
0x057e0000005c6e01,
0x057f0000005c7001,
0x05800000005c7201,
0x05810000005c7401,
0x05820000005c7404,
0x05830000005c7405,
0x05840000005c7409,
0x05850000005c7601,
0x05860000005c7604,
0x05870000005c7605,
0x05880000005c7609,
0x05890000005c7801,
0x058a0000005c7a01,
0x058b0000005c7c01,
0x058c0000005c7e01,
0x058d0000005c8001,
0x058e0000005c8601,
0x058f0000005c8801,
0x05900000005c8a01,
0x05910000005c8c01,
0x05920000005c8e01,
0x05930000005c9001,
0x05940000005c9201,
0x05950000005c9401,
0x05960000005e3804,
0x05970000005e3805,
0x05980000005e3809,
0x05990000005e4201,
0x059a0000005e4401,
0x059b0000005e4801,
0x059c0000005e4c01,
0x059d0000005e5001,
0x059e0000005e5201,
0x059f0000005e5401,
0x05a00000005e5801,
0x05a10000005e5a01,
0x05a20000005e5c01,
0x05a30000005e5c04,
0x05a40000005e5c05,
0x05a50000005e5c09,
0x05a60000005e6201,
0x05a70000005e6601,
0x05a80000005e6801,
0x05a90000005e6a01,
0x05aa0000005e6c01,
0x05ab0000005e6c04,
0x05ac0000005e6c05,
0x05ad0000005e6c09,
0x05ae0000005e6e01,
0x05af0000005e7001,
0x05b00000005e7201,
0x05b10000005e7401,
0x05b20000005e7404,
0x05b30000005e7405,
0x05b40000005e7409,
0x05b50000005e7601,
0x05b60000005e7604,
0x05b70000005e7605,
0x05b80000005e7609,
0x05b90000005e7801,
0x05ba0000005e7a01,
0x05bb0000005e7c01,
0x05bc0000005e7e01,
0x05bd0000005e8001,
0x05be0000005e8601,
0x05bf0000005e8801,
0x05c00000005e8a01,
0x05c10000005e8c01,
0x05c20000005e8e01,
0x05c30000005e9001,
0x05c40000005e9201,
0x05c50000005e9401,
0x05c6000000602404,
0x05c7000000602405,
0x05c8000000602409,
0x05c9000000604601,
0x05ca000000604604,
0x05cb000000604605,
0x05cc000000604609,
0x05cd000000606801,
0x05ce000000606804,
0x05cf000000606805,
0x05d0000000606809,
0x05d1000000608201,
0x05d2000000608401,
0x05d3000000608604,
0x05d4000000608605,
0x05d5000000608609,
0x05d6000000609001,
0x05d7000000620204,
0x05d8000000620205,
0x05d9000000620209,
0x05da000000620604,
0x05db000000620605,
0x05dc000000620609,
0x05dd000000622804,
0x05de000000622805,
0x05df000000622809,
0x05e0000000623804,
0x05e1000000623805,
0x05e2000000623809,
0x05e3000000624201,
0x05e4000000624401,
0x05e5000000624801,
0x05e6000000624c01,
0x05e7000000625001,
0x05e8000000625201,
0x05e9000000625204,
0x05ea000000625205,
0x05eb000000625209,
0x05ec000000625401,
0x05ed000000625801,
0x05ee000000625a01,
0x05ef000000625c01,
0x05f0000000625e01,
0x05f1000000626601,
0x05f2000000626801,
0x05f3000000626a01,
0x05f4000000626c01,
0x05f5000000626e01,
0x05f6000000627001,
0x05f7000000627004,
0x05f8000000627005,
0x05f9000000627009,
0x05fa000000627201,
0x05fb000000627401,
0x05fc000000627601,
0x05fd000000627801,
0x05fe000000627a01,
0x05ff000000627c01,
0x0600000000627e01,
0x0601000000628001,
0x0602000000628601,
0x0603000000628801,
0x0604000000628a01,
0x0605000000628c01,
0x0606000000628e01,
0x0607000000629001,
0x0608000000629201,
0x0609000000629401,
0x060a000000640804,
0x060b000000640805,
0x060c000000640809,
0x060d000000641204,
0x060e000000641205,
0x060f000000641209,
0x0610000000642004,
0x0611000000642005,
0x0612000000642009,
0x0613000000644a01,
0x0614000000644e01,
0x0615000000645601,
0x0616000000645604,
0x0617000000645605,
0x0618000000645609,
0x0619000000646a01,
0x061a000000647201,
0x061b000000647204,
0x061c000000647205,
0x061d000000647209,
0x061e000000648801,
0x061f000000649401,
0x0620000000661404,
0x0621000000661405,
0x0622000000661409,
0x0623000000662804,
0x0624000000662805,
0x0625000000662809,
0x0626000000663404,
0x0627000000663405,
0x0628000000663409,
0x0629000000664201,
0x062a000000664401,
0x062b000000664801,
0x062c000000664c01,
0x062d000000664c04,
0x062e000000664c05,
0x062f000000664c09,
0x0630000000665001,
0x0631000000665201,
0x0632000000665204,
0x0633000000665205,
0x0634000000665209,
0x0635000000665401,
0x0636000000665801,
0x0637000000665a01,
0x0638000000665c01,
0x0639000000665e01,
0x063a000000666201,
0x063b000000666801,
0x063c000000666a01,
0x063d000000666c01,
0x063e000000666e01,
0x063f000000667001,
0x0640000000667201,
0x0641000000667401,
0x0642000000667601,
0x0643000000667801,
0x0644000000667a01,
0x0645000000667c01,
0x0646000000667e01,
0x0647000000668001,
0x0648000000668601,
0x0649000000668801,
0x064a000000668a01,
0x064b000000668c01,
0x064c000000668e01,
0x064d000000669001,
0x064e000000669201,
0x064f000000669401,
0x0650000000681e04,
0x0651000000681e05,
0x0652000000681e09,
0x0653000000682404,
0x0654000000682405,
0x0655000000682409,
0x0656000000684201,
0x0657000000684401,
0x0658000000684601,
0x0659000000684801,
0x065a000000684c01,
0x065b000000685001,
0x065c000000685201,
0x065d000000685401,
0x065e000000685801,
0x065f000000685a01,
0x0660000000685c01,
0x0661000000685e01,
0x0662000000686001,
0x0663000000686004,
0x0664000000686005,
0x0665000000686009,
0x0666000000686201,
0x0667000000686601,
0x0668000000686a01,
0x0669000000686c01,
0x066a000000686e01,
0x066b000000687001,
0x066c000000687201,
0x066d000000687401,
0x066e000000687601,
0x066f000000687801,
0x0670000000687a01,
0x0671000000687c01,
0x0672000000687e01,
0x0673000000688001,
0x0674000000688201,
0x0675000000688401,
0x0676000000688601,
0x0677000000688604,
0x0678000000688605,
0x0679000000688609,
0x067a000000688801,
0x067b000000688a01,
0x067c000000688c01,
0x067d000000688e01,
0x067e000000689001,
0x067f000000689004,
0x0680000000689005,
0x0681000000689009,
0x0682000000689201,
0x0683000000689401,
0x06840000006a2004,
0x06850000006a2005,
0x06860000006a2009,
0x06870000006a2e04,
0x06880000006a2e05,
0x06890000006a2e09,
0x068a0000006a3804,
0x068b0000006a3805,
0x068c0000006a3809,
0x068d0000006a3c04,
0x068e0000006a3c05,
0x068f0000006a3c09,
0x06900000006a4201,
0x06910000006a4401,
0x06920000006a4801,
0x06930000006a4a01,
0x06940000006a4c01,
0x06950000006a4e01,
0x06960000006a5001,
0x06970000006a5201,
0x06980000006a5401,
0x06990000006a5601,
0x069a0000006a5801,
0x069b0000006a5a01,
0x069c0000006a5c01,
0x069d0000006a5e01,
0x069e0000006a6201,
0x069f0000006a6401,
0x06a00000006a6601,
0x06a10000006a6801,
0x06a20000006a6c01,
0x06a30000006a6e01,
0x06a40000006a7001,
0x06a50000006a7201,
0x06a60000006a7204,
0x06a70000006a7205,
0x06a80000006a7209,
0x06a90000006a7401,
0x06aa0000006a7601,
0x06ab0000006a7801,
0x06ac0000006a7a01,
0x06ad0000006a7c01,
0x06ae0000006a7e01,
0x06af0000006a8001,
0x06b00000006a8601,
0x06b10000006a8801,
0x06b20000006a8804,
0x06b30000006a8805,
0x06b40000006a8809,
0x06b50000006a8a01,
0x06b60000006a8c01,
0x06b70000006a8e01,
0x06b80000006a9001,
0x06b90000006a9201,
0x06ba0000006a9401,
0x06bb0000006c3804,
0x06bc0000006c3805,
0x06bd0000006c3809,
0x06be0000006c3a04,
0x06bf0000006c3a05,
0x06c00000006c3a09,
0x06c10000006c4201,
0x06c20000006c4401,
0x06c30000006c4801,
0x06c40000006c4804,
0x06c50000006c4805,
0x06c60000006c4809,
0x06c70000006c4c01,
0x06c80000006c5001,
0x06c90000006c5201,
0x06ca0000006c5401,
0x06cb0000006c5801,
0x06cc0000006c5a01,
0x06cd0000006c5c01,
0x06ce0000006c5e01,
0x06cf0000006c5e04,
0x06d00000006c5e05,
0x06d10000006c5e09,
0x06d20000006c6201,
0x06d30000006c6601,
0x06d40000006c6801,
0x06d50000006c6a01,
0x06d60000006c6e01,
0x06d70000006c7001,
0x06d80000006c7201,
0x06d90000006c7401,
0x06da0000006c7601,
0x06db0000006c7604,
0x06dc0000006c7605,
0x06dd0000006c7609,
0x06de0000006c7801,
0x06df0000006c7a01,
0x06e00000006c7c01,
0x06e10000006c7e01,
0x06e20000006c8001,
0x06e30000006c8601,
0x06e40000006c8801,
0x06e50000006c8a01,
0x06e60000006c8c01,
0x06e70000006c8e01,
0x06e80000006c9001,
0x06e90000006c9201,
0x06ea0000006c9401,
0x06eb0000006e1604,
0x06ec0000006e1605,
0x06ed0000006e1609,
0x06ee0000006e1e04,
0x06ef0000006e1e05,
0x06f00000006e1e09,
0x06f10000006e3004,
0x06f20000006e3005,
0x06f30000006e3009,
0x06f40000006e4201,
0x06f50000006e4204,
0x06f60000006e4205,
0x06f70000006e4209,
0x06f80000006e4401,
0x06f90000006e4801,
0x06fa0000006e4c01,
0x06fb0000006e5001,
0x06fc0000006e5201,
0x06fd0000006e5401,
0x06fe0000006e5801,
0x06ff0000006e5a01,
0x07000000006e5c01,
0x07010000006e5e01,
0x07020000006e6201,
0x07030000006e6601,
0x07040000006e6801,
0x07050000006e6a01,
0x07060000006e6c01,
0x07070000006e7001,
0x07080000006e7201,
0x07090000006e7401,
0x070a0000006e7601,
0x070b0000006e7801,
0x070c0000006e7a01,
0x070d0000006e7c01,
0x070e0000006e7e01,
0x070f0000006e8001,
0x07100000006e8601,
0x07110000006e8801,
0x07120000006e8a01,
0x07130000006e8c01,
0x07140000006e8e01,
0x07150000006e9001,
0x07160000006e9004,
0x07170000006e9005,
0x07180000006e9009,
0x07190000006e9201,
0x071a0000006e9401,
0x071b000000700604,
0x071c000000700605,
0x071d000000700609,
0x071e000000702e04,
0x071f000000702e05,
0x0720000000702e09,
0x0721000000703804,
0x0722000000703805,
0x0723000000703809,
0x0724000000704201,
0x0725000000704401,
0x0726000000704801,
0x0727000000704c01,
0x0728000000705001,
0x0729000000705201,
0x072a000000705401,
0x072b000000705801,
0x072c000000705a01,
0x072d000000705c01,
0x072e000000705e01,
0x072f000000706201,
0x0730000000706204,
0x0731000000706205,
0x0732000000706209,
0x0733000000706601,
0x0734000000706801,
0x0735000000706a01,
0x0736000000706c01,
0x0737000000706e01,
0x0738000000707201,
0x0739000000707204,
0x073a000000707205,
0x073b000000707209,
0x073c000000707401,
0x073d000000707601,
0x073e000000707801,
0x073f000000707a01,
0x0740000000707c01,
0x0741000000707e01,
0x0742000000708001,
0x0743000000708601,
0x0744000000708801,
0x0745000000708a01,
0x0746000000708c01,
0x0747000000708e01,
0x0748000000709001,
0x0749000000709201,
0x074a000000709401,
0x074b000000720604,
0x074c000000720605,
0x074d000000720609,
0x074e000000721204,
0x074f000000721205,
0x0750000000721209,
0x0751000000722004,
0x0752000000722005,
0x0753000000722009,
0x0754000000722e04,
0x0755000000722e05,
0x0756000000722e09,
0x0757000000724201,
0x0758000000724401,
0x0759000000724801,
0x075a000000724a01,
0x075b000000724c01,
0x075c000000724e01,
0x075d000000725001,
0x075e000000725201,
0x075f000000725401,
0x0760000000725601,
0x0761000000725801,
0x0762000000725a01,
0x0763000000725c01,
0x0764000000725e01,
0x0765000000726201,
0x0766000000726401,
0x0767000000726404,
0x0768000000726405,
0x0769000000726409,
0x076a000000726601,
0x076b000000726801,
0x076c000000726a01,
0x076d000000726a04,
0x076e000000726a05,
0x076f000000726a09,
0x0770000000726c01,
0x0771000000726e01,
0x0772000000727001,
0x0773000000727004,
0x0774000000727005,
0x0775000000727009,
0x0776000000727401,
0x0777000000727601,
0x0778000000727801,
0x0779000000727a01,
0x077a000000727c01,
0x077b000000727e01,
0x077c000000728001,
0x077d000000728601,
0x077e000000728801,
0x077f000000728a01,
0x0780000000728c01,
0x0781000000728e01,
0x0782000000729001,
0x0783000000729201,
0x0784000000729401,
0x0785000000742804,
0x0786000000742805,
0x0787000000742809,
0x0788000000743804,
0x0789000000743805,
0x078a000000743809,
0x078b000000744201,
0x078c000000744401,
0x078d000000744801,
0x078e000000744c01,
0x078f000000745001,
0x0790000000745201,
0x0791000000745401,
0x0792000000745801,
0x0793000000745a01,
0x0794000000745c01,
0x0795000000745c04,
0x0796000000745c05,
0x0797000000745c09,
0x0798000000745e01,
0x0799000000745e04,
0x079a000000745e05,
0x079b000000745e09,
0x079c000000746201,
0x079d000000746601,
0x079e000000746801,
0x079f000000746a01,
0x07a0000000746c01,
0x07a1000000746e01,
0x07a2000000747001,
0x07a3000000747201,
0x07a4000000747601,
0x07a5000000747801,
0x07a6000000747a01,
0x07a7000000747c01,
0x07a8000000747e01,
0x07a9000000748001,
0x07aa000000748601,
0x07ab000000748801,
0x07ac000000748a01,
0x07ad000000748c01,
0x07ae000000748e01,
0x07af000000749001,
0x07b0000000749201,
0x07b1000000749401,
0x07b2000000763204,
0x07b3000000763205,
0x07b4000000763209,
0x07b5000000763604,
0x07b6000000763605,
0x07b7000000763609,
0x07b8000000764201,
0x07b9000000764401,
0x07ba000000764801,
0x07bb000000764804,
0x07bc000000764805,
0x07bd000000764809,
0x07be000000764c01,
0x07bf000000765001,
0x07c0000000765201,
0x07c1000000765401,
0x07c2000000765801,
0x07c3000000765a01,
0x07c4000000765c01,
0x07c5000000765c04,
0x07c6000000765c05,
0x07c7000000765c09,
0x07c8000000765e01,
0x07c9000000765e04,
0x07ca000000765e05,
0x07cb000000765e09,
0x07cc000000766201,
0x07cd000000766601,
0x07ce000000766801,
0x07cf000000766a01,
0x07d0000000766c01,
0x07d1000000766c04,
0x07d2000000766c05,
0x07d3000000766c09,
0x07d4000000766e01,
0x07d5000000767001,
0x07d6000000767201,
0x07d7000000767401,
0x07d8000000767801,
0x07d9000000767a01,
0x07da000000767c01,
0x07db000000767e01,
0x07dc000000768001,
0x07dd000000768601,
0x07de000000768801,
0x07df000000768a01,
0x07e0000000768c01,
0x07e1000000768e01,
0x07e2000000769001,
0x07e3000000769201,
0x07e4000000769401,
0x07e5000000780204,
0x07e6000000780205,
0x07e7000000780209,
0x07e8000000782c04,
0x07e9000000782c05,
0x07ea000000782c09,
0x07eb000000784201,
0x07ec000000784401,
0x07ed000000784801,
0x07ee000000784c01,
0x07ef000000784c04,
0x07f0000000784c05,
0x07f1000000784c09,
0x07f2000000785001,
0x07f3000000785201,
0x07f4000000785401,
0x07f5000000785404,
0x07f6000000785405,
0x07f7000000785409,
0x07f8000000785801,
0x07f9000000785a01,
0x07fa000000785c01,
0x07fb000000785e01,
0x07fc000000786201,
0x07fd000000786601,
0x07fe000000786801,
0x07ff000000786a01,
0x0800000000786c01,
0x0801000000786e01,
0x0802000000787001,
0x0803000000787201,
0x0804000000787401,
0x0805000000787601,
0x0806000000787a01,
0x0807000000787c01,
0x0808000000787e01,
0x0809000000788001,
0x080a000000788601,
0x080b000000788801,
0x080c000000788a01,
0x080d000000788c01,
0x080e000000788e01,
0x080f000000789001,
0x0810000000789201,
0x0811000000789204,
0x0812000000789205,
0x0813000000789209,
0x0814000000789401,
0x08150000007a3004,
0x08160000007a3005,
0x08170000007a3009,
0x08180000007a3e04,
0x08190000007a3e05,
0x081a0000007a3e09,
0x081b0000007a4201,
0x081c0000007a4401,
0x081d0000007a4404,
0x081e0000007a4405,
0x081f0000007a4409,
0x08200000007a4801,
0x08210000007a4c01,
0x08220000007a5001,
0x08230000007a5201,
0x08240000007a5401,
0x08250000007a5801,
0x08260000007a5a01,
0x08270000007a5c01,
0x08280000007a5e01,
0x08290000007a6201,
0x082a0000007a6601,
0x082b0000007a6801,
0x082c0000007a6a01,
0x082d0000007a6c01,
0x082e0000007a6e01,
0x082f0000007a7001,
0x08300000007a7201,
0x08310000007a7401,
0x08320000007a7601,
0x08330000007a7801,
0x08340000007a7c01,
0x08350000007a7e01,
0x08360000007a8001,
0x08370000007a8004,
0x08380000007a8005,
0x08390000007a8009,
0x083a0000007a8601,
0x083b0000007a8801,
0x083c0000007a8a01,
0x083d0000007a8c01,
0x083e0000007a8e01,
0x083f0000007a9001,
0x08400000007a9201,
0x08410000007a9401,
0x08420000007c2204,
0x08430000007c2205,
0x08440000007c2209,
0x08450000007c3804,
0x08460000007c3805,
0x08470000007c3809,
0x08480000007c3a04,
0x08490000007c3a05,
0x084a0000007c3a09,
0x084b0000007c3c04,
0x084c0000007c3c05,
0x084d0000007c3c09,
0x084e0000007c4201,
0x084f0000007c4401,
0x08500000007c4801,
0x08510000007c4a04,
0x08520000007c4a05,
0x08530000007c4a09,
0x08540000007c4c01,
0x08550000007c5001,
0x08560000007c5201,
0x08570000007c5401,
0x08580000007c5801,
0x08590000007c5a01,
0x085a0000007c5c01,
0x085b0000007c5e01,
0x085c0000007c6201,
0x085d0000007c6601,
0x085e0000007c6801,
0x085f0000007c6a01,
0x08600000007c6c01,
0x08610000007c6e01,
0x08620000007c7001,
0x08630000007c7201,
0x08640000007c7401,
0x08650000007c7601,
0x08660000007c7801,
0x08670000007c7a01,
0x08680000007c7e01,
0x08690000007c8001,
0x086a0000007c8601,
0x086b0000007c8801,
0x086c0000007c8804,
0x086d0000007c8805,
0x086e0000007c8809,
0x086f0000007c8a01,
0x08700000007c8c01,
0x08710000007c8e01,
0x08720000007c9001,
0x08730000007c9201,
0x08740000007c9401,
0x08750000007c9404,
0x08760000007c9405,
0x08770000007c9409,
0x08780000007e3404,
0x08790000007e3405,
0x087a0000007e3409,
0x087b0000007e4201,
0x087c0000007e4401,
0x087d0000007e4801,
0x087e0000007e4c01,
0x087f0000007e5001,
0x08800000007e5201,
0x08810000007e5401,
0x08820000007e5801,
0x08830000007e5a01,
0x08840000007e5c01,
0x08850000007e5e01,
0x08860000007e6201,
0x08870000007e6601,
0x08880000007e6801,
0x08890000007e6a01,
0x088a0000007e6c01,
0x088b0000007e6e01,
0x088c0000007e7001,
0x088d0000007e7201,
0x088e0000007e7401,
0x088f0000007e7601,
0x08900000007e7801,
0x08910000007e7a01,
0x08920000007e7c01,
0x08930000007e8001,
0x08940000007e8601,
0x08950000007e8801,
0x08960000007e8a01,
0x08970000007e8c01,
0x08980000007e8e01,
0x08990000007e9001,
0x089a0000007e9201,
0x089b0000007e9204,
0x089c0000007e9205,
0x089d0000007e9209,
0x089e0000007e9401,
0x089f000000803e04,
0x08a0000000803e05,
0x08a1000000803e09,
0x08a2000000804201,
0x08a3000000804401,
0x08a4000000804404,
0x08a5000000804405,
0x08a6000000804409,
0x08a7000000804801,
0x08a8000000804c01,
0x08a9000000805001,
0x08aa000000805201,
0x08ab000000805401,
0x08ac000000805801,
0x08ad000000805a01,
0x08ae000000805a04,
0x08af000000805a05,
0x08b0000000805a09,
0x08b1000000805c01,
0x08b2000000805e01,
0x08b3000000806201,
0x08b4000000806601,
0x08b5000000806801,
0x08b6000000806a01,
0x08b7000000806c01,
0x08b8000000806e01,
0x08b9000000807001,
0x08ba000000807201,
0x08bb000000807401,
0x08bc000000807601,
0x08bd000000807801,
0x08be000000807a01,
0x08bf000000807a04,
0x08c0000000807a05,
0x08c1000000807a09,
0x08c2000000807c01,
0x08c3000000807e01,
0x08c4000000808601,
0x08c5000000808801,
0x08c6000000808a01,
0x08c7000000808c01,
0x08c8000000808e01,
0x08c9000000808e04,
0x08ca000000808e05,
0x08cb000000808e09,
0x08cc000000809001,
0x08cd000000809201,
0x08ce000000809401,
0x08cf000000820404,
0x08d0000000820405,
0x08d1000000820409,
0x08d2000000820c04,
0x08d3000000820c05,
0x08d4000000820c09,
0x08d5000000820e04,
0x08d6000000820e05,
0x08d7000000820e09,
0x08d8000000821604,
0x08d9000000821605,
0x08da000000821609,
0x08db000000822404,
0x08dc000000822405,
0x08dd000000822409,
0x08de000000824601,
0x08df000000826001,
0x08e0000000826801,
0x08e1000000828401,
0x08e2000000828404,
0x08e3000000828405,
0x08e4000000828409,
0x08e5000000829001,
0x08e6000000829004,
0x08e7000000829005,
0x08e8000000829009,
0x08e9000000840c04,
0x08ea000000840c05,
0x08eb000000840c09,
0x08ec000000841004,
0x08ed000000841005,
0x08ee000000841009,
0x08ef000000842404,
0x08f0000000842405,
0x08f1000000842409,
0x08f2000000844601,
0x08f3000000844604,
0x08f4000000844605,
0x08f5000000844609,
0x08f6000000846001,
0x08f7000000846801,
0x08f8000000848201,
0x08f9000000848204,
0x08fa000000848205,
0x08fb000000848209,
0x08fc000000849001,
0x08fd000000861e04,
0x08fe000000861e05,
0x08ff000000861e09,
0x0900000000862604,
0x0901000000862605,
0x0902000000862609,
0x0903000000864201,
0x0904000000864401,
0x0905000000864604,
0x0906000000864605,
0x0907000000864609,
0x0908000000864801,
0x0909000000864c01,
0x090a000000865001,
0x090b000000865201,
0x090c000000865401,
0x090d000000865801,
0x090e000000865804,
0x090f000000865805,
0x0910000000865809,
0x0911000000865a01,
0x0912000000865c01,
0x0913000000865e01,
0x0914000000866004,
0x0915000000866005,
0x0916000000866009,
0x0917000000866201,
0x0918000000866601,
0x0919000000866801,
0x091a000000866804,
0x091b000000866805,
0x091c000000866809,
0x091d000000866a01,
0x091e000000866c01,
0x091f000000866e01,
0x0920000000867001,
0x0921000000867201,
0x0922000000867401,
0x0923000000867601,
0x0924000000867801,
0x0925000000867a01,
0x0926000000867c01,
0x0927000000867e01,
0x0928000000868001,
0x0929000000868801,
0x092a000000868a01,
0x092b000000868c01,
0x092c000000868e01,
0x092d000000869001,
0x092e000000869201,
0x092f000000869401,
0x0930000000882004,
0x0931000000882005,
0x0932000000882009,
0x0933000000882a04,
0x0934000000882a05,
0x0935000000882a09,
0x0936000000883c04,
0x0937000000883c05,
0x0938000000883c09,
0x0939000000884201,
0x093a000000884401,
0x093b000000884801,
0x093c000000884a01,
0x093d000000884a04,
0x093e000000884a05,
0x093f000000884a09,
0x0940000000884c01,
0x0941000000884e01,
0x0942000000885001,
0x0943000000885201,
0x0944000000885401,
0x0945000000885601,
0x0946000000885801,
0x0947000000885a01,
0x0948000000885c01,
0x0949000000885e01,
0x094a000000886201,
0x094b000000886401,
0x094c000000886601,
0x094d000000886801,
0x094e000000886a01,
0x094f000000886a04,
0x0950000000886a05,
0x0951000000886a09,
0x0952000000886c01,
0x0953000000886e01,
0x0954000000887001,
0x0955000000887201,
0x0956000000887401,
0x0957000000887601,
0x0958000000887801,
0x0959000000887a01,
0x095a000000887c01,
0x095b000000887c04,
0x095c000000887c05,
0x095d000000887c09,
0x095e000000887e01,
0x095f000000888001,
0x0960000000888601,
0x0961000000888a01,
0x0962000000888c01,
0x0963000000888e01,
0x0964000000889001,
0x0965000000889201,
0x0966000000889401,
0x09670000008a0a04,
0x09680000008a0a05,
0x09690000008a0a09,
0x096a0000008a0e04,
0x096b0000008a0e05,
0x096c0000008a0e09,
0x096d0000008a1604,
0x096e0000008a1605,
0x096f0000008a1609,
0x09700000008a1804,
0x09710000008a1805,
0x09720000008a1809,
0x09730000008a1c04,
0x09740000008a1c05,
0x09750000008a1c09,
0x09760000008a4201,
0x09770000008a4204,
0x09780000008a4205,
0x09790000008a4209,
0x097a0000008a4401,
0x097b0000008a4801,
0x097c0000008a4c01,
0x097d0000008a5001,
0x097e0000008a5201,
0x097f0000008a5401,
0x09800000008a5801,
0x09810000008a5a01,
0x09820000008a5c01,
0x09830000008a5e01,
0x09840000008a6201,
0x09850000008a6601,
0x09860000008a6801,
0x09870000008a6a01,
0x09880000008a6c01,
0x09890000008a6e01,
0x098a0000008a7001,
0x098b0000008a7201,
0x098c0000008a7401,
0x098d0000008a7601,
0x098e0000008a7801,
0x098f0000008a7a01,
0x09900000008a7c01,
0x09910000008a7e01,
0x09920000008a8001,
0x09930000008a8601,
0x09940000008a8801,
0x09950000008a8c01,
0x09960000008a8e01,
0x09970000008a8e04,
0x09980000008a8e05,
0x09990000008a8e09,
0x099a0000008a9001,
0x099b0000008a9201,
0x099c0000008a9401,
0x099d0000008c3004,
0x099e0000008c3005,
0x099f0000008c3009,
0x09a00000008c3e04,
0x09a10000008c3e05,
0x09a20000008c3e09,
0x09a30000008c4004,
0x09a40000008c4005,
0x09a50000008c4009,
0x09a60000008c4201,
0x09a70000008c4401,
0x09a80000008c4801,
0x09a90000008c4c01,
0x09aa0000008c5001,
0x09ab0000008c5004,
0x09ac0000008c5005,
0x09ad0000008c5009,
0x09ae0000008c5201,
0x09af0000008c5401,
0x09b00000008c5801,
0x09b10000008c5a01,
0x09b20000008c5c01,
0x09b30000008c5e01,
0x09b40000008c6201,
0x09b50000008c6601,
0x09b60000008c6801,
0x09b70000008c6a01,
0x09b80000008c6c01,
0x09b90000008c6e01,
0x09ba0000008c7001,
0x09bb0000008c7201,
0x09bc0000008c7401,
0x09bd0000008c7601,
0x09be0000008c7801,
0x09bf0000008c7a01,
0x09c00000008c7c01,
0x09c10000008c7e01,
0x09c20000008c8001,
0x09c30000008c8601,
0x09c40000008c8801,
0x09c50000008c8a01,
0x09c60000008c8e01,
0x09c70000008c9001,
0x09c80000008c9201,
0x09c90000008c9401,
0x09ca0000008e0a04,
0x09cb0000008e0a05,
0x09cc0000008e0a09,
0x09cd0000008e1c04,
0x09ce0000008e1c05,
0x09cf0000008e1c09,
0x09d00000008e4201,
0x09d10000008e4401,
0x09d20000008e4404,
0x09d30000008e4405,
0x09d40000008e4409,
0x09d50000008e4801,
0x09d60000008e4c01,
0x09d70000008e5001,
0x09d80000008e5201,
0x09d90000008e5401,
0x09da0000008e5404,
0x09db0000008e5405,
0x09dc0000008e5409,
0x09dd0000008e5801,
0x09de0000008e5a01,
0x09df0000008e5a04,
0x09e00000008e5a05,
0x09e10000008e5a09,
0x09e20000008e5c01,
0x09e30000008e5e01,
0x09e40000008e6201,
0x09e50000008e6601,
0x09e60000008e6801,
0x09e70000008e6a01,
0x09e80000008e6c01,
0x09e90000008e6e01,
0x09ea0000008e7001,
0x09eb0000008e7201,
0x09ec0000008e7401,
0x09ed0000008e7601,
0x09ee0000008e7801,
0x09ef0000008e7a01,
0x09f00000008e7c01,
0x09f10000008e7e01,
0x09f20000008e8001,
0x09f30000008e8004,
0x09f40000008e8005,
0x09f50000008e8009,
0x09f60000008e8601,
0x09f70000008e8801,
0x09f80000008e8a01,
0x09f90000008e8a04,
0x09fa0000008e8a05,
0x09fb0000008e8a09,
0x09fc0000008e8c01,
0x09fd0000008e9001,
0x09fe0000008e9201,
0x09ff0000008e9401,
0x0a00000000901604,
0x0a01000000901605,
0x0a02000000901609,
0x0a03000000901e05,
0x0a04000000902404,
0x0a05000000902405,
0x0a06000000902409,
0x0a07000000904201,
0x0a08000000904401,
0x0a09000000904601,
0x0a0a000000904801,
0x0a0b000000904c01,
0x0a0c000000905001,
0x0a0d000000905201,
0x0a0e000000905401,
0x0a0f000000905801,
0x0a10000000905a01,
0x0a11000000905c01,
0x0a12000000905e01,
0x0a13000000906001,
0x0a14000000906201,
0x0a15000000906601,
0x0a16000000906801,
0x0a17000000906804,
0x0a18000000906805,
0x0a19000000906809,
0x0a1a000000906a01,
0x0a1b000000906c01,
0x0a1c000000906e01,
0x0a1d000000906e04,
0x0a1e000000906e05,
0x0a1f000000906e09,
0x0a20000000907001,
0x0a21000000907201,
0x0a22000000907401,
0x0a23000000907601,
0x0a24000000907801,
0x0a25000000907a01,
0x0a26000000907c01,
0x0a27000000907e01,
0x0a28000000908001,
0x0a29000000908201,
0x0a2a000000908204,
0x0a2b000000908205,
0x0a2c000000908209,
0x0a2d000000908401,
0x0a2e000000908601,
0x0a2f000000908801,
0x0a30000000908a01,
0x0a31000000908c01,
0x0a32000000908e01,
0x0a33000000909201,
0x0a34000000909401,
0x0a35000000911e04,
0x0a36000000911e09,
0x0a37000000916804,
0x0a38000000916809,
0x0a39000000916e04,
0x0a3a000000916e09,
0x0a3b000000922c05,
0x0a3c000000923404,
0x0a3d000000923405,
0x0a3e000000923409,
0x0a3f000000924005,
0x0a40000000924201,
0x0a41000000924401,
0x0a42000000924801,
0x0a43000000924c01,
0x0a44000000924c04,
0x0a45000000924c05,
0x0a46000000924c09,
0x0a47000000925001,
0x0a48000000925201,
0x0a49000000925401,
0x0a4a000000925801,
0x0a4b000000925a01,
0x0a4c000000925c01,
0x0a4d000000925e01,
0x0a4e000000926201,
0x0a4f000000926601,
0x0a50000000926801,
0x0a51000000926a01,
0x0a52000000926c01,
0x0a53000000926e01,
0x0a54000000927001,
0x0a55000000927201,
0x0a56000000927401,
0x0a57000000927601,
0x0a58000000927801,
0x0a59000000927804,
0x0a5a000000927805,
0x0a5b000000927809,
0x0a5c000000927a01,
0x0a5d000000927c01,
0x0a5e000000927e01,
0x0a5f000000927e04,
0x0a60000000927e05,
0x0a61000000927e09,
0x0a62000000928001,
0x0a63000000928601,
0x0a64000000928801,
0x0a65000000928a01,
0x0a66000000928c01,
0x0a67000000928e01,
0x0a68000000929001,
0x0a69000000929401,
0x0a6a000000932c04,
0x0a6b000000932c09,
0x0a6c000000933404,
0x0a6d000000933409,
0x0a6e000000934004,
0x0a6f000000934009,
0x0a70000000937804,
0x0a71000000937809,
0x0a72000000937e04,
0x0a73000000937e09,
0x0a74000000941004,
0x0a75000000941005,
0x0a76000000941009,
0x0a77000000942204,
0x0a78000000942205,
0x0a79000000942209,
0x0a7a000000942a05,
0x0a7b000000944201,
0x0a7c000000944401,
0x0a7d000000944801,
0x0a7e000000944a01,
0x0a7f000000944a04,
0x0a80000000944a05,
0x0a81000000944a09,
0x0a82000000944c01,
0x0a83000000944e01,
0x0a84000000944e04,
0x0a85000000944e05,
0x0a86000000944e09,
0x0a87000000945001,
0x0a88000000945201,
0x0a89000000945401,
0x0a8a000000945601,
0x0a8b000000945801,
0x0a8c000000945a01,
0x0a8d000000945c01,
0x0a8e000000945e01,
0x0a8f000000946201,
0x0a90000000946401,
0x0a91000000946601,
0x0a92000000946801,
0x0a93000000946a01,
0x0a94000000946c01,
0x0a95000000946e01,
0x0a96000000947001,
0x0a97000000947201,
0x0a98000000947401,
0x0a99000000947601,
0x0a9a000000947801,
0x0a9b000000947a01,
0x0a9c000000947c01,
0x0a9d000000947c04,
0x0a9e000000947c05,
0x0a9f000000947c09,
0x0aa0000000947e01,
0x0aa1000000948001,
0x0aa2000000948601,
0x0aa3000000948801,
0x0aa4000000948a01,
0x0aa5000000948c01,
0x0aa6000000948e01,
0x0aa7000000949001,
0x0aa8000000949201,
0x0aa9000000952a04,
0x0aaa000000952a09,
0x0aab000000954a04,
0x0aac000000954a09,
0x0aad000000954e04,
0x0aae000000954e09,
0x0aaf000002061206,
0x0ab0000002066206,
0x0ab1000002067006,
0x0ab2000002067206,
0x0ab3000002120006,
0x0ab4000002120606,
0x0ab5000002120806,
0x0ab6000002120a06,
0x0ab7000002126406,
0x0ab8000002127206,
0x0ab9000002144c06,
0x0aba000002145206,
0x0abb000002146606,
0x0abc0000024c1406,
0x0abd0000024c3406,
0x0abe0000024c6606,
0x0abf0000024c7806,
0x0ac00000024c9206,
0x0ac1000002521406,
0x0ac2000002522806,
0x0ac3000002526206,
0x0ac4000002526606,
0x0ac5000002620606,
0x0ac6000002622806,
0x0ac7000002623806,
0x0ac8000002625206,
0x0ac9000002627006,
0x0aca000002782c06,
0x0acb000002784c06,
0x0acc000002785406,
0x0acd000002789206,
0x0ace000004000806,
0x0acf000004000a06,
0x0ad0000004001206,
0x0ad1000004001806,
0x0ad2000004080006,
0x0ad3000004081206,
0x0ad4000004081a06,
0x0ad5000004085606,
0x0ad6000004086406,
0x0ad70000040c1006,
0x0ad80000040c1a06,
0x0ad90000040c8206,
0x0ada0000040c8406,
0x0adb0000040e1606,
0x0adc0000040e1806,
0x0add0000040e8206,
0x0ade0000040e8a06,
0x0adf000004180006,
0x0ae0000004180a06,
0x0ae1000004180e06,
0x0ae2000004188a06,
0x0ae30000041a0806,
0x0ae40000041a0c06,
0x0ae50000041a1006,
0x0ae60000041a4e06,
0x0ae70000041a5606,
0x0ae8000004820c06,
0x0ae9000004820e06,
0x0aea000004821606,
0x0aeb000004822406,
0x0aec000004828406,
0x0aed000004829006,
0x0aee000006021206,
0x0aef000006021406,
0x0af0000006024c06,
0x0af1000006025206,
0x0af2000006026206,
0x0af3000006027806,
0x0af4000006120006,
0x0af5000006120206,
0x0af6000006120806,
0x0af7000006120a06,
0x0af8000006126406,
0x0af9000006127206,
0x0afa000006620206,
0x0afb000006622806,
0x0afc000006623806,
0x0afd000006625206,
0x0afe000006627006,
0x0aff000006702e06,
0x0b00000006703806,
0x0b01000006706206,
0x0b02000006707206,
0x0b03000006721206,
0x0b04000006722006,
0x0b05000006722e06,
0x0b06000006726406,
0x0b07000006726a06,
0x0b08000006727006,
0x0b09000008000406,
0x0b0a000008000a06,
0x0b0b000008001206,
0x0b0c000008001806,
0x0b0d000008040006,
0x0b0e000008040c06,
0x0b0f000008040e06,
0x0b10000008041806,
0x0b11000008041a06,
0x0b12000008048206,
0x0b13000008120006,
0x0b14000008120206,
0x0b15000008120606,
0x0b16000008120a06,
0x0b17000008126406,
0x0b18000008127206,
0x0b190000081a0406,
0x0b1a0000081a0c06,
0x0b1b0000081a1006,
0x0b1c0000081a4e06,
0x0b1d0000081a5606,
0x0b1e000008561a06,
0x0b1f000008562006,
0x0b20000008564e06,
0x0b21000008566406,
0x0b22000008641206,
0x0b23000008642006,
0x0b24000008645606,
0x0b25000008647206,
0x0b2600000a000406,
0x0b2700000a000806,
0x0b2800000a001206,
0x0b2900000a001806,
0x0b2a00000a120006,
0x0b2b00000a120206,
0x0b2c00000a120606,
0x0b2d00000a120806,
0x0b2e00000a126406,
0x0b2f00000a127206,
0x0b3000000a180006,
0x0b3100000a180406,
0x0b3200000a180e06,
0x0b3300000a188a06,
0x0b3400000a542c06,
0x0b3500000a545a06,
0x0b3600000a547806,
0x0b3700000a548e06,
0x0b3800000a8a0e06,
0x0b3900000a8a1606,
0x0b3a00000a8a1806,
0x0b3b00000a8a1c06,
0x0b3c00000a8a4206,
0x0b3d00000a8a8e06,
0x0b3e00000a8e1c06,
0x0b3f00000a8e4406,
0x0b4000000a8e5406,
0x0b4100000a8e5a06,
0x0b4200000a8e8006,
0x0b4300000a8e8a06,
0x0b4400000c040006,
0x0b4500000c040806,
0x0b4600000c040e06,
0x0b4700000c041806,
0x0b4800000c041a06,
0x0b4900000c048206,
0x0b4a00000c101a06,
0x0b4b00000c104e06,
0x0b4c00000c108406,
0x0b4d00000c109406,
0x0b4e00000c1a0406,
0x0b4f00000c1a0806,
0x0b5000000c1a1006,
0x0b5100000c1a4e06,
0x0b5200000c1a5606,
0x0b5300000c820406,
0x0b5400000c820e06,
0x0b5500000c821606,
0x0b5600000c822406,
0x0b5700000c828406,
0x0b5800000c829006,
0x0b5900000c841006,
0x0b5a00000c842406,
0x0b5b00000c844606,
0x0b5c00000c848206,
0x0b5d00000e040006,
0x0b5e00000e040806,
0x0b5f00000e040c06,
0x0b6000000e041806,
0x0b6100000e041a06,
0x0b6200000e048206,
0x0b6300000e164206,
0x0b6400000e166e06,
0x0b6500000e168206,
0x0b6600000e168a06,
0x0b6700000e169006,
0x0b6800000e180006,
0x0b6900000e180406,
0x0b6a00000e180a06,
0x0b6b00000e188a06,
0x0b6c00000e820406,
0x0b6d00000e820c06,
0x0b6e00000e821606,
0x0b6f00000e822406,
0x0b7000000e828406,
0x0b7100000e829006,
0x0b7200000e8a0a06,
0x0b7300000e8a1606,
0x0b7400000e8a1806,
0x0b7500000e8a1c06,
0x0b7600000e8a4206,
0x0b7700000e8a8e06,
0x0b780000100c0406,
0x0b790000100c1a06,
0x0b7a0000100c8206,
0x0b7b0000100c8406,
0x0b7c0000101a0406,
0x0b7d0000101a0806,
0x0b7e0000101a0c06,
0x0b7f0000101a4e06,
0x0b800000101a5606,
0x0b810000104e1a06,
0x0b820000104e2006,
0x0b830000104e2a06,
0x0b840000104e5606,
0x0b850000104e9406,
0x0b86000010840c06,
0x0b87000010842406,
0x0b88000010844606,
0x0b89000010848206,
0x0b8a000010942206,
0x0b8b000010942a06,
0x0b8c000010944a06,
0x0b8d000010944e06,
0x0b8e000010947c06,
0x0b8f000012000406,
0x0b90000012000806,
0x0b91000012000a06,
0x0b92000012001806,
0x0b93000012020606,
0x0b94000012021406,
0x0b95000012024c06,
0x0b96000012025206,
0x0b97000012026206,
0x0b98000012027806,
0x0b99000012060206,
0x0b9a000012066206,
0x0b9b000012067006,
0x0b9c000012067206,
0x0b9d000012080006,
0x0b9e000012080406,
0x0b9f000012081a06,
0x0ba0000012085606,
0x0ba1000012086406,
0x0ba20000120a0006,
0x0ba30000120a1806,
0x0ba40000120a5406,
0x0ba50000120a8a06,
0x0ba60000120a8e06,
0x0ba7000012640806,
0x0ba8000012642006,
0x0ba9000012645606,
0x0baa000012647206,
0x0bab000012720606,
0x0bac000012722006,
0x0bad000012722e06,
0x0bae000012726406,
0x0baf000012726a06,
0x0bb0000012727006,
0x0bb1000014020606,
0x0bb2000014021206,
0x0bb3000014024c06,
0x0bb4000014025206,
0x0bb5000014026206,
0x0bb6000014027806,
0x0bb70000144c0206,
0x0bb80000144c3406,
0x0bb90000144c6606,
0x0bba0000144c7806,
0x0bbb0000144c9206,
0x0bbc000014520206,
0x0bbd000014522806,
0x0bbe000014526206,
0x0bbf000014526606,
0x0bc0000014662806,
0x0bc1000014663406,
0x0bc2000014664c06,
0x0bc3000014665206,
0x0bc40000160e0406,
0x0bc50000160e1806,
0x0bc60000160e8206,
0x0bc70000160e8a06,
0x0bc8000016421c06,
0x0bc9000016423006,
0x0bca000016426e06,
0x0bcb000016428a06,
0x0bcc0000166e1e06,
0x0bcd0000166e3006,
0x0bce0000166e4206,
0x0bcf0000166e9006,
0x0bd0000016820406,
0x0bd1000016820c06,
0x0bd2000016820e06,
0x0bd3000016822406,
0x0bd4000016828406,
0x0bd5000016829006,
0x0bd60000168a0a06,
0x0bd70000168a0e06,
0x0bd80000168a1806,
0x0bd90000168a1c06,
0x0bda0000168a4206,
0x0bdb0000168a8e06,
0x0bdc000016901e06,
0x0bdd000016902406,
0x0bde000016906806,
0x0bdf000016906e06,
0x0be0000016908206,
0x0be1000018000406,
0x0be2000018000806,
0x0be3000018000a06,
0x0be4000018001206,
0x0be5000018040006,
0x0be6000018040806,
0x0be7000018040c06,
0x0be8000018040e06,
0x0be9000018041a06,
0x0bea000018048206,
0x0beb0000180a0006,
0x0bec0000180a1206,
0x0bed0000180a5406,
0x0bee0000180a8a06,
0x0bef0000180a8e06,
0x0bf00000180e0406,
0x0bf10000180e1606,
0x0bf20000180e8206,
0x0bf30000180e8a06,
0x0bf40000188a0a06,
0x0bf50000188a0e06,
0x0bf60000188a1606,
0x0bf70000188a1c06,
0x0bf80000188a4206,
0x0bf90000188a8e06,
0x0bfa00001a040006,
0x0bfb00001a040806,
0x0bfc00001a040c06,
0x0bfd00001a040e06,
0x0bfe00001a041806,
0x0bff00001a048206,
0x0c0000001a080006,
0x0c0100001a080406,
0x0c0200001a081206,
0x0c0300001a085606,
0x0c0400001a086406,
0x0c0500001a0c0406,
0x0c0600001a0c1006,
0x0c0700001a0c8206,
0x0c0800001a0c8406,
0x0c0900001a100c06,
0x0c0a00001a104e06,
0x0c0b00001a108406,
0x0c0c00001a109406,
0x0c0d00001a4e1006,
0x0c0e00001a4e2006,
0x0c0f00001a4e2a06,
0x0c1000001a4e5606,
0x0c1100001a4e9406,
0x0c1200001a560806,
0x0c1300001a562006,
0x0c1400001a564e06,
0x0c1500001a566406,
0x0c1600001c301e06,
0x0c1700001c302606,
0x0c1800001c303e06,
0x0c1900001c304206,
0x0c1a00001c304406,
0x0c1b00001c306e06,
0x0c1c00001c307a06,
0x0c1d00001c308c06,
0x0c1e00001c421606,
0x0c1f00001c423006,
0x0c2000001c426e06,
0x0c2100001c428a06,
0x0c2200001c443006,
0x0c2300001c447a06,
0x0c2400001c448006,
0x0c2500001c448e06,
0x0c2600001c8a0a06,
0x0c2700001c8a0e06,
0x0c2800001c8a1606,
0x0c2900001c8a1806,
0x0c2a00001c8a4206,
0x0c2b00001c8a8e06,
0x0c2c00001c8e0a06,
0x0c2d00001c8e4406,
0x0c2e00001c8e5406,
0x0c2f00001c8e5a06,
0x0c3000001c8e8006,
0x0c3100001c8e8a06,
0x0c3200001e263006,
0x0c3300001e265806,
0x0c3400001e268606,
0x0c3500001e301c06,
0x0c3600001e302606,
0x0c3700001e303e06,
0x0c3800001e304206,
0x0c3900001e304406,
0x0c3a00001e306e06,
0x0c3b00001e307a06,
0x0c3c00001e308c06,
0x0c3d00001e682406,
0x0c3e00001e686006,
0x0c3f00001e688606,
0x0c4000001e689006,
0x0c4100001e6e1606,
0x0c4200001e6e3006,
0x0c4300001e6e4206,
0x0c4400001e6e9006,
0x0c4500001e862606,
0x0c4600001e864606,
0x0c4700001e865806,
0x0c4800001e866006,
0x0c4900001e866806,
0x0c4a00001e901606,
0x0c4b00001e902406,
0x0c4c00001e906806,
0x0c4d00001e906e06,
0x0c4e00001e908206,
0x0c4f0000202a4a06,
0x0c500000202a4e06,
0x0c510000202a8806,
0x0c520000202a9406,
0x0c530000204e1006,
0x0c540000204e1a06,
0x0c550000204e2a06,
0x0c560000204e5606,
0x0c570000204e9406,
0x0c58000020560806,
0x0c59000020561a06,
0x0c5a000020564e06,
0x0c5b000020566406,
0x0c5c000020640806,
0x0c5d000020641206,
0x0c5e000020645606,
0x0c5f000020647206,
0x0c600000206a2e06,
0x0c610000206a3806,
0x0c620000206a3c06,
0x0c630000206a7206,
0x0c640000206a8806,
0x0c65000020720606,
0x0c66000020721206,
0x0c67000020722e06,
0x0c68000020726406,
0x0c69000020726a06,
0x0c6a000020727006,
0x0c6b000020882a06,
0x0c6c000020883c06,
0x0c6d000020884a06,
0x0c6e000020886a06,
0x0c6f000020887c06,
0x0c700000223a3606,
0x0c710000223a3806,
0x0c720000223a4806,
0x0c730000223a6c06,
0x0c740000223a7c06,
0x0c750000227c3806,
0x0c760000227c3a06,
0x0c770000227c3c06,
0x0c780000227c4a06,
0x0c790000227c8806,
0x0c7a0000227c9406,
0x0c7b000022941006,
0x0c7c000022942a06,
0x0c7d000022944a06,
0x0c7e000022944e06,
0x0c7f000022947c06,
0x0c80000024465806,
0x0c81000024466006,
0x0c82000024468406,
0x0c83000024468606,
0x0c84000024604606,
0x0c85000024606806,
0x0c86000024608606,
0x0c87000024681e06,
0x0c88000024686006,
0x0c89000024688606,
0x0c8a000024689006,
0x0c8b000024820406,
0x0c8c000024820c06,
0x0c8d000024820e06,
0x0c8e000024821606,
0x0c8f000024828406,
0x0c90000024829006,
0x0c91000024840c06,
0x0c92000024841006,
0x0c93000024844606,
0x0c94000024848206,
0x0c95000024901606,
0x0c96000024901e06,
0x0c97000024906806,
0x0c98000024906e06,
0x0c99000024908206,
0x0c9a0000261e3006,
0x0c9b0000261e6806,
0x0c9c0000261e6e06,
0x0c9d0000261e8606,
0x0c9e0000261e9006,
0x0c9f000026301c06,
0x0ca0000026301e06,
0x0ca1000026303e06,
0x0ca2000026304206,
0x0ca3000026304406,
0x0ca4000026306e06,
0x0ca5000026307a06,
0x0ca6000026308c06,
0x0ca7000026584606,
0x0ca8000026588606,
0x0ca9000026861e06,
0x0caa000026864606,
0x0cab000026865806,
0x0cac000026866006,
0x0cad000026866806,
0x0cae000028323406,
0x0caf000028323606,
0x0cb0000028325c06,
0x0cb1000028327606,
0x0cb2000028343206,
0x0cb3000028343606,
0x0cb4000028344006,
0x0cb5000028344c06,
0x0cb6000028345006,
0x0cb7000028346606,
0x0cb8000028347e06,
0x0cb9000028349206,
0x0cba000028382e06,
0x0cbb000028383a06,
0x0cbc000028383c06,
0x0cbd000028385e06,
0x0cbe000028386206,
0x0cbf000028386a06,
0x0cc0000028386c06,
0x0cc1000028387006,
0x0cc2000028387406,
0x0cc3000028387c06,
0x0cc4000028520206,
0x0cc5000028521406,
0x0cc6000028526206,
0x0cc7000028526606,
0x0cc80000285c3206,
0x0cc90000285c5e06,
0x0cca0000285c7406,
0x0ccb0000285c7606,
0x0ccc000028620206,
0x0ccd000028620606,
0x0cce000028623806,
0x0ccf000028625206,
0x0cd0000028627006,
0x0cd1000028661406,
0x0cd2000028663406,
0x0cd3000028664c06,
0x0cd4000028665206,
0x0cd5000028743806,
0x0cd6000028745c06,
0x0cd7000028745e06,
0x0cd800002a204e06,
0x0cd900002a205606,
0x0cda00002a206406,
0x0cdb00002a206a06,
0x0cdc00002a207206,
0x0cdd00002a208806,
0x0cde00002a4a7c06,
0x0cdf00002a4a8806,
0x0ce000002a4a9406,
0x0ce100002a4e1006,
0x0ce200002a4e1a06,
0x0ce300002a4e2006,
0x0ce400002a4e5606,
0x0ce500002a4e9406,
0x0ce600002a882006,
0x0ce700002a883c06,
0x0ce800002a884a06,
0x0ce900002a886a06,
0x0cea00002a887c06,
0x0ceb00002a941006,
0x0cec00002a942206,
0x0ced00002a944a06,
0x0cee00002a944e06,
0x0cef00002a947c06,
0x0cf000002c3e3006,
0x0cf100002c3e4006,
0x0cf200002c3e5a06,
0x0cf300002c3e7a06,
0x0cf400002c3e8006,
0x0cf500002c3e8c06,
0x0cf600002c403406,
0x0cf700002c403e06,
0x0cf800002c405006,
0x0cf900002c408c06,
0x0cfa00002c409206,
0x0cfb00002c540a06,
0x0cfc00002c545a06,
0x0cfd00002c547806,
0x0cfe00002c548e06,
0x0cff00002c5a3e06,
0x0d0000002c5a5406,
0x0d0100002c5a8006,
0x0d0200002c5a8e06,
0x0d0300002c780206,
0x0d0400002c784c06,
0x0d0500002c785406,
0x0d0600002c789206,
0x0d0700002c923406,
0x0d0800002c924006,
0x0d0900002c924c06,
0x0d0a00002c927806,
0x0d0b00002c927e06,
0x0d0c00002e382806,
0x0d0d00002e383a06,
0x0d0e00002e383c06,
0x0d0f00002e385e06,
0x0d1000002e386206,
0x0d1100002e386a06,
0x0d1200002e386c06,
0x0d1300002e387006,
0x0d1400002e387406,
0x0d1500002e387c06,
0x0d1600002e6a2006,
0x0d1700002e6a3806,
0x0d1800002e6a3c06,
0x0d1900002e6a7206,
0x0d1a00002e6a8806,
0x0d1b00002e700606,
0x0d1c00002e703806,
0x0d1d00002e706206,
0x0d1e00002e707206,
0x0d1f00002e720606,
0x0d2000002e721206,
0x0d2100002e722006,
0x0d2200002e726406,
0x0d2300002e726a06,
0x0d2400002e727006,
0x0d250000301c4206,
0x0d260000301c4406,
0x0d270000301c8a06,
0x0d280000301c8e06,
0x0d290000301e2606,
0x0d2a0000301e6806,
0x0d2b0000301e6e06,
0x0d2c0000301e8606,
0x0d2d0000301e9006,
0x0d2e000030261e06,
0x0d2f000030265806,
0x0d30000030268606,
0x0d310000303e2c06,
0x0d320000303e4006,
0x0d330000303e5a06,
0x0d340000303e7a06,
0x0d350000303e8006,
0x0d360000303e8c06,
0x0d37000030421606,
0x0d38000030421c06,
0x0d39000030426e06,
0x0d3a000030428a06,
0x0d3b000030441c06,
0x0d3c000030447a06,
0x0d3d000030448006,
0x0d3e000030448e06,
0x0d3f0000306e1606,
0x0d400000306e1e06,
0x0d410000306e4206,
0x0d420000306e9006,
0x0d430000307a3e06,
0x0d440000307a4406,
0x0d450000307a8006,
0x0d460000308c3e06,
0x0d470000308c4006,
0x0d480000308c5006,
0x0d49000032283406,
0x0d4a000032283806,
0x0d4b000032285206,
0x0d4c000032285c06,
0x0d4d000032286206,
0x0d4e000032286606,
0x0d4f000032287406,
0x0d50000032342806,
0x0d51000032343606,
0x0d52000032344006,
0x0d53000032344c06,
0x0d54000032345006,
0x0d55000032346606,
0x0d56000032347e06,
0x0d57000032349206,
0x0d58000032363406,
0x0d59000032363a06,
0x0d5a000032364806,
0x0d5b000032367606,
0x0d5c0000325c2806,
0x0d5d0000325c5e06,
0x0d5e0000325c7406,
0x0d5f0000325c7606,
0x0d60000032763606,
0x0d61000032764806,
0x0d62000032765c06,
0x0d63000032765e06,
0x0d64000032766c06,
0x0d65000034283206,
0x0d66000034283806,
0x0d67000034285206,
0x0d68000034285c06,
0x0d69000034286206,
0x0d6a000034286606,
0x0d6b000034287406,
0x0d6c000034322806,
0x0d6d000034323606,
0x0d6e000034325c06,
0x0d6f000034327606,
0x0d70000034363206,
0x0d71000034363a06,
0x0d72000034364806,
0x0d73000034367606,
0x0d74000034402c06,
0x0d75000034403e06,
0x0d76000034405006,
0x0d77000034408c06,
0x0d78000034409206,
0x0d790000344c0206,
0x0d7a0000344c1406,
0x0d7b0000344c6606,
0x0d7c0000344c7806,
0x0d7d0000344c9206,
0x0d7e000034504006,
0x0d7f000034508c06,
0x0d80000034661406,
0x0d81000034662806,
0x0d82000034664c06,
0x0d83000034665206,
0x0d840000347e9206,
0x0d85000034922c06,
0x0d86000034924006,
0x0d87000034924c06,
0x0d88000034927806,
0x0d89000034927e06,
0x0d8a000036322806,
0x0d8b000036323406,
0x0d8c000036325c06,
0x0d8d000036327606,
0x0d8e000036342806,
0x0d8f000036343206,
0x0d90000036344006,
0x0d91000036344c06,
0x0d92000036345006,
0x0d93000036346606,
0x0d94000036347e06,
0x0d95000036349206,
0x0d960000363a2206,
0x0d970000363a3806,
0x0d980000363a4806,
0x0d990000363a6c06,
0x0d9a0000363a7c06,
0x0d9b000036483a06,
0x0d9c000036486c06,
0x0d9d000036487606,
0x0d9e000036763206,
0x0d9f000036764806,
0x0da0000036765c06,
0x0da1000036765e06,
0x0da2000036766c06,
0x0da3000038283206,
0x0da4000038283406,
0x0da5000038285206,
0x0da6000038285c06,
0x0da7000038286206,
0x0da8000038286606,
0x0da9000038287406,
0x0daa0000382e6a06,
0x0dab0000382e7006,
0x0dac0000382e7206,
0x0dad0000383a2206,
0x0dae0000383a3606,
0x0daf0000383a4806,
0x0db00000383a6c06,
0x0db10000383a7c06,
0x0db20000383c6a06,
0x0db30000383c7c06,
0x0db40000383c8806,
0x0db50000385e5c06,
0x0db60000385e6c06,
0x0db70000385e7406,
0x0db80000385e7606,
0x0db9000038620206,
0x0dba000038620606,
0x0dbb000038622806,
0x0dbc000038625206,
0x0dbd000038627006,
0x0dbe0000386a2006,
0x0dbf0000386a2e06,
0x0dc00000386a3c06,
0x0dc10000386a7206,
0x0dc20000386a8806,
0x0dc30000386c3a06,
0x0dc40000386c4806,
0x0dc50000386c5e06,
0x0dc60000386c7606,
0x0dc7000038700606,
0x0dc8000038702e06,
0x0dc9000038706206,
0x0dca000038707206,
0x0dcb000038742806,
0x0dcc000038745c06,
0x0dcd000038745e06,
0x0dce0000387c2206,
0x0dcf0000387c3a06,
0x0dd00000387c3c06,
0x0dd10000387c4a06,
0x0dd20000387c8806,
0x0dd30000387c9406,
0x0dd400003a227c06,
0x0dd500003a229406,
0x0dd600003a363206,
0x0dd700003a363406,
0x0dd800003a364806,
0x0dd900003a367606,
0x0dda00003a382806,
0x0ddb00003a382e06,
0x0ddc00003a383c06,
0x0ddd00003a385e06,
0x0dde00003a386206,
0x0ddf00003a386a06,
0x0de000003a386c06,
0x0de100003a387006,
0x0de200003a387406,
0x0de300003a387c06,
0x0de400003a483606,
0x0de500003a486c06,
0x0de600003a487606,
0x0de700003a6c3806,
0x0de800003a6c4806,
0x0de900003a6c5e06,
0x0dea00003a6c7606,
0x0deb00003a7c2206,
0x0dec00003a7c3806,
0x0ded00003a7c3c06,
0x0dee00003a7c4a06,
0x0def00003a7c8806,
0x0df000003a7c9406,
0x0df100003c382806,
0x0df200003c382e06,
0x0df300003c383a06,
0x0df400003c385e06,
0x0df500003c386206,
0x0df600003c386a06,
0x0df700003c386c06,
0x0df800003c387006,
0x0df900003c387406,
0x0dfa00003c387c06,
0x0dfb00003c6a2006,
0x0dfc00003c6a2e06,
0x0dfd00003c6a3806,
0x0dfe00003c6a7206,
0x0dff00003c6a8806,
0x0e0000003c7c2206,
0x0e0100003c7c3806,
0x0e0200003c7c3a06,
0x0e0300003c7c4a06,
0x0e0400003c7c8806,
0x0e0500003c7c9406,
0x0e0600003c882006,
0x0e0700003c882a06,
0x0e0800003c884a06,
0x0e0900003c886a06,
0x0e0a00003c887c06,
0x0e0b00003e2c4006,
0x0e0c00003e2c5406,
0x0e0d00003e2c5a06,
0x0e0e00003e2c7806,
0x0e0f00003e2c9206,
0x0e1000003e301c06,
0x0e1100003e301e06,
0x0e1200003e302606,
0x0e1300003e304206,
0x0e1400003e304406,
0x0e1500003e306e06,
0x0e1600003e307a06,
0x0e1700003e308c06,
0x0e1800003e402c06,
0x0e1900003e403406,
0x0e1a00003e405006,
0x0e1b00003e408c06,
0x0e1c00003e409206,
0x0e1d00003e5a2c06,
0x0e1e00003e5a5406,
0x0e1f00003e5a8006,
0x0e2000003e5a8e06,
0x0e2100003e7a3006,
0x0e2200003e7a4406,
0x0e2300003e7a8006,
0x0e2400003e804406,
0x0e2500003e805a06,
0x0e2600003e807a06,
0x0e2700003e808e06,
0x0e2800003e8c3006,
0x0e2900003e8c4006,
0x0e2a00003e8c5006,
0x0e2b0000402c3e06,
0x0e2c0000402c5406,
0x0e2d0000402c5a06,
0x0e2e0000402c7806,
0x0e2f0000402c9206,
0x0e30000040342806,
0x0e31000040343206,
0x0e32000040343606,
0x0e33000040344c06,
0x0e34000040345006,
0x0e35000040346606,
0x0e36000040347e06,
0x0e37000040349206,
0x0e380000403e2c06,
0x0e390000403e3006,
0x0e3a0000403e5a06,
0x0e3b0000403e7a06,
0x0e3c0000403e8006,
0x0e3d0000403e8c06,
0x0e3e000040503406,
0x0e3f000040508c06,
0x0e400000408c3006,
0x0e410000408c3e06,
0x0e420000408c5006,
0x0e43000040922c06,
0x0e44000040923406,
0x0e45000040924c06,
0x0e46000040927806,
0x0e47000040927e06,
0x0e48000042160e06,
0x0e49000042166e06,
0x0e4a000042168206,
0x0e4b000042168a06,
0x0e4c000042169006,
0x0e4d0000421c3006,
0x0e4e0000421c4406,
0x0e4f0000421c8a06,
0x0e500000421c8e06,
0x0e51000042301c06,
0x0e52000042301e06,
0x0e53000042302606,
0x0e54000042303e06,
0x0e55000042304406,
0x0e56000042306e06,
0x0e57000042307a06,
0x0e58000042308c06,
0x0e59000042441c02,
0x0e5a000042441c06,
0x0e5b000042443002,
0x0e5c000042443006,
0x0e5d000042447a06,
0x0e5e000042448006,
0x0e5f000042448e06,
0x0e60000042481c02,
0x0e61000042482802,
0x0e62000042482c02,
0x0e63000042483002,
0x0e64000042483202,
0x0e65000042483402,
0x0e66000042483602,
0x0e67000042483606,
0x0e68000042483802,
0x0e69000042483a02,
0x0e6a000042483a06,
0x0e6b000042483e02,
0x0e6c000042484002,
0x0e6d000042486c06,
0x0e6e000042487606,
0x0e6f0000424c0206,
0x0e700000424c1406,
0x0e710000424c1c02,
0x0e720000424c2c02,
0x0e730000424c3002,
0x0e740000424c3402,
0x0e750000424c3e02,
0x0e760000424c4002,
0x0e770000424c6606,
0x0e780000424c7806,
0x0e790000424c9206,
0x0e7a000042501c02,
0x0e7b000042502c02,
0x0e7c000042503002,
0x0e7d000042503402,
0x0e7e000042503406,
0x0e7f000042503e02,
0x0e80000042504002,
0x0e81000042508c06,
0x0e82000042520206,
0x0e83000042521406,
0x0e84000042521c02,
0x0e85000042522802,
0x0e86000042522c02,
0x0e87000042523002,
0x0e88000042523202,
0x0e89000042523402,
0x0e8a000042523602,
0x0e8b000042523802,
0x0e8c000042523a02,
0x0e8d000042523e02,
0x0e8e000042524002,
0x0e8f000042526206,
0x0e90000042526606,
0x0e91000042540a06,
0x0e92000042541c02,
0x0e93000042542c02,
0x0e94000042543002,
0x0e95000042543e02,
0x0e96000042544002,
0x0e97000042545a06,
0x0e98000042547806,
0x0e99000042548e06,
0x0e9a000042581c02,
0x0e9b000042581e02,
0x0e9c000042582602,
0x0e9d000042583002,
0x0e9e000042584606,
0x0e9f000042588606,
0x0ea00000425a1c02,
0x0ea10000425a2c02,
0x0ea20000425a2c06,
0x0ea30000425a3002,
0x0ea40000425a3e02,
0x0ea50000425a4002,
0x0ea60000425a5406,
0x0ea70000425a8006,
0x0ea80000425a8e06,
0x0ea90000425c1c02,
0x0eaa0000425c2802,
0x0eab0000425c2806,
0x0eac0000425c2c02,
0x0ead0000425c3002,
0x0eae0000425c3202,
0x0eaf0000425c3206,
0x0eb00000425c3402,
0x0eb10000425c3602,
0x0eb20000425c3802,
0x0eb30000425c3a02,
0x0eb40000425c3e02,
0x0eb50000425c4002,
0x0eb60000425c5e06,
0x0eb70000425c7406,
0x0eb80000425c7606,
0x0eb90000425e1c02,
0x0eba0000425e2802,
0x0ebb0000425e2c02,
0x0ebc0000425e3002,
0x0ebd0000425e3202,
0x0ebe0000425e3402,
0x0ebf0000425e3602,
0x0ec00000425e3802,
0x0ec10000425e3a02,
0x0ec20000425e3e02,
0x0ec30000425e4002,
0x0ec40000425e5c06,
0x0ec50000425e6c06,
0x0ec60000425e7406,
0x0ec70000425e7606,
0x0ec8000042620206,
0x0ec9000042620606,
0x0eca000042621c02,
0x0ecb000042622802,
0x0ecc000042622806,
0x0ecd000042622c02,
0x0ece000042623002,
0x0ecf000042623202,
0x0ed0000042623402,
0x0ed1000042623602,
0x0ed2000042623802,
0x0ed3000042623806,
0x0ed4000042623a02,
0x0ed5000042623e02,
0x0ed6000042624002,
0x0ed7000042625206,
0x0ed8000042627006,
0x0ed9000042661406,
0x0eda000042661c02,
0x0edb000042662802,
0x0edc000042662806,
0x0edd000042662c02,
0x0ede000042663002,
0x0edf000042663202,
0x0ee0000042663402,
0x0ee1000042663602,
0x0ee2000042663802,
0x0ee3000042663a02,
0x0ee4000042663e02,
0x0ee5000042664002,
0x0ee6000042664c06,
0x0ee7000042665206,
0x0ee8000042681c02,
0x0ee9000042681e02,
0x0eea000042682406,
0x0eeb000042682602,
0x0eec000042683002,
0x0eed000042686006,
0x0eee000042688606,
0x0eef000042689006,
0x0ef00000426a1c02,
0x0ef10000426a2006,
0x0ef20000426a2802,
0x0ef30000426a2c02,
0x0ef40000426a2e02,
0x0ef50000426a2e06,
0x0ef60000426a3002,
0x0ef70000426a3202,
0x0ef80000426a3402,
0x0ef90000426a3602,
0x0efa0000426a3802,
0x0efb0000426a3a02,
0x0efc0000426a3c02,
0x0efd0000426a3c06,
0x0efe0000426a3e02,
0x0eff0000426a4002,
0x0f000000426a7206,
0x0f010000426a8806,
0x0f020000426c1c02,
0x0f030000426c2802,
0x0f040000426c2c02,
0x0f050000426c3002,
0x0f060000426c3202,
0x0f070000426c3402,
0x0f080000426c3602,
0x0f090000426c3802,
0x0f0a0000426c3806,
0x0f0b0000426c3a02,
0x0f0c0000426c3a06,
0x0f0d0000426c3e02,
0x0f0e0000426c4002,
0x0f0f0000426c4806,
0x0f100000426c5e06,
0x0f110000426c7606,
0x0f120000426e1606,
0x0f130000426e1c02,
0x0f140000426e1e02,
0x0f150000426e1e06,
0x0f160000426e2602,
0x0f170000426e3002,
0x0f180000426e3006,
0x0f190000426e9006,
0x0f1a000042700606,
0x0f1b000042701c02,
0x0f1c000042702802,
0x0f1d000042702c02,
0x0f1e000042702e02,
0x0f1f000042702e06,
0x0f20000042703002,
0x0f21000042703202,
0x0f22000042703402,
0x0f23000042703602,
0x0f24000042703802,
0x0f25000042703a02,
0x0f26000042703e02,
0x0f27000042704002,
0x0f28000042706206,
0x0f29000042707206,
0x0f2a000042720606,
0x0f2b000042721206,
0x0f2c000042721c02,
0x0f2d000042722006,
0x0f2e000042722802,
0x0f2f000042722c02,
0x0f30000042722e02,
0x0f31000042723002,
0x0f32000042723202,
0x0f33000042723402,
0x0f34000042723602,
0x0f35000042723802,
0x0f36000042723a02,
0x0f37000042723e02,
0x0f38000042724002,
0x0f39000042726406,
0x0f3a000042726a06,
0x0f3b000042727006,
0x0f3c000042741c02,
0x0f3d000042742802,
0x0f3e000042742806,
0x0f3f000042742c02,
0x0f40000042743002,
0x0f41000042743202,
0x0f42000042743402,
0x0f43000042743602,
0x0f44000042743802,
0x0f45000042743806,
0x0f46000042743a02,
0x0f47000042743e02,
0x0f48000042744002,
0x0f49000042745c06,
0x0f4a000042745e06,
0x0f4b000042761c02,
0x0f4c000042762802,
0x0f4d000042762c02,
0x0f4e000042763002,
0x0f4f000042763202,
0x0f50000042763206,
0x0f51000042763402,
0x0f52000042763602,
0x0f53000042763606,
0x0f54000042763802,
0x0f55000042763a02,
0x0f56000042763e02,
0x0f57000042764002,
0x0f58000042764806,
0x0f59000042765c06,
0x0f5a000042765e06,
0x0f5b000042766c06,
0x0f5c000042780206,
0x0f5d000042781c02,
0x0f5e000042782c02,
0x0f5f000042783002,
0x0f60000042783e02,
0x0f61000042784002,
0x0f62000042784c06,
0x0f63000042785406,
0x0f64000042789206,
0x0f650000427a1c02,
0x0f660000427a3002,
0x0f670000427a3e02,
0x0f680000427a3e06,
0x0f690000427a4406,
0x0f6a0000427a8006,
0x0f6b0000427c1c02,
0x0f6c0000427c2202,
0x0f6d0000427c2206,
0x0f6e0000427c2802,
0x0f6f0000427c2c02,
0x0f700000427c3002,
0x0f710000427c3202,
0x0f720000427c3402,
0x0f730000427c3602,
0x0f740000427c3802,
0x0f750000427c3806,
0x0f760000427c3a02,
0x0f770000427c3a06,
0x0f780000427c3c02,
0x0f790000427c3c06,
0x0f7a0000427c3e02,
0x0f7b0000427c4002,
0x0f7c0000427c4a06,
0x0f7d0000427c8806,
0x0f7e0000427c9406,
0x0f7f0000427e1c02,
0x0f800000427e2c02,
0x0f810000427e3002,
0x0f820000427e3402,
0x0f830000427e3e02,
0x0f840000427e4002,
0x0f850000427e9206,
0x0f86000042801c02,
0x0f87000042803002,
0x0f88000042803e02,
0x0f89000042804406,
0x0f8a000042805a06,
0x0f8b000042807a06,
0x0f8c000042808e06,
0x0f8d000042861c02,
0x0f8e000042861e02,
0x0f8f000042861e06,
0x0f90000042862602,
0x0f91000042862606,
0x0f92000042863002,
0x0f93000042864606,
0x0f94000042865806,
0x0f95000042866006,
0x0f96000042866806,
0x0f97000042881c02,
0x0f98000042882006,
0x0f99000042882802,
0x0f9a000042882a06,
0x0f9b000042882c02,
0x0f9c000042883002,
0x0f9d000042883202,
0x0f9e000042883402,
0x0f9f000042883602,
0x0fa0000042883802,
0x0fa1000042883a02,
0x0fa2000042883c02,
0x0fa3000042883e02,
0x0fa4000042884002,
0x0fa5000042884a06,
0x0fa6000042886a06,
0x0fa7000042887c06,
0x0fa80000428a0a06,
0x0fa90000428a0e06,
0x0faa0000428a1606,
0x0fab0000428a1806,
0x0fac0000428a1c02,
0x0fad0000428a1c06,
0x0fae0000428a3002,
0x0faf0000428a8e06,
0x0fb00000428c1c02,
0x0fb10000428c2c02,
0x0fb20000428c3002,
0x0fb30000428c3e02,
0x0fb40000428c3e06,
0x0fb50000428c4002,
0x0fb60000428c4006,
0x0fb70000428c5006,
0x0fb80000428e0a06,
0x0fb90000428e1c02,
0x0fba0000428e3002,
0x0fbb0000428e4406,
0x0fbc0000428e5406,
0x0fbd0000428e5a06,
0x0fbe0000428e8006,
0x0fbf0000428e8a06,
0x0fc0000042901606,
0x0fc1000042901c02,
0x0fc2000042901e02,
0x0fc3000042902406,
0x0fc4000042902602,
0x0fc5000042903002,
0x0fc6000042906806,
0x0fc7000042906e06,
0x0fc8000042908206,
0x0fc9000042921c02,
0x0fca000042922c02,
0x0fcb000042922c06,
0x0fcc000042923002,
0x0fcd000042923402,
0x0fce000042923406,
0x0fcf000042923e02,
0x0fd0000042924002,
0x0fd1000042924006,
0x0fd2000042924c06,
0x0fd3000042927806,
0x0fd4000042927e06,
0x0fd5000042941006,
0x0fd6000042941c02,
0x0fd7000042942202,
0x0fd8000042942802,
0x0fd9000042942a06,
0x0fda000042942c02,
0x0fdb000042943002,
0x0fdc000042943202,
0x0fdd000042943402,
0x0fde000042943602,
0x0fdf000042943802,
0x0fe0000042943a02,
0x0fe1000042943e02,
0x0fe2000042944002,
0x0fe3000042944a06,
0x0fe4000042944e06,
0x0fe5000042947c06,
0x0fe60000441c3006,
0x0fe70000441c4206,
0x0fe80000441c8a06,
0x0fe90000441c8e06,
0x0fea000044301c06,
0x0feb000044301e06,
0x0fec000044302606,
0x0fed000044303e06,
0x0fee000044304206,
0x0fef000044306e06,
0x0ff0000044307a06,
0x0ff1000044308c06,
0x0ff2000044421606,
0x0ff3000044421c02,
0x0ff4000044421c06,
0x0ff5000044423002,
0x0ff6000044423006,
0x0ff7000044426e06,
0x0ff8000044428a06,
0x0ff9000044481c02,
0x0ffa000044482802,
0x0ffb000044482c02,
0x0ffc000044483002,
0x0ffd000044483202,
0x0ffe000044483402,
0x0fff000044483602,
0x1000000044483606,
0x1001000044483802,
0x1002000044483a02,
0x1003000044483a06,
0x1004000044483e02,
0x1005000044484002,
0x1006000044486c06,
0x1007000044487606,
0x10080000444c0206,
0x10090000444c1406,
0x100a0000444c1c02,
0x100b0000444c2c02,
0x100c0000444c3002,
0x100d0000444c3402,
0x100e0000444c3e02,
0x100f0000444c4002,
0x10100000444c6606,
0x10110000444c7806,
0x10120000444c9206,
0x1013000044501c02,
0x1014000044502c02,
0x1015000044503002,
0x1016000044503402,
0x1017000044503406,
0x1018000044503e02,
0x1019000044504002,
0x101a000044508c06,
0x101b000044520206,
0x101c000044521406,
0x101d000044521c02,
0x101e000044522802,
0x101f000044522c02,
0x1020000044523002,
0x1021000044523202,
0x1022000044523402,
0x1023000044523602,
0x1024000044523802,
0x1025000044523a02,
0x1026000044523e02,
0x1027000044524002,
0x1028000044526206,
0x1029000044526606,
0x102a000044540a06,
0x102b000044541c02,
0x102c000044542c02,
0x102d000044543002,
0x102e000044543e02,
0x102f000044544002,
0x1030000044545a06,
0x1031000044547806,
0x1032000044548e06,
0x1033000044581c02,
0x1034000044581e02,
0x1035000044582602,
0x1036000044583002,
0x1037000044584606,
0x1038000044588606,
0x10390000445a1c02,
0x103a0000445a2c02,
0x103b0000445a2c06,
0x103c0000445a3002,
0x103d0000445a3e02,
0x103e0000445a4002,
0x103f0000445a5406,
0x10400000445a8006,
0x10410000445a8e06,
0x10420000445c1c02,
0x10430000445c2802,
0x10440000445c2806,
0x10450000445c2c02,
0x10460000445c3002,
0x10470000445c3202,
0x10480000445c3206,
0x10490000445c3402,
0x104a0000445c3602,
0x104b0000445c3802,
0x104c0000445c3a02,
0x104d0000445c3e02,
0x104e0000445c4002,
0x104f0000445c5e06,
0x10500000445c7406,
0x10510000445c7606,
0x10520000445e1c02,
0x10530000445e2802,
0x10540000445e2c02,
0x10550000445e3002,
0x10560000445e3202,
0x10570000445e3402,
0x10580000445e3602,
0x10590000445e3802,
0x105a0000445e3a02,
0x105b0000445e3e02,
0x105c0000445e4002,
0x105d0000445e5c06,
0x105e0000445e6c06,
0x105f0000445e7406,
0x10600000445e7606,
0x1061000044620206,
0x1062000044620606,
0x1063000044621c02,
0x1064000044622802,
0x1065000044622806,
0x1066000044622c02,
0x1067000044623002,
0x1068000044623202,
0x1069000044623402,
0x106a000044623602,
0x106b000044623802,
0x106c000044623806,
0x106d000044623a02,
0x106e000044623e02,
0x106f000044624002,
0x1070000044625206,
0x1071000044627006,
0x1072000044661406,
0x1073000044661c02,
0x1074000044662802,
0x1075000044662806,
0x1076000044662c02,
0x1077000044663002,
0x1078000044663202,
0x1079000044663402,
0x107a000044663602,
0x107b000044663802,
0x107c000044663a02,
0x107d000044663e02,
0x107e000044664002,
0x107f000044664c06,
0x1080000044665206,
0x1081000044681c02,
0x1082000044681e02,
0x1083000044682406,
0x1084000044682602,
0x1085000044683002,
0x1086000044686006,
0x1087000044688606,
0x1088000044689006,
0x10890000446a1c02,
0x108a0000446a2006,
0x108b0000446a2802,
0x108c0000446a2c02,
0x108d0000446a2e02,
0x108e0000446a2e06,
0x108f0000446a3002,
0x10900000446a3202,
0x10910000446a3402,
0x10920000446a3602,
0x10930000446a3802,
0x10940000446a3a02,
0x10950000446a3c02,
0x10960000446a3c06,
0x10970000446a3e02,
0x10980000446a4002,
0x10990000446a7206,
0x109a0000446a8806,
0x109b0000446c1c02,
0x109c0000446c2802,
0x109d0000446c2c02,
0x109e0000446c3002,
0x109f0000446c3202,
0x10a00000446c3402,
0x10a10000446c3602,
0x10a20000446c3802,
0x10a30000446c3806,
0x10a40000446c3a02,
0x10a50000446c3a06,
0x10a60000446c3e02,
0x10a70000446c4002,
0x10a80000446c4806,
0x10a90000446c5e06,
0x10aa0000446c7606,
0x10ab0000446e1606,
0x10ac0000446e1c02,
0x10ad0000446e1e02,
0x10ae0000446e1e06,
0x10af0000446e2602,
0x10b00000446e3002,
0x10b10000446e4206,
0x10b20000446e9006,
0x10b3000044700606,
0x10b4000044701c02,
0x10b5000044702802,
0x10b6000044702c02,
0x10b7000044702e02,
0x10b8000044702e06,
0x10b9000044703002,
0x10ba000044703202,
0x10bb000044703402,
0x10bc000044703602,
0x10bd000044703802,
0x10be000044703a02,
0x10bf000044703e02,
0x10c0000044704002,
0x10c1000044706206,
0x10c2000044707206,
0x10c3000044720606,
0x10c4000044721206,
0x10c5000044721c02,
0x10c6000044722006,
0x10c7000044722802,
0x10c8000044722c02,
0x10c9000044722e02,
0x10ca000044723002,
0x10cb000044723202,
0x10cc000044723402,
0x10cd000044723602,
0x10ce000044723802,
0x10cf000044723a02,
0x10d0000044723e02,
0x10d1000044724002,
0x10d2000044726406,
0x10d3000044726a06,
0x10d4000044727006,
0x10d5000044741c02,
0x10d6000044742802,
0x10d7000044742806,
0x10d8000044742c02,
0x10d9000044743002,
0x10da000044743202,
0x10db000044743402,
0x10dc000044743602,
0x10dd000044743802,
0x10de000044743806,
0x10df000044743a02,
0x10e0000044743e02,
0x10e1000044744002,
0x10e2000044745c06,
0x10e3000044745e06,
0x10e4000044761c02,
0x10e5000044762802,
0x10e6000044762c02,
0x10e7000044763002,
0x10e8000044763202,
0x10e9000044763206,
0x10ea000044763402,
0x10eb000044763602,
0x10ec000044763606,
0x10ed000044763802,
0x10ee000044763a02,
0x10ef000044763e02,
0x10f0000044764002,
0x10f1000044764806,
0x10f2000044765c06,
0x10f3000044765e06,
0x10f4000044766c06,
0x10f5000044780206,
0x10f6000044781c02,
0x10f7000044782c02,
0x10f8000044783002,
0x10f9000044783e02,
0x10fa000044784002,
0x10fb000044784c06,
0x10fc000044785406,
0x10fd000044789206,
0x10fe0000447a1c02,
0x10ff0000447a3002,
0x11000000447a3006,
0x11010000447a3e02,
0x11020000447a3e06,
0x11030000447a8006,
0x11040000447c1c02,
0x11050000447c2202,
0x11060000447c2206,
0x11070000447c2802,
0x11080000447c2c02,
0x11090000447c3002,
0x110a0000447c3202,
0x110b0000447c3402,
0x110c0000447c3602,
0x110d0000447c3802,
0x110e0000447c3806,
0x110f0000447c3a02,
0x11100000447c3a06,
0x11110000447c3c02,
0x11120000447c3c06,
0x11130000447c3e02,
0x11140000447c4002,
0x11150000447c4a06,
0x11160000447c8806,
0x11170000447c9406,
0x11180000447e1c02,
0x11190000447e2c02,
0x111a0000447e3002,
0x111b0000447e3402,
0x111c0000447e3e02,
0x111d0000447e4002,
0x111e0000447e9206,
0x111f000044801c02,
0x1120000044803002,
0x1121000044803e02,
0x1122000044803e06,
0x1123000044805a06,
0x1124000044807a06,
0x1125000044808e06,
0x1126000044861c02,
0x1127000044861e02,
0x1128000044861e06,
0x1129000044862602,
0x112a000044862606,
0x112b000044863002,
0x112c000044864606,
0x112d000044865806,
0x112e000044866006,
0x112f000044866806,
0x1130000044881c02,
0x1131000044882006,
0x1132000044882802,
0x1133000044882a06,
0x1134000044882c02,
0x1135000044883002,
0x1136000044883202,
0x1137000044883402,
0x1138000044883602,
0x1139000044883802,
0x113a000044883a02,
0x113b000044883c02,
0x113c000044883e02,
0x113d000044884002,
0x113e000044884a06,
0x113f000044886a06,
0x1140000044887c06,
0x11410000448a0a06,
0x11420000448a0e06,
0x11430000448a1606,
0x11440000448a1806,
0x11450000448a1c02,
0x11460000448a3002,
0x11470000448a4206,
0x11480000448a8e06,
0x11490000448c1c02,
0x114a0000448c2c02,
0x114b0000448c3002,
0x114c0000448c3e02,
0x114d0000448c3e06,
0x114e0000448c4002,
0x114f0000448c4006,
0x11500000448c5006,
0x11510000448e0a06,
0x11520000448e1c02,
0x11530000448e1c06,
0x11540000448e3002,
0x11550000448e5406,
0x11560000448e5a06,
0x11570000448e8006,
0x11580000448e8a06,
0x1159000044901606,
0x115a000044901c02,
0x115b000044901e02,
0x115c000044902406,
0x115d000044902602,
0x115e000044903002,
0x115f000044906806,
0x1160000044906e06,
0x1161000044908206,
0x1162000044921c02,
0x1163000044922c02,
0x1164000044922c06,
0x1165000044923002,
0x1166000044923402,
0x1167000044923406,
0x1168000044923e02,
0x1169000044924002,
0x116a000044924006,
0x116b000044924c06,
0x116c000044927806,
0x116d000044927e06,
0x116e000044941006,
0x116f000044941c02,
0x1170000044942202,
0x1171000044942802,
0x1172000044942a06,
0x1173000044942c02,
0x1174000044943002,
0x1175000044943202,
0x1176000044943402,
0x1177000044943602,
0x1178000044943802,
0x1179000044943a02,
0x117a000044943e02,
0x117b000044944002,
0x117c000044944a06,
0x117d000044944e06,
0x117e000044947c06,
0x117f000046246006,
0x1180000046246806,
0x1181000046248206,
0x1182000046248406,
0x1183000046249006,
0x1184000046582606,
0x1185000046588606,
0x1186000046602402,
0x1187000046602406,
0x1188000046606806,
0x1189000046608606,
0x118a000046681e06,
0x118b000046682402,
0x118c000046686006,
0x118d000046688606,
0x118e000046689006,
0x118f000046820406,
0x1190000046820c06,
0x1191000046820e06,
0x1192000046821606,
0x1193000046822402,
0x1194000046828406,
0x1195000046829006,
0x1196000046840c06,
0x1197000046841006,
0x1198000046842402,
0x1199000046842406,
0x119a000046848206,
0x119b000046861e06,
0x119c000046862606,
0x119d000046865806,
0x119e000046866006,
0x119f000046866806,
0x11a0000046901606,
0x11a1000046901e06,
0x11a2000046902402,
0x11a3000046906806,
0x11a4000046906e06,
0x11a5000046908206,
0x11a6000048363206,
0x11a7000048363406,
0x11a8000048363a06,
0x11a9000048367606,
0x11aa0000483a2206,
0x11ab0000483a3606,
0x11ac0000483a3806,
0x11ad0000483a6c06,
0x11ae0000483a7c06,
0x11af000048421606,
0x11b0000048421c02,
0x11b1000048421c06,
0x11b2000048422802,
0x11b3000048422c02,
0x11b4000048423002,
0x11b5000048423202,
0x11b6000048423402,
0x11b7000048423602,
0x11b8000048423802,
0x11b9000048423a02,
0x11ba000048423e02,
0x11bb000048424002,
0x11bc000048426e06,
0x11bd000048428a06,
0x11be000048441c02,
0x11bf000048441c06,
0x11c0000048442802,
0x11c1000048442c02,
0x11c2000048443002,
0x11c3000048443202,
0x11c4000048443402,
0x11c5000048443602,
0x11c6000048443802,
0x11c7000048443a02,
0x11c8000048443e02,
0x11c9000048444002,
0x11ca000048447a06,
0x11cb000048448006,
0x11cc000048448e06,
0x11cd0000484c0206,
0x11ce0000484c1406,
0x11cf0000484c2802,
0x11d00000484c3202,
0x11d10000484c3402,
0x11d20000484c3602,
0x11d30000484c3802,
0x11d40000484c3a02,
0x11d50000484c6606,
0x11d60000484c7806,
0x11d70000484c9206,
0x11d8000048502802,
0x11d9000048503202,
0x11da000048503402,
0x11db000048503602,
0x11dc000048503802,
0x11dd000048503a02,
0x11de000048504002,
0x11df000048504006,
0x11e0000048508c06,
0x11e1000048520206,
0x11e2000048521406,
0x11e3000048522802,
0x11e4000048523202,
0x11e5000048523402,
0x11e6000048523602,
0x11e7000048523802,
0x11e8000048523a02,
0x11e9000048526206,
0x11ea000048526606,
0x11eb000048540a06,
0x11ec000048542802,
0x11ed000048542c02,
0x11ee000048543202,
0x11ef000048543402,
0x11f0000048543602,
0x11f1000048543802,
0x11f2000048543a02,
0x11f3000048543e02,
0x11f4000048544002,
0x11f5000048545a06,
0x11f6000048547806,
0x11f7000048548e06,
0x11f8000048581e02,
0x11f9000048582602,
0x11fa000048582802,
0x11fb000048582c02,
0x11fc000048583002,
0x11fd000048583202,
0x11fe000048583402,
0x11ff000048583602,
0x1200000048583802,
0x1201000048583a02,
0x1202000048583e02,
0x1203000048584002,
0x1204000048584606,
0x1205000048588606,
0x12060000485a2802,
0x12070000485a2c02,
0x12080000485a2c06,
0x12090000485a3202,
0x120a0000485a3402,
0x120b0000485a3602,
0x120c0000485a3802,
0x120d0000485a3a02,
0x120e0000485a3e02,
0x120f0000485a3e06,
0x12100000485a4002,
0x12110000485a5406,
0x12120000485a8006,
0x12130000485a8e06,
0x12140000485c2802,
0x12150000485c2806,
0x12160000485c3202,
0x12170000485c3206,
0x12180000485c3402,
0x12190000485c3602,
0x121a0000485c3802,
0x121b0000485c3a02,
0x121c0000485c5e06,
0x121d0000485c7406,
0x121e0000485c7606,
0x121f0000485e2802,
0x12200000485e3202,
0x12210000485e3402,
0x12220000485e3602,
0x12230000485e3802,
0x12240000485e3a02,
0x12250000485e5c06,
0x12260000485e6c06,
0x12270000485e7406,
0x12280000485e7606,
0x1229000048620206,
0x122a000048620606,
0x122b000048622802,
0x122c000048622806,
0x122d000048623202,
0x122e000048623402,
0x122f000048623602,
0x1230000048623802,
0x1231000048623806,
0x1232000048623a02,
0x1233000048625206,
0x1234000048627006,
0x1235000048661406,
0x1236000048662802,
0x1237000048662806,
0x1238000048663202,
0x1239000048663402,
0x123a000048663406,
0x123b000048663602,
0x123c000048663802,
0x123d000048663a02,
0x123e000048664c06,
0x123f000048665206,
0x1240000048681e02,
0x1241000048682406,
0x1242000048682602,
0x1243000048682802,
0x1244000048682c02,
0x1245000048683002,
0x1246000048683202,
0x1247000048683402,
0x1248000048683602,
0x1249000048683802,
0x124a000048683a02,
0x124b000048683e02,
0x124c000048684002,
0x124d000048686006,
0x124e000048688606,
0x124f000048689006,
0x12500000486a2006,
0x12510000486a2802,
0x12520000486a2e02,
0x12530000486a2e06,
0x12540000486a3202,
0x12550000486a3402,
0x12560000486a3602,
0x12570000486a3802,
0x12580000486a3a02,
0x12590000486a3c02,
0x125a0000486a3c06,
0x125b0000486a7206,
0x125c0000486a8806,
0x125d0000486c2802,
0x125e0000486c3202,
0x125f0000486c3402,
0x12600000486c3602,
0x12610000486c3802,
0x12620000486c3806,
0x12630000486c3a02,
0x12640000486c3a06,
0x12650000486c5e06,
0x12660000486c7606,
0x12670000486e1606,
0x12680000486e1e02,
0x12690000486e1e06,
0x126a0000486e2602,
0x126b0000486e2802,
0x126c0000486e2c02,
0x126d0000486e3002,
0x126e0000486e3202,
0x126f0000486e3402,
0x12700000486e3602,
0x12710000486e3802,
0x12720000486e3a02,
0x12730000486e3e02,
0x12740000486e4002,
0x12750000486e4206,
0x12760000486e9006,
0x1277000048700606,
0x1278000048702802,
0x1279000048702e02,
0x127a000048702e06,
0x127b000048703202,
0x127c000048703402,
0x127d000048703602,
0x127e000048703802,
0x127f000048703a02,
0x1280000048706206,
0x1281000048707206,
0x1282000048720606,
0x1283000048721206,
0x1284000048722006,
0x1285000048722802,
0x1286000048722e02,
0x1287000048723202,
0x1288000048723402,
0x1289000048723602,
0x128a000048723802,
0x128b000048723a02,
0x128c000048726406,
0x128d000048726a06,
0x128e000048727006,
0x128f000048742802,
0x1290000048742806,
0x1291000048743202,
0x1292000048743402,
0x1293000048743602,
0x1294000048743802,
0x1295000048743806,
0x1296000048743a02,
0x1297000048745c06,
0x1298000048745e06,
0x1299000048762802,
0x129a000048763202,
0x129b000048763206,
0x129c000048763402,
0x129d000048763602,
0x129e000048763606,
0x129f000048763802,
0x12a0000048763a02,
0x12a1000048765c06,
0x12a2000048765e06,
0x12a3000048766c06,
0x12a4000048780206,
0x12a5000048782802,
0x12a6000048782c02,
0x12a7000048783202,
0x12a8000048783402,
0x12a9000048783602,
0x12aa000048783802,
0x12ab000048783a02,
0x12ac000048783e02,
0x12ad000048784002,
0x12ae000048784c06,
0x12af000048785406,
0x12b0000048789206,
0x12b10000487a2802,
0x12b20000487a2c02,
0x12b30000487a3002,
0x12b40000487a3006,
0x12b50000487a3202,
0x12b60000487a3402,
0x12b70000487a3602,
0x12b80000487a3802,
0x12b90000487a3a02,
0x12ba0000487a3e02,
0x12bb0000487a4002,
0x12bc0000487a4406,
0x12bd0000487a8006,
0x12be0000487c2202,
0x12bf0000487c2206,
0x12c00000487c2802,
0x12c10000487c3202,
0x12c20000487c3402,
0x12c30000487c3602,
0x12c40000487c3802,
0x12c50000487c3806,
0x12c60000487c3a02,
0x12c70000487c3a06,
0x12c80000487c3c02,
0x12c90000487c3c06,
0x12ca0000487c4a06,
0x12cb0000487c8806,
0x12cc0000487c9406,
0x12cd0000487e2802,
0x12ce0000487e3202,
0x12cf0000487e3402,
0x12d00000487e3602,
0x12d10000487e3802,
0x12d20000487e3a02,
0x12d30000487e9206,
0x12d4000048802802,
0x12d5000048802c02,
0x12d6000048803202,
0x12d7000048803402,
0x12d8000048803602,
0x12d9000048803802,
0x12da000048803a02,
0x12db000048803e02,
0x12dc000048804002,
0x12dd000048804406,
0x12de000048805a06,
0x12df000048807a06,
0x12e0000048808e06,
0x12e1000048861e02,
0x12e2000048861e06,
0x12e3000048862602,
0x12e4000048862606,
0x12e5000048862802,
0x12e6000048862c02,
0x12e7000048863002,
0x12e8000048863202,
0x12e9000048863402,
0x12ea000048863602,
0x12eb000048863802,
0x12ec000048863a02,
0x12ed000048863e02,
0x12ee000048864002,
0x12ef000048864606,
0x12f0000048865806,
0x12f1000048866006,
0x12f2000048866806,
0x12f3000048882006,
0x12f4000048882802,
0x12f5000048882a06,
0x12f6000048883202,
0x12f7000048883402,
0x12f8000048883602,
0x12f9000048883802,
0x12fa000048883a02,
0x12fb000048883c02,
0x12fc000048884a06,
0x12fd000048886a06,
0x12fe000048887c06,
0x12ff0000488a0a06,
0x13000000488a0e06,
0x13010000488a1606,
0x13020000488a1806,
0x13030000488a1c02,
0x13040000488a2802,
0x13050000488a2c02,
0x13060000488a3002,
0x13070000488a3202,
0x13080000488a3402,
0x13090000488a3602,
0x130a0000488a3802,
0x130b0000488a3a02,
0x130c0000488a3e02,
0x130d0000488a4002,
0x130e0000488a4206,
0x130f0000488a8e06,
0x13100000488c2802,
0x13110000488c2c02,
0x13120000488c3002,
0x13130000488c3006,
0x13140000488c3202,
0x13150000488c3402,
0x13160000488c3602,
0x13170000488c3802,
0x13180000488c3a02,
0x13190000488c3e02,
0x131a0000488c3e06,
0x131b0000488c4002,
0x131c0000488c5006,
0x131d0000488e0a06,
0x131e0000488e1c02,
0x131f0000488e2802,
0x13200000488e2c02,
0x13210000488e3002,
0x13220000488e3202,
0x13230000488e3402,
0x13240000488e3602,
0x13250000488e3802,
0x13260000488e3a02,
0x13270000488e3e02,
0x13280000488e4002,
0x13290000488e4406,
0x132a0000488e5406,
0x132b0000488e5a06,
0x132c0000488e8006,
0x132d0000488e8a06,
0x132e000048901606,
0x132f000048901e02,
0x1330000048902406,
0x1331000048902602,
0x1332000048902802,
0x1333000048902c02,
0x1334000048903002,
0x1335000048903202,
0x1336000048903402,
0x1337000048903602,
0x1338000048903802,
0x1339000048903a02,
0x133a000048903e02,
0x133b000048904002,
0x133c000048906806,
0x133d000048906e06,
0x133e000048908206,
0x133f000048922802,
0x1340000048922c02,
0x1341000048922c06,
0x1342000048923202,
0x1343000048923402,
0x1344000048923602,
0x1345000048923802,
0x1346000048923a02,
0x1347000048923e02,
0x1348000048924002,
0x1349000048924006,
0x134a000048924c06,
0x134b000048927806,
0x134c000048927e06,
0x134d000048941006,
0x134e000048942202,
0x134f000048942802,
0x1350000048942a06,
0x1351000048943202,
0x1352000048943402,
0x1353000048943602,
0x1354000048943802,
0x1355000048943a02,
0x1356000048944a06,
0x1357000048944e06,
0x1358000048947c06,
0x135900004a2a2006,
0x135a00004a2a4e06,
0x135b00004a2a8806,
0x135c00004a2a9406,
0x135d00004a4e1006,
0x135e00004a4e1a06,
0x135f00004a4e2002,
0x136000004a4e2006,
0x136100004a4e2a02,
0x136200004a4e5606,
0x136300004a4e9406,
0x136400004a560806,
0x136500004a561a06,
0x136600004a562002,
0x136700004a562a02,
0x136800004a564e06,
0x136900004a566406,
0x136a00004a640806,
0x136b00004a641206,
0x136c00004a642002,
0x136d00004a642a02,
0x136e00004a645606,
0x136f00004a647206,
0x137000004a6a2002,
0x137100004a6a2a02,
0x137200004a6a2e06,
0x137300004a6a3806,
0x137400004a6a3c06,
0x137500004a6a7206,
0x137600004a6a8806,
0x137700004a720606,
0x137800004a721206,
0x137900004a722002,
0x137a00004a722a02,
0x137b00004a722e06,
0x137c00004a726406,
0x137d00004a726a06,
0x137e00004a727006,
0x137f00004a7c2206,
0x138000004a7c3806,
0x138100004a7c3a06,
0x138200004a7c3c06,
0x138300004a7c8806,
0x138400004a7c9406,
0x138500004a882002,
0x138600004a882006,
0x138700004a882a02,
0x138800004a882a06,
0x138900004a883c06,
0x138a00004a886a06,
0x138b00004a887c06,
0x138c00004a941006,
0x138d00004a942206,
0x138e00004a942a02,
0x138f00004a942a06,
0x139000004a944e06,
0x139100004a947c06,
0x139200004c020606,
0x139300004c021206,
0x139400004c021406,
0x139500004c025206,
0x139600004c026206,
0x139700004c027806,
0x139800004c140206,
0x139900004c145206,
0x139a00004c146606,
0x139b00004c342806,
0x139c00004c343206,
0x139d00004c343606,
0x139e00004c344006,
0x139f00004c345006,
0x13a000004c346606,
0x13a100004c347e06,
0x13a200004c349206,
0x13a300004c421606,
0x13a400004c421c02,
0x13a500004c421c06,
0x13a600004c422c02,
0x13a700004c423002,
0x13a800004c423402,
0x13a900004c423e02,
0x13aa00004c424002,
0x13ab00004c426e06,
0x13ac00004c428a06,
0x13ad00004c441c02,
0x13ae00004c441c06,
0x13af00004c442c02,
0x13b000004c443002,
0x13b100004c443402,
0x13b200004c443e02,
0x13b300004c444002,
0x13b400004c447a06,
0x13b500004c448006,
0x13b600004c448e06,
0x13b700004c482802,
0x13b800004c483202,
0x13b900004c483402,
0x13ba00004c483602,
0x13bb00004c483606,
0x13bc00004c483802,
0x13bd00004c483a02,
0x13be00004c483a06,
0x13bf00004c486c06,
0x13c000004c487606,
0x13c100004c503402,
0x13c200004c504002,
0x13c300004c504006,
0x13c400004c508c06,
0x13c500004c520206,
0x13c600004c521406,
0x13c700004c522802,
0x13c800004c523202,
0x13c900004c523402,
0x13ca00004c523602,
0x13cb00004c523802,
0x13cc00004c523a02,
0x13cd00004c526206,
0x13ce00004c526606,
0x13cf00004c540a06,
0x13d000004c542c02,
0x13d100004c543402,
0x13d200004c543e02,
0x13d300004c544002,
0x13d400004c545a06,
0x13d500004c547806,
0x13d600004c548e06,
0x13d700004c581e02,
0x13d800004c582602,
0x13d900004c582c02,
0x13da00004c583002,
0x13db00004c583402,
0x13dc00004c583e02,
0x13dd00004c584002,
0x13de00004c584606,
0x13df00004c588606,
0x13e000004c5a2c02,
0x13e100004c5a2c06,
0x13e200004c5a3402,
0x13e300004c5a3e02,
0x13e400004c5a3e06,
0x13e500004c5a4002,
0x13e600004c5a5406,
0x13e700004c5a8006,
0x13e800004c5a8e06,
0x13e900004c5c2802,
0x13ea00004c5c2806,
0x13eb00004c5c3202,
0x13ec00004c5c3206,
0x13ed00004c5c3402,
0x13ee00004c5c3602,
0x13ef00004c5c3802,
0x13f000004c5c3a02,
0x13f100004c5c5e06,
0x13f200004c5c7406,
0x13f300004c5c7606,
0x13f400004c5e2802,
0x13f500004c5e3202,
0x13f600004c5e3402,
0x13f700004c5e3602,
0x13f800004c5e3802,
0x13f900004c5e3a02,
0x13fa00004c5e5c06,
0x13fb00004c5e6c06,
0x13fc00004c5e7406,
0x13fd00004c5e7606,
0x13fe00004c620206,
0x13ff00004c620606,
0x140000004c622802,
0x140100004c622806,
0x140200004c623202,
0x140300004c623402,
0x140400004c623602,
0x140500004c623802,
0x140600004c623806,
0x140700004c623a02,
0x140800004c625206,
0x140900004c627006,
0x140a00004c661406,
0x140b00004c662802,
0x140c00004c662806,
0x140d00004c663202,
0x140e00004c663402,
0x140f00004c663406,
0x141000004c663602,
0x141100004c663802,
0x141200004c663a02,
0x141300004c665206,
0x141400004c681e02,
0x141500004c682406,
0x141600004c682602,
0x141700004c682c02,
0x141800004c683002,
0x141900004c683402,
0x141a00004c683e02,
0x141b00004c684002,
0x141c00004c686006,
0x141d00004c688606,
0x141e00004c689006,
0x141f00004c6a2006,
0x142000004c6a2802,
0x142100004c6a2e02,
0x142200004c6a2e06,
0x142300004c6a3202,
0x142400004c6a3402,
0x142500004c6a3602,
0x142600004c6a3802,
0x142700004c6a3a02,
0x142800004c6a3c02,
0x142900004c6a3c06,
0x142a00004c6a7206,
0x142b00004c6a8806,
0x142c00004c6c2802,
0x142d00004c6c3202,
0x142e00004c6c3402,
0x142f00004c6c3602,
0x143000004c6c3802,
0x143100004c6c3806,
0x143200004c6c3a02,
0x143300004c6c3a06,
0x143400004c6c4806,
0x143500004c6c5e06,
0x143600004c6c7606,
0x143700004c6e1606,
0x143800004c6e1e02,
0x143900004c6e1e06,
0x143a00004c6e2602,
0x143b00004c6e2c02,
0x143c00004c6e3002,
0x143d00004c6e3402,
0x143e00004c6e3e02,
0x143f00004c6e4002,
0x144000004c6e4206,
0x144100004c6e9006,
0x144200004c700606,
0x144300004c702802,
0x144400004c702e02,
0x144500004c702e06,
0x144600004c703202,
0x144700004c703402,
0x144800004c703602,
0x144900004c703802,
0x144a00004c703a02,
0x144b00004c706206,
0x144c00004c707206,
0x144d00004c720606,
0x144e00004c721206,
0x144f00004c722006,
0x145000004c722802,
0x145100004c722e02,
0x145200004c723202,
0x145300004c723402,
0x145400004c723602,
0x145500004c723802,
0x145600004c723a02,
0x145700004c726406,
0x145800004c726a06,
0x145900004c727006,
0x145a00004c742802,
0x145b00004c742806,
0x145c00004c743202,
0x145d00004c743402,
0x145e00004c743602,
0x145f00004c743802,
0x146000004c743806,
0x146100004c743a02,
0x146200004c745c06,
0x146300004c745e06,
0x146400004c762802,
0x146500004c763202,
0x146600004c763206,
0x146700004c763402,
0x146800004c763602,
0x146900004c763606,
0x146a00004c763802,
0x146b00004c763a02,
0x146c00004c764806,
0x146d00004c765c06,
0x146e00004c765e06,
0x146f00004c766c06,
0x147000004c780206,
0x147100004c782c02,
0x147200004c782c06,
0x147300004c783402,
0x147400004c783e02,
0x147500004c784002,
0x147600004c785406,
0x147700004c789206,
0x147800004c7a2c02,
0x147900004c7a3002,
0x147a00004c7a3006,
0x147b00004c7a3402,
0x147c00004c7a3e02,
0x147d00004c7a4002,
0x147e00004c7a4406,
0x147f00004c7a8006,
0x148000004c7c2202,
0x148100004c7c2206,
0x148200004c7c2802,
0x148300004c7c3202,
0x148400004c7c3402,
0x148500004c7c3602,
0x148600004c7c3802,
0x148700004c7c3806,
0x148800004c7c3a02,
0x148900004c7c3a06,
0x148a00004c7c3c02,
0x148b00004c7c3c06,
0x148c00004c7c4a06,
0x148d00004c7c8806,
0x148e00004c7c9406,
0x148f00004c7e3402,
0x149000004c7e9206,
0x149100004c802c02,
0x149200004c803402,
0x149300004c803e02,
0x149400004c804002,
0x149500004c804406,
0x149600004c805a06,
0x149700004c807a06,
0x149800004c808e06,
0x149900004c861e02,
0x149a00004c861e06,
0x149b00004c862602,
0x149c00004c862606,
0x149d00004c862c02,
0x149e00004c863002,
0x149f00004c863402,
0x14a000004c863e02,
0x14a100004c864002,
0x14a200004c864606,
0x14a300004c865806,
0x14a400004c866006,
0x14a500004c866806,
0x14a600004c882006,
0x14a700004c882802,
0x14a800004c882a06,
0x14a900004c883202,
0x14aa00004c883402,
0x14ab00004c883602,
0x14ac00004c883802,
0x14ad00004c883a02,
0x14ae00004c883c02,
0x14af00004c884a06,
0x14b000004c886a06,
0x14b100004c887c06,
0x14b200004c8a0a06,
0x14b300004c8a0e06,
0x14b400004c8a1606,
0x14b500004c8a1806,
0x14b600004c8a1c02,
0x14b700004c8a2c02,
0x14b800004c8a3002,
0x14b900004c8a3402,
0x14ba00004c8a3e02,
0x14bb00004c8a4002,
0x14bc00004c8a4206,
0x14bd00004c8a8e06,
0x14be00004c8c2c02,
0x14bf00004c8c3002,
0x14c000004c8c3006,
0x14c100004c8c3402,
0x14c200004c8c3e02,
0x14c300004c8c3e06,
0x14c400004c8c4002,
0x14c500004c8c5006,
0x14c600004c8e0a06,
0x14c700004c8e1c02,
0x14c800004c8e2c02,
0x14c900004c8e3002,
0x14ca00004c8e3402,
0x14cb00004c8e3e02,
0x14cc00004c8e4002,
0x14cd00004c8e4406,
0x14ce00004c8e5406,
0x14cf00004c8e5a06,
0x14d000004c8e8006,
0x14d100004c8e8a06,
0x14d200004c901606,
0x14d300004c901e02,
0x14d400004c902406,
0x14d500004c902602,
0x14d600004c902c02,
0x14d700004c903002,
0x14d800004c903402,
0x14d900004c903e02,
0x14da00004c904002,
0x14db00004c906806,
0x14dc00004c906e06,
0x14dd00004c908206,
0x14de00004c922c02,
0x14df00004c922c06,
0x14e000004c923402,
0x14e100004c923406,
0x14e200004c923e02,
0x14e300004c924002,
0x14e400004c924006,
0x14e500004c927806,
0x14e600004c927e06,
0x14e700004c941006,
0x14e800004c942202,
0x14e900004c942802,
0x14ea00004c942a06,
0x14eb00004c943202,
0x14ec00004c943402,
0x14ed00004c943602,
0x14ee00004c943802,
0x14ef00004c943a02,
0x14f000004c944a06,
0x14f100004c944e06,
0x14f200004c947c06,
0x14f300004e100c06,
0x14f400004e101a06,
0x14f500004e108406,
0x14f600004e109406,
0x14f700004e1a0406,
0x14f800004e1a0806,
0x14f900004e1a0c06,
0x14fa00004e1a1006,
0x14fb00004e1a5606,
0x14fc00004e202a06,
0x14fd00004e205606,
0x14fe00004e206406,
0x14ff00004e206a06,
0x150000004e207206,
0x150100004e208806,
0x150200004e2a2006,
0x150300004e2a4a06,
0x150400004e2a8806,
0x150500004e2a9406,
0x150600004e4a2002,
0x150700004e4a2a02,
0x150800004e4a7c06,
0x150900004e4a8806,
0x150a00004e4a9406,
0x150b00004e560806,
0x150c00004e561a06,
0x150d00004e562002,
0x150e00004e562006,
0x150f00004e562a02,
0x151000004e566406,
0x151100004e640806,
0x151200004e641206,
0x151300004e642002,
0x151400004e642a02,
0x151500004e645606,
0x151600004e647206,
0x151700004e6a2002,
0x151800004e6a2a02,
0x151900004e6a2e06,
0x151a00004e6a3806,
0x151b00004e6a3c06,
0x151c00004e6a7206,
0x151d00004e6a8806,
0x151e00004e720606,
0x151f00004e721206,
0x152000004e722002,
0x152100004e722a02,
0x152200004e722e06,
0x152300004e726406,
0x152400004e726a06,
0x152500004e727006,
0x152600004e882002,
0x152700004e882006,
0x152800004e882a02,
0x152900004e882a06,
0x152a00004e883c06,
0x152b00004e884a06,
0x152c00004e886a06,
0x152d00004e887c06,
0x152e00004e941006,
0x152f00004e942002,
0x153000004e942206,
0x153100004e942a02,
0x153200004e942a06,
0x153300004e944a06,
0x153400004e947c06,
0x1535000050342806,
0x1536000050343206,
0x1537000050343606,
0x1538000050344006,
0x1539000050344c06,
0x153a000050346606,
0x153b000050347e06,
0x153c000050349206,
0x153d000050402c06,
0x153e000050403406,
0x153f000050403e06,
0x1540000050408c06,
0x1541000050409206,
0x1542000050421606,
0x1543000050421c02,
0x1544000050421c06,
0x1545000050422c02,
0x1546000050423002,
0x1547000050423402,
0x1548000050423e02,
0x1549000050424002,
0x154a000050426e06,
0x154b000050428a06,
0x154c000050441c02,
0x154d000050441c06,
0x154e000050442c02,
0x154f000050443002,
0x1550000050443402,
0x1551000050443e02,
0x1552000050444002,
0x1553000050447a06,
0x1554000050448006,
0x1555000050448e06,
0x1556000050482802,
0x1557000050483202,
0x1558000050483402,
0x1559000050483602,
0x155a000050483606,
0x155b000050483802,
0x155c000050483a02,
0x155d000050483a06,
0x155e000050484002,
0x155f000050486c06,
0x1560000050487606,
0x15610000504c0206,
0x15620000504c1406,
0x15630000504c3402,
0x15640000504c4002,
0x15650000504c6606,
0x15660000504c7806,
0x15670000504c9206,
0x1568000050520206,
0x1569000050521406,
0x156a000050522802,
0x156b000050523202,
0x156c000050523402,
0x156d000050523602,
0x156e000050523802,
0x156f000050523a02,
0x1570000050524002,
0x1571000050526206,
0x1572000050526606,
0x1573000050540a06,
0x1574000050542c02,
0x1575000050543402,
0x1576000050543e02,
0x1577000050544002,
0x1578000050545a06,
0x1579000050547806,
0x157a000050548e06,
0x157b000050581e02,
0x157c000050582602,
0x157d000050582c02,
0x157e000050583002,
0x157f000050583402,
0x1580000050583e02,
0x1581000050584002,
0x1582000050584606,
0x1583000050588606,
0x15840000505a2c02,
0x15850000505a2c06,
0x15860000505a3402,
0x15870000505a3e02,
0x15880000505a3e06,
0x15890000505a4002,
0x158a0000505a5406,
0x158b0000505a8006,
0x158c0000505a8e06,
0x158d0000505c2802,
0x158e0000505c2806,
0x158f0000505c3202,
0x15900000505c3206,
0x15910000505c3402,
0x15920000505c3602,
0x15930000505c3802,
0x15940000505c3a02,
0x15950000505c4002,
0x15960000505c5e06,
0x15970000505c7406,
0x15980000505c7606,
0x15990000505e2802,
0x159a0000505e3202,
0x159b0000505e3402,
0x159c0000505e3602,
0x159d0000505e3802,
0x159e0000505e3a02,
0x159f0000505e4002,
0x15a00000505e5c06,
0x15a10000505e6c06,
0x15a20000505e7406,
0x15a30000505e7606,
0x15a4000050620206,
0x15a5000050620606,
0x15a6000050622802,
0x15a7000050622806,
0x15a8000050623202,
0x15a9000050623402,
0x15aa000050623602,
0x15ab000050623802,
0x15ac000050623806,
0x15ad000050623a02,
0x15ae000050624002,
0x15af000050625206,
0x15b0000050627006,
0x15b1000050661406,
0x15b2000050662802,
0x15b3000050662806,
0x15b4000050663202,
0x15b5000050663402,
0x15b6000050663602,
0x15b7000050663802,
0x15b8000050663a02,
0x15b9000050664002,
0x15ba000050664c06,
0x15bb000050665206,
0x15bc000050681e02,
0x15bd000050682406,
0x15be000050682602,
0x15bf000050682c02,
0x15c0000050683002,
0x15c1000050683402,
0x15c2000050683e02,
0x15c3000050684002,
0x15c4000050686006,
0x15c5000050688606,
0x15c6000050689006,
0x15c70000506a2006,
0x15c80000506a2802,
0x15c90000506a2e02,
0x15ca0000506a2e06,
0x15cb0000506a3202,
0x15cc0000506a3402,
0x15cd0000506a3602,
0x15ce0000506a3802,
0x15cf0000506a3a02,
0x15d00000506a3c02,
0x15d10000506a3c06,
0x15d20000506a4002,
0x15d30000506a7206,
0x15d40000506a8806,
0x15d50000506c2802,
0x15d60000506c3202,
0x15d70000506c3402,
0x15d80000506c3602,
0x15d90000506c3802,
0x15da0000506c3806,
0x15db0000506c3a02,
0x15dc0000506c3a06,
0x15dd0000506c4002,
0x15de0000506c4806,
0x15df0000506c5e06,
0x15e00000506c7606,
0x15e10000506e1606,
0x15e20000506e1e02,
0x15e30000506e1e06,
0x15e40000506e2602,
0x15e50000506e2c02,
0x15e60000506e3002,
0x15e70000506e3402,
0x15e80000506e3e02,
0x15e90000506e4002,
0x15ea0000506e4206,
0x15eb0000506e9006,
0x15ec000050700606,
0x15ed000050702802,
0x15ee000050702e02,
0x15ef000050702e06,
0x15f0000050703202,
0x15f1000050703402,
0x15f2000050703602,
0x15f3000050703802,
0x15f4000050703a02,
0x15f5000050704002,
0x15f6000050706206,
0x15f7000050707206,
0x15f8000050720606,
0x15f9000050721206,
0x15fa000050722006,
0x15fb000050722802,
0x15fc000050722e02,
0x15fd000050723202,
0x15fe000050723402,
0x15ff000050723602,
0x1600000050723802,
0x1601000050723a02,
0x1602000050724002,
0x1603000050726406,
0x1604000050726a06,
0x1605000050727006,
0x1606000050742802,
0x1607000050742806,
0x1608000050743202,
0x1609000050743402,
0x160a000050743602,
0x160b000050743802,
0x160c000050743806,
0x160d000050743a02,
0x160e000050744002,
0x160f000050745c06,
0x1610000050745e06,
0x1611000050762802,
0x1612000050763202,
0x1613000050763206,
0x1614000050763402,
0x1615000050763602,
0x1616000050763606,
0x1617000050763802,
0x1618000050763a02,
0x1619000050764002,
0x161a000050764806,
0x161b000050765c06,
0x161c000050765e06,
0x161d000050766c06,
0x161e000050780206,
0x161f000050782c02,
0x1620000050783402,
0x1621000050783e02,
0x1622000050784002,
0x1623000050784c06,
0x1624000050785406,
0x1625000050789206,
0x16260000507a2c02,
0x16270000507a3002,
0x16280000507a3006,
0x16290000507a3402,
0x162a0000507a3e02,
0x162b0000507a4002,
0x162c0000507a4406,
0x162d0000507a8006,
0x162e0000507c2202,
0x162f0000507c2206,
0x16300000507c2802,
0x16310000507c3202,
0x16320000507c3402,
0x16330000507c3602,
0x16340000507c3802,
0x16350000507c3806,
0x16360000507c3a02,
0x16370000507c3a06,
0x16380000507c3c02,
0x16390000507c3c06,
0x163a0000507c4002,
0x163b0000507c4a06,
0x163c0000507c8806,
0x163d0000507c9406,
0x163e0000507e3402,
0x163f0000507e4002,
0x16400000507e9206,
0x1641000050802c02,
0x1642000050803402,
0x1643000050803e02,
0x1644000050804002,
0x1645000050804406,
0x1646000050805a06,
0x1647000050807a06,
0x1648000050808e06,
0x1649000050861e02,
0x164a000050861e06,
0x164b000050862602,
0x164c000050862606,
0x164d000050862c02,
0x164e000050863002,
0x164f000050863402,
0x1650000050863e02,
0x1651000050864002,
0x1652000050864606,
0x1653000050865806,
0x1654000050866006,
0x1655000050866806,
0x1656000050882006,
0x1657000050882802,
0x1658000050882a06,
0x1659000050883202,
0x165a000050883402,
0x165b000050883602,
0x165c000050883802,
0x165d000050883a02,
0x165e000050883c02,
0x165f000050884002,
0x1660000050884a06,
0x1661000050886a06,
0x1662000050887c06,
0x16630000508a0a06,
0x16640000508a0e06,
0x16650000508a1606,
0x16660000508a1806,
0x16670000508a1c02,
0x16680000508a2c02,
0x16690000508a3002,
0x166a0000508a3402,
0x166b0000508a3e02,
0x166c0000508a4002,
0x166d0000508a4206,
0x166e0000508a8e06,
0x166f0000508c2c02,
0x16700000508c3002,
0x16710000508c3006,
0x16720000508c3402,
0x16730000508c3e02,
0x16740000508c3e06,
0x16750000508c4002,
0x16760000508c4006,
0x16770000508e0a06,
0x16780000508e1c02,
0x16790000508e2c02,
0x167a0000508e3002,
0x167b0000508e3402,
0x167c0000508e3e02,
0x167d0000508e4002,
0x167e0000508e4406,
0x167f0000508e5406,
0x16800000508e5a06,
0x16810000508e8006,
0x16820000508e8a06,
0x1683000050901606,
0x1684000050901e02,
0x1685000050902406,
0x1686000050902602,
0x1687000050902c02,
0x1688000050903002,
0x1689000050903402,
0x168a000050903e02,
0x168b000050904002,
0x168c000050906806,
0x168d000050906e06,
0x168e000050908206,
0x168f000050922c02,
0x1690000050922c06,
0x1691000050923402,
0x1692000050923406,
0x1693000050923e02,
0x1694000050924002,
0x1695000050924006,
0x1696000050924c06,
0x1697000050927806,
0x1698000050927e06,
0x1699000050941006,
0x169a000050942202,
0x169b000050942802,
0x169c000050942a06,
0x169d000050943202,
0x169e000050943402,
0x169f000050943602,
0x16a0000050943802,
0x16a1000050943a02,
0x16a2000050944002,
0x16a3000050944a06,
0x16a4000050944e06,
0x16a5000050947c06,
0x16a6000052020606,
0x16a7000052021206,
0x16a8000052021406,
0x16a9000052024c06,
0x16aa000052026206,
0x16ab000052027806,
0x16ac000052140206,
0x16ad000052144c06,
0x16ae000052146606,
0x16af000052283206,
0x16b0000052283406,
0x16b1000052283806,
0x16b2000052285c06,
0x16b3000052286206,
0x16b4000052286606,
0x16b5000052287406,
0x16b6000052421606,
0x16b7000052421c02,
0x16b8000052421c06,
0x16b9000052422802,
0x16ba000052422c02,
0x16bb000052423002,
0x16bc000052423202,
0x16bd000052423402,
0x16be000052423602,
0x16bf000052423802,
0x16c0000052423a02,
0x16c1000052423e02,
0x16c2000052424002,
0x16c3000052426e06,
0x16c4000052428a06,
0x16c5000052441c02,
0x16c6000052441c06,
0x16c7000052442802,
0x16c8000052442c02,
0x16c9000052443002,
0x16ca000052443202,
0x16cb000052443402,
0x16cc000052443602,
0x16cd000052443802,
0x16ce000052443a02,
0x16cf000052443e02,
0x16d0000052444002,
0x16d1000052447a06,
0x16d2000052448006,
0x16d3000052448e06,
0x16d4000052482802,
0x16d5000052483202,
0x16d6000052483402,
0x16d7000052483602,
0x16d8000052483606,
0x16d9000052483802,
0x16da000052483a02,
0x16db000052483a06,
0x16dc000052486c06,
0x16dd000052487606,
0x16de0000524c0206,
0x16df0000524c1406,
0x16e00000524c2802,
0x16e10000524c3202,
0x16e20000524c3402,
0x16e30000524c3602,
0x16e40000524c3802,
0x16e50000524c3a02,
0x16e60000524c6606,
0x16e70000524c7806,
0x16e80000524c9206,
0x16e9000052502802,
0x16ea000052503202,
0x16eb000052503402,
0x16ec000052503602,
0x16ed000052503802,
0x16ee000052503a02,
0x16ef000052504002,
0x16f0000052504006,
0x16f1000052508c06,
0x16f2000052540a06,
0x16f3000052542802,
0x16f4000052542c02,
0x16f5000052543202,
0x16f6000052543402,
0x16f7000052543602,
0x16f8000052543802,
0x16f9000052543a02,
0x16fa000052543e02,
0x16fb000052544002,
0x16fc000052545a06,
0x16fd000052547806,
0x16fe000052548e06,
0x16ff000052581e02,
0x1700000052582602,
0x1701000052582802,
0x1702000052582c02,
0x1703000052583002,
0x1704000052583202,
0x1705000052583402,
0x1706000052583602,
0x1707000052583802,
0x1708000052583a02,
0x1709000052583e02,
0x170a000052584002,
0x170b000052584606,
0x170c000052588606,
0x170d0000525a2802,
0x170e0000525a2c02,
0x170f0000525a2c06,
0x17100000525a3202,
0x17110000525a3402,
0x17120000525a3602,
0x17130000525a3802,
0x17140000525a3a02,
0x17150000525a3e02,
0x17160000525a3e06,
0x17170000525a4002,
0x17180000525a5406,
0x17190000525a8006,
0x171a0000525a8e06,
0x171b0000525c2802,
0x171c0000525c3202,
0x171d0000525c3206,
0x171e0000525c3402,
0x171f0000525c3602,
0x17200000525c3802,
0x17210000525c3a02,
0x17220000525c5e06,
0x17230000525c7406,
0x17240000525c7606,
0x17250000525e2802,
0x17260000525e3202,
0x17270000525e3402,
0x17280000525e3602,
0x17290000525e3802,
0x172a0000525e3a02,
0x172b0000525e5c06,
0x172c0000525e6c06,
0x172d0000525e7406,
0x172e0000525e7606,
0x172f000052620206,
0x1730000052620606,
0x1731000052622802,
0x1732000052622806,
0x1733000052623202,
0x1734000052623402,
0x1735000052623602,
0x1736000052623802,
0x1737000052623806,
0x1738000052623a02,
0x1739000052627006,
0x173a000052661406,
0x173b000052662802,
0x173c000052662806,
0x173d000052663202,
0x173e000052663402,
0x173f000052663406,
0x1740000052663602,
0x1741000052663802,
0x1742000052663a02,
0x1743000052664c06,
0x1744000052681e02,
0x1745000052682406,
0x1746000052682602,
0x1747000052682802,
0x1748000052682c02,
0x1749000052683002,
0x174a000052683202,
0x174b000052683402,
0x174c000052683602,
0x174d000052683802,
0x174e000052683a02,
0x174f000052683e02,
0x1750000052684002,
0x1751000052686006,
0x1752000052688606,
0x1753000052689006,
0x17540000526a2006,
0x17550000526a2802,
0x17560000526a2e02,
0x17570000526a2e06,
0x17580000526a3202,
0x17590000526a3402,
0x175a0000526a3602,
0x175b0000526a3802,
0x175c0000526a3a02,
0x175d0000526a3c02,
0x175e0000526a3c06,
0x175f0000526a7206,
0x17600000526a8806,
0x17610000526c2802,
0x17620000526c3202,
0x17630000526c3402,
0x17640000526c3602,
0x17650000526c3802,
0x17660000526c3806,
0x17670000526c3a02,
0x17680000526c3a06,
0x17690000526c4806,
0x176a0000526c5e06,
0x176b0000526c7606,
0x176c0000526e1606,
0x176d0000526e1e02,
0x176e0000526e1e06,
0x176f0000526e2602,
0x17700000526e2802,
0x17710000526e2c02,
0x17720000526e3002,
0x17730000526e3202,
0x17740000526e3402,
0x17750000526e3602,
0x17760000526e3802,
0x17770000526e3a02,
0x17780000526e3e02,
0x17790000526e4002,
0x177a0000526e4206,
0x177b0000526e9006,
0x177c000052700606,
0x177d000052702802,
0x177e000052702e02,
0x177f000052702e06,
0x1780000052703202,
0x1781000052703402,
0x1782000052703602,
0x1783000052703802,
0x1784000052703a02,
0x1785000052706206,
0x1786000052707206,
0x1787000052720606,
0x1788000052721206,
0x1789000052722006,
0x178a000052722802,
0x178b000052722e02,
0x178c000052723202,
0x178d000052723402,
0x178e000052723602,
0x178f000052723802,
0x1790000052723a02,
0x1791000052726406,
0x1792000052726a06,
0x1793000052727006,
0x1794000052742802,
0x1795000052743202,
0x1796000052743402,
0x1797000052743602,
0x1798000052743802,
0x1799000052743806,
0x179a000052743a02,
0x179b000052745c06,
0x179c000052745e06,
0x179d000052762802,
0x179e000052763202,
0x179f000052763206,
0x17a0000052763402,
0x17a1000052763602,
0x17a2000052763606,
0x17a3000052763802,
0x17a4000052763a02,
0x17a5000052764806,
0x17a6000052765c06,
0x17a7000052765e06,
0x17a8000052766c06,
0x17a9000052780206,
0x17aa000052782802,
0x17ab000052782c02,
0x17ac000052783202,
0x17ad000052783402,
0x17ae000052783602,
0x17af000052783802,
0x17b0000052783a02,
0x17b1000052783e02,
0x17b2000052784002,
0x17b3000052784c06,
0x17b4000052785406,
0x17b5000052789206,
0x17b60000527a2802,
0x17b70000527a2c02,
0x17b80000527a3002,
0x17b90000527a3006,
0x17ba0000527a3202,
0x17bb0000527a3402,
0x17bc0000527a3602,
0x17bd0000527a3802,
0x17be0000527a3a02,
0x17bf0000527a3e02,
0x17c00000527a4002,
0x17c10000527a4406,
0x17c20000527a8006,
0x17c30000527c2202,
0x17c40000527c2206,
0x17c50000527c2802,
0x17c60000527c3202,
0x17c70000527c3402,
0x17c80000527c3602,
0x17c90000527c3802,
0x17ca0000527c3806,
0x17cb0000527c3a02,
0x17cc0000527c3a06,
0x17cd0000527c3c02,
0x17ce0000527c3c06,
0x17cf0000527c4a06,
0x17d00000527c8806,
0x17d10000527c9406,
0x17d20000527e2802,
0x17d30000527e3202,
0x17d40000527e3402,
0x17d50000527e3602,
0x17d60000527e3802,
0x17d70000527e3a02,
0x17d80000527e9206,
0x17d9000052802802,
0x17da000052802c02,
0x17db000052803202,
0x17dc000052803402,
0x17dd000052803602,
0x17de000052803802,
0x17df000052803a02,
0x17e0000052803e02,
0x17e1000052804002,
0x17e2000052804406,
0x17e3000052805a06,
0x17e4000052807a06,
0x17e5000052808e06,
0x17e6000052861e02,
0x17e7000052861e06,
0x17e8000052862602,
0x17e9000052862606,
0x17ea000052862802,
0x17eb000052862c02,
0x17ec000052863002,
0x17ed000052863202,
0x17ee000052863402,
0x17ef000052863602,
0x17f0000052863802,
0x17f1000052863a02,
0x17f2000052863e02,
0x17f3000052864002,
0x17f4000052864606,
0x17f5000052865806,
0x17f6000052866006,
0x17f7000052866806,
0x17f8000052882006,
0x17f9000052882802,
0x17fa000052882a06,
0x17fb000052883202,
0x17fc000052883402,
0x17fd000052883602,
0x17fe000052883802,
0x17ff000052883a02,
0x1800000052883c02,
0x1801000052884a06,
0x1802000052886a06,
0x1803000052887c06,
0x18040000528a0a06,
0x18050000528a0e06,
0x18060000528a1606,
0x18070000528a1806,
0x18080000528a1c02,
0x18090000528a2802,
0x180a0000528a2c02,
0x180b0000528a3002,
0x180c0000528a3202,
0x180d0000528a3402,
0x180e0000528a3602,
0x180f0000528a3802,
0x18100000528a3a02,
0x18110000528a3e02,
0x18120000528a4002,
0x18130000528a4206,
0x18140000528a8e06,
0x18150000528c2802,
0x18160000528c2c02,
0x18170000528c3002,
0x18180000528c3006,
0x18190000528c3202,
0x181a0000528c3402,
0x181b0000528c3602,
0x181c0000528c3802,
0x181d0000528c3a02,
0x181e0000528c3e02,
0x181f0000528c3e06,
0x18200000528c4002,
0x18210000528c5006,
0x18220000528e0a06,
0x18230000528e1c02,
0x18240000528e2802,
0x18250000528e2c02,
0x18260000528e3002,
0x18270000528e3202,
0x18280000528e3402,
0x18290000528e3602,
0x182a0000528e3802,
0x182b0000528e3a02,
0x182c0000528e3e02,
0x182d0000528e4002,
0x182e0000528e4406,
0x182f0000528e5406,
0x18300000528e5a06,
0x18310000528e8006,
0x18320000528e8a06,
0x1833000052901606,
0x1834000052901e02,
0x1835000052902406,
0x1836000052902602,
0x1837000052902802,
0x1838000052902c02,
0x1839000052903002,
0x183a000052903202,
0x183b000052903402,
0x183c000052903602,
0x183d000052903802,
0x183e000052903a02,
0x183f000052903e02,
0x1840000052904002,
0x1841000052906806,
0x1842000052906e06,
0x1843000052908206,
0x1844000052922802,
0x1845000052922c02,
0x1846000052922c06,
0x1847000052923202,
0x1848000052923402,
0x1849000052923602,
0x184a000052923802,
0x184b000052923a02,
0x184c000052923e02,
0x184d000052924002,
0x184e000052924006,
0x184f000052924c06,
0x1850000052927806,
0x1851000052927e06,
0x1852000052941006,
0x1853000052942202,
0x1854000052942802,
0x1855000052942a06,
0x1856000052943202,
0x1857000052943402,
0x1858000052943602,
0x1859000052943802,
0x185a000052943a02,
0x185b000052944a06,
0x185c000052944e06,
0x185d000052947c06,
0x185e0000540a0006,
0x185f0000540a1206,
0x18600000540a1806,
0x18610000540a8a06,
0x18620000540a8e06,
0x18630000542c3e06,
0x18640000542c4006,
0x18650000542c5a06,
0x18660000542c7806,
0x18670000542c9206,
0x1868000054421606,
0x1869000054421c02,
0x186a000054421c06,
0x186b000054422c02,
0x186c000054423002,
0x186d000054423e02,
0x186e000054424002,
0x186f000054426e06,
0x1870000054428a06,
0x1871000054441c02,
0x1872000054441c06,
0x1873000054442c02,
0x1874000054443002,
0x1875000054443e02,
0x1876000054444002,
0x1877000054447a06,
0x1878000054448006,
0x1879000054448e06,
0x187a000054482802,
0x187b000054482c02,
0x187c000054483202,
0x187d000054483402,
0x187e000054483602,
0x187f000054483606,
0x1880000054483802,
0x1881000054483a02,
0x1882000054483a06,
0x1883000054483e02,
0x1884000054484002,
0x1885000054486c06,
0x1886000054487606,
0x18870000544c0206,
0x18880000544c1406,
0x18890000544c2c02,
0x188a0000544c3402,
0x188b0000544c3e02,
0x188c0000544c4002,
0x188d0000544c6606,
0x188e0000544c7806,
0x188f0000544c9206,
0x1890000054502c02,
0x1891000054503402,
0x1892000054503406,
0x1893000054503e02,
0x1894000054504002,
0x1895000054508c06,
0x1896000054520206,
0x1897000054521406,
0x1898000054522802,
0x1899000054522c02,
0x189a000054523202,
0x189b000054523402,
0x189c000054523602,
0x189d000054523802,
0x189e000054523a02,
0x189f000054523e02,
0x18a0000054524002,
0x18a1000054526206,
0x18a2000054526606,
0x18a3000054581e02,
0x18a4000054582602,
0x18a5000054582c02,
0x18a6000054583002,
0x18a7000054583e02,
0x18a8000054584002,
0x18a9000054584606,
0x18aa000054588606,
0x18ab0000545a2c02,
0x18ac0000545a2c06,
0x18ad0000545a3e02,
0x18ae0000545a3e06,
0x18af0000545a4002,
0x18b00000545a8006,
0x18b10000545a8e06,
0x18b20000545c2802,
0x18b30000545c2806,
0x18b40000545c2c02,
0x18b50000545c3202,
0x18b60000545c3206,
0x18b70000545c3402,
0x18b80000545c3602,
0x18b90000545c3802,
0x18ba0000545c3a02,
0x18bb0000545c3e02,
0x18bc0000545c4002,
0x18bd0000545c5e06,
0x18be0000545c7406,
0x18bf0000545c7606,
0x18c00000545e2802,
0x18c10000545e2c02,
0x18c20000545e3202,
0x18c30000545e3402,
0x18c40000545e3602,
0x18c50000545e3802,
0x18c60000545e3a02,
0x18c70000545e3e02,
0x18c80000545e4002,
0x18c90000545e5c06,
0x18ca0000545e6c06,
0x18cb0000545e7406,
0x18cc0000545e7606,
0x18cd000054620206,
0x18ce000054620606,
0x18cf000054622802,
0x18d0000054622806,
0x18d1000054622c02,
0x18d2000054623202,
0x18d3000054623402,
0x18d4000054623602,
0x18d5000054623802,
0x18d6000054623806,
0x18d7000054623a02,
0x18d8000054623e02,
0x18d9000054624002,
0x18da000054625206,
0x18db000054627006,
0x18dc000054661406,
0x18dd000054662802,
0x18de000054662806,
0x18df000054662c02,
0x18e0000054663202,
0x18e1000054663402,
0x18e2000054663602,
0x18e3000054663802,
0x18e4000054663a02,
0x18e5000054663e02,
0x18e6000054664002,
0x18e7000054664c06,
0x18e8000054665206,
0x18e9000054681e02,
0x18ea000054682406,
0x18eb000054682602,
0x18ec000054682c02,
0x18ed000054683002,
0x18ee000054683e02,
0x18ef000054684002,
0x18f0000054686006,
0x18f1000054688606,
0x18f2000054689006,
0x18f30000546a2006,
0x18f40000546a2802,
0x18f50000546a2c02,
0x18f60000546a2e02,
0x18f70000546a2e06,
0x18f80000546a3202,
0x18f90000546a3402,
0x18fa0000546a3602,
0x18fb0000546a3802,
0x18fc0000546a3a02,
0x18fd0000546a3c02,
0x18fe0000546a3c06,
0x18ff0000546a3e02,
0x19000000546a4002,
0x19010000546a7206,
0x19020000546a8806,
0x19030000546c2802,
0x19040000546c2c02,
0x19050000546c3202,
0x19060000546c3402,
0x19070000546c3602,
0x19080000546c3802,
0x19090000546c3806,
0x190a0000546c3a02,
0x190b0000546c3a06,
0x190c0000546c3e02,
0x190d0000546c4002,
0x190e0000546c4806,
0x190f0000546c5e06,
0x19100000546c7606,
0x19110000546e1606,
0x19120000546e1e02,
0x19130000546e1e06,
0x19140000546e2602,
0x19150000546e2c02,
0x19160000546e3002,
0x19170000546e3e02,
0x19180000546e4002,
0x19190000546e4206,
0x191a0000546e9006,
0x191b000054700606,
0x191c000054702802,
0x191d000054702c02,
0x191e000054702e02,
0x191f000054702e06,
0x1920000054703202,
0x1921000054703402,
0x1922000054703602,
0x1923000054703802,
0x1924000054703a02,
0x1925000054703e02,
0x1926000054704002,
0x1927000054706206,
0x1928000054707206,
0x1929000054720606,
0x192a000054721206,
0x192b000054722006,
0x192c000054722802,
0x192d000054722c02,
0x192e000054722e02,
0x192f000054723202,
0x1930000054723402,
0x1931000054723602,
0x1932000054723802,
0x1933000054723a02,
0x1934000054723e02,
0x1935000054724002,
0x1936000054726406,
0x1937000054726a06,
0x1938000054727006,
0x1939000054742802,
0x193a000054742806,
0x193b000054742c02,
0x193c000054743202,
0x193d000054743402,
0x193e000054743602,
0x193f000054743802,
0x1940000054743806,
0x1941000054743a02,
0x1942000054743e02,
0x1943000054744002,
0x1944000054745c06,
0x1945000054745e06,
0x1946000054762802,
0x1947000054762c02,
0x1948000054763202,
0x1949000054763206,
0x194a000054763402,
0x194b000054763602,
0x194c000054763606,
0x194d000054763802,
0x194e000054763a02,
0x194f000054763e02,
0x1950000054764002,
0x1951000054764806,
0x1952000054765c06,
0x1953000054765e06,
0x1954000054766c06,
0x1955000054780206,
0x1956000054782c02,
0x1957000054782c06,
0x1958000054784c06,
0x1959000054789206,
0x195a0000547a2c02,
0x195b0000547a3002,
0x195c0000547a3006,
0x195d0000547a3e02,
0x195e0000547a4002,
0x195f0000547a4406,
0x19600000547a8006,
0x19610000547c2202,
0x19620000547c2206,
0x19630000547c2802,
0x19640000547c2c02,
0x19650000547c3202,
0x19660000547c3402,
0x19670000547c3602,
0x19680000547c3802,
0x19690000547c3806,
0x196a0000547c3a02,
0x196b0000547c3a06,
0x196c0000547c3c02,
0x196d0000547c3c06,
0x196e0000547c3e02,
0x196f0000547c4002,
0x19700000547c4a06,
0x19710000547c8806,
0x19720000547c9406,
0x19730000547e2c02,
0x19740000547e3402,
0x19750000547e3e02,
0x19760000547e4002,
0x19770000547e9206,
0x1978000054802c02,
0x1979000054803e02,
0x197a000054804002,
0x197b000054804406,
0x197c000054805a06,
0x197d000054807a06,
0x197e000054808e06,
0x197f000054861e02,
0x1980000054861e06,
0x1981000054862602,
0x1982000054862606,
0x1983000054862c02,
0x1984000054863002,
0x1985000054863e02,
0x1986000054864002,
0x1987000054864606,
0x1988000054865806,
0x1989000054866006,
0x198a000054866806,
0x198b000054882006,
0x198c000054882802,
0x198d000054882a06,
0x198e000054882c02,
0x198f000054883202,
0x1990000054883402,
0x1991000054883602,
0x1992000054883802,
0x1993000054883a02,
0x1994000054883c02,
0x1995000054883e02,
0x1996000054884002,
0x1997000054884a06,
0x1998000054886a06,
0x1999000054887c06,
0x199a0000548a0a06,
0x199b0000548a0e06,
0x199c0000548a1606,
0x199d0000548a1806,
0x199e0000548a1c02,
0x199f0000548a2c02,
0x19a00000548a3002,
0x19a10000548a3e02,
0x19a20000548a4002,
0x19a30000548a4206,
0x19a40000548a8e06,
0x19a50000548c2c02,
0x19a60000548c3002,
0x19a70000548c3006,
0x19a80000548c3e02,
0x19a90000548c3e06,
0x19aa0000548c4002,
0x19ab0000548c4006,
0x19ac0000548c5006,
0x19ad0000548e0a06,
0x19ae0000548e1c02,
0x19af0000548e1c06,
0x19b00000548e2c02,
0x19b10000548e3002,
0x19b20000548e3e02,
0x19b30000548e4002,
0x19b40000548e4406,
0x19b50000548e5a06,
0x19b60000548e8006,
0x19b70000548e8a06,
0x19b8000054901606,
0x19b9000054901e02,
0x19ba000054902406,
0x19bb000054902602,
0x19bc000054902c02,
0x19bd000054903002,
0x19be000054903e02,
0x19bf000054904002,
0x19c0000054906806,
0x19c1000054906e06,
0x19c2000054908206,
0x19c3000054922c02,
0x19c4000054923402,
0x19c5000054923406,
0x19c6000054923e02,
0x19c7000054924002,
0x19c8000054924006,
0x19c9000054924c06,
0x19ca000054927806,
0x19cb000054927e06,
0x19cc000054941006,
0x19cd000054942202,
0x19ce000054942802,
0x19cf000054942a06,
0x19d0000054942c02,
0x19d1000054943202,
0x19d2000054943402,
0x19d3000054943602,
0x19d4000054943802,
0x19d5000054943a02,
0x19d6000054943e02,
0x19d7000054944002,
0x19d8000054944a06,
0x19d9000054944e06,
0x19da000054947c06,
0x19db000056080006,
0x19dc000056080406,
0x19dd000056081206,
0x19de000056081a06,
0x19df000056086406,
0x19e00000561a0406,
0x19e10000561a0806,
0x19e20000561a0c06,
0x19e30000561a1006,
0x19e40000561a4e06,
0x19e5000056202a06,
0x19e6000056204e06,
0x19e7000056206406,
0x19e8000056206a06,
0x19e9000056207206,
0x19ea000056208806,
0x19eb0000564a2002,
0x19ec0000564a2a02,
0x19ed0000564a7c06,
0x19ee0000564a8806,
0x19ef0000564a9406,
0x19f00000564e1006,
0x19f10000564e1a06,
0x19f20000564e2002,
0x19f30000564e2006,
0x19f40000564e2a02,
0x19f50000564e2a06,
0x19f60000564e9406,
0x19f7000056640806,
0x19f8000056641206,
0x19f9000056642002,
0x19fa000056642006,
0x19fb000056647206,
0x19fc0000566a2002,
0x19fd0000566a2e06,
0x19fe0000566a3806,
0x19ff0000566a3c06,
0x1a000000566a7206,
0x1a010000566a8806,
0x1a02000056720606,
0x1a03000056721206,
0x1a04000056722002,
0x1a05000056722e06,
0x1a06000056726406,
0x1a07000056726a06,
0x1a08000056727006,
0x1a09000056882002,
0x1a0a000056882a02,
0x1a0b000056882a06,
0x1a0c000056883c06,
0x1a0d000056884a06,
0x1a0e000056886a06,
0x1a0f000056887c06,
0x1a10000056941006,
0x1a11000056942002,
0x1a12000056942206,
0x1a13000056942a02,
0x1a14000056944a06,
0x1a15000056944e06,
0x1a16000056947c06,
0x1a17000058261e06,
0x1a18000058263006,
0x1a19000058268606,
0x1a1a000058421606,
0x1a1b000058421c02,
0x1a1c000058421c06,
0x1a1d000058421e02,
0x1a1e000058422602,
0x1a1f000058423002,
0x1a20000058426e06,
0x1a21000058428a06,
0x1a22000058441c02,
0x1a23000058441c06,
0x1a24000058441e02,
0x1a25000058442602,
0x1a26000058443002,
0x1a27000058447a06,
0x1a28000058448006,
0x1a29000058448e06,
0x1a2a000058462406,
0x1a2b000058466006,
0x1a2c000058468406,
0x1a2d000058468606,
0x1a2e000058481e02,
0x1a2f000058482602,
0x1a30000058482802,
0x1a31000058482c02,
0x1a32000058483002,
0x1a33000058483202,
0x1a34000058483402,
0x1a35000058483602,
0x1a36000058483606,
0x1a37000058483802,
0x1a38000058483a02,
0x1a39000058483a06,
0x1a3a000058483e02,
0x1a3b000058484002,
0x1a3c000058486c06,
0x1a3d000058487606,
0x1a3e0000584c0206,
0x1a3f0000584c1406,
0x1a400000584c1e02,
0x1a410000584c2602,
0x1a420000584c2c02,
0x1a430000584c3002,
0x1a440000584c3402,
0x1a450000584c3e02,
0x1a460000584c4002,
0x1a470000584c6606,
0x1a480000584c7806,
0x1a490000584c9206,
0x1a4a000058501e02,
0x1a4b000058502602,
0x1a4c000058502c02,
0x1a4d000058503002,
0x1a4e000058503402,
0x1a4f000058503406,
0x1a50000058503e02,
0x1a51000058504002,
0x1a52000058508c06,
0x1a53000058520206,
0x1a54000058521406,
0x1a55000058521e02,
0x1a56000058522602,
0x1a57000058522802,
0x1a58000058522c02,
0x1a59000058523002,
0x1a5a000058523202,
0x1a5b000058523402,
0x1a5c000058523602,
0x1a5d000058523802,
0x1a5e000058523a02,
0x1a5f000058523e02,
0x1a60000058524002,
0x1a61000058526206,
0x1a62000058526606,
0x1a63000058540a06,
0x1a64000058541e02,
0x1a65000058542602,
0x1a66000058542c02,
0x1a67000058543002,
0x1a68000058543e02,
0x1a69000058544002,
0x1a6a000058545a06,
0x1a6b000058547806,
0x1a6c000058548e06,
0x1a6d0000585a1e02,
0x1a6e0000585a2602,
0x1a6f0000585a2c02,
0x1a700000585a2c06,
0x1a710000585a3002,
0x1a720000585a3e02,
0x1a730000585a4002,
0x1a740000585a5406,
0x1a750000585a8006,
0x1a760000585a8e06,
0x1a770000585c1e02,
0x1a780000585c2602,
0x1a790000585c2802,
0x1a7a0000585c2806,
0x1a7b0000585c2c02,
0x1a7c0000585c3002,
0x1a7d0000585c3202,
0x1a7e0000585c3206,
0x1a7f0000585c3402,
0x1a800000585c3602,
0x1a810000585c3802,
0x1a820000585c3a02,
0x1a830000585c3e02,
0x1a840000585c4002,
0x1a850000585c5e06,
0x1a860000585c7406,
0x1a870000585c7606,
0x1a880000585e1e02,
0x1a890000585e2602,
0x1a8a0000585e2802,
0x1a8b0000585e2c02,
0x1a8c0000585e3002,
0x1a8d0000585e3202,
0x1a8e0000585e3402,
0x1a8f0000585e3602,
0x1a900000585e3802,
0x1a910000585e3a02,
0x1a920000585e3e02,
0x1a930000585e4002,
0x1a940000585e5c06,
0x1a950000585e6c06,
0x1a960000585e7406,
0x1a970000585e7606,
0x1a98000058620206,
0x1a99000058620606,
0x1a9a000058621e02,
0x1a9b000058622602,
0x1a9c000058622802,
0x1a9d000058622806,
0x1a9e000058622c02,
0x1a9f000058623002,
0x1aa0000058623202,
0x1aa1000058623402,
0x1aa2000058623602,
0x1aa3000058623802,
0x1aa4000058623806,
0x1aa5000058623a02,
0x1aa6000058623e02,
0x1aa7000058624002,
0x1aa8000058625206,
0x1aa9000058627006,
0x1aaa000058661406,
0x1aab000058661e02,
0x1aac000058662602,
0x1aad000058662802,
0x1aae000058662806,
0x1aaf000058662c02,
0x1ab0000058663002,
0x1ab1000058663202,
0x1ab2000058663402,
0x1ab3000058663602,
0x1ab4000058663802,
0x1ab5000058663a02,
0x1ab6000058663e02,
0x1ab7000058664002,
0x1ab8000058664c06,
0x1ab9000058665206,
0x1aba000058681e02,
0x1abb000058682406,
0x1abc000058682602,
0x1abd000058683002,
0x1abe000058686006,
0x1abf000058688606,
0x1ac0000058689006,
0x1ac10000586a1e02,
0x1ac20000586a2006,
0x1ac30000586a2602,
0x1ac40000586a2802,
0x1ac50000586a2c02,
0x1ac60000586a2e02,
0x1ac70000586a2e06,
0x1ac80000586a3002,
0x1ac90000586a3202,
0x1aca0000586a3402,
0x1acb0000586a3602,
0x1acc0000586a3802,
0x1acd0000586a3a02,
0x1ace0000586a3c02,
0x1acf0000586a3c06,
0x1ad00000586a3e02,
0x1ad10000586a4002,
0x1ad20000586a7206,
0x1ad30000586a8806,
0x1ad40000586c1e02,
0x1ad50000586c2602,
0x1ad60000586c2802,
0x1ad70000586c2c02,
0x1ad80000586c3002,
0x1ad90000586c3202,
0x1ada0000586c3402,
0x1adb0000586c3602,
0x1adc0000586c3802,
0x1add0000586c3806,
0x1ade0000586c3a02,
0x1adf0000586c3a06,
0x1ae00000586c3e02,
0x1ae10000586c4002,
0x1ae20000586c4806,
0x1ae30000586c5e06,
0x1ae40000586c7606,
0x1ae50000586e1606,
0x1ae60000586e1e02,
0x1ae70000586e1e06,
0x1ae80000586e2602,
0x1ae90000586e3002,
0x1aea0000586e3006,
0x1aeb0000586e4206,
0x1aec0000586e9006,
0x1aed000058700606,
0x1aee000058701e02,
0x1aef000058702602,
0x1af0000058702802,
0x1af1000058702c02,
0x1af2000058702e02,
0x1af3000058702e06,
0x1af4000058703002,
0x1af5000058703202,
0x1af6000058703402,
0x1af7000058703602,
0x1af8000058703802,
0x1af9000058703a02,
0x1afa000058703e02,
0x1afb000058704002,
0x1afc000058706206,
0x1afd000058707206,
0x1afe000058720606,
0x1aff000058721206,
0x1b00000058721e02,
0x1b01000058722006,
0x1b02000058722602,
0x1b03000058722802,
0x1b04000058722c02,
0x1b05000058722e02,
0x1b06000058723002,
0x1b07000058723202,
0x1b08000058723402,
0x1b09000058723602,
0x1b0a000058723802,
0x1b0b000058723a02,
0x1b0c000058723e02,
0x1b0d000058724002,
0x1b0e000058726406,
0x1b0f000058726a06,
0x1b10000058727006,
0x1b11000058741e02,
0x1b12000058742602,
0x1b13000058742802,
0x1b14000058742806,
0x1b15000058742c02,
0x1b16000058743002,
0x1b17000058743202,
0x1b18000058743402,
0x1b19000058743602,
0x1b1a000058743802,
0x1b1b000058743806,
0x1b1c000058743a02,
0x1b1d000058743e02,
0x1b1e000058744002,
0x1b1f000058745c06,
0x1b20000058745e06,
0x1b21000058761e02,
0x1b22000058762602,
0x1b23000058762802,
0x1b24000058762c02,
0x1b25000058763002,
0x1b26000058763202,
0x1b27000058763206,
0x1b28000058763402,
0x1b29000058763602,
0x1b2a000058763606,
0x1b2b000058763802,
0x1b2c000058763a02,
0x1b2d000058763e02,
0x1b2e000058764002,
0x1b2f000058764806,
0x1b30000058765c06,
0x1b31000058765e06,
0x1b32000058766c06,
0x1b33000058780206,
0x1b34000058781e02,
0x1b35000058782602,
0x1b36000058782c02,
0x1b37000058783002,
0x1b38000058783e02,
0x1b39000058784002,
0x1b3a000058784c06,
0x1b3b000058785406,
0x1b3c000058789206,
0x1b3d0000587a1e02,
0x1b3e0000587a2602,
0x1b3f0000587a3002,
0x1b400000587a3e02,
0x1b410000587a3e06,
0x1b420000587a4406,
0x1b430000587a8006,
0x1b440000587c1e02,
0x1b450000587c2202,
0x1b460000587c2206,
0x1b470000587c2602,
0x1b480000587c2802,
0x1b490000587c2c02,
0x1b4a0000587c3002,
0x1b4b0000587c3202,
0x1b4c0000587c3402,
0x1b4d0000587c3602,
0x1b4e0000587c3802,
0x1b4f0000587c3806,
0x1b500000587c3a02,
0x1b510000587c3a06,
0x1b520000587c3c02,
0x1b530000587c3c06,
0x1b540000587c3e02,
0x1b550000587c4002,
0x1b560000587c4a06,
0x1b570000587c8806,
0x1b580000587c9406,
0x1b590000587e1e02,
0x1b5a0000587e2602,
0x1b5b0000587e2c02,
0x1b5c0000587e3002,
0x1b5d0000587e3402,
0x1b5e0000587e3e02,
0x1b5f0000587e4002,
0x1b600000587e9206,
0x1b61000058801e02,
0x1b62000058802602,
0x1b63000058803002,
0x1b64000058803e02,
0x1b65000058804406,
0x1b66000058805a06,
0x1b67000058807a06,
0x1b68000058808e06,
0x1b69000058861e02,
0x1b6a000058861e06,
0x1b6b000058862602,
0x1b6c000058862606,
0x1b6d000058863002,
0x1b6e000058864606,
0x1b6f000058866006,
0x1b70000058866806,
0x1b71000058881e02,
0x1b72000058882006,
0x1b73000058882602,
0x1b74000058882802,
0x1b75000058882a06,
0x1b76000058882c02,
0x1b77000058883002,
0x1b78000058883202,
0x1b79000058883402,
0x1b7a000058883602,
0x1b7b000058883802,
0x1b7c000058883a02,
0x1b7d000058883c02,
0x1b7e000058883e02,
0x1b7f000058884002,
0x1b80000058884a06,
0x1b81000058886a06,
0x1b82000058887c06,
0x1b830000588a0a06,
0x1b840000588a0e06,
0x1b850000588a1606,
0x1b860000588a1806,
0x1b870000588a1c02,
0x1b880000588a1e02,
0x1b890000588a2602,
0x1b8a0000588a3002,
0x1b8b0000588a4206,
0x1b8c0000588a8e06,
0x1b8d0000588c1e02,
0x1b8e0000588c2602,
0x1b8f0000588c2c02,
0x1b900000588c3002,
0x1b910000588c3e02,
0x1b920000588c3e06,
0x1b930000588c4002,
0x1b940000588c4006,
0x1b950000588c5006,
0x1b960000588e0a06,
0x1b970000588e1c02,
0x1b980000588e1e02,
0x1b990000588e2602,
0x1b9a0000588e3002,
0x1b9b0000588e4406,
0x1b9c0000588e5406,
0x1b9d0000588e5a06,
0x1b9e0000588e8006,
0x1b9f0000588e8a06,
0x1ba0000058901606,
0x1ba1000058901e02,
0x1ba2000058902406,
0x1ba3000058902602,
0x1ba4000058903002,
0x1ba5000058906806,
0x1ba6000058906e06,
0x1ba7000058908206,
0x1ba8000058921e02,
0x1ba9000058922602,
0x1baa000058922c02,
0x1bab000058922c06,
0x1bac000058923002,
0x1bad000058923402,
0x1bae000058923406,
0x1baf000058923e02,
0x1bb0000058924002,
0x1bb1000058924006,
0x1bb2000058924c06,
0x1bb3000058927806,
0x1bb4000058927e06,
0x1bb5000058941006,
0x1bb6000058941e02,
0x1bb7000058942202,
0x1bb8000058942602,
0x1bb9000058942802,
0x1bba000058942a06,
0x1bbb000058942c02,
0x1bbc000058943002,
0x1bbd000058943202,
0x1bbe000058943402,
0x1bbf000058943602,
0x1bc0000058943802,
0x1bc1000058943a02,
0x1bc2000058943e02,
0x1bc3000058944002,
0x1bc4000058944a06,
0x1bc5000058944e06,
0x1bc6000058947c06,
0x1bc700005a2c3e06,
0x1bc800005a2c4006,
0x1bc900005a2c5406,
0x1bca00005a2c7806,
0x1bcb00005a2c9206,
0x1bcc00005a3e2c06,
0x1bcd00005a3e3006,
0x1bce00005a3e4006,
0x1bcf00005a3e7a06,
0x1bd000005a3e8006,
0x1bd100005a3e8c06,
0x1bd200005a421606,
0x1bd300005a421c02,
0x1bd400005a421c06,
0x1bd500005a422c02,
0x1bd600005a423002,
0x1bd700005a423e02,
0x1bd800005a424002,
0x1bd900005a426e06,
0x1bda00005a428a06,
0x1bdb00005a441c02,
0x1bdc00005a441c06,
0x1bdd00005a442c02,
0x1bde00005a443002,
0x1bdf00005a443e02,
0x1be000005a444002,
0x1be100005a447a06,
0x1be200005a448006,
0x1be300005a448e06,
0x1be400005a482802,
0x1be500005a482c02,
0x1be600005a483202,
0x1be700005a483402,
0x1be800005a483602,
0x1be900005a483606,
0x1bea00005a483802,
0x1beb00005a483a02,
0x1bec00005a483a06,
0x1bed00005a483e02,
0x1bee00005a484002,
0x1bef00005a486c06,
0x1bf000005a487606,
0x1bf100005a4c0206,
0x1bf200005a4c1406,
0x1bf300005a4c2c02,
0x1bf400005a4c3402,
0x1bf500005a4c3e02,
0x1bf600005a4c4002,
0x1bf700005a4c6606,
0x1bf800005a4c7806,
0x1bf900005a4c9206,
0x1bfa00005a502c02,
0x1bfb00005a503402,
0x1bfc00005a503406,
0x1bfd00005a503e02,
0x1bfe00005a504002,
0x1bff00005a508c06,
0x1c0000005a520206,
0x1c0100005a521406,
0x1c0200005a522802,
0x1c0300005a522c02,
0x1c0400005a523202,
0x1c0500005a523402,
0x1c0600005a523602,
0x1c0700005a523802,
0x1c0800005a523a02,
0x1c0900005a523e02,
0x1c0a00005a524002,
0x1c0b00005a526206,
0x1c0c00005a526606,
0x1c0d00005a540a06,
0x1c0e00005a542c02,
0x1c0f00005a542c06,
0x1c1000005a543e02,
0x1c1100005a544002,
0x1c1200005a547806,
0x1c1300005a548e06,
0x1c1400005a581e02,
0x1c1500005a582602,
0x1c1600005a582c02,
0x1c1700005a583002,
0x1c1800005a583e02,
0x1c1900005a584002,
0x1c1a00005a584606,
0x1c1b00005a588606,
0x1c1c00005a5c2802,
0x1c1d00005a5c2806,
0x1c1e00005a5c2c02,
0x1c1f00005a5c3202,
0x1c2000005a5c3206,
0x1c2100005a5c3402,
0x1c2200005a5c3602,
0x1c2300005a5c3802,
0x1c2400005a5c3a02,
0x1c2500005a5c3e02,
0x1c2600005a5c4002,
0x1c2700005a5c5e06,
0x1c2800005a5c7406,
0x1c2900005a5c7606,
0x1c2a00005a5e2802,
0x1c2b00005a5e2c02,
0x1c2c00005a5e3202,
0x1c2d00005a5e3402,
0x1c2e00005a5e3602,
0x1c2f00005a5e3802,
0x1c3000005a5e3a02,
0x1c3100005a5e3e02,
0x1c3200005a5e4002,
0x1c3300005a5e5c06,
0x1c3400005a5e6c06,
0x1c3500005a5e7406,
0x1c3600005a5e7606,
0x1c3700005a620206,
0x1c3800005a620606,
0x1c3900005a622802,
0x1c3a00005a622806,
0x1c3b00005a622c02,
0x1c3c00005a623202,
0x1c3d00005a623402,
0x1c3e00005a623602,
0x1c3f00005a623802,
0x1c4000005a623806,
0x1c4100005a623a02,
0x1c4200005a623e02,
0x1c4300005a624002,
0x1c4400005a625206,
0x1c4500005a627006,
0x1c4600005a661406,
0x1c4700005a662802,
0x1c4800005a662806,
0x1c4900005a662c02,
0x1c4a00005a663202,
0x1c4b00005a663402,
0x1c4c00005a663602,
0x1c4d00005a663802,
0x1c4e00005a663a02,
0x1c4f00005a663e02,
0x1c5000005a664002,
0x1c5100005a664c06,
0x1c5200005a665206,
0x1c5300005a681e02,
0x1c5400005a682406,
0x1c5500005a682602,
0x1c5600005a682c02,
0x1c5700005a683002,
0x1c5800005a683e02,
0x1c5900005a684002,
0x1c5a00005a686006,
0x1c5b00005a688606,
0x1c5c00005a689006,
0x1c5d00005a6a2006,
0x1c5e00005a6a2802,
0x1c5f00005a6a2c02,
0x1c6000005a6a2e02,
0x1c6100005a6a2e06,
0x1c6200005a6a3202,
0x1c6300005a6a3402,
0x1c6400005a6a3602,
0x1c6500005a6a3802,
0x1c6600005a6a3a02,
0x1c6700005a6a3c02,
0x1c6800005a6a3c06,
0x1c6900005a6a3e02,
0x1c6a00005a6a4002,
0x1c6b00005a6a7206,
0x1c6c00005a6a8806,
0x1c6d00005a6c2802,
0x1c6e00005a6c2c02,
0x1c6f00005a6c3202,
0x1c7000005a6c3402,
0x1c7100005a6c3602,
0x1c7200005a6c3802,
0x1c7300005a6c3806,
0x1c7400005a6c3a02,
0x1c7500005a6c3a06,
0x1c7600005a6c3e02,
0x1c7700005a6c4002,
0x1c7800005a6c4806,
0x1c7900005a6c5e06,
0x1c7a00005a6c7606,
0x1c7b00005a6e1606,
0x1c7c00005a6e1e02,
0x1c7d00005a6e1e06,
0x1c7e00005a6e2602,
0x1c7f00005a6e2c02,
0x1c8000005a6e3002,
0x1c8100005a6e3e02,
0x1c8200005a6e4002,
0x1c8300005a6e4206,
0x1c8400005a6e9006,
0x1c8500005a700606,
0x1c8600005a702802,
0x1c8700005a702c02,
0x1c8800005a702e02,
0x1c8900005a702e06,
0x1c8a00005a703202,
0x1c8b00005a703402,
0x1c8c00005a703602,
0x1c8d00005a703802,
0x1c8e00005a703a02,
0x1c8f00005a703e02,
0x1c9000005a704002,
0x1c9100005a706206,
0x1c9200005a707206,
0x1c9300005a720606,
0x1c9400005a721206,
0x1c9500005a722006,
0x1c9600005a722802,
0x1c9700005a722c02,
0x1c9800005a722e02,
0x1c9900005a723202,
0x1c9a00005a723402,
0x1c9b00005a723602,
0x1c9c00005a723802,
0x1c9d00005a723a02,
0x1c9e00005a723e02,
0x1c9f00005a724002,
0x1ca000005a726406,
0x1ca100005a726a06,
0x1ca200005a727006,
0x1ca300005a742802,
0x1ca400005a742806,
0x1ca500005a742c02,
0x1ca600005a743202,
0x1ca700005a743402,
0x1ca800005a743602,
0x1ca900005a743802,
0x1caa00005a743806,
0x1cab00005a743a02,
0x1cac00005a743e02,
0x1cad00005a744002,
0x1cae00005a745c06,
0x1caf00005a745e06,
0x1cb000005a762802,
0x1cb100005a762c02,
0x1cb200005a763202,
0x1cb300005a763206,
0x1cb400005a763402,
0x1cb500005a763602,
0x1cb600005a763606,
0x1cb700005a763802,
0x1cb800005a763a02,
0x1cb900005a763e02,
0x1cba00005a764002,
0x1cbb00005a764806,
0x1cbc00005a765c06,
0x1cbd00005a765e06,
0x1cbe00005a766c06,
0x1cbf00005a780206,
0x1cc000005a782c02,
0x1cc100005a783e02,
0x1cc200005a784002,
0x1cc300005a784c06,
0x1cc400005a785406,
0x1cc500005a789206,
0x1cc600005a7a2c02,
0x1cc700005a7a3002,
0x1cc800005a7a3006,
0x1cc900005a7a3e02,
0x1cca00005a7a4002,
0x1ccb00005a7a4406,
0x1ccc00005a7a8006,
0x1ccd00005a7c2202,
0x1cce00005a7c2206,
0x1ccf00005a7c2802,
0x1cd000005a7c2c02,
0x1cd100005a7c3202,
0x1cd200005a7c3402,
0x1cd300005a7c3602,
0x1cd400005a7c3802,
0x1cd500005a7c3806,
0x1cd600005a7c3a02,
0x1cd700005a7c3a06,
0x1cd800005a7c3c02,
0x1cd900005a7c3c06,
0x1cda00005a7c3e02,
0x1cdb00005a7c4002,
0x1cdc00005a7c4a06,
0x1cdd00005a7c8806,
0x1cde00005a7c9406,
0x1cdf00005a7e2c02,
0x1ce000005a7e3402,
0x1ce100005a7e3e02,
0x1ce200005a7e4002,
0x1ce300005a7e9206,
0x1ce400005a802c02,
0x1ce500005a803e02,
0x1ce600005a803e06,
0x1ce700005a804002,
0x1ce800005a804406,
0x1ce900005a807a06,
0x1cea00005a808e06,
0x1ceb00005a861e02,
0x1cec00005a861e06,
0x1ced00005a862602,
0x1cee00005a862606,
0x1cef00005a862c02,
0x1cf000005a863002,
0x1cf100005a863e02,
0x1cf200005a864002,
0x1cf300005a864606,
0x1cf400005a865806,
0x1cf500005a866006,
0x1cf600005a866806,
0x1cf700005a882006,
0x1cf800005a882802,
0x1cf900005a882a06,
0x1cfa00005a882c02,
0x1cfb00005a883202,
0x1cfc00005a883402,
0x1cfd00005a883602,
0x1cfe00005a883802,
0x1cff00005a883a02,
0x1d0000005a883c02,
0x1d0100005a883e02,
0x1d0200005a884002,
0x1d0300005a884a06,
0x1d0400005a886a06,
0x1d0500005a887c06,
0x1d0600005a8a0a06,
0x1d0700005a8a0e06,
0x1d0800005a8a1606,
0x1d0900005a8a1806,
0x1d0a00005a8a1c02,
0x1d0b00005a8a2c02,
0x1d0c00005a8a3002,
0x1d0d00005a8a3e02,
0x1d0e00005a8a4002,
0x1d0f00005a8a4206,
0x1d1000005a8a8e06,
0x1d1100005a8c2c02,
0x1d1200005a8c3002,
0x1d1300005a8c3006,
0x1d1400005a8c3e02,
0x1d1500005a8c3e06,
0x1d1600005a8c4002,
0x1d1700005a8c4006,
0x1d1800005a8c5006,
0x1d1900005a8e0a06,
0x1d1a00005a8e1c02,
0x1d1b00005a8e1c06,
0x1d1c00005a8e2c02,
0x1d1d00005a8e3002,
0x1d1e00005a8e3e02,
0x1d1f00005a8e4002,
0x1d2000005a8e4406,
0x1d2100005a8e5406,
0x1d2200005a8e8006,
0x1d2300005a8e8a06,
0x1d2400005a901606,
0x1d2500005a901e02,
0x1d2600005a902406,
0x1d2700005a902602,
0x1d2800005a902c02,
0x1d2900005a903002,
0x1d2a00005a903e02,
0x1d2b00005a904002,
0x1d2c00005a906806,
0x1d2d00005a906e06,
0x1d2e00005a908206,
0x1d2f00005a922c02,
0x1d3000005a922c06,
0x1d3100005a923402,
0x1d3200005a923406,
0x1d3300005a923e02,
0x1d3400005a924002,
0x1d3500005a924006,
0x1d3600005a924c06,
0x1d3700005a927806,
0x1d3800005a927e06,
0x1d3900005a941006,
0x1d3a00005a942202,
0x1d3b00005a942802,
0x1d3c00005a942a06,
0x1d3d00005a942c02,
0x1d3e00005a943202,
0x1d3f00005a943402,
0x1d4000005a943602,
0x1d4100005a943802,
0x1d4200005a943a02,
0x1d4300005a943e02,
0x1d4400005a944002,
0x1d4500005a944a06,
0x1d4600005a944e06,
0x1d4700005a947c06,
0x1d4800005c283206,
0x1d4900005c283406,
0x1d4a00005c283806,
0x1d4b00005c285206,
0x1d4c00005c286206,
0x1d4d00005c286606,
0x1d4e00005c287406,
0x1d4f00005c322806,
0x1d5000005c323406,
0x1d5100005c323606,
0x1d5200005c327606,
0x1d5300005c421606,
0x1d5400005c421c02,
0x1d5500005c421c06,
0x1d5600005c422802,
0x1d5700005c422c02,
0x1d5800005c423002,
0x1d5900005c423202,
0x1d5a00005c423402,
0x1d5b00005c423602,
0x1d5c00005c423802,
0x1d5d00005c423a02,
0x1d5e00005c423e02,
0x1d5f00005c424002,
0x1d6000005c426e06,
0x1d6100005c428a06,
0x1d6200005c441c02,
0x1d6300005c441c06,
0x1d6400005c442802,
0x1d6500005c442c02,
0x1d6600005c443002,
0x1d6700005c443202,
0x1d6800005c443402,
0x1d6900005c443602,
0x1d6a00005c443802,
0x1d6b00005c443a02,
0x1d6c00005c443e02,
0x1d6d00005c444002,
0x1d6e00005c447a06,
0x1d6f00005c448006,
0x1d7000005c448e06,
0x1d7100005c482802,
0x1d7200005c483202,
0x1d7300005c483402,
0x1d7400005c483602,
0x1d7500005c483606,
0x1d7600005c483802,
0x1d7700005c483a02,
0x1d7800005c483a06,
0x1d7900005c486c06,
0x1d7a00005c487606,
0x1d7b00005c4c0206,
0x1d7c00005c4c1406,
0x1d7d00005c4c2802,
0x1d7e00005c4c3202,
0x1d7f00005c4c3402,
0x1d8000005c4c3602,
0x1d8100005c4c3802,
0x1d8200005c4c3a02,
0x1d8300005c4c6606,
0x1d8400005c4c7806,
0x1d8500005c4c9206,
0x1d8600005c502802,
0x1d8700005c503202,
0x1d8800005c503402,
0x1d8900005c503602,
0x1d8a00005c503802,
0x1d8b00005c503a02,
0x1d8c00005c504002,
0x1d8d00005c504006,
0x1d8e00005c508c06,
0x1d8f00005c520206,
0x1d9000005c521406,
0x1d9100005c522802,
0x1d9200005c523202,
0x1d9300005c523402,
0x1d9400005c523602,
0x1d9500005c523802,
0x1d9600005c523a02,
0x1d9700005c526206,
0x1d9800005c526606,
0x1d9900005c540a06,
0x1d9a00005c542802,
0x1d9b00005c542c02,
0x1d9c00005c543202,
0x1d9d00005c543402,
0x1d9e00005c543602,
0x1d9f00005c543802,
0x1da000005c543a02,
0x1da100005c543e02,
0x1da200005c544002,
0x1da300005c545a06,
0x1da400005c547806,
0x1da500005c548e06,
0x1da600005c581e02,
0x1da700005c582602,
0x1da800005c582802,
0x1da900005c582c02,
0x1daa00005c583002,
0x1dab00005c583202,
0x1dac00005c583402,
0x1dad00005c583602,
0x1dae00005c583802,
0x1daf00005c583a02,
0x1db000005c583e02,
0x1db100005c584002,
0x1db200005c584606,
0x1db300005c588606,
0x1db400005c5a2802,
0x1db500005c5a2c02,
0x1db600005c5a2c06,
0x1db700005c5a3202,
0x1db800005c5a3402,
0x1db900005c5a3602,
0x1dba00005c5a3802,
0x1dbb00005c5a3a02,
0x1dbc00005c5a3e02,
0x1dbd00005c5a3e06,
0x1dbe00005c5a4002,
0x1dbf00005c5a5406,
0x1dc000005c5a8006,
0x1dc100005c5a8e06,
0x1dc200005c5e2802,
0x1dc300005c5e3202,
0x1dc400005c5e3402,
0x1dc500005c5e3602,
0x1dc600005c5e3802,
0x1dc700005c5e3806,
0x1dc800005c5e3a02,
0x1dc900005c5e6c06,
0x1dca00005c5e7406,
0x1dcb00005c5e7606,
0x1dcc00005c620206,
0x1dcd00005c620606,
0x1dce00005c622802,
0x1dcf00005c622806,
0x1dd000005c623202,
0x1dd100005c623402,
0x1dd200005c623602,
0x1dd300005c623802,
0x1dd400005c623806,
0x1dd500005c623a02,
0x1dd600005c625206,
0x1dd700005c627006,
0x1dd800005c661406,
0x1dd900005c662802,
0x1dda00005c662806,
0x1ddb00005c663202,
0x1ddc00005c663402,
0x1ddd00005c663406,
0x1dde00005c663602,
0x1ddf00005c663802,
0x1de000005c663a02,
0x1de100005c664c06,
0x1de200005c665206,
0x1de300005c681e02,
0x1de400005c682406,
0x1de500005c682602,
0x1de600005c682802,
0x1de700005c682c02,
0x1de800005c683002,
0x1de900005c683202,
0x1dea00005c683402,
0x1deb00005c683602,
0x1dec00005c683802,
0x1ded00005c683a02,
0x1dee00005c683e02,
0x1def00005c684002,
0x1df000005c686006,
0x1df100005c688606,
0x1df200005c689006,
0x1df300005c6a2006,
0x1df400005c6a2802,
0x1df500005c6a2e02,
0x1df600005c6a2e06,
0x1df700005c6a3202,
0x1df800005c6a3402,
0x1df900005c6a3602,
0x1dfa00005c6a3802,
0x1dfb00005c6a3a02,
0x1dfc00005c6a3c02,
0x1dfd00005c6a3c06,
0x1dfe00005c6a7206,
0x1dff00005c6a8806,
0x1e0000005c6c2802,
0x1e0100005c6c3202,
0x1e0200005c6c3402,
0x1e0300005c6c3602,
0x1e0400005c6c3802,
0x1e0500005c6c3806,
0x1e0600005c6c3a02,
0x1e0700005c6c3a06,
0x1e0800005c6c4806,
0x1e0900005c6c5e06,
0x1e0a00005c6c7606,
0x1e0b00005c6e1606,
0x1e0c00005c6e1e02,
0x1e0d00005c6e1e06,
0x1e0e00005c6e2602,
0x1e0f00005c6e2802,
0x1e1000005c6e2c02,
0x1e1100005c6e3002,
0x1e1200005c6e3202,
0x1e1300005c6e3402,
0x1e1400005c6e3602,
0x1e1500005c6e3802,
0x1e1600005c6e3a02,
0x1e1700005c6e3e02,
0x1e1800005c6e4002,
0x1e1900005c6e4206,
0x1e1a00005c6e9006,
0x1e1b00005c700606,
0x1e1c00005c702802,
0x1e1d00005c702e02,
0x1e1e00005c702e06,
0x1e1f00005c703202,
0x1e2000005c703402,
0x1e2100005c703602,
0x1e2200005c703802,
0x1e2300005c703a02,
0x1e2400005c706206,
0x1e2500005c707206,
0x1e2600005c720606,
0x1e2700005c721206,
0x1e2800005c722006,
0x1e2900005c722802,
0x1e2a00005c722e02,
0x1e2b00005c723202,
0x1e2c00005c723402,
0x1e2d00005c723602,
0x1e2e00005c723802,
0x1e2f00005c723a02,
0x1e3000005c726406,
0x1e3100005c726a06,
0x1e3200005c727006,
0x1e3300005c742802,
0x1e3400005c742806,
0x1e3500005c743202,
0x1e3600005c743402,
0x1e3700005c743602,
0x1e3800005c743802,
0x1e3900005c743806,
0x1e3a00005c743a02,
0x1e3b00005c745e06,
0x1e3c00005c762802,
0x1e3d00005c763202,
0x1e3e00005c763206,
0x1e3f00005c763402,
0x1e4000005c763602,
0x1e4100005c763606,
0x1e4200005c763802,
0x1e4300005c763a02,
0x1e4400005c764806,
0x1e4500005c765e06,
0x1e4600005c766c06,
0x1e4700005c780206,
0x1e4800005c782802,
0x1e4900005c782c02,
0x1e4a00005c783202,
0x1e4b00005c783402,
0x1e4c00005c783602,
0x1e4d00005c783802,
0x1e4e00005c783a02,
0x1e4f00005c783e02,
0x1e5000005c784002,
0x1e5100005c784c06,
0x1e5200005c785406,
0x1e5300005c789206,
0x1e5400005c7a2802,
0x1e5500005c7a2c02,
0x1e5600005c7a3002,
0x1e5700005c7a3006,
0x1e5800005c7a3202,
0x1e5900005c7a3402,
0x1e5a00005c7a3602,
0x1e5b00005c7a3802,
0x1e5c00005c7a3a02,
0x1e5d00005c7a3e02,
0x1e5e00005c7a4002,
0x1e5f00005c7a4406,
0x1e6000005c7a8006,
0x1e6100005c7c2202,
0x1e6200005c7c2206,
0x1e6300005c7c2802,
0x1e6400005c7c3202,
0x1e6500005c7c3402,
0x1e6600005c7c3602,
0x1e6700005c7c3802,
0x1e6800005c7c3806,
0x1e6900005c7c3a02,
0x1e6a00005c7c3a06,
0x1e6b00005c7c3c02,
0x1e6c00005c7c3c06,
0x1e6d00005c7c4a06,
0x1e6e00005c7c8806,
0x1e6f00005c7c9406,
0x1e7000005c7e2802,
0x1e7100005c7e3202,
0x1e7200005c7e3402,
0x1e7300005c7e3602,
0x1e7400005c7e3802,
0x1e7500005c7e3a02,
0x1e7600005c7e9206,
0x1e7700005c802802,
0x1e7800005c802c02,
0x1e7900005c803202,
0x1e7a00005c803402,
0x1e7b00005c803602,
0x1e7c00005c803802,
0x1e7d00005c803a02,
0x1e7e00005c803e02,
0x1e7f00005c804002,
0x1e8000005c804406,
0x1e8100005c805a06,
0x1e8200005c807a06,
0x1e8300005c808e06,
0x1e8400005c861e02,
0x1e8500005c861e06,
0x1e8600005c862602,
0x1e8700005c862606,
0x1e8800005c862802,
0x1e8900005c862c02,
0x1e8a00005c863002,
0x1e8b00005c863202,
0x1e8c00005c863402,
0x1e8d00005c863602,
0x1e8e00005c863802,
0x1e8f00005c863a02,
0x1e9000005c863e02,
0x1e9100005c864002,
0x1e9200005c864606,
0x1e9300005c865806,
0x1e9400005c866006,
0x1e9500005c866806,
0x1e9600005c882006,
0x1e9700005c882802,
0x1e9800005c882a06,
0x1e9900005c883202,
0x1e9a00005c883402,
0x1e9b00005c883602,
0x1e9c00005c883802,
0x1e9d00005c883a02,
0x1e9e00005c883c02,
0x1e9f00005c884a06,
0x1ea000005c886a06,
0x1ea100005c887c06,
0x1ea200005c8a0a06,
0x1ea300005c8a0e06,
0x1ea400005c8a1606,
0x1ea500005c8a1806,
0x1ea600005c8a1c02,
0x1ea700005c8a2802,
0x1ea800005c8a2c02,
0x1ea900005c8a3002,
0x1eaa00005c8a3202,
0x1eab00005c8a3402,
0x1eac00005c8a3602,
0x1ead00005c8a3802,
0x1eae00005c8a3a02,
0x1eaf00005c8a3e02,
0x1eb000005c8a4002,
0x1eb100005c8a4206,
0x1eb200005c8a8e06,
0x1eb300005c8c2802,
0x1eb400005c8c2c02,
0x1eb500005c8c3002,
0x1eb600005c8c3006,
0x1eb700005c8c3202,
0x1eb800005c8c3402,
0x1eb900005c8c3602,
0x1eba00005c8c3802,
0x1ebb00005c8c3a02,
0x1ebc00005c8c3e02,
0x1ebd00005c8c3e06,
0x1ebe00005c8c4002,
0x1ebf00005c8c5006,
0x1ec000005c8e0a06,
0x1ec100005c8e1c02,
0x1ec200005c8e2802,
0x1ec300005c8e2c02,
0x1ec400005c8e3002,
0x1ec500005c8e3202,
0x1ec600005c8e3402,
0x1ec700005c8e3602,
0x1ec800005c8e3802,
0x1ec900005c8e3a02,
0x1eca00005c8e3e02,
0x1ecb00005c8e4002,
0x1ecc00005c8e4406,
0x1ecd00005c8e5406,
0x1ece00005c8e5a06,
0x1ecf00005c8e8006,
0x1ed000005c8e8a06,
0x1ed100005c901606,
0x1ed200005c901e02,
0x1ed300005c902406,
0x1ed400005c902602,
0x1ed500005c902802,
0x1ed600005c902c02,
0x1ed700005c903002,
0x1ed800005c903202,
0x1ed900005c903402,
0x1eda00005c903602,
0x1edb00005c903802,
0x1edc00005c903a02,
0x1edd00005c903e02,
0x1ede00005c904002,
0x1edf00005c906806,
0x1ee000005c906e06,
0x1ee100005c908206,
0x1ee200005c922802,
0x1ee300005c922c02,
0x1ee400005c922c06,
0x1ee500005c923202,
0x1ee600005c923402,
0x1ee700005c923602,
0x1ee800005c923802,
0x1ee900005c923a02,
0x1eea00005c923e02,
0x1eeb00005c924002,
0x1eec00005c924006,
0x1eed00005c924c06,
0x1eee00005c927806,
0x1eef00005c927e06,
0x1ef000005c941006,
0x1ef100005c942202,
0x1ef200005c942802,
0x1ef300005c942a06,
0x1ef400005c943202,
0x1ef500005c943402,
0x1ef600005c943602,
0x1ef700005c943802,
0x1ef800005c943a02,
0x1ef900005c944a06,
0x1efa00005c944e06,
0x1efb00005c947c06,
0x1efc00005e382806,
0x1efd00005e382e06,
0x1efe00005e383a06,
0x1eff00005e383c06,
0x1f0000005e386206,
0x1f0100005e386a06,
0x1f0200005e386c06,
0x1f0300005e387006,
0x1f0400005e387406,
0x1f0500005e387c06,
0x1f0600005e421606,
0x1f0700005e421c02,
0x1f0800005e421c06,
0x1f0900005e422802,
0x1f0a00005e422c02,
0x1f0b00005e423002,
0x1f0c00005e423202,
0x1f0d00005e423402,
0x1f0e00005e423602,
0x1f0f00005e423802,
0x1f1000005e423a02,
0x1f1100005e423e02,
0x1f1200005e424002,
0x1f1300005e426e06,
0x1f1400005e428a06,
0x1f1500005e441c02,
0x1f1600005e441c06,
0x1f1700005e442802,
0x1f1800005e442c02,
0x1f1900005e443002,
0x1f1a00005e443202,
0x1f1b00005e443402,
0x1f1c00005e443602,
0x1f1d00005e443802,
0x1f1e00005e443a02,
0x1f1f00005e443e02,
0x1f2000005e444002,
0x1f2100005e447a06,
0x1f2200005e448006,
0x1f2300005e448e06,
0x1f2400005e482802,
0x1f2500005e483202,
0x1f2600005e483402,
0x1f2700005e483602,
0x1f2800005e483606,
0x1f2900005e483802,
0x1f2a00005e483a02,
0x1f2b00005e483a06,
0x1f2c00005e486c06,
0x1f2d00005e487606,
0x1f2e00005e4c0206,
0x1f2f00005e4c1406,
0x1f3000005e4c2802,
0x1f3100005e4c3202,
0x1f3200005e4c3402,
0x1f3300005e4c3602,
0x1f3400005e4c3802,
0x1f3500005e4c3a02,
0x1f3600005e4c6606,
0x1f3700005e4c7806,
0x1f3800005e4c9206,
0x1f3900005e502802,
0x1f3a00005e503202,
0x1f3b00005e503402,
0x1f3c00005e503602,
0x1f3d00005e503802,
0x1f3e00005e503a02,
0x1f3f00005e504002,
0x1f4000005e504006,
0x1f4100005e508c06,
0x1f4200005e520206,
0x1f4300005e521406,
0x1f4400005e522802,
0x1f4500005e523202,
0x1f4600005e523402,
0x1f4700005e523602,
0x1f4800005e523802,
0x1f4900005e523a02,
0x1f4a00005e526206,
0x1f4b00005e526606,
0x1f4c00005e540a06,
0x1f4d00005e542802,
0x1f4e00005e542c02,
0x1f4f00005e543202,
0x1f5000005e543402,
0x1f5100005e543602,
0x1f5200005e543802,
0x1f5300005e543a02,
0x1f5400005e543e02,
0x1f5500005e544002,
0x1f5600005e545a06,
0x1f5700005e547806,
0x1f5800005e548e06,
0x1f5900005e581e02,
0x1f5a00005e582602,
0x1f5b00005e582802,
0x1f5c00005e582c02,
0x1f5d00005e583002,
0x1f5e00005e583202,
0x1f5f00005e583402,
0x1f6000005e583602,
0x1f6100005e583802,
0x1f6200005e583a02,
0x1f6300005e583e02,
0x1f6400005e584002,
0x1f6500005e584606,
0x1f6600005e588606,
0x1f6700005e5a2802,
0x1f6800005e5a2c02,
0x1f6900005e5a2c06,
0x1f6a00005e5a3202,
0x1f6b00005e5a3402,
0x1f6c00005e5a3602,
0x1f6d00005e5a3802,
0x1f6e00005e5a3a02,
0x1f6f00005e5a3e02,
0x1f7000005e5a3e06,
0x1f7100005e5a4002,
0x1f7200005e5a5406,
0x1f7300005e5a8006,
0x1f7400005e5a8e06,
0x1f7500005e5c2802,
0x1f7600005e5c2806,
0x1f7700005e5c3202,
0x1f7800005e5c3206,
0x1f7900005e5c3402,
0x1f7a00005e5c3602,
0x1f7b00005e5c3802,
0x1f7c00005e5c3a02,
0x1f7d00005e5c7406,
0x1f7e00005e5c7606,
0x1f7f00005e620206,
0x1f8000005e620606,
0x1f8100005e622802,
0x1f8200005e622806,
0x1f8300005e623202,
0x1f8400005e623402,
0x1f8500005e623602,
0x1f8600005e623802,
0x1f8700005e623a02,
0x1f8800005e625206,
0x1f8900005e627006,
0x1f8a00005e661406,
0x1f8b00005e662802,
0x1f8c00005e662806,
0x1f8d00005e663202,
0x1f8e00005e663402,
0x1f8f00005e663406,
0x1f9000005e663602,
0x1f9100005e663802,
0x1f9200005e663a02,
0x1f9300005e664c06,
0x1f9400005e665206,
0x1f9500005e681e02,
0x1f9600005e682406,
0x1f9700005e682602,
0x1f9800005e682802,
0x1f9900005e682c02,
0x1f9a00005e683002,
0x1f9b00005e683202,
0x1f9c00005e683402,
0x1f9d00005e683602,
0x1f9e00005e683802,
0x1f9f00005e683a02,
0x1fa000005e683e02,
0x1fa100005e684002,
0x1fa200005e686006,
0x1fa300005e688606,
0x1fa400005e689006,
0x1fa500005e6a2006,
0x1fa600005e6a2e02,
0x1fa700005e6a2e06,
0x1fa800005e6a3802,
0x1fa900005e6a3c02,
0x1faa00005e6a3c06,
0x1fab00005e6a7206,
0x1fac00005e6a8806,
0x1fad00005e6c2802,
0x1fae00005e6c3202,
0x1faf00005e6c3402,
0x1fb000005e6c3602,
0x1fb100005e6c3802,
0x1fb200005e6c3806,
0x1fb300005e6c3a02,
0x1fb400005e6c3a06,
0x1fb500005e6c4806,
0x1fb600005e6c7606,
0x1fb700005e6e1606,
0x1fb800005e6e1e02,
0x1fb900005e6e1e06,
0x1fba00005e6e2602,
0x1fbb00005e6e2802,
0x1fbc00005e6e2c02,
0x1fbd00005e6e3002,
0x1fbe00005e6e3202,
0x1fbf00005e6e3402,
0x1fc000005e6e3602,
0x1fc100005e6e3802,
0x1fc200005e6e3a02,
0x1fc300005e6e3e02,
0x1fc400005e6e4002,
0x1fc500005e6e4206,
0x1fc600005e6e9006,
0x1fc700005e700606,
0x1fc800005e702e02,
0x1fc900005e702e06,
0x1fca00005e703802,
0x1fcb00005e706206,
0x1fcc00005e707206,
0x1fcd00005e720606,
0x1fce00005e721206,
0x1fcf00005e722006,
0x1fd000005e722e02,
0x1fd100005e723802,
0x1fd200005e726406,
0x1fd300005e726a06,
0x1fd400005e727006,
0x1fd500005e742802,
0x1fd600005e742806,
0x1fd700005e743202,
0x1fd800005e743402,
0x1fd900005e743602,
0x1fda00005e743802,
0x1fdb00005e743806,
0x1fdc00005e743a02,
0x1fdd00005e745c06,
0x1fde00005e762802,
0x1fdf00005e763202,
0x1fe000005e763206,
0x1fe100005e763402,
0x1fe200005e763602,
0x1fe300005e763606,
0x1fe400005e763802,
0x1fe500005e763a02,
0x1fe600005e764806,
0x1fe700005e765c06,
0x1fe800005e766c06,
0x1fe900005e780206,
0x1fea00005e782802,
0x1feb00005e782c02,
0x1fec00005e783202,
0x1fed00005e783402,
0x1fee00005e783602,
0x1fef00005e783802,
0x1ff000005e783a02,
0x1ff100005e783e02,
0x1ff200005e784002,
0x1ff300005e784c06,
0x1ff400005e785406,
0x1ff500005e789206,
0x1ff600005e7a2802,
0x1ff700005e7a2c02,
0x1ff800005e7a3002,
0x1ff900005e7a3006,
0x1ffa00005e7a3202,
0x1ffb00005e7a3402,
0x1ffc00005e7a3602,
0x1ffd00005e7a3802,
0x1ffe00005e7a3a02,
0x1fff00005e7a3e02,
0x200000005e7a4002,
0x200100005e7a4406,
0x200200005e7a8006,
0x200300005e7c2202,
0x200400005e7c2206,
0x200500005e7c2802,
0x200600005e7c3202,
0x200700005e7c3402,
0x200800005e7c3602,
0x200900005e7c3802,
0x200a00005e7c3a02,
0x200b00005e7c3a06,
0x200c00005e7c3c02,
0x200d00005e7c3c06,
0x200e00005e7c4a06,
0x200f00005e7c8806,
0x201000005e7c9406,
0x201100005e7e2802,
0x201200005e7e3202,
0x201300005e7e3402,
0x201400005e7e3602,
0x201500005e7e3802,
0x201600005e7e3a02,
0x201700005e7e9206,
0x201800005e802802,
0x201900005e802c02,
0x201a00005e803202,
0x201b00005e803402,
0x201c00005e803602,
0x201d00005e803802,
0x201e00005e803a02,
0x201f00005e803e02,
0x202000005e804002,
0x202100005e804406,
0x202200005e805a06,
0x202300005e807a06,
0x202400005e808e06,
0x202500005e861e02,
0x202600005e861e06,
0x202700005e862602,
0x202800005e862606,
0x202900005e862802,
0x202a00005e862c02,
0x202b00005e863002,
0x202c00005e863202,
0x202d00005e863402,
0x202e00005e863602,
0x202f00005e863802,
0x203000005e863a02,
0x203100005e863e02,
0x203200005e864002,
0x203300005e864606,
0x203400005e865806,
0x203500005e866006,
0x203600005e866806,
0x203700005e882006,
0x203800005e882a06,
0x203900005e883802,
0x203a00005e883c02,
0x203b00005e884a06,
0x203c00005e886a06,
0x203d00005e887c06,
0x203e00005e8a0a06,
0x203f00005e8a0e06,
0x204000005e8a1606,
0x204100005e8a1806,
0x204200005e8a1c02,
0x204300005e8a2802,
0x204400005e8a2c02,
0x204500005e8a3002,
0x204600005e8a3202,
0x204700005e8a3402,
0x204800005e8a3602,
0x204900005e8a3802,
0x204a00005e8a3a02,
0x204b00005e8a3e02,
0x204c00005e8a4002,
0x204d00005e8a4206,
0x204e00005e8a8e06,
0x204f00005e8c2802,
0x205000005e8c2c02,
0x205100005e8c3002,
0x205200005e8c3006,
0x205300005e8c3202,
0x205400005e8c3402,
0x205500005e8c3602,
0x205600005e8c3802,
0x205700005e8c3a02,
0x205800005e8c3e02,
0x205900005e8c3e06,
0x205a00005e8c4002,
0x205b00005e8c5006,
0x205c00005e8e0a06,
0x205d00005e8e1c02,
0x205e00005e8e2802,
0x205f00005e8e2c02,
0x206000005e8e3002,
0x206100005e8e3202,
0x206200005e8e3402,
0x206300005e8e3602,
0x206400005e8e3802,
0x206500005e8e3a02,
0x206600005e8e3e02,
0x206700005e8e4002,
0x206800005e8e4406,
0x206900005e8e5406,
0x206a00005e8e5a06,
0x206b00005e8e8006,
0x206c00005e8e8a06,
0x206d00005e901606,
0x206e00005e901e02,
0x206f00005e902406,
0x207000005e902602,
0x207100005e902802,
0x207200005e902c02,
0x207300005e903002,
0x207400005e903202,
0x207500005e903402,
0x207600005e903602,
0x207700005e903802,
0x207800005e903a02,
0x207900005e903e02,
0x207a00005e904002,
0x207b00005e906806,
0x207c00005e906e06,
0x207d00005e908206,
0x207e00005e922802,
0x207f00005e922c02,
0x208000005e922c06,
0x208100005e923202,
0x208200005e923402,
0x208300005e923602,
0x208400005e923802,
0x208500005e923a02,
0x208600005e923e02,
0x208700005e924002,
0x208800005e924006,
0x208900005e924c06,
0x208a00005e927806,
0x208b00005e927e06,
0x208c00005e941006,
0x208d00005e942202,
0x208e00005e942802,
0x208f00005e942a06,
0x209000005e943202,
0x209100005e943402,
0x209200005e943602,
0x209300005e943802,
0x209400005e943a02,
0x209500005e944a06,
0x209600005e944e06,
0x209700005e947c06,
0x2098000060244606,
0x2099000060246806,
0x209a000060248206,
0x209b000060248406,
0x209c000060249006,
0x209d000060462402,
0x209e000060462406,
0x209f000060465806,
0x20a0000060468406,
0x20a1000060468606,
0x20a2000060681e06,
0x20a3000060682402,
0x20a4000060682406,
0x20a5000060688606,
0x20a6000060689006,
0x20a7000060820406,
0x20a8000060820c06,
0x20a9000060820e06,
0x20aa000060821606,
0x20ab000060822402,
0x20ac000060828406,
0x20ad000060829006,
0x20ae000060840c06,
0x20af000060841006,
0x20b0000060842402,
0x20b1000060844606,
0x20b2000060848206,
0x20b3000060861e06,
0x20b4000060862606,
0x20b5000060864606,
0x20b6000060865806,
0x20b7000060866806,
0x20b8000060901606,
0x20b9000060901e06,
0x20ba000060902402,
0x20bb000060906806,
0x20bc000060906e06,
0x20bd000060908206,
0x20be000062020606,
0x20bf000062021206,
0x20c0000062021406,
0x20c1000062024c06,
0x20c2000062025206,
0x20c3000062027806,
0x20c4000062060206,
0x20c5000062061206,
0x20c6000062067006,
0x20c7000062067206,
0x20c8000062283206,
0x20c9000062283406,
0x20ca000062283806,
0x20cb000062285206,
0x20cc000062285c06,
0x20cd000062286606,
0x20ce000062287406,
0x20cf000062382806,
0x20d0000062382e06,
0x20d1000062383a06,
0x20d2000062383c06,
0x20d3000062385e06,
0x20d4000062386a06,
0x20d5000062386c06,
0x20d6000062387006,
0x20d7000062387406,
0x20d8000062387c06,
0x20d9000062421606,
0x20da000062421c02,
0x20db000062421c06,
0x20dc000062422802,
0x20dd000062422c02,
0x20de000062423002,
0x20df000062423202,
0x20e0000062423402,
0x20e1000062423602,
0x20e2000062423802,
0x20e3000062423a02,
0x20e4000062423e02,
0x20e5000062424002,
0x20e6000062426e06,
0x20e7000062428a06,
0x20e8000062441c02,
0x20e9000062441c06,
0x20ea000062442802,
0x20eb000062442c02,
0x20ec000062443002,
0x20ed000062443202,
0x20ee000062443402,
0x20ef000062443602,
0x20f0000062443802,
0x20f1000062443a02,
0x20f2000062443e02,
0x20f3000062444002,
0x20f4000062447a06,
0x20f5000062448006,
0x20f6000062448e06,
0x20f7000062482802,
0x20f8000062483202,
0x20f9000062483402,
0x20fa000062483602,
0x20fb000062483606,
0x20fc000062483802,
0x20fd000062483a02,
0x20fe000062483a06,
0x20ff000062486c06,
0x2100000062487606,
0x21010000624c0206,
0x21020000624c1406,
0x21030000624c2802,
0x21040000624c3202,
0x21050000624c3402,
0x21060000624c3602,
0x21070000624c3802,
0x21080000624c3a02,
0x21090000624c6606,
0x210a0000624c7806,
0x210b0000624c9206,
0x210c000062502802,
0x210d000062503202,
0x210e000062503402,
0x210f000062503602,
0x2110000062503802,
0x2111000062503a02,
0x2112000062504002,
0x2113000062504006,
0x2114000062508c06,
0x2115000062520206,
0x2116000062521406,
0x2117000062522802,
0x2118000062522806,
0x2119000062523202,
0x211a000062523402,
0x211b000062523602,
0x211c000062523802,
0x211d000062523a02,
0x211e000062526606,
0x211f000062540a06,
0x2120000062542802,
0x2121000062542c02,
0x2122000062543202,
0x2123000062543402,
0x2124000062543602,
0x2125000062543802,
0x2126000062543a02,
0x2127000062543e02,
0x2128000062544002,
0x2129000062545a06,
0x212a000062547806,
0x212b000062548e06,
0x212c000062581e02,
0x212d000062582602,
0x212e000062582802,
0x212f000062582c02,
0x2130000062583002,
0x2131000062583202,
0x2132000062583402,
0x2133000062583602,
0x2134000062583802,
0x2135000062583a02,
0x2136000062583e02,
0x2137000062584002,
0x2138000062584606,
0x2139000062588606,
0x213a0000625a2802,
0x213b0000625a2c02,
0x213c0000625a2c06,
0x213d0000625a3202,
0x213e0000625a3402,
0x213f0000625a3602,
0x21400000625a3802,
0x21410000625a3a02,
0x21420000625a3e02,
0x21430000625a3e06,
0x21440000625a4002,
0x21450000625a5406,
0x21460000625a8006,
0x21470000625a8e06,
0x21480000625c2802,
0x21490000625c2806,
0x214a0000625c3202,
0x214b0000625c3206,
0x214c0000625c3402,
0x214d0000625c3602,
0x214e0000625c3802,
0x214f0000625c3a02,
0x21500000625c5e06,
0x21510000625c7406,
0x21520000625c7606,
0x21530000625e2802,
0x21540000625e3202,
0x21550000625e3402,
0x21560000625e3602,
0x21570000625e3802,
0x21580000625e3a02,
0x21590000625e5c06,
0x215a0000625e6c06,
0x215b0000625e7406,
0x215c0000625e7606,
0x215d000062661406,
0x215e000062662802,
0x215f000062662806,
0x2160000062663202,
0x2161000062663402,
0x2162000062663406,
0x2163000062663602,
0x2164000062663802,
0x2165000062663a02,
0x2166000062664c06,
0x2167000062665206,
0x2168000062681e02,
0x2169000062682406,
0x216a000062682602,
0x216b000062682802,
0x216c000062682c02,
0x216d000062683002,
0x216e000062683202,
0x216f000062683402,
0x2170000062683602,
0x2171000062683802,
0x2172000062683a02,
0x2173000062683e02,
0x2174000062684002,
0x2175000062686006,
0x2176000062688606,
0x2177000062689006,
0x21780000626a2006,
0x21790000626a2802,
0x217a0000626a2e02,
0x217b0000626a2e06,
0x217c0000626a3202,
0x217d0000626a3402,
0x217e0000626a3602,
0x217f0000626a3802,
0x21800000626a3a02,
0x21810000626a3c02,
0x21820000626a3c06,
0x21830000626a7206,
0x21840000626a8806,
0x21850000626c2802,
0x21860000626c3202,
0x21870000626c3402,
0x21880000626c3602,
0x21890000626c3802,
0x218a0000626c3806,
0x218b0000626c3a02,
0x218c0000626c3a06,
0x218d0000626c4806,
0x218e0000626c5e06,
0x218f0000626c7606,
0x21900000626e1606,
0x21910000626e1e02,
0x21920000626e1e06,
0x21930000626e2602,
0x21940000626e2802,
0x21950000626e2c02,
0x21960000626e3002,
0x21970000626e3202,
0x21980000626e3402,
0x21990000626e3602,
0x219a0000626e3802,
0x219b0000626e3a02,
0x219c0000626e3e02,
0x219d0000626e4002,
0x219e0000626e4206,
0x219f0000626e9006,
0x21a0000062700606,
0x21a1000062702802,
0x21a2000062702e02,
0x21a3000062702e06,
0x21a4000062703202,
0x21a5000062703402,
0x21a6000062703602,
0x21a7000062703802,
0x21a8000062703806,
0x21a9000062703a02,
0x21aa000062707206,
0x21ab000062720606,
0x21ac000062721206,
0x21ad000062722006,
0x21ae000062722802,
0x21af000062722e02,
0x21b0000062723202,
0x21b1000062723402,
0x21b2000062723602,
0x21b3000062723802,
0x21b4000062723a02,
0x21b5000062726406,
0x21b6000062726a06,
0x21b7000062727006,
0x21b8000062742802,
0x21b9000062742806,
0x21ba000062743202,
0x21bb000062743402,
0x21bc000062743602,
0x21bd000062743802,
0x21be000062743806,
0x21bf000062743a02,
0x21c0000062745c06,
0x21c1000062745e06,
0x21c2000062762802,
0x21c3000062763202,
0x21c4000062763206,
0x21c5000062763402,
0x21c6000062763602,
0x21c7000062763606,
0x21c8000062763802,
0x21c9000062763a02,
0x21ca000062764806,
0x21cb000062765c06,
0x21cc000062765e06,
0x21cd000062766c06,
0x21ce000062780206,
0x21cf000062782802,
0x21d0000062782c02,
0x21d1000062783202,
0x21d2000062783402,
0x21d3000062783602,
0x21d4000062783802,
0x21d5000062783a02,
0x21d6000062783e02,
0x21d7000062784002,
0x21d8000062784c06,
0x21d9000062785406,
0x21da000062789206,
0x21db0000627a2802,
0x21dc0000627a2c02,
0x21dd0000627a3002,
0x21de0000627a3006,
0x21df0000627a3202,
0x21e00000627a3402,
0x21e10000627a3602,
0x21e20000627a3802,
0x21e30000627a3a02,
0x21e40000627a3e02,
0x21e50000627a4002,
0x21e60000627a4406,
0x21e70000627a8006,
0x21e80000627c2202,
0x21e90000627c2206,
0x21ea0000627c2802,
0x21eb0000627c3202,
0x21ec0000627c3402,
0x21ed0000627c3602,
0x21ee0000627c3802,
0x21ef0000627c3806,
0x21f00000627c3a02,
0x21f10000627c3a06,
0x21f20000627c3c02,
0x21f30000627c3c06,
0x21f40000627c4a06,
0x21f50000627c8806,
0x21f60000627c9406,
0x21f70000627e2802,
0x21f80000627e3202,
0x21f90000627e3402,
0x21fa0000627e3602,
0x21fb0000627e3802,
0x21fc0000627e3a02,
0x21fd0000627e9206,
0x21fe000062802802,
0x21ff000062802c02,
0x2200000062803202,
0x2201000062803402,
0x2202000062803602,
0x2203000062803802,
0x2204000062803a02,
0x2205000062803e02,
0x2206000062804002,
0x2207000062804406,
0x2208000062805a06,
0x2209000062807a06,
0x220a000062808e06,
0x220b000062861e02,
0x220c000062861e06,
0x220d000062862602,
0x220e000062862606,
0x220f000062862802,
0x2210000062862c02,
0x2211000062863002,
0x2212000062863202,
0x2213000062863402,
0x2214000062863602,
0x2215000062863802,
0x2216000062863a02,
0x2217000062863e02,
0x2218000062864002,
0x2219000062864606,
0x221a000062865806,
0x221b000062866006,
0x221c000062866806,
0x221d000062882006,
0x221e000062882802,
0x221f000062882a06,
0x2220000062883202,
0x2221000062883402,
0x2222000062883602,
0x2223000062883802,
0x2224000062883a02,
0x2225000062883c02,
0x2226000062884a06,
0x2227000062886a06,
0x2228000062887c06,
0x22290000628a0a06,
0x222a0000628a0e06,
0x222b0000628a1606,
0x222c0000628a1806,
0x222d0000628a1c02,
0x222e0000628a2802,
0x222f0000628a2c02,
0x22300000628a3002,
0x22310000628a3202,
0x22320000628a3402,
0x22330000628a3602,
0x22340000628a3802,
0x22350000628a3a02,
0x22360000628a3e02,
0x22370000628a4002,
0x22380000628a4206,
0x22390000628a8e06,
0x223a0000628c2802,
0x223b0000628c2c02,
0x223c0000628c3002,
0x223d0000628c3006,
0x223e0000628c3202,
0x223f0000628c3402,
0x22400000628c3602,
0x22410000628c3802,
0x22420000628c3a02,
0x22430000628c3e02,
0x22440000628c3e06,
0x22450000628c4002,
0x22460000628c5006,
0x22470000628e0a06,
0x22480000628e1c02,
0x22490000628e2802,
0x224a0000628e2c02,
0x224b0000628e3002,
0x224c0000628e3202,
0x224d0000628e3402,
0x224e0000628e3602,
0x224f0000628e3802,
0x22500000628e3a02,
0x22510000628e3e02,
0x22520000628e4002,
0x22530000628e4406,
0x22540000628e5406,
0x22550000628e5a06,
0x22560000628e8006,
0x22570000628e8a06,
0x2258000062901606,
0x2259000062901e02,
0x225a000062902406,
0x225b000062902602,
0x225c000062902802,
0x225d000062902c02,
0x225e000062903002,
0x225f000062903202,
0x2260000062903402,
0x2261000062903602,
0x2262000062903802,
0x2263000062903a02,
0x2264000062903e02,
0x2265000062904002,
0x2266000062906806,
0x2267000062906e06,
0x2268000062908206,
0x2269000062922802,
0x226a000062922c02,
0x226b000062922c06,
0x226c000062923202,
0x226d000062923402,
0x226e000062923602,
0x226f000062923802,
0x2270000062923a02,
0x2271000062923e02,
0x2272000062924002,
0x2273000062924006,
0x2274000062924c06,
0x2275000062927806,
0x2276000062927e06,
0x2277000062941006,
0x2278000062942202,
0x2279000062942802,
0x227a000062942a06,
0x227b000062943202,
0x227c000062943402,
0x227d000062943602,
0x227e000062943802,
0x227f000062943a02,
0x2280000062944a06,
0x2281000062944e06,
0x2282000062947c06,
0x2283000064080006,
0x2284000064080406,
0x2285000064081206,
0x2286000064081a06,
0x2287000064085606,
0x2288000064120006,
0x2289000064120206,
0x228a000064120606,
0x228b000064120806,
0x228c000064120a06,
0x228d000064127206,
0x228e000064202a06,
0x228f000064204e06,
0x2290000064205606,
0x2291000064206a06,
0x2292000064207206,
0x2293000064208806,
0x22940000644a2002,
0x22950000644a2a02,
0x22960000644a7c06,
0x22970000644a8806,
0x22980000644a9406,
0x22990000644e1006,
0x229a0000644e1a06,
0x229b0000644e2002,
0x229c0000644e2a02,
0x229d0000644e2a06,
0x229e0000644e5606,
0x229f0000644e9406,
0x22a0000064560806,
0x22a1000064561a06,
0x22a2000064562002,
0x22a3000064562006,
0x22a4000064564e06,
0x22a50000646a2002,
0x22a60000646a2e06,
0x22a70000646a3806,
0x22a80000646a3c06,
0x22a90000646a7206,
0x22aa0000646a8806,
0x22ab000064720606,
0x22ac000064721206,
0x22ad000064722002,
0x22ae000064722006,
0x22af000064722e06,
0x22b0000064726a06,
0x22b1000064727006,
0x22b2000064882002,
0x22b3000064882a02,
0x22b4000064882a06,
0x22b5000064883c06,
0x22b6000064884a06,
0x22b7000064886a06,
0x22b8000064887c06,
0x22b9000064941006,
0x22ba000064942002,
0x22bb000064942206,
0x22bc000064942a02,
0x22bd000064944a06,
0x22be000064944e06,
0x22bf000064947c06,
0x22c0000066140206,
0x22c1000066144c06,
0x22c2000066145206,
0x22c3000066283206,
0x22c4000066283406,
0x22c5000066283806,
0x22c6000066285206,
0x22c7000066285c06,
0x22c8000066286206,
0x22c9000066287406,
0x22ca000066342806,
0x22cb000066343206,
0x22cc000066343606,
0x22cd000066344006,
0x22ce000066344c06,
0x22cf000066345006,
0x22d0000066347e06,
0x22d1000066349206,
0x22d2000066421606,
0x22d3000066421c02,
0x22d4000066421c06,
0x22d5000066422802,
0x22d6000066422c02,
0x22d7000066423002,
0x22d8000066423202,
0x22d9000066423402,
0x22da000066423602,
0x22db000066423802,
0x22dc000066423a02,
0x22dd000066423e02,
0x22de000066424002,
0x22df000066426e06,
0x22e0000066428a06,
0x22e1000066441c02,
0x22e2000066441c06,
0x22e3000066442802,
0x22e4000066442c02,
0x22e5000066443002,
0x22e6000066443202,
0x22e7000066443402,
0x22e8000066443602,
0x22e9000066443802,
0x22ea000066443a02,
0x22eb000066443e02,
0x22ec000066444002,
0x22ed000066447a06,
0x22ee000066448006,
0x22ef000066448e06,
0x22f0000066482802,
0x22f1000066483202,
0x22f2000066483402,
0x22f3000066483602,
0x22f4000066483606,
0x22f5000066483802,
0x22f6000066483a02,
0x22f7000066483a06,
0x22f8000066486c06,
0x22f9000066487606,
0x22fa0000664c0206,
0x22fb0000664c1406,
0x22fc0000664c2802,
0x22fd0000664c3202,
0x22fe0000664c3402,
0x22ff0000664c3406,
0x23000000664c3602,
0x23010000664c3802,
0x23020000664c3a02,
0x23030000664c7806,
0x23040000664c9206,
0x2305000066502802,
0x2306000066503202,
0x2307000066503402,
0x2308000066503602,
0x2309000066503802,
0x230a000066503a02,
0x230b000066504002,
0x230c000066504006,
0x230d000066508c06,
0x230e000066520206,
0x230f000066521406,
0x2310000066522802,
0x2311000066522806,
0x2312000066523202,
0x2313000066523402,
0x2314000066523602,
0x2315000066523802,
0x2316000066523a02,
0x2317000066526206,
0x2318000066540a06,
0x2319000066542802,
0x231a000066542c02,
0x231b000066543202,
0x231c000066543402,
0x231d000066543602,
0x231e000066543802,
0x231f000066543a02,
0x2320000066543e02,
0x2321000066544002,
0x2322000066545a06,
0x2323000066547806,
0x2324000066548e06,
0x2325000066581e02,
0x2326000066582602,
0x2327000066582802,
0x2328000066582c02,
0x2329000066583002,
0x232a000066583202,
0x232b000066583402,
0x232c000066583602,
0x232d000066583802,
0x232e000066583a02,
0x232f000066583e02,
0x2330000066584002,
0x2331000066584606,
0x2332000066588606,
0x23330000665a2802,
0x23340000665a2c02,
0x23350000665a2c06,
0x23360000665a3202,
0x23370000665a3402,
0x23380000665a3602,
0x23390000665a3802,
0x233a0000665a3a02,
0x233b0000665a3e02,
0x233c0000665a3e06,
0x233d0000665a4002,
0x233e0000665a5406,
0x233f0000665a8006,
0x23400000665a8e06,
0x23410000665c2802,
0x23420000665c2806,
0x23430000665c3202,
0x23440000665c3206,
0x23450000665c3402,
0x23460000665c3602,
0x23470000665c3802,
0x23480000665c3a02,
0x23490000665c5e06,
0x234a0000665c7406,
0x234b0000665c7606,
0x234c0000665e2802,
0x234d0000665e3202,
0x234e0000665e3402,
0x234f0000665e3602,
0x23500000665e3802,
0x23510000665e3a02,
0x23520000665e5c06,
0x23530000665e6c06,
0x23540000665e7406,
0x23550000665e7606,
0x2356000066620206,
0x2357000066620606,
0x2358000066622802,
0x2359000066622806,
0x235a000066623202,
0x235b000066623402,
0x235c000066623602,
0x235d000066623802,
0x235e000066623806,
0x235f000066623a02,
0x2360000066625206,
0x2361000066627006,
0x2362000066681e02,
0x2363000066682406,
0x2364000066682602,
0x2365000066682802,
0x2366000066682c02,
0x2367000066683002,
0x2368000066683202,
0x2369000066683402,
0x236a000066683602,
0x236b000066683802,
0x236c000066683a02,
0x236d000066683e02,
0x236e000066684002,
0x236f000066686006,
0x2370000066688606,
0x2371000066689006,
0x23720000666a2006,
0x23730000666a2802,
0x23740000666a2e02,
0x23750000666a2e06,
0x23760000666a3202,
0x23770000666a3402,
0x23780000666a3602,
0x23790000666a3802,
0x237a0000666a3a02,
0x237b0000666a3c02,
0x237c0000666a3c06,
0x237d0000666a7206,
0x237e0000666a8806,
0x237f0000666c2802,
0x23800000666c3202,
0x23810000666c3402,
0x23820000666c3602,
0x23830000666c3802,
0x23840000666c3806,
0x23850000666c3a02,
0x23860000666c3a06,
0x23870000666c4806,
0x23880000666c5e06,
0x23890000666c7606,
0x238a0000666e1606,
0x238b0000666e1e02,
0x238c0000666e1e06,
0x238d0000666e2602,
0x238e0000666e2802,
0x238f0000666e2c02,
0x23900000666e3002,
0x23910000666e3202,
0x23920000666e3402,
0x23930000666e3602,
0x23940000666e3802,
0x23950000666e3a02,
0x23960000666e3e02,
0x23970000666e4002,
0x23980000666e4206,
0x23990000666e9006,
0x239a000066700606,
0x239b000066702802,
0x239c000066702e02,
0x239d000066702e06,
0x239e000066703202,
0x239f000066703402,
0x23a0000066703602,
0x23a1000066703802,
0x23a2000066703a02,
0x23a3000066706206,
0x23a4000066707206,
0x23a5000066720606,
0x23a6000066721206,
0x23a7000066722006,
0x23a8000066722802,
0x23a9000066722e02,
0x23aa000066723202,
0x23ab000066723402,
0x23ac000066723602,
0x23ad000066723802,
0x23ae000066723a02,
0x23af000066726406,
0x23b0000066726a06,
0x23b1000066727006,
0x23b2000066742802,
0x23b3000066742806,
0x23b4000066743202,
0x23b5000066743402,
0x23b6000066743602,
0x23b7000066743802,
0x23b8000066743806,
0x23b9000066743a02,
0x23ba000066745c06,
0x23bb000066745e06,
0x23bc000066762802,
0x23bd000066763202,
0x23be000066763206,
0x23bf000066763402,
0x23c0000066763602,
0x23c1000066763606,
0x23c2000066763802,
0x23c3000066763a02,
0x23c4000066764806,
0x23c5000066765c06,
0x23c6000066765e06,
0x23c7000066766c06,
0x23c8000066780206,
0x23c9000066782802,
0x23ca000066782c02,
0x23cb000066783202,
0x23cc000066783402,
0x23cd000066783602,
0x23ce000066783802,
0x23cf000066783a02,
0x23d0000066783e02,
0x23d1000066784002,
0x23d2000066784c06,
0x23d3000066785406,
0x23d4000066789206,
0x23d50000667a2802,
0x23d60000667a2c02,
0x23d70000667a3002,
0x23d80000667a3006,
0x23d90000667a3202,
0x23da0000667a3402,
0x23db0000667a3602,
0x23dc0000667a3802,
0x23dd0000667a3a02,
0x23de0000667a3e02,
0x23df0000667a4002,
0x23e00000667a4406,
0x23e10000667a8006,
0x23e20000667c2202,
0x23e30000667c2206,
0x23e40000667c2802,
0x23e50000667c3202,
0x23e60000667c3402,
0x23e70000667c3602,
0x23e80000667c3802,
0x23e90000667c3806,
0x23ea0000667c3a02,
0x23eb0000667c3a06,
0x23ec0000667c3c02,
0x23ed0000667c3c06,
0x23ee0000667c4a06,
0x23ef0000667c8806,
0x23f00000667c9406,
0x23f10000667e2802,
0x23f20000667e3202,
0x23f30000667e3402,
0x23f40000667e3602,
0x23f50000667e3802,
0x23f60000667e3a02,
0x23f70000667e9206,
0x23f8000066802802,
0x23f9000066802c02,
0x23fa000066803202,
0x23fb000066803402,
0x23fc000066803602,
0x23fd000066803802,
0x23fe000066803a02,
0x23ff000066803e02,
0x2400000066804002,
0x2401000066804406,
0x2402000066805a06,
0x2403000066807a06,
0x2404000066808e06,
0x2405000066861e02,
0x2406000066861e06,
0x2407000066862602,
0x2408000066862606,
0x2409000066862802,
0x240a000066862c02,
0x240b000066863002,
0x240c000066863202,
0x240d000066863402,
0x240e000066863602,
0x240f000066863802,
0x2410000066863a02,
0x2411000066863e02,
0x2412000066864002,
0x2413000066864606,
0x2414000066865806,
0x2415000066866006,
0x2416000066866806,
0x2417000066882006,
0x2418000066882802,
0x2419000066882a06,
0x241a000066883202,
0x241b000066883402,
0x241c000066883602,
0x241d000066883802,
0x241e000066883a02,
0x241f000066883c02,
0x2420000066884a06,
0x2421000066886a06,
0x2422000066887c06,
0x24230000668a0a06,
0x24240000668a0e06,
0x24250000668a1606,
0x24260000668a1806,
0x24270000668a1c02,
0x24280000668a2802,
0x24290000668a2c02,
0x242a0000668a3002,
0x242b0000668a3202,
0x242c0000668a3402,
0x242d0000668a3602,
0x242e0000668a3802,
0x242f0000668a3a02,
0x24300000668a3e02,
0x24310000668a4002,
0x24320000668a4206,
0x24330000668a8e06,
0x24340000668c2802,
0x24350000668c2c02,
0x24360000668c3002,
0x24370000668c3006,
0x24380000668c3202,
0x24390000668c3402,
0x243a0000668c3602,
0x243b0000668c3802,
0x243c0000668c3a02,
0x243d0000668c3e02,
0x243e0000668c3e06,
0x243f0000668c4002,
0x24400000668c5006,
0x24410000668e0a06,
0x24420000668e1c02,
0x24430000668e2802,
0x24440000668e2c02,
0x24450000668e3002,
0x24460000668e3202,
0x24470000668e3402,
0x24480000668e3602,
0x24490000668e3802,
0x244a0000668e3a02,
0x244b0000668e3e02,
0x244c0000668e4002,
0x244d0000668e4406,
0x244e0000668e5406,
0x244f0000668e5a06,
0x24500000668e8006,
0x24510000668e8a06,
0x2452000066901606,
0x2453000066901e02,
0x2454000066902406,
0x2455000066902602,
0x2456000066902802,
0x2457000066902c02,
0x2458000066903002,
0x2459000066903202,
0x245a000066903402,
0x245b000066903602,
0x245c000066903802,
0x245d000066903a02,
0x245e000066903e02,
0x245f000066904002,
0x2460000066906806,
0x2461000066906e06,
0x2462000066908206,
0x2463000066922802,
0x2464000066922c02,
0x2465000066922c06,
0x2466000066923202,
0x2467000066923402,
0x2468000066923602,
0x2469000066923802,
0x246a000066923a02,
0x246b000066923e02,
0x246c000066924002,
0x246d000066924006,
0x246e000066924c06,
0x246f000066927806,
0x2470000066927e06,
0x2471000066941006,
0x2472000066942202,
0x2473000066942802,
0x2474000066942a06,
0x2475000066943202,
0x2476000066943402,
0x2477000066943602,
0x2478000066943802,
0x2479000066943a02,
0x247a000066944a06,
0x247b000066944e06,
0x247c000066947c06,
0x247d0000681e2606,
0x247e0000681e3006,
0x247f0000681e6e06,
0x24800000681e8606,
0x24810000681e9006,
0x2482000068244606,
0x2483000068246006,
0x2484000068248206,
0x2485000068248406,
0x2486000068249006,
0x2487000068421606,
0x2488000068421c02,
0x2489000068421c06,
0x248a000068421e02,
0x248b000068422602,
0x248c000068423002,
0x248d000068426e06,
0x248e000068428a06,
0x248f000068441c02,
0x2490000068441c06,
0x2491000068441e02,
0x2492000068442602,
0x2493000068443002,
0x2494000068447a06,
0x2495000068448006,
0x2496000068448e06,
0x2497000068462402,
0x2498000068465806,
0x2499000068466006,
0x249a000068468406,
0x249b000068468606,
0x249c000068481e02,
0x249d000068482602,
0x249e000068482802,
0x249f000068482c02,
0x24a0000068483002,
0x24a1000068483202,
0x24a2000068483402,
0x24a3000068483602,
0x24a4000068483606,
0x24a5000068483802,
0x24a6000068483a02,
0x24a7000068483a06,
0x24a8000068483e02,
0x24a9000068484002,
0x24aa000068486c06,
0x24ab000068487606,
0x24ac0000684c0206,
0x24ad0000684c1406,
0x24ae0000684c1e02,
0x24af0000684c2602,
0x24b00000684c2c02,
0x24b10000684c3002,
0x24b20000684c3402,
0x24b30000684c3e02,
0x24b40000684c4002,
0x24b50000684c6606,
0x24b60000684c7806,
0x24b70000684c9206,
0x24b8000068501e02,
0x24b9000068502602,
0x24ba000068502c02,
0x24bb000068503002,
0x24bc000068503402,
0x24bd000068503406,
0x24be000068503e02,
0x24bf000068504002,
0x24c0000068508c06,
0x24c1000068520206,
0x24c2000068521406,
0x24c3000068521e02,
0x24c4000068522602,
0x24c5000068522802,
0x24c6000068522c02,
0x24c7000068523002,
0x24c8000068523202,
0x24c9000068523402,
0x24ca000068523602,
0x24cb000068523802,
0x24cc000068523a02,
0x24cd000068523e02,
0x24ce000068524002,
0x24cf000068526206,
0x24d0000068526606,
0x24d1000068540a06,
0x24d2000068541e02,
0x24d3000068542602,
0x24d4000068542c02,
0x24d5000068543002,
0x24d6000068543e02,
0x24d7000068544002,
0x24d8000068545a06,
0x24d9000068547806,
0x24da000068548e06,
0x24db000068581e02,
0x24dc000068582602,
0x24dd000068583002,
0x24de000068584606,
0x24df000068588606,
0x24e00000685a1e02,
0x24e10000685a2602,
0x24e20000685a2c02,
0x24e30000685a2c06,
0x24e40000685a3002,
0x24e50000685a3e02,
0x24e60000685a4002,
0x24e70000685a5406,
0x24e80000685a8006,
0x24e90000685a8e06,
0x24ea0000685c1e02,
0x24eb0000685c2602,
0x24ec0000685c2802,
0x24ed0000685c2806,
0x24ee0000685c2c02,
0x24ef0000685c3002,
0x24f00000685c3202,
0x24f10000685c3206,
0x24f20000685c3402,
0x24f30000685c3602,
0x24f40000685c3802,
0x24f50000685c3a02,
0x24f60000685c3e02,
0x24f70000685c4002,
0x24f80000685c5e06,
0x24f90000685c7406,
0x24fa0000685c7606,
0x24fb0000685e1e02,
0x24fc0000685e2602,
0x24fd0000685e2802,
0x24fe0000685e2c02,
0x24ff0000685e3002,
0x25000000685e3202,
0x25010000685e3402,
0x25020000685e3602,
0x25030000685e3802,
0x25040000685e3a02,
0x25050000685e3e02,
0x25060000685e4002,
0x25070000685e5c06,
0x25080000685e6c06,
0x25090000685e7406,
0x250a0000685e7606,
0x250b000068602402,
0x250c000068602406,
0x250d000068604606,
0x250e000068608606,
0x250f000068620206,
0x2510000068620606,
0x2511000068621e02,
0x2512000068622602,
0x2513000068622802,
0x2514000068622806,
0x2515000068622c02,
0x2516000068623002,
0x2517000068623202,
0x2518000068623402,
0x2519000068623602,
0x251a000068623802,
0x251b000068623806,
0x251c000068623a02,
0x251d000068623e02,
0x251e000068624002,
0x251f000068625206,
0x2520000068627006,
0x2521000068661406,
0x2522000068661e02,
0x2523000068662602,
0x2524000068662802,
0x2525000068662806,
0x2526000068662c02,
0x2527000068663002,
0x2528000068663202,
0x2529000068663402,
0x252a000068663602,
0x252b000068663802,
0x252c000068663a02,
0x252d000068663e02,
0x252e000068664002,
0x252f000068664c06,
0x2530000068665206,
0x25310000686a1e02,
0x25320000686a2006,
0x25330000686a2602,
0x25340000686a2802,
0x25350000686a2c02,
0x25360000686a2e02,
0x25370000686a2e06,
0x25380000686a3002,
0x25390000686a3202,
0x253a0000686a3402,
0x253b0000686a3602,
0x253c0000686a3802,
0x253d0000686a3a02,
0x253e0000686a3c02,
0x253f0000686a3c06,
0x25400000686a3e02,
0x25410000686a4002,
0x25420000686a7206,
0x25430000686a8806,
0x25440000686c1e02,
0x25450000686c2602,
0x25460000686c2802,
0x25470000686c2c02,
0x25480000686c3002,
0x25490000686c3202,
0x254a0000686c3402,
0x254b0000686c3602,
0x254c0000686c3802,
0x254d0000686c3806,
0x254e0000686c3a02,
0x254f0000686c3a06,
0x25500000686c3e02,
0x25510000686c4002,
0x25520000686c4806,
0x25530000686c5e06,
0x25540000686c7606,
0x25550000686e1606,
0x25560000686e1e02,
0x25570000686e2602,
0x25580000686e3002,
0x25590000686e3006,
0x255a0000686e4206,
0x255b0000686e9006,
0x255c000068700606,
0x255d000068701e02,
0x255e000068702602,
0x255f000068702802,
0x2560000068702c02,
0x2561000068702e02,
0x2562000068702e06,
0x2563000068703002,
0x2564000068703202,
0x2565000068703402,
0x2566000068703602,
0x2567000068703802,
0x2568000068703a02,
0x2569000068703e02,
0x256a000068704002,
0x256b000068706206,
0x256c000068707206,
0x256d000068720606,
0x256e000068721206,
0x256f000068721e02,
0x2570000068722006,
0x2571000068722602,
0x2572000068722802,
0x2573000068722c02,
0x2574000068722e02,
0x2575000068723002,
0x2576000068723202,
0x2577000068723402,
0x2578000068723602,
0x2579000068723802,
0x257a000068723a02,
0x257b000068723e02,
0x257c000068724002,
0x257d000068726406,
0x257e000068726a06,
0x257f000068727006,
0x2580000068741e02,
0x2581000068742602,
0x2582000068742802,
0x2583000068742806,
0x2584000068742c02,
0x2585000068743002,
0x2586000068743202,
0x2587000068743402,
0x2588000068743602,
0x2589000068743802,
0x258a000068743806,
0x258b000068743a02,
0x258c000068743e02,
0x258d000068744002,
0x258e000068745c06,
0x258f000068745e06,
0x2590000068761e02,
0x2591000068762602,
0x2592000068762802,
0x2593000068762c02,
0x2594000068763002,
0x2595000068763202,
0x2596000068763206,
0x2597000068763402,
0x2598000068763602,
0x2599000068763606,
0x259a000068763802,
0x259b000068763a02,
0x259c000068763e02,
0x259d000068764002,
0x259e000068764806,
0x259f000068765c06,
0x25a0000068765e06,
0x25a1000068766c06,
0x25a2000068780206,
0x25a3000068781e02,
0x25a4000068782602,
0x25a5000068782c02,
0x25a6000068783002,
0x25a7000068783e02,
0x25a8000068784002,
0x25a9000068784c06,
0x25aa000068785406,
0x25ab000068789206,
0x25ac0000687a1e02,
0x25ad0000687a2602,
0x25ae0000687a3002,
0x25af0000687a3e02,
0x25b00000687a3e06,
0x25b10000687a4406,
0x25b20000687a8006,
0x25b30000687c1e02,
0x25b40000687c2202,
0x25b50000687c2206,
0x25b60000687c2602,
0x25b70000687c2802,
0x25b80000687c2c02,
0x25b90000687c3002,
0x25ba0000687c3202,
0x25bb0000687c3402,
0x25bc0000687c3602,
0x25bd0000687c3802,
0x25be0000687c3806,
0x25bf0000687c3a02,
0x25c00000687c3a06,
0x25c10000687c3c02,
0x25c20000687c3c06,
0x25c30000687c3e02,
0x25c40000687c4002,
0x25c50000687c4a06,
0x25c60000687c8806,
0x25c70000687c9406,
0x25c80000687e1e02,
0x25c90000687e2602,
0x25ca0000687e2c02,
0x25cb0000687e3002,
0x25cc0000687e3402,
0x25cd0000687e3e02,
0x25ce0000687e4002,
0x25cf0000687e9206,
0x25d0000068801e02,
0x25d1000068802602,
0x25d2000068803002,
0x25d3000068803e02,
0x25d4000068804406,
0x25d5000068805a06,
0x25d6000068807a06,
0x25d7000068808e06,
0x25d8000068820406,
0x25d9000068820c06,
0x25da000068820e06,
0x25db000068821606,
0x25dc000068822402,
0x25dd000068828406,
0x25de000068829006,
0x25df000068840c06,
0x25e0000068841006,
0x25e1000068842402,
0x25e2000068844606,
0x25e3000068848206,
0x25e4000068861e02,
0x25e5000068861e06,
0x25e6000068862602,
0x25e7000068862606,
0x25e8000068863002,
0x25e9000068864606,
0x25ea000068865806,
0x25eb000068866006,
0x25ec000068881e02,
0x25ed000068882006,
0x25ee000068882602,
0x25ef000068882802,
0x25f0000068882a06,
0x25f1000068882c02,
0x25f2000068883002,
0x25f3000068883202,
0x25f4000068883402,
0x25f5000068883602,
0x25f6000068883802,
0x25f7000068883a02,
0x25f8000068883c02,
0x25f9000068883e02,
0x25fa000068884002,
0x25fb000068884a06,
0x25fc000068886a06,
0x25fd000068887c06,
0x25fe0000688a0a06,
0x25ff0000688a0e06,
0x26000000688a1606,
0x26010000688a1806,
0x26020000688a1c02,
0x26030000688a1e02,
0x26040000688a2602,
0x26050000688a3002,
0x26060000688a4206,
0x26070000688a8e06,
0x26080000688c1e02,
0x26090000688c2602,
0x260a0000688c2c02,
0x260b0000688c3002,
0x260c0000688c3e02,
0x260d0000688c3e06,
0x260e0000688c4002,
0x260f0000688c4006,
0x26100000688c5006,
0x26110000688e0a06,
0x26120000688e1c02,
0x26130000688e1e02,
0x26140000688e2602,
0x26150000688e3002,
0x26160000688e4406,
0x26170000688e5406,
0x26180000688e5a06,
0x26190000688e8006,
0x261a0000688e8a06,
0x261b000068901606,
0x261c000068901e02,
0x261d000068901e06,
0x261e000068902402,
0x261f000068902406,
0x2620000068906e06,
0x2621000068908206,
0x2622000068921e02,
0x2623000068922602,
0x2624000068922c02,
0x2625000068922c06,
0x2626000068923002,
0x2627000068923402,
0x2628000068923406,
0x2629000068923e02,
0x262a000068924002,
0x262b000068924006,
0x262c000068924c06,
0x262d000068927806,
0x262e000068927e06,
0x262f000068941006,
0x2630000068941e02,
0x2631000068942202,
0x2632000068942602,
0x2633000068942802,
0x2634000068942a06,
0x2635000068942c02,
0x2636000068943002,
0x2637000068943202,
0x2638000068943402,
0x2639000068943602,
0x263a000068943802,
0x263b000068943a02,
0x263c000068943e02,
0x263d000068944002,
0x263e000068944a06,
0x263f000068944e06,
0x2640000068947c06,
0x264100006a202a06,
0x264200006a204e06,
0x264300006a205606,
0x264400006a206406,
0x264500006a207206,
0x264600006a208806,
0x264700006a2e3806,
0x264800006a2e7006,
0x264900006a2e7206,
0x264a00006a382806,
0x264b00006a382e06,
0x264c00006a383a06,
0x264d00006a383c06,
0x264e00006a385e06,
0x264f00006a386206,
0x265000006a386c06,
0x265100006a387006,
0x265200006a387406,
0x265300006a387c06,
0x265400006a3c3806,
0x265500006a3c7c06,
0x265600006a3c8806,
0x265700006a421606,
0x265800006a421c02,
0x265900006a421c06,
0x265a00006a422802,
0x265b00006a422c02,
0x265c00006a422e02,
0x265d00006a423002,
0x265e00006a423202,
0x265f00006a423402,
0x266000006a423602,
0x266100006a423802,
0x266200006a423a02,
0x266300006a423c02,
0x266400006a423e02,
0x266500006a424002,
0x266600006a426e06,
0x266700006a428a06,
0x266800006a441c02,
0x266900006a441c06,
0x266a00006a442802,
0x266b00006a442c02,
0x266c00006a442e02,
0x266d00006a443002,
0x266e00006a443202,
0x266f00006a443402,
0x267000006a443602,
0x267100006a443802,
0x267200006a443a02,
0x267300006a443c02,
0x267400006a443e02,
0x267500006a444002,
0x267600006a447a06,
0x267700006a448006,
0x267800006a448e06,
0x267900006a482802,
0x267a00006a482e02,
0x267b00006a483202,
0x267c00006a483402,
0x267d00006a483602,
0x267e00006a483606,
0x267f00006a483802,
0x268000006a483a02,
0x268100006a483a06,
0x268200006a483c02,
0x268300006a486c06,
0x268400006a487606,
0x268500006a4a2002,
0x268600006a4a2a02,
0x268700006a4a7c06,
0x268800006a4a8806,
0x268900006a4a9406,
0x268a00006a4c0206,
0x268b00006a4c1406,
0x268c00006a4c2802,
0x268d00006a4c2e02,
0x268e00006a4c3202,
0x268f00006a4c3402,
0x269000006a4c3602,
0x269100006a4c3802,
0x269200006a4c3a02,
0x269300006a4c3c02,
0x269400006a4c6606,
0x269500006a4c7806,
0x269600006a4c9206,
0x269700006a4e1006,
0x269800006a4e1a06,
0x269900006a4e2002,
0x269a00006a4e2a02,
0x269b00006a4e2a06,
0x269c00006a4e5606,
0x269d00006a4e9406,
0x269e00006a502802,
0x269f00006a502e02,
0x26a000006a503202,
0x26a100006a503402,
0x26a200006a503602,
0x26a300006a503802,
0x26a400006a503a02,
0x26a500006a503c02,
0x26a600006a504002,
0x26a700006a504006,
0x26a800006a508c06,
0x26a900006a520206,
0x26aa00006a521406,
0x26ab00006a522802,
0x26ac00006a522e02,
0x26ad00006a523202,
0x26ae00006a523402,
0x26af00006a523602,
0x26b000006a523802,
0x26b100006a523a02,
0x26b200006a523c02,
0x26b300006a526206,
0x26b400006a526606,
0x26b500006a540a06,
0x26b600006a542802,
0x26b700006a542c02,
0x26b800006a542e02,
0x26b900006a543202,
0x26ba00006a543402,
0x26bb00006a543602,
0x26bc00006a543802,
0x26bd00006a543a02,
0x26be00006a543c02,
0x26bf00006a543e02,
0x26c000006a544002,
0x26c100006a545a06,
0x26c200006a547806,
0x26c300006a548e06,
0x26c400006a560806,
0x26c500006a561a06,
0x26c600006a562002,
0x26c700006a564e06,
0x26c800006a566406,
0x26c900006a581e02,
0x26ca00006a582602,
0x26cb00006a582802,
0x26cc00006a582c02,
0x26cd00006a582e02,
0x26ce00006a583002,
0x26cf00006a583202,
0x26d000006a583402,
0x26d100006a583602,
0x26d200006a583802,
0x26d300006a583a02,
0x26d400006a583c02,
0x26d500006a583e02,
0x26d600006a584002,
0x26d700006a584606,
0x26d800006a588606,
0x26d900006a5a2802,
0x26da00006a5a2c02,
0x26db00006a5a2c06,
0x26dc00006a5a2e02,
0x26dd00006a5a3202,
0x26de00006a5a3402,
0x26df00006a5a3602,
0x26e000006a5a3802,
0x26e100006a5a3a02,
0x26e200006a5a3c02,
0x26e300006a5a3e02,
0x26e400006a5a3e06,
0x26e500006a5a4002,
0x26e600006a5a5406,
0x26e700006a5a8006,
0x26e800006a5a8e06,
0x26e900006a5c2802,
0x26ea00006a5c2806,
0x26eb00006a5c2e02,
0x26ec00006a5c3202,
0x26ed00006a5c3206,
0x26ee00006a5c3402,
0x26ef00006a5c3602,
0x26f000006a5c3802,
0x26f100006a5c3a02,
0x26f200006a5c3c02,
0x26f300006a5c5e06,
0x26f400006a5c7406,
0x26f500006a5c7606,
0x26f600006a5e2e02,
0x26f700006a5e3802,
0x26f800006a5e3c02,
0x26f900006a5e5c06,
0x26fa00006a5e6c06,
0x26fb00006a5e7406,
0x26fc00006a5e7606,
0x26fd00006a620206,
0x26fe00006a620606,
0x26ff00006a622802,
0x270000006a622806,
0x270100006a622e02,
0x270200006a623202,
0x270300006a623402,
0x270400006a623602,
0x270500006a623802,
0x270600006a623a02,
0x270700006a623c02,
0x270800006a625206,
0x270900006a627006,
0x270a00006a640806,
0x270b00006a641206,
0x270c00006a642002,
0x270d00006a645606,
0x270e00006a647206,
0x270f00006a661406,
0x271000006a662802,
0x271100006a662806,
0x271200006a662e02,
0x271300006a663202,
0x271400006a663402,
0x271500006a663406,
0x271600006a663602,
0x271700006a663802,
0x271800006a663a02,
0x271900006a663c02,
0x271a00006a664c06,
0x271b00006a665206,
0x271c00006a681e02,
0x271d00006a682406,
0x271e00006a682602,
0x271f00006a682802,
0x272000006a682c02,
0x272100006a682e02,
0x272200006a683002,
0x272300006a683202,
0x272400006a683402,
0x272500006a683602,
0x272600006a683802,
0x272700006a683a02,
0x272800006a683c02,
0x272900006a683e02,
0x272a00006a684002,
0x272b00006a686006,
0x272c00006a688606,
0x272d00006a689006,
0x272e00006a6c2802,
0x272f00006a6c2e02,
0x273000006a6c3202,
0x273100006a6c3402,
0x273200006a6c3602,
0x273300006a6c3802,
0x273400006a6c3a02,
0x273500006a6c3a06,
0x273600006a6c3c02,
0x273700006a6c4806,
0x273800006a6c5e06,
0x273900006a6c7606,
0x273a00006a6e1606,
0x273b00006a6e1e02,
0x273c00006a6e1e06,
0x273d00006a6e2602,
0x273e00006a6e2802,
0x273f00006a6e2c02,
0x274000006a6e2e02,
0x274100006a6e3002,
0x274200006a6e3202,
0x274300006a6e3402,
0x274400006a6e3602,
0x274500006a6e3802,
0x274600006a6e3a02,
0x274700006a6e3c02,
0x274800006a6e3e02,
0x274900006a6e4002,
0x274a00006a6e4206,
0x274b00006a6e9006,
0x274c00006a700606,
0x274d00006a702e02,
0x274e00006a702e06,
0x274f00006a703802,
0x275000006a703806,
0x275100006a703c02,
0x275200006a706206,
0x275300006a707206,
0x275400006a720606,
0x275500006a721206,
0x275600006a722002,
0x275700006a722006,
0x275800006a722e02,
0x275900006a722e06,
0x275a00006a723802,
0x275b00006a723c02,
0x275c00006a726406,
0x275d00006a727006,
0x275e00006a742802,
0x275f00006a742806,
0x276000006a742e02,
0x276100006a743202,
0x276200006a743402,
0x276300006a743602,
0x276400006a743802,
0x276500006a743a02,
0x276600006a743c02,
0x276700006a745c06,
0x276800006a745e06,
0x276900006a762802,
0x276a00006a762e02,
0x276b00006a763202,
0x276c00006a763206,
0x276d00006a763402,
0x276e00006a763602,
0x276f00006a763606,
0x277000006a763802,
0x277100006a763a02,
0x277200006a763c02,
0x277300006a764806,
0x277400006a765c06,
0x277500006a765e06,
0x277600006a766c06,
0x277700006a780206,
0x277800006a782802,
0x277900006a782c02,
0x277a00006a782e02,
0x277b00006a783202,
0x277c00006a783402,
0x277d00006a783602,
0x277e00006a783802,
0x277f00006a783a02,
0x278000006a783c02,
0x278100006a783e02,
0x278200006a784002,
0x278300006a784c06,
0x278400006a785406,
0x278500006a789206,
0x278600006a7a2802,
0x278700006a7a2c02,
0x278800006a7a2e02,
0x278900006a7a3002,
0x278a00006a7a3006,
0x278b00006a7a3202,
0x278c00006a7a3402,
0x278d00006a7a3602,
0x278e00006a7a3802,
0x278f00006a7a3a02,
0x279000006a7a3c02,
0x279100006a7a3e02,
0x279200006a7a4002,
0x279300006a7a4406,
0x279400006a7a8006,
0x279500006a7c2202,
0x279600006a7c2206,
0x279700006a7c2802,
0x279800006a7c2e02,
0x279900006a7c3202,
0x279a00006a7c3402,
0x279b00006a7c3602,
0x279c00006a7c3802,
0x279d00006a7c3806,
0x279e00006a7c3a02,
0x279f00006a7c3a06,
0x27a000006a7c3c02,
0x27a100006a7c3c06,
0x27a200006a7c4a06,
0x27a300006a7c8806,
0x27a400006a7c9406,
0x27a500006a7e2802,
0x27a600006a7e2e02,
0x27a700006a7e3202,
0x27a800006a7e3402,
0x27a900006a7e3602,
0x27aa00006a7e3802,
0x27ab00006a7e3a02,
0x27ac00006a7e3c02,
0x27ad00006a7e9206,
0x27ae00006a802802,
0x27af00006a802c02,
0x27b000006a802e02,
0x27b100006a803202,
0x27b200006a803402,
0x27b300006a803602,
0x27b400006a803802,
0x27b500006a803a02,
0x27b600006a803c02,
0x27b700006a803e02,
0x27b800006a804002,
0x27b900006a804406,
0x27ba00006a805a06,
0x27bb00006a807a06,
0x27bc00006a808e06,
0x27bd00006a861e02,
0x27be00006a861e06,
0x27bf00006a862602,
0x27c000006a862606,
0x27c100006a862802,
0x27c200006a862c02,
0x27c300006a862e02,
0x27c400006a863002,
0x27c500006a863202,
0x27c600006a863402,
0x27c700006a863602,
0x27c800006a863802,
0x27c900006a863a02,
0x27ca00006a863c02,
0x27cb00006a863e02,
0x27cc00006a864002,
0x27cd00006a864606,
0x27ce00006a865806,
0x27cf00006a866006,
0x27d000006a866806,
0x27d100006a882002,
0x27d200006a882006,
0x27d300006a882a02,
0x27d400006a882a06,
0x27d500006a882e02,
0x27d600006a883802,
0x27d700006a883c02,
0x27d800006a883c06,
0x27d900006a884a06,
0x27da00006a887c06,
0x27db00006a8a0a06,
0x27dc00006a8a0e06,
0x27dd00006a8a1606,
0x27de00006a8a1806,
0x27df00006a8a1c02,
0x27e000006a8a2802,
0x27e100006a8a2c02,
0x27e200006a8a2e02,
0x27e300006a8a3002,
0x27e400006a8a3202,
0x27e500006a8a3402,
0x27e600006a8a3602,
0x27e700006a8a3802,
0x27e800006a8a3a02,
0x27e900006a8a3c02,
0x27ea00006a8a3e02,
0x27eb00006a8a4002,
0x27ec00006a8a4206,
0x27ed00006a8a8e06,
0x27ee00006a8c2802,
0x27ef00006a8c2c02,
0x27f000006a8c2e02,
0x27f100006a8c3002,
0x27f200006a8c3006,
0x27f300006a8c3202,
0x27f400006a8c3402,
0x27f500006a8c3602,
0x27f600006a8c3802,
0x27f700006a8c3a02,
0x27f800006a8c3c02,
0x27f900006a8c3e02,
0x27fa00006a8c3e06,
0x27fb00006a8c4002,
0x27fc00006a8c5006,
0x27fd00006a8e0a06,
0x27fe00006a8e1c02,
0x27ff00006a8e2802,
0x280000006a8e2c02,
0x280100006a8e2e02,
0x280200006a8e3002,
0x280300006a8e3202,
0x280400006a8e3402,
0x280500006a8e3602,
0x280600006a8e3802,
0x280700006a8e3a02,
0x280800006a8e3c02,
0x280900006a8e3e02,
0x280a00006a8e4002,
0x280b00006a8e4406,
0x280c00006a8e5406,
0x280d00006a8e5a06,
0x280e00006a8e8006,
0x280f00006a8e8a06,
0x281000006a901606,
0x281100006a901e02,
0x281200006a902406,
0x281300006a902602,
0x281400006a902802,
0x281500006a902c02,
0x281600006a902e02,
0x281700006a903002,
0x281800006a903202,
0x281900006a903402,
0x281a00006a903602,
0x281b00006a903802,
0x281c00006a903a02,
0x281d00006a903c02,
0x281e00006a903e02,
0x281f00006a904002,
0x282000006a906806,
0x282100006a906e06,
0x282200006a908206,
0x282300006a922802,
0x282400006a922c02,
0x282500006a922c06,
0x282600006a922e02,
0x282700006a923202,
0x282800006a923402,
0x282900006a923602,
0x282a00006a923802,
0x282b00006a923a02,
0x282c00006a923c02,
0x282d00006a923e02,
0x282e00006a924002,
0x282f00006a924006,
0x283000006a924c06,
0x283100006a927806,
0x283200006a927e06,
0x283300006a941006,
0x283400006a942002,
0x283500006a942202,
0x283600006a942206,
0x283700006a942802,
0x283800006a942a02,
0x283900006a942a06,
0x283a00006a942e02,
0x283b00006a943202,
0x283c00006a943402,
0x283d00006a943602,
0x283e00006a943802,
0x283f00006a943a02,
0x284000006a943c02,
0x284100006a944a06,
0x284200006a944e06,
0x284300006a947c06,
0x284400006c382806,
0x284500006c382e06,
0x284600006c383a06,
0x284700006c383c06,
0x284800006c385e06,
0x284900006c386206,
0x284a00006c386a06,
0x284b00006c387006,
0x284c00006c387406,
0x284d00006c387c06,
0x284e00006c3a2206,
0x284f00006c3a3606,
0x285000006c3a3806,
0x285100006c3a4806,
0x285200006c3a7c06,
0x285300006c421606,
0x285400006c421c02,
0x285500006c421c06,
0x285600006c422802,
0x285700006c422c02,
0x285800006c423002,
0x285900006c423202,
0x285a00006c423402,
0x285b00006c423602,
0x285c00006c423802,
0x285d00006c423a02,
0x285e00006c423e02,
0x285f00006c424002,
0x286000006c426e06,
0x286100006c428a06,
0x286200006c441c02,
0x286300006c441c06,
0x286400006c442802,
0x286500006c442c02,
0x286600006c443002,
0x286700006c443202,
0x286800006c443402,
0x286900006c443602,
0x286a00006c443802,
0x286b00006c443a02,
0x286c00006c443e02,
0x286d00006c444002,
0x286e00006c447a06,
0x286f00006c448006,
0x287000006c448e06,
0x287100006c482802,
0x287200006c483202,
0x287300006c483402,
0x287400006c483602,
0x287500006c483606,
0x287600006c483802,
0x287700006c483a02,
0x287800006c483a06,
0x287900006c487606,
0x287a00006c4c0206,
0x287b00006c4c1406,
0x287c00006c4c2802,
0x287d00006c4c3202,
0x287e00006c4c3402,
0x287f00006c4c3602,
0x288000006c4c3802,
0x288100006c4c3a02,
0x288200006c4c6606,
0x288300006c4c7806,
0x288400006c4c9206,
0x288500006c502802,
0x288600006c503202,
0x288700006c503402,
0x288800006c503602,
0x288900006c503802,
0x288a00006c503a02,
0x288b00006c504002,
0x288c00006c504006,
0x288d00006c508c06,
0x288e00006c520206,
0x288f00006c521406,
0x289000006c522802,
0x289100006c523202,
0x289200006c523402,
0x289300006c523602,
0x289400006c523802,
0x289500006c523a02,
0x289600006c526206,
0x289700006c526606,
0x289800006c540a06,
0x289900006c542802,
0x289a00006c542c02,
0x289b00006c543202,
0x289c00006c543402,
0x289d00006c543602,
0x289e00006c543802,
0x289f00006c543a02,
0x28a000006c543e02,
0x28a100006c544002,
0x28a200006c545a06,
0x28a300006c547806,
0x28a400006c548e06,
0x28a500006c581e02,
0x28a600006c582602,
0x28a700006c582802,
0x28a800006c582c02,
0x28a900006c583002,
0x28aa00006c583202,
0x28ab00006c583402,
0x28ac00006c583602,
0x28ad00006c583802,
0x28ae00006c583a02,
0x28af00006c583e02,
0x28b000006c584002,
0x28b100006c584606,
0x28b200006c588606,
0x28b300006c5a2802,
0x28b400006c5a2c02,
0x28b500006c5a2c06,
0x28b600006c5a3202,
0x28b700006c5a3402,
0x28b800006c5a3602,
0x28b900006c5a3802,
0x28ba00006c5a3a02,
0x28bb00006c5a3e02,
0x28bc00006c5a3e06,
0x28bd00006c5a4002,
0x28be00006c5a5406,
0x28bf00006c5a8006,
0x28c000006c5a8e06,
0x28c100006c5c2802,
0x28c200006c5c2806,
0x28c300006c5c3202,
0x28c400006c5c3206,
0x28c500006c5c3402,
0x28c600006c5c3602,
0x28c700006c5c3802,
0x28c800006c5c3a02,
0x28c900006c5c5e06,
0x28ca00006c5c7406,
0x28cb00006c5c7606,
0x28cc00006c5e2802,
0x28cd00006c5e3202,
0x28ce00006c5e3402,
0x28cf00006c5e3602,
0x28d000006c5e3802,
0x28d100006c5e3806,
0x28d200006c5e3a02,
0x28d300006c5e5c06,
0x28d400006c5e7406,
0x28d500006c5e7606,
0x28d600006c620206,
0x28d700006c620606,
0x28d800006c622802,
0x28d900006c622806,
0x28da00006c623202,
0x28db00006c623402,
0x28dc00006c623602,
0x28dd00006c623802,
0x28de00006c623806,
0x28df00006c623a02,
0x28e000006c625206,
0x28e100006c627006,
0x28e200006c661406,
0x28e300006c662802,
0x28e400006c662806,
0x28e500006c663202,
0x28e600006c663402,
0x28e700006c663406,
0x28e800006c663602,
0x28e900006c663802,
0x28ea00006c663a02,
0x28eb00006c664c06,
0x28ec00006c665206,
0x28ed00006c681e02,
0x28ee00006c682406,
0x28ef00006c682602,
0x28f000006c682802,
0x28f100006c682c02,
0x28f200006c683002,
0x28f300006c683202,
0x28f400006c683402,
0x28f500006c683602,
0x28f600006c683802,
0x28f700006c683a02,
0x28f800006c683e02,
0x28f900006c684002,
0x28fa00006c686006,
0x28fb00006c688606,
0x28fc00006c689006,
0x28fd00006c6a2006,
0x28fe00006c6a2802,
0x28ff00006c6a2e02,
0x290000006c6a2e06,
0x290100006c6a3202,
0x290200006c6a3402,
0x290300006c6a3602,
0x290400006c6a3802,
0x290500006c6a3a02,
0x290600006c6a3c02,
0x290700006c6a3c06,
0x290800006c6a7206,
0x290900006c6a8806,
0x290a00006c6e1606,
0x290b00006c6e1e02,
0x290c00006c6e1e06,
0x290d00006c6e2602,
0x290e00006c6e2802,
0x290f00006c6e2c02,
0x291000006c6e3002,
0x291100006c6e3202,
0x291200006c6e3402,
0x291300006c6e3602,
0x291400006c6e3802,
0x291500006c6e3a02,
0x291600006c6e3e02,
0x291700006c6e4002,
0x291800006c6e4206,
0x291900006c6e9006,
0x291a00006c700606,
0x291b00006c702802,
0x291c00006c702e02,
0x291d00006c702e06,
0x291e00006c703202,
0x291f00006c703402,
0x292000006c703602,
0x292100006c703802,
0x292200006c703a02,
0x292300006c706206,
0x292400006c707206,
0x292500006c720606,
0x292600006c721206,
0x292700006c722006,
0x292800006c722802,
0x292900006c722e02,
0x292a00006c723202,
0x292b00006c723402,
0x292c00006c723602,
0x292d00006c723802,
0x292e00006c723a02,
0x292f00006c726406,
0x293000006c726a06,
0x293100006c727006,
0x293200006c742802,
0x293300006c742806,
0x293400006c743202,
0x293500006c743402,
0x293600006c743602,
0x293700006c743802,
0x293800006c743806,
0x293900006c743a02,
0x293a00006c745c06,
0x293b00006c745e06,
0x293c00006c762802,
0x293d00006c763202,
0x293e00006c763206,
0x293f00006c763402,
0x294000006c763602,
0x294100006c763606,
0x294200006c763802,
0x294300006c763a02,
0x294400006c764806,
0x294500006c765c06,
0x294600006c765e06,
0x294700006c780206,
0x294800006c782802,
0x294900006c782c02,
0x294a00006c783202,
0x294b00006c783402,
0x294c00006c783602,
0x294d00006c783802,
0x294e00006c783a02,
0x294f00006c783e02,
0x295000006c784002,
0x295100006c784c06,
0x295200006c785406,
0x295300006c789206,
0x295400006c7a2802,
0x295500006c7a2c02,
0x295600006c7a3002,
0x295700006c7a3006,
0x295800006c7a3202,
0x295900006c7a3402,
0x295a00006c7a3602,
0x295b00006c7a3802,
0x295c00006c7a3a02,
0x295d00006c7a3e02,
0x295e00006c7a4002,
0x295f00006c7a4406,
0x296000006c7a8006,
0x296100006c7c2202,
0x296200006c7c2206,
0x296300006c7c2802,
0x296400006c7c3202,
0x296500006c7c3402,
0x296600006c7c3602,
0x296700006c7c3802,
0x296800006c7c3806,
0x296900006c7c3a02,
0x296a00006c7c3a06,
0x296b00006c7c3c02,
0x296c00006c7c3c06,
0x296d00006c7c4a06,
0x296e00006c7c8806,
0x296f00006c7c9406,
0x297000006c7e2802,
0x297100006c7e3202,
0x297200006c7e3402,
0x297300006c7e3602,
0x297400006c7e3802,
0x297500006c7e3a02,
0x297600006c7e9206,
0x297700006c802802,
0x297800006c802c02,
0x297900006c803202,
0x297a00006c803402,
0x297b00006c803602,
0x297c00006c803802,
0x297d00006c803a02,
0x297e00006c803e02,
0x297f00006c804002,
0x298000006c804406,
0x298100006c805a06,
0x298200006c807a06,
0x298300006c808e06,
0x298400006c861e02,
0x298500006c861e06,
0x298600006c862602,
0x298700006c862606,
0x298800006c862802,
0x298900006c862c02,
0x298a00006c863002,
0x298b00006c863202,
0x298c00006c863402,
0x298d00006c863602,
0x298e00006c863802,
0x298f00006c863a02,
0x299000006c863e02,
0x299100006c864002,
0x299200006c864606,
0x299300006c865806,
0x299400006c866006,
0x299500006c866806,
0x299600006c882006,
0x299700006c882802,
0x299800006c882a06,
0x299900006c883202,
0x299a00006c883402,
0x299b00006c883602,
0x299c00006c883802,
0x299d00006c883a02,
0x299e00006c883c02,
0x299f00006c884a06,
0x29a000006c886a06,
0x29a100006c887c06,
0x29a200006c8a0a06,
0x29a300006c8a0e06,
0x29a400006c8a1606,
0x29a500006c8a1806,
0x29a600006c8a1c02,
0x29a700006c8a2802,
0x29a800006c8a2c02,
0x29a900006c8a3002,
0x29aa00006c8a3202,
0x29ab00006c8a3402,
0x29ac00006c8a3602,
0x29ad00006c8a3802,
0x29ae00006c8a3a02,
0x29af00006c8a3e02,
0x29b000006c8a4002,
0x29b100006c8a4206,
0x29b200006c8a8e06,
0x29b300006c8c2802,
0x29b400006c8c2c02,
0x29b500006c8c3002,
0x29b600006c8c3006,
0x29b700006c8c3202,
0x29b800006c8c3402,
0x29b900006c8c3602,
0x29ba00006c8c3802,
0x29bb00006c8c3a02,
0x29bc00006c8c3e02,
0x29bd00006c8c3e06,
0x29be00006c8c4002,
0x29bf00006c8c5006,
0x29c000006c8e0a06,
0x29c100006c8e1c02,
0x29c200006c8e2802,
0x29c300006c8e2c02,
0x29c400006c8e3002,
0x29c500006c8e3202,
0x29c600006c8e3402,
0x29c700006c8e3602,
0x29c800006c8e3802,
0x29c900006c8e3a02,
0x29ca00006c8e3e02,
0x29cb00006c8e4002,
0x29cc00006c8e4406,
0x29cd00006c8e5406,
0x29ce00006c8e5a06,
0x29cf00006c8e8006,
0x29d000006c8e8a06,
0x29d100006c901606,
0x29d200006c901e02,
0x29d300006c902406,
0x29d400006c902602,
0x29d500006c902802,
0x29d600006c902c02,
0x29d700006c903002,
0x29d800006c903202,
0x29d900006c903402,
0x29da00006c903602,
0x29db00006c903802,
0x29dc00006c903a02,
0x29dd00006c903e02,
0x29de00006c904002,
0x29df00006c906806,
0x29e000006c906e06,
0x29e100006c908206,
0x29e200006c922802,
0x29e300006c922c02,
0x29e400006c922c06,
0x29e500006c923202,
0x29e600006c923402,
0x29e700006c923602,
0x29e800006c923802,
0x29e900006c923a02,
0x29ea00006c923e02,
0x29eb00006c924002,
0x29ec00006c924006,
0x29ed00006c924c06,
0x29ee00006c927806,
0x29ef00006c927e06,
0x29f000006c941006,
0x29f100006c942202,
0x29f200006c942802,
0x29f300006c942a06,
0x29f400006c943202,
0x29f500006c943402,
0x29f600006c943602,
0x29f700006c943802,
0x29f800006c943a02,
0x29f900006c944a06,
0x29fa00006c944e06,
0x29fb00006c947c06,
0x29fc00006e160e06,
0x29fd00006e164206,
0x29fe00006e168206,
0x29ff00006e168a06,
0x2a0000006e169006,
0x2a0100006e1e2606,
0x2a0200006e1e3006,
0x2a0300006e1e6806,
0x2a0400006e1e8606,
0x2a0500006e1e9006,
0x2a0600006e301c06,
0x2a0700006e301e06,
0x2a0800006e302606,
0x2a0900006e303e06,
0x2a0a00006e304206,
0x2a0b00006e304406,
0x2a0c00006e307a06,
0x2a0d00006e308c06,
0x2a0e00006e421606,
0x2a0f00006e421c02,
0x2a1000006e421c06,
0x2a1100006e421e02,
0x2a1200006e422602,
0x2a1300006e423002,
0x2a1400006e423006,
0x2a1500006e428a06,
0x2a1600006e441c02,
0x2a1700006e441c06,
0x2a1800006e441e02,
0x2a1900006e442602,
0x2a1a00006e443002,
0x2a1b00006e447a06,
0x2a1c00006e448006,
0x2a1d00006e448e06,
0x2a1e00006e481e02,
0x2a1f00006e482602,
0x2a2000006e482802,
0x2a2100006e482c02,
0x2a2200006e483002,
0x2a2300006e483202,
0x2a2400006e483402,
0x2a2500006e483602,
0x2a2600006e483606,
0x2a2700006e483802,
0x2a2800006e483a02,
0x2a2900006e483a06,
0x2a2a00006e483e02,
0x2a2b00006e484002,
0x2a2c00006e486c06,
0x2a2d00006e487606,
0x2a2e00006e4c0206,
0x2a2f00006e4c1406,
0x2a3000006e4c1e02,
0x2a3100006e4c2602,
0x2a3200006e4c2c02,
0x2a3300006e4c3002,
0x2a3400006e4c3402,
0x2a3500006e4c3e02,
0x2a3600006e4c4002,
0x2a3700006e4c6606,
0x2a3800006e4c7806,
0x2a3900006e4c9206,
0x2a3a00006e501e02,
0x2a3b00006e502602,
0x2a3c00006e502c02,
0x2a3d00006e503002,
0x2a3e00006e503402,
0x2a3f00006e503406,
0x2a4000006e503e02,
0x2a4100006e504002,
0x2a4200006e508c06,
0x2a4300006e520206,
0x2a4400006e521406,
0x2a4500006e521e02,
0x2a4600006e522602,
0x2a4700006e522802,
0x2a4800006e522c02,
0x2a4900006e523002,
0x2a4a00006e523202,
0x2a4b00006e523402,
0x2a4c00006e523602,
0x2a4d00006e523802,
0x2a4e00006e523a02,
0x2a4f00006e523e02,
0x2a5000006e524002,
0x2a5100006e526206,
0x2a5200006e526606,
0x2a5300006e540a06,
0x2a5400006e541e02,
0x2a5500006e542602,
0x2a5600006e542c02,
0x2a5700006e543002,
0x2a5800006e543e02,
0x2a5900006e544002,
0x2a5a00006e545a06,
0x2a5b00006e547806,
0x2a5c00006e548e06,
0x2a5d00006e581e02,
0x2a5e00006e582602,
0x2a5f00006e583002,
0x2a6000006e584606,
0x2a6100006e588606,
0x2a6200006e5a1e02,
0x2a6300006e5a2602,
0x2a6400006e5a2c02,
0x2a6500006e5a2c06,
0x2a6600006e5a3002,
0x2a6700006e5a3e02,
0x2a6800006e5a4002,
0x2a6900006e5a5406,
0x2a6a00006e5a8006,
0x2a6b00006e5a8e06,
0x2a6c00006e5c1e02,
0x2a6d00006e5c2602,
0x2a6e00006e5c2802,
0x2a6f00006e5c2806,
0x2a7000006e5c2c02,
0x2a7100006e5c3002,
0x2a7200006e5c3202,
0x2a7300006e5c3206,
0x2a7400006e5c3402,
0x2a7500006e5c3602,
0x2a7600006e5c3802,
0x2a7700006e5c3a02,
0x2a7800006e5c3e02,
0x2a7900006e5c4002,
0x2a7a00006e5c5e06,
0x2a7b00006e5c7406,
0x2a7c00006e5c7606,
0x2a7d00006e5e1e02,
0x2a7e00006e5e2602,
0x2a7f00006e5e2802,
0x2a8000006e5e2c02,
0x2a8100006e5e3002,
0x2a8200006e5e3202,
0x2a8300006e5e3402,
0x2a8400006e5e3602,
0x2a8500006e5e3802,
0x2a8600006e5e3a02,
0x2a8700006e5e3e02,
0x2a8800006e5e4002,
0x2a8900006e5e5c06,
0x2a8a00006e5e6c06,
0x2a8b00006e5e7406,
0x2a8c00006e5e7606,
0x2a8d00006e620206,
0x2a8e00006e620606,
0x2a8f00006e621e02,
0x2a9000006e622602,
0x2a9100006e622802,
0x2a9200006e622806,
0x2a9300006e622c02,
0x2a9400006e623002,
0x2a9500006e623202,
0x2a9600006e623402,
0x2a9700006e623602,
0x2a9800006e623802,
0x2a9900006e623806,
0x2a9a00006e623a02,
0x2a9b00006e623e02,
0x2a9c00006e624002,
0x2a9d00006e625206,
0x2a9e00006e627006,
0x2a9f00006e661406,
0x2aa000006e661e02,
0x2aa100006e662602,
0x2aa200006e662802,
0x2aa300006e662806,
0x2aa400006e662c02,
0x2aa500006e663002,
0x2aa600006e663202,
0x2aa700006e663402,
0x2aa800006e663602,
0x2aa900006e663802,
0x2aaa00006e663a02,
0x2aab00006e663e02,
0x2aac00006e664002,
0x2aad00006e664c06,
0x2aae00006e665206,
0x2aaf00006e681e02,
0x2ab000006e682406,
0x2ab100006e682602,
0x2ab200006e683002,
0x2ab300006e686006,
0x2ab400006e688606,
0x2ab500006e689006,
0x2ab600006e6a1e02,
0x2ab700006e6a2006,
0x2ab800006e6a2602,
0x2ab900006e6a2802,
0x2aba00006e6a2c02,
0x2abb00006e6a2e02,
0x2abc00006e6a2e06,
0x2abd00006e6a3002,
0x2abe00006e6a3202,
0x2abf00006e6a3402,
0x2ac000006e6a3602,
0x2ac100006e6a3802,
0x2ac200006e6a3a02,
0x2ac300006e6a3c02,
0x2ac400006e6a3c06,
0x2ac500006e6a3e02,
0x2ac600006e6a4002,
0x2ac700006e6a7206,
0x2ac800006e6a8806,
0x2ac900006e6c1e02,
0x2aca00006e6c2602,
0x2acb00006e6c2802,
0x2acc00006e6c2c02,
0x2acd00006e6c3002,
0x2ace00006e6c3202,
0x2acf00006e6c3402,
0x2ad000006e6c3602,
0x2ad100006e6c3802,
0x2ad200006e6c3806,
0x2ad300006e6c3a02,
0x2ad400006e6c3a06,
0x2ad500006e6c3e02,
0x2ad600006e6c4002,
0x2ad700006e6c4806,
0x2ad800006e6c5e06,
0x2ad900006e6c7606,
0x2ada00006e700606,
0x2adb00006e701e02,
0x2adc00006e702602,
0x2add00006e702802,
0x2ade00006e702c02,
0x2adf00006e702e02,
0x2ae000006e702e06,
0x2ae100006e703002,
0x2ae200006e703202,
0x2ae300006e703402,
0x2ae400006e703602,
0x2ae500006e703802,
0x2ae600006e703a02,
0x2ae700006e703e02,
0x2ae800006e704002,
0x2ae900006e706206,
0x2aea00006e707206,
0x2aeb00006e720606,
0x2aec00006e721206,
0x2aed00006e721e02,
0x2aee00006e722006,
0x2aef00006e722602,
0x2af000006e722802,
0x2af100006e722c02,
0x2af200006e722e02,
0x2af300006e723002,
0x2af400006e723202,
0x2af500006e723402,
0x2af600006e723602,
0x2af700006e723802,
0x2af800006e723a02,
0x2af900006e723e02,
0x2afa00006e724002,
0x2afb00006e726406,
0x2afc00006e726a06,
0x2afd00006e727006,
0x2afe00006e741e02,
0x2aff00006e742602,
0x2b0000006e742802,
0x2b0100006e742806,
0x2b0200006e742c02,
0x2b0300006e743002,
0x2b0400006e743202,
0x2b0500006e743402,
0x2b0600006e743602,
0x2b0700006e743802,
0x2b0800006e743806,
0x2b0900006e743a02,
0x2b0a00006e743e02,
0x2b0b00006e744002,
0x2b0c00006e745c06,
0x2b0d00006e745e06,
0x2b0e00006e761e02,
0x2b0f00006e762602,
0x2b1000006e762802,
0x2b1100006e762c02,
0x2b1200006e763002,
0x2b1300006e763202,
0x2b1400006e763206,
0x2b1500006e763402,
0x2b1600006e763602,
0x2b1700006e763606,
0x2b1800006e763802,
0x2b1900006e763a02,
0x2b1a00006e763e02,
0x2b1b00006e764002,
0x2b1c00006e764806,
0x2b1d00006e765c06,
0x2b1e00006e765e06,
0x2b1f00006e766c06,
0x2b2000006e780206,
0x2b2100006e781e02,
0x2b2200006e782602,
0x2b2300006e782c02,
0x2b2400006e783002,
0x2b2500006e783e02,
0x2b2600006e784002,
0x2b2700006e784c06,
0x2b2800006e785406,
0x2b2900006e789206,
0x2b2a00006e7a1e02,
0x2b2b00006e7a2602,
0x2b2c00006e7a3002,
0x2b2d00006e7a3e02,
0x2b2e00006e7a3e06,
0x2b2f00006e7a4406,
0x2b3000006e7a8006,
0x2b3100006e7c1e02,
0x2b3200006e7c2202,
0x2b3300006e7c2206,
0x2b3400006e7c2602,
0x2b3500006e7c2802,
0x2b3600006e7c2c02,
0x2b3700006e7c3002,
0x2b3800006e7c3202,
0x2b3900006e7c3402,
0x2b3a00006e7c3602,
0x2b3b00006e7c3802,
0x2b3c00006e7c3806,
0x2b3d00006e7c3a02,
0x2b3e00006e7c3a06,
0x2b3f00006e7c3c02,
0x2b4000006e7c3c06,
0x2b4100006e7c3e02,
0x2b4200006e7c4002,
0x2b4300006e7c4a06,
0x2b4400006e7c8806,
0x2b4500006e7c9406,
0x2b4600006e7e1e02,
0x2b4700006e7e2602,
0x2b4800006e7e2c02,
0x2b4900006e7e3002,
0x2b4a00006e7e3402,
0x2b4b00006e7e3e02,
0x2b4c00006e7e4002,
0x2b4d00006e7e9206,
0x2b4e00006e801e02,
0x2b4f00006e802602,
0x2b5000006e803002,
0x2b5100006e803e02,
0x2b5200006e804406,
0x2b5300006e805a06,
0x2b5400006e807a06,
0x2b5500006e808e06,
0x2b5600006e861e02,
0x2b5700006e861e06,
0x2b5800006e862602,
0x2b5900006e862606,
0x2b5a00006e863002,
0x2b5b00006e864606,
0x2b5c00006e865806,
0x2b5d00006e866006,
0x2b5e00006e866806,
0x2b5f00006e881e02,
0x2b6000006e882006,
0x2b6100006e882602,
0x2b6200006e882802,
0x2b6300006e882a06,
0x2b6400006e882c02,
0x2b6500006e883002,
0x2b6600006e883202,
0x2b6700006e883402,
0x2b6800006e883602,
0x2b6900006e883802,
0x2b6a00006e883a02,
0x2b6b00006e883c02,
0x2b6c00006e883e02,
0x2b6d00006e884002,
0x2b6e00006e884a06,
0x2b6f00006e886a06,
0x2b7000006e887c06,
0x2b7100006e8a0a06,
0x2b7200006e8a0e06,
0x2b7300006e8a1606,
0x2b7400006e8a1806,
0x2b7500006e8a1c02,
0x2b7600006e8a1e02,
0x2b7700006e8a2602,
0x2b7800006e8a3002,
0x2b7900006e8a4206,
0x2b7a00006e8a8e06,
0x2b7b00006e8c1e02,
0x2b7c00006e8c2602,
0x2b7d00006e8c2c02,
0x2b7e00006e8c3002,
0x2b7f00006e8c3e02,
0x2b8000006e8c3e06,
0x2b8100006e8c4002,
0x2b8200006e8c4006,
0x2b8300006e8c5006,
0x2b8400006e8e0a06,
0x2b8500006e8e1c02,
0x2b8600006e8e1e02,
0x2b8700006e8e2602,
0x2b8800006e8e3002,
0x2b8900006e8e4406,
0x2b8a00006e8e5406,
0x2b8b00006e8e5a06,
0x2b8c00006e8e8006,
0x2b8d00006e8e8a06,
0x2b8e00006e901606,
0x2b8f00006e901e02,
0x2b9000006e901e06,
0x2b9100006e902406,
0x2b9200006e902602,
0x2b9300006e903002,
0x2b9400006e906806,
0x2b9500006e908206,
0x2b9600006e921e02,
0x2b9700006e922602,
0x2b9800006e922c02,
0x2b9900006e922c06,
0x2b9a00006e923002,
0x2b9b00006e923402,
0x2b9c00006e923406,
0x2b9d00006e923e02,
0x2b9e00006e924002,
0x2b9f00006e924006,
0x2ba000006e924c06,
0x2ba100006e927806,
0x2ba200006e927e06,
0x2ba300006e941006,
0x2ba400006e941e02,
0x2ba500006e942202,
0x2ba600006e942602,
0x2ba700006e942802,
0x2ba800006e942a06,
0x2ba900006e942c02,
0x2baa00006e943002,
0x2bab00006e943202,
0x2bac00006e943402,
0x2bad00006e943602,
0x2bae00006e943802,
0x2baf00006e943a02,
0x2bb000006e943e02,
0x2bb100006e944002,
0x2bb200006e944a06,
0x2bb300006e944e06,
0x2bb400006e947c06,
0x2bb5000070060206,
0x2bb6000070061206,
0x2bb7000070066206,
0x2bb8000070067206,
0x2bb90000702e3806,
0x2bba0000702e6a06,
0x2bbb0000702e7206,
0x2bbc000070382806,
0x2bbd000070382e06,
0x2bbe000070383a06,
0x2bbf000070383c06,
0x2bc0000070385e06,
0x2bc1000070386206,
0x2bc2000070386a06,
0x2bc3000070386c06,
0x2bc4000070387406,
0x2bc5000070387c06,
0x2bc6000070421606,
0x2bc7000070421c02,
0x2bc8000070421c06,
0x2bc9000070422802,
0x2bca000070422c02,
0x2bcb000070422e02,
0x2bcc000070423002,
0x2bcd000070423202,
0x2bce000070423402,
0x2bcf000070423602,
0x2bd0000070423802,
0x2bd1000070423a02,
0x2bd2000070423e02,
0x2bd3000070424002,
0x2bd4000070426e06,
0x2bd5000070428a06,
0x2bd6000070441c02,
0x2bd7000070441c06,
0x2bd8000070442802,
0x2bd9000070442c02,
0x2bda000070442e02,
0x2bdb000070443002,
0x2bdc000070443202,
0x2bdd000070443402,
0x2bde000070443602,
0x2bdf000070443802,
0x2be0000070443a02,
0x2be1000070443e02,
0x2be2000070444002,
0x2be3000070447a06,
0x2be4000070448006,
0x2be5000070448e06,
0x2be6000070482802,
0x2be7000070482e02,
0x2be8000070483202,
0x2be9000070483402,
0x2bea000070483602,
0x2beb000070483606,
0x2bec000070483802,
0x2bed000070483a02,
0x2bee000070483a06,
0x2bef000070486c06,
0x2bf0000070487606,
0x2bf10000704c0206,
0x2bf20000704c1406,
0x2bf30000704c2802,
0x2bf40000704c2e02,
0x2bf50000704c3202,
0x2bf60000704c3402,
0x2bf70000704c3602,
0x2bf80000704c3802,
0x2bf90000704c3a02,
0x2bfa0000704c6606,
0x2bfb0000704c7806,
0x2bfc0000704c9206,
0x2bfd000070502802,
0x2bfe000070502e02,
0x2bff000070503202,
0x2c00000070503402,
0x2c01000070503602,
0x2c02000070503802,
0x2c03000070503a02,
0x2c04000070504002,
0x2c05000070504006,
0x2c06000070508c06,
0x2c07000070520206,
0x2c08000070521406,
0x2c09000070522802,
0x2c0a000070522e02,
0x2c0b000070523202,
0x2c0c000070523402,
0x2c0d000070523602,
0x2c0e000070523802,
0x2c0f000070523a02,
0x2c10000070526206,
0x2c11000070526606,
0x2c12000070540a06,
0x2c13000070542802,
0x2c14000070542c02,
0x2c15000070542e02,
0x2c16000070543202,
0x2c17000070543402,
0x2c18000070543602,
0x2c19000070543802,
0x2c1a000070543a02,
0x2c1b000070543e02,
0x2c1c000070544002,
0x2c1d000070545a06,
0x2c1e000070547806,
0x2c1f000070548e06,
0x2c20000070581e02,
0x2c21000070582602,
0x2c22000070582802,
0x2c23000070582c02,
0x2c24000070582e02,
0x2c25000070583002,
0x2c26000070583202,
0x2c27000070583402,
0x2c28000070583602,
0x2c29000070583802,
0x2c2a000070583a02,
0x2c2b000070583e02,
0x2c2c000070584002,
0x2c2d000070584606,
0x2c2e000070588606,
0x2c2f0000705a2802,
0x2c300000705a2c02,
0x2c310000705a2c06,
0x2c320000705a2e02,
0x2c330000705a3202,
0x2c340000705a3402,
0x2c350000705a3602,
0x2c360000705a3802,
0x2c370000705a3a02,
0x2c380000705a3e02,
0x2c390000705a3e06,
0x2c3a0000705a4002,
0x2c3b0000705a5406,
0x2c3c0000705a8006,
0x2c3d0000705a8e06,
0x2c3e0000705c2802,
0x2c3f0000705c2806,
0x2c400000705c2e02,
0x2c410000705c3202,
0x2c420000705c3206,
0x2c430000705c3402,
0x2c440000705c3602,
0x2c450000705c3802,
0x2c460000705c3a02,
0x2c470000705c5e06,
0x2c480000705c7406,
0x2c490000705c7606,
0x2c4a0000705e2e02,
0x2c4b0000705e3802,
0x2c4c0000705e5c06,
0x2c4d0000705e6c06,
0x2c4e0000705e7406,
0x2c4f0000705e7606,
0x2c50000070620206,
0x2c51000070620606,
0x2c52000070622802,
0x2c53000070622806,
0x2c54000070622e02,
0x2c55000070623202,
0x2c56000070623402,
0x2c57000070623602,
0x2c58000070623802,
0x2c59000070623806,
0x2c5a000070623a02,
0x2c5b000070625206,
0x2c5c000070661406,
0x2c5d000070662802,
0x2c5e000070662806,
0x2c5f000070662e02,
0x2c60000070663202,
0x2c61000070663402,
0x2c62000070663406,
0x2c63000070663602,
0x2c64000070663802,
0x2c65000070663a02,
0x2c66000070664c06,
0x2c67000070665206,
0x2c68000070681e02,
0x2c69000070682406,
0x2c6a000070682602,
0x2c6b000070682802,
0x2c6c000070682c02,
0x2c6d000070682e02,
0x2c6e000070683002,
0x2c6f000070683202,
0x2c70000070683402,
0x2c71000070683602,
0x2c72000070683802,
0x2c73000070683a02,
0x2c74000070683e02,
0x2c75000070684002,
0x2c76000070686006,
0x2c77000070688606,
0x2c78000070689006,
0x2c790000706a2006,
0x2c7a0000706a2e02,
0x2c7b0000706a2e06,
0x2c7c0000706a3802,
0x2c7d0000706a3806,
0x2c7e0000706a3c02,
0x2c7f0000706a3c06,
0x2c800000706a7206,
0x2c810000706a8806,
0x2c820000706c2802,
0x2c830000706c2e02,
0x2c840000706c3202,
0x2c850000706c3402,
0x2c860000706c3602,
0x2c870000706c3802,
0x2c880000706c3a02,
0x2c890000706c3a06,
0x2c8a0000706c4806,
0x2c8b0000706c5e06,
0x2c8c0000706c7606,
0x2c8d0000706e1606,
0x2c8e0000706e1e02,
0x2c8f0000706e1e06,
0x2c900000706e2602,
0x2c910000706e2802,
0x2c920000706e2c02,
0x2c930000706e2e02,
0x2c940000706e3002,
0x2c950000706e3202,
0x2c960000706e3402,
0x2c970000706e3602,
0x2c980000706e3802,
0x2c990000706e3a02,
0x2c9a0000706e3e02,
0x2c9b0000706e4002,
0x2c9c0000706e4206,
0x2c9d0000706e9006,
0x2c9e000070720606,
0x2c9f000070721206,
0x2ca0000070722006,
0x2ca1000070722e02,
0x2ca2000070722e06,
0x2ca3000070723802,
0x2ca4000070726406,
0x2ca5000070726a06,
0x2ca6000070742802,
0x2ca7000070742806,
0x2ca8000070742e02,
0x2ca9000070743202,
0x2caa000070743402,
0x2cab000070743602,
0x2cac000070743802,
0x2cad000070743a02,
0x2cae000070745c06,
0x2caf000070745e06,
0x2cb0000070762802,
0x2cb1000070762e02,
0x2cb2000070763202,
0x2cb3000070763206,
0x2cb4000070763402,
0x2cb5000070763602,
0x2cb6000070763606,
0x2cb7000070763802,
0x2cb8000070763a02,
0x2cb9000070764806,
0x2cba000070765c06,
0x2cbb000070765e06,
0x2cbc000070766c06,
0x2cbd000070780206,
0x2cbe000070782802,
0x2cbf000070782c02,
0x2cc0000070782e02,
0x2cc1000070783202,
0x2cc2000070783402,
0x2cc3000070783602,
0x2cc4000070783802,
0x2cc5000070783a02,
0x2cc6000070783e02,
0x2cc7000070784002,
0x2cc8000070784c06,
0x2cc9000070785406,
0x2cca000070789206,
0x2ccb0000707a2802,
0x2ccc0000707a2c02,
0x2ccd0000707a2e02,
0x2cce0000707a3002,
0x2ccf0000707a3006,
0x2cd00000707a3202,
0x2cd10000707a3402,
0x2cd20000707a3602,
0x2cd30000707a3802,
0x2cd40000707a3a02,
0x2cd50000707a3e02,
0x2cd60000707a4002,
0x2cd70000707a4406,
0x2cd80000707a8006,
0x2cd90000707c2202,
0x2cda0000707c2206,
0x2cdb0000707c2802,
0x2cdc0000707c2e02,
0x2cdd0000707c3202,
0x2cde0000707c3402,
0x2cdf0000707c3602,
0x2ce00000707c3802,
0x2ce10000707c3a02,
0x2ce20000707c3a06,
0x2ce30000707c3c02,
0x2ce40000707c3c06,
0x2ce50000707c4a06,
0x2ce60000707c8806,
0x2ce70000707c9406,
0x2ce80000707e2802,
0x2ce90000707e2e02,
0x2cea0000707e3202,
0x2ceb0000707e3402,
0x2cec0000707e3602,
0x2ced0000707e3802,
0x2cee0000707e3a02,
0x2cef0000707e9206,
0x2cf0000070802802,
0x2cf1000070802c02,
0x2cf2000070802e02,
0x2cf3000070803202,
0x2cf4000070803402,
0x2cf5000070803602,
0x2cf6000070803802,
0x2cf7000070803a02,
0x2cf8000070803e02,
0x2cf9000070804002,
0x2cfa000070804406,
0x2cfb000070805a06,
0x2cfc000070807a06,
0x2cfd000070808e06,
0x2cfe000070861e02,
0x2cff000070861e06,
0x2d00000070862602,
0x2d01000070862606,
0x2d02000070862802,
0x2d03000070862c02,
0x2d04000070862e02,
0x2d05000070863002,
0x2d06000070863202,
0x2d07000070863402,
0x2d08000070863602,
0x2d09000070863802,
0x2d0a000070863a02,
0x2d0b000070863e02,
0x2d0c000070864002,
0x2d0d000070864606,
0x2d0e000070865806,
0x2d0f000070866006,
0x2d10000070866806,
0x2d11000070882006,
0x2d12000070882a06,
0x2d13000070882e02,
0x2d14000070883802,
0x2d15000070883c02,
0x2d16000070884a06,
0x2d17000070886a06,
0x2d18000070887c06,
0x2d190000708a0a06,
0x2d1a0000708a0e06,
0x2d1b0000708a1606,
0x2d1c0000708a1806,
0x2d1d0000708a1c02,
0x2d1e0000708a2802,
0x2d1f0000708a2c02,
0x2d200000708a2e02,
0x2d210000708a3002,
0x2d220000708a3202,
0x2d230000708a3402,
0x2d240000708a3602,
0x2d250000708a3802,
0x2d260000708a3a02,
0x2d270000708a3e02,
0x2d280000708a4002,
0x2d290000708a4206,
0x2d2a0000708a8e06,
0x2d2b0000708c2802,
0x2d2c0000708c2c02,
0x2d2d0000708c2e02,
0x2d2e0000708c3002,
0x2d2f0000708c3006,
0x2d300000708c3202,
0x2d310000708c3402,
0x2d320000708c3602,
0x2d330000708c3802,
0x2d340000708c3a02,
0x2d350000708c3e02,
0x2d360000708c3e06,
0x2d370000708c4002,
0x2d380000708c5006,
0x2d390000708e0a06,
0x2d3a0000708e1c02,
0x2d3b0000708e2802,
0x2d3c0000708e2c02,
0x2d3d0000708e2e02,
0x2d3e0000708e3002,
0x2d3f0000708e3202,
0x2d400000708e3402,
0x2d410000708e3602,
0x2d420000708e3802,
0x2d430000708e3a02,
0x2d440000708e3e02,
0x2d450000708e4002,
0x2d460000708e4406,
0x2d470000708e5406,
0x2d480000708e5a06,
0x2d490000708e8006,
0x2d4a0000708e8a06,
0x2d4b000070901606,
0x2d4c000070901e02,
0x2d4d000070902406,
0x2d4e000070902602,
0x2d4f000070902802,
0x2d50000070902c02,
0x2d51000070902e02,
0x2d52000070903002,
0x2d53000070903202,
0x2d54000070903402,
0x2d55000070903602,
0x2d56000070903802,
0x2d57000070903a02,
0x2d58000070903e02,
0x2d59000070904002,
0x2d5a000070906806,
0x2d5b000070906e06,
0x2d5c000070908206,
0x2d5d000070922802,
0x2d5e000070922c02,
0x2d5f000070922c06,
0x2d60000070922e02,
0x2d61000070923202,
0x2d62000070923402,
0x2d63000070923602,
0x2d64000070923802,
0x2d65000070923a02,
0x2d66000070923e02,
0x2d67000070924002,
0x2d68000070924006,
0x2d69000070924c06,
0x2d6a000070927806,
0x2d6b000070927e06,
0x2d6c000070941006,
0x2d6d000070942202,
0x2d6e000070942802,
0x2d6f000070942a06,
0x2d70000070942e02,
0x2d71000070943202,
0x2d72000070943402,
0x2d73000070943602,
0x2d74000070943802,
0x2d75000070943a02,
0x2d76000070944a06,
0x2d77000070944e06,
0x2d78000070947c06,
0x2d79000072060206,
0x2d7a000072061206,
0x2d7b000072066206,
0x2d7c000072067006,
0x2d7d000072120006,
0x2d7e000072120206,
0x2d7f000072120606,
0x2d80000072120806,
0x2d81000072120a06,
0x2d82000072126406,
0x2d83000072202a06,
0x2d84000072204e06,
0x2d85000072205606,
0x2d86000072206406,
0x2d87000072206a06,
0x2d88000072208806,
0x2d890000722e3806,
0x2d8a0000722e6a06,
0x2d8b0000722e7006,
0x2d8c000072421606,
0x2d8d000072421c02,
0x2d8e000072421c06,
0x2d8f000072422802,
0x2d90000072422c02,
0x2d91000072422e02,
0x2d92000072423002,
0x2d93000072423202,
0x2d94000072423402,
0x2d95000072423602,
0x2d96000072423802,
0x2d97000072423a02,
0x2d98000072423e02,
0x2d99000072424002,
0x2d9a000072426e06,
0x2d9b000072428a06,
0x2d9c000072441c02,
0x2d9d000072441c06,
0x2d9e000072442802,
0x2d9f000072442c02,
0x2da0000072442e02,
0x2da1000072443002,
0x2da2000072443202,
0x2da3000072443402,
0x2da4000072443602,
0x2da5000072443802,
0x2da6000072443a02,
0x2da7000072443e02,
0x2da8000072444002,
0x2da9000072447a06,
0x2daa000072448006,
0x2dab000072448e06,
0x2dac000072482802,
0x2dad000072482e02,
0x2dae000072483202,
0x2daf000072483402,
0x2db0000072483602,
0x2db1000072483606,
0x2db2000072483802,
0x2db3000072483a02,
0x2db4000072483a06,
0x2db5000072486c06,
0x2db6000072487606,
0x2db70000724a2002,
0x2db80000724a2a02,
0x2db90000724a7c06,
0x2dba0000724a8806,
0x2dbb0000724a9406,
0x2dbc0000724c0206,
0x2dbd0000724c1406,
0x2dbe0000724c2802,
0x2dbf0000724c2e02,
0x2dc00000724c3202,
0x2dc10000724c3402,
0x2dc20000724c3602,
0x2dc30000724c3802,
0x2dc40000724c3a02,
0x2dc50000724c6606,
0x2dc60000724c7806,
0x2dc70000724c9206,
0x2dc80000724e1006,
0x2dc90000724e1a06,
0x2dca0000724e2002,
0x2dcb0000724e2a02,
0x2dcc0000724e2a06,
0x2dcd0000724e5606,
0x2dce0000724e9406,
0x2dcf000072502802,
0x2dd0000072502e02,
0x2dd1000072503202,
0x2dd2000072503402,
0x2dd3000072503602,
0x2dd4000072503802,
0x2dd5000072503a02,
0x2dd6000072504002,
0x2dd7000072504006,
0x2dd8000072508c06,
0x2dd9000072520206,
0x2dda000072521406,
0x2ddb000072522802,
0x2ddc000072522e02,
0x2ddd000072523202,
0x2dde000072523402,
0x2ddf000072523602,
0x2de0000072523802,
0x2de1000072523a02,
0x2de2000072526206,
0x2de3000072526606,
0x2de4000072540a06,
0x2de5000072542802,
0x2de6000072542c02,
0x2de7000072542e02,
0x2de8000072543202,
0x2de9000072543402,
0x2dea000072543602,
0x2deb000072543802,
0x2dec000072543a02,
0x2ded000072543e02,
0x2dee000072544002,
0x2def000072545a06,
0x2df0000072547806,
0x2df1000072548e06,
0x2df2000072560806,
0x2df3000072561a06,
0x2df4000072562002,
0x2df5000072564e06,
0x2df6000072566406,
0x2df7000072581e02,
0x2df8000072582602,
0x2df9000072582802,
0x2dfa000072582c02,
0x2dfb000072582e02,
0x2dfc000072583002,
0x2dfd000072583202,
0x2dfe000072583402,
0x2dff000072583602,
0x2e00000072583802,
0x2e01000072583a02,
0x2e02000072583e02,
0x2e03000072584002,
0x2e04000072584606,
0x2e05000072588606,
0x2e060000725a2802,
0x2e070000725a2c02,
0x2e080000725a2c06,
0x2e090000725a2e02,
0x2e0a0000725a3202,
0x2e0b0000725a3402,
0x2e0c0000725a3602,
0x2e0d0000725a3802,
0x2e0e0000725a3a02,
0x2e0f0000725a3e02,
0x2e100000725a3e06,
0x2e110000725a4002,
0x2e120000725a5406,
0x2e130000725a8006,
0x2e140000725a8e06,
0x2e150000725c2802,
0x2e160000725c2806,
0x2e170000725c2e02,
0x2e180000725c3202,
0x2e190000725c3206,
0x2e1a0000725c3402,
0x2e1b0000725c3602,
0x2e1c0000725c3802,
0x2e1d0000725c3a02,
0x2e1e0000725c5e06,
0x2e1f0000725c7406,
0x2e200000725c7606,
0x2e210000725e2e02,
0x2e220000725e3802,
0x2e230000725e5c06,
0x2e240000725e6c06,
0x2e250000725e7406,
0x2e260000725e7606,
0x2e27000072620206,
0x2e28000072620606,
0x2e29000072622802,
0x2e2a000072622806,
0x2e2b000072622e02,
0x2e2c000072623202,
0x2e2d000072623402,
0x2e2e000072623602,
0x2e2f000072623802,
0x2e30000072623a02,
0x2e31000072625206,
0x2e32000072627006,
0x2e33000072640806,
0x2e34000072641206,
0x2e35000072642002,
0x2e36000072642006,
0x2e37000072645606,
0x2e38000072661406,
0x2e39000072662802,
0x2e3a000072662806,
0x2e3b000072662e02,
0x2e3c000072663202,
0x2e3d000072663402,
0x2e3e000072663406,
0x2e3f000072663602,
0x2e40000072663802,
0x2e41000072663a02,
0x2e42000072664c06,
0x2e43000072665206,
0x2e44000072681e02,
0x2e45000072682406,
0x2e46000072682602,
0x2e47000072682802,
0x2e48000072682c02,
0x2e49000072682e02,
0x2e4a000072683002,
0x2e4b000072683202,
0x2e4c000072683402,
0x2e4d000072683602,
0x2e4e000072683802,
0x2e4f000072683a02,
0x2e50000072683e02,
0x2e51000072684002,
0x2e52000072686006,
0x2e53000072688606,
0x2e54000072689006,
0x2e550000726a2002,
0x2e560000726a2006,
0x2e570000726a2e02,
0x2e580000726a2e06,
0x2e590000726a3802,
0x2e5a0000726a3806,
0x2e5b0000726a3c02,
0x2e5c0000726a3c06,
0x2e5d0000726a8806,
0x2e5e0000726c2802,
0x2e5f0000726c2e02,
0x2e600000726c3202,
0x2e610000726c3402,
0x2e620000726c3602,
0x2e630000726c3802,
0x2e640000726c3a02,
0x2e650000726c3a06,
0x2e660000726c4806,
0x2e670000726c5e06,
0x2e680000726c7606,
0x2e690000726e1606,
0x2e6a0000726e1e02,
0x2e6b0000726e1e06,
0x2e6c0000726e2602,
0x2e6d0000726e2802,
0x2e6e0000726e2c02,
0x2e6f0000726e2e02,
0x2e700000726e3002,
0x2e710000726e3202,
0x2e720000726e3402,
0x2e730000726e3602,
0x2e740000726e3802,
0x2e750000726e3a02,
0x2e760000726e3e02,
0x2e770000726e4002,
0x2e780000726e4206,
0x2e790000726e9006,
0x2e7a000072700606,
0x2e7b000072702e02,
0x2e7c000072702e06,
0x2e7d000072703802,
0x2e7e000072703806,
0x2e7f000072706206,
0x2e80000072742802,
0x2e81000072742806,
0x2e82000072742e02,
0x2e83000072743202,
0x2e84000072743402,
0x2e85000072743602,
0x2e86000072743802,
0x2e87000072743a02,
0x2e88000072745c06,
0x2e89000072745e06,
0x2e8a000072762802,
0x2e8b000072762e02,
0x2e8c000072763202,
0x2e8d000072763206,
0x2e8e000072763402,
0x2e8f000072763602,
0x2e90000072763606,
0x2e91000072763802,
0x2e92000072763a02,
0x2e93000072764806,
0x2e94000072765c06,
0x2e95000072765e06,
0x2e96000072766c06,
0x2e97000072780206,
0x2e98000072782802,
0x2e99000072782c02,
0x2e9a000072782e02,
0x2e9b000072783202,
0x2e9c000072783402,
0x2e9d000072783602,
0x2e9e000072783802,
0x2e9f000072783a02,
0x2ea0000072783e02,
0x2ea1000072784002,
0x2ea2000072784c06,
0x2ea3000072785406,
0x2ea4000072789206,
0x2ea50000727a2802,
0x2ea60000727a2c02,
0x2ea70000727a2e02,
0x2ea80000727a3002,
0x2ea90000727a3006,
0x2eaa0000727a3202,
0x2eab0000727a3402,
0x2eac0000727a3602,
0x2ead0000727a3802,
0x2eae0000727a3a02,
0x2eaf0000727a3e02,
0x2eb00000727a4002,
0x2eb10000727a4406,
0x2eb20000727a8006,
0x2eb30000727c2202,
0x2eb40000727c2206,
0x2eb50000727c2802,
0x2eb60000727c2e02,
0x2eb70000727c3202,
0x2eb80000727c3402,
0x2eb90000727c3602,
0x2eba0000727c3802,
0x2ebb0000727c3a02,
0x2ebc0000727c3a06,
0x2ebd0000727c3c02,
0x2ebe0000727c3c06,
0x2ebf0000727c4a06,
0x2ec00000727c8806,
0x2ec10000727c9406,
0x2ec20000727e2802,
0x2ec30000727e2e02,
0x2ec40000727e3202,
0x2ec50000727e3402,
0x2ec60000727e3602,
0x2ec70000727e3802,
0x2ec80000727e3a02,
0x2ec90000727e9206,
0x2eca000072802802,
0x2ecb000072802c02,
0x2ecc000072802e02,
0x2ecd000072803202,
0x2ece000072803402,
0x2ecf000072803602,
0x2ed0000072803802,
0x2ed1000072803a02,
0x2ed2000072803e02,
0x2ed3000072804002,
0x2ed4000072804406,
0x2ed5000072805a06,
0x2ed6000072807a06,
0x2ed7000072808e06,
0x2ed8000072861e02,
0x2ed9000072861e06,
0x2eda000072862602,
0x2edb000072862606,
0x2edc000072862802,
0x2edd000072862c02,
0x2ede000072862e02,
0x2edf000072863002,
0x2ee0000072863202,
0x2ee1000072863402,
0x2ee2000072863602,
0x2ee3000072863802,
0x2ee4000072863a02,
0x2ee5000072863e02,
0x2ee6000072864002,
0x2ee7000072864606,
0x2ee8000072865806,
0x2ee9000072866006,
0x2eea000072866806,
0x2eeb000072882002,
0x2eec000072882006,
0x2eed000072882a02,
0x2eee000072882a06,
0x2eef000072882e02,
0x2ef0000072883802,
0x2ef1000072883c02,
0x2ef2000072883c06,
0x2ef3000072884a06,
0x2ef4000072886a06,
0x2ef5000072887c06,
0x2ef60000728a0a06,
0x2ef70000728a0e06,
0x2ef80000728a1606,
0x2ef90000728a1806,
0x2efa0000728a1c02,
0x2efb0000728a2802,
0x2efc0000728a2c02,
0x2efd0000728a2e02,
0x2efe0000728a3002,
0x2eff0000728a3202,
0x2f000000728a3402,
0x2f010000728a3602,
0x2f020000728a3802,
0x2f030000728a3a02,
0x2f040000728a3e02,
0x2f050000728a4002,
0x2f060000728a4206,
0x2f070000728a8e06,
0x2f080000728c2802,
0x2f090000728c2c02,
0x2f0a0000728c2e02,
0x2f0b0000728c3002,
0x2f0c0000728c3006,
0x2f0d0000728c3202,
0x2f0e0000728c3402,
0x2f0f0000728c3602,
0x2f100000728c3802,
0x2f110000728c3a02,
0x2f120000728c3e02,
0x2f130000728c3e06,
0x2f140000728c4002,
0x2f150000728c5006,
0x2f160000728e0a06,
0x2f170000728e1c02,
0x2f180000728e2802,
0x2f190000728e2c02,
0x2f1a0000728e2e02,
0x2f1b0000728e3002,
0x2f1c0000728e3202,
0x2f1d0000728e3402,
0x2f1e0000728e3602,
0x2f1f0000728e3802,
0x2f200000728e3a02,
0x2f210000728e3e02,
0x2f220000728e4002,
0x2f230000728e4406,
0x2f240000728e5406,
0x2f250000728e5a06,
0x2f260000728e8006,
0x2f270000728e8a06,
0x2f28000072901606,
0x2f29000072901e02,
0x2f2a000072902406,
0x2f2b000072902602,
0x2f2c000072902802,
0x2f2d000072902c02,
0x2f2e000072902e02,
0x2f2f000072903002,
0x2f30000072903202,
0x2f31000072903402,
0x2f32000072903602,
0x2f33000072903802,
0x2f34000072903a02,
0x2f35000072903e02,
0x2f36000072904002,
0x2f37000072906806,
0x2f38000072906e06,
0x2f39000072908206,
0x2f3a000072922802,
0x2f3b000072922c02,
0x2f3c000072922c06,
0x2f3d000072922e02,
0x2f3e000072923202,
0x2f3f000072923402,
0x2f40000072923602,
0x2f41000072923802,
0x2f42000072923a02,
0x2f43000072923e02,
0x2f44000072924002,
0x2f45000072924006,
0x2f46000072924c06,
0x2f47000072927806,
0x2f48000072927e06,
0x2f49000072941006,
0x2f4a000072942002,
0x2f4b000072942202,
0x2f4c000072942206,
0x2f4d000072942802,
0x2f4e000072942a02,
0x2f4f000072942a06,
0x2f50000072942e02,
0x2f51000072943202,
0x2f52000072943402,
0x2f53000072943602,
0x2f54000072943802,
0x2f55000072943a02,
0x2f56000072944a06,
0x2f57000072944e06,
0x2f58000072947c06,
0x2f59000074283206,
0x2f5a000074283406,
0x2f5b000074283806,
0x2f5c000074285206,
0x2f5d000074285c06,
0x2f5e000074286206,
0x2f5f000074286606,
0x2f60000074382806,
0x2f61000074382e06,
0x2f62000074383a06,
0x2f63000074383c06,
0x2f64000074385e06,
0x2f65000074386206,
0x2f66000074386a06,
0x2f67000074386c06,
0x2f68000074387006,
0x2f69000074387c06,
0x2f6a000074421606,
0x2f6b000074421c02,
0x2f6c000074421c06,
0x2f6d000074422802,
0x2f6e000074422c02,
0x2f6f000074423002,
0x2f70000074423202,
0x2f71000074423402,
0x2f72000074423602,
0x2f73000074423802,
0x2f74000074423a02,
0x2f75000074423e02,
0x2f76000074424002,
0x2f77000074426e06,
0x2f78000074428a06,
0x2f79000074441c02,
0x2f7a000074441c06,
0x2f7b000074442802,
0x2f7c000074442c02,
0x2f7d000074443002,
0x2f7e000074443202,
0x2f7f000074443402,
0x2f80000074443602,
0x2f81000074443802,
0x2f82000074443a02,
0x2f83000074443e02,
0x2f84000074444002,
0x2f85000074447a06,
0x2f86000074448006,
0x2f87000074448e06,
0x2f88000074482802,
0x2f89000074483202,
0x2f8a000074483402,
0x2f8b000074483602,
0x2f8c000074483606,
0x2f8d000074483802,
0x2f8e000074483a02,
0x2f8f000074483a06,
0x2f90000074486c06,
0x2f91000074487606,
0x2f920000744c0206,
0x2f930000744c1406,
0x2f940000744c2802,
0x2f950000744c3202,
0x2f960000744c3402,
0x2f970000744c3602,
0x2f980000744c3802,
0x2f990000744c3a02,
0x2f9a0000744c6606,
0x2f9b0000744c7806,
0x2f9c0000744c9206,
0x2f9d000074502802,
0x2f9e000074503202,
0x2f9f000074503402,
0x2fa0000074503602,
0x2fa1000074503802,
0x2fa2000074503a02,
0x2fa3000074504002,
0x2fa4000074504006,
0x2fa5000074508c06,
0x2fa6000074520206,
0x2fa7000074521406,
0x2fa8000074522802,
0x2fa9000074523202,
0x2faa000074523402,
0x2fab000074523602,
0x2fac000074523802,
0x2fad000074523a02,
0x2fae000074526206,
0x2faf000074526606,
0x2fb0000074540a06,
0x2fb1000074542802,
0x2fb2000074542c02,
0x2fb3000074543202,
0x2fb4000074543402,
0x2fb5000074543602,
0x2fb6000074543802,
0x2fb7000074543a02,
0x2fb8000074543e02,
0x2fb9000074544002,
0x2fba000074545a06,
0x2fbb000074547806,
0x2fbc000074548e06,
0x2fbd000074581e02,
0x2fbe000074582602,
0x2fbf000074582802,
0x2fc0000074582c02,
0x2fc1000074583002,
0x2fc2000074583202,
0x2fc3000074583402,
0x2fc4000074583602,
0x2fc5000074583802,
0x2fc6000074583a02,
0x2fc7000074583e02,
0x2fc8000074584002,
0x2fc9000074584606,
0x2fca000074588606,
0x2fcb0000745a2802,
0x2fcc0000745a2c02,
0x2fcd0000745a2c06,
0x2fce0000745a3202,
0x2fcf0000745a3402,
0x2fd00000745a3602,
0x2fd10000745a3802,
0x2fd20000745a3a02,
0x2fd30000745a3e02,
0x2fd40000745a3e06,
0x2fd50000745a4002,
0x2fd60000745a5406,
0x2fd70000745a8006,
0x2fd80000745a8e06,
0x2fd90000745c2802,
0x2fda0000745c2806,
0x2fdb0000745c3202,
0x2fdc0000745c3206,
0x2fdd0000745c3402,
0x2fde0000745c3602,
0x2fdf0000745c3802,
0x2fe00000745c3a02,
0x2fe10000745c5e06,
0x2fe20000745c7606,
0x2fe30000745e2802,
0x2fe40000745e3202,
0x2fe50000745e3402,
0x2fe60000745e3602,
0x2fe70000745e3802,
0x2fe80000745e3806,
0x2fe90000745e3a02,
0x2fea0000745e5c06,
0x2feb0000745e6c06,
0x2fec0000745e7606,
0x2fed000074620206,
0x2fee000074620606,
0x2fef000074622802,
0x2ff0000074622806,
0x2ff1000074623202,
0x2ff2000074623402,
0x2ff3000074623602,
0x2ff4000074623802,
0x2ff5000074623806,
0x2ff6000074623a02,
0x2ff7000074625206,
0x2ff8000074627006,
0x2ff9000074661406,
0x2ffa000074662802,
0x2ffb000074662806,
0x2ffc000074663202,
0x2ffd000074663402,
0x2ffe000074663406,
0x2fff000074663602,
0x3000000074663802,
0x3001000074663a02,
0x3002000074664c06,
0x3003000074665206,
0x3004000074681e02,
0x3005000074682406,
0x3006000074682602,
0x3007000074682802,
0x3008000074682c02,
0x3009000074683002,
0x300a000074683202,
0x300b000074683402,
0x300c000074683602,
0x300d000074683802,
0x300e000074683a02,
0x300f000074683e02,
0x3010000074684002,
0x3011000074686006,
0x3012000074688606,
0x3013000074689006,
0x30140000746a2006,
0x30150000746a2802,
0x30160000746a2e02,
0x30170000746a2e06,
0x30180000746a3202,
0x30190000746a3402,
0x301a0000746a3602,
0x301b0000746a3802,
0x301c0000746a3a02,
0x301d0000746a3c02,
0x301e0000746a3c06,
0x301f0000746a7206,
0x30200000746a8806,
0x30210000746c2802,
0x30220000746c3202,
0x30230000746c3402,
0x30240000746c3602,
0x30250000746c3802,
0x30260000746c3806,
0x30270000746c3a02,
0x30280000746c3a06,
0x30290000746c4806,
0x302a0000746c5e06,
0x302b0000746c7606,
0x302c0000746e1606,
0x302d0000746e1e02,
0x302e0000746e1e06,
0x302f0000746e2602,
0x30300000746e2802,
0x30310000746e2c02,
0x30320000746e3002,
0x30330000746e3202,
0x30340000746e3402,
0x30350000746e3602,
0x30360000746e3802,
0x30370000746e3a02,
0x30380000746e3e02,
0x30390000746e4002,
0x303a0000746e4206,
0x303b0000746e9006,
0x303c000074700606,
0x303d000074702802,
0x303e000074702e02,
0x303f000074702e06,
0x3040000074703202,
0x3041000074703402,
0x3042000074703602,
0x3043000074703802,
0x3044000074703a02,
0x3045000074706206,
0x3046000074707206,
0x3047000074720606,
0x3048000074721206,
0x3049000074722006,
0x304a000074722802,
0x304b000074722e02,
0x304c000074723202,
0x304d000074723402,
0x304e000074723602,
0x304f000074723802,
0x3050000074723a02,
0x3051000074726406,
0x3052000074726a06,
0x3053000074727006,
0x3054000074762802,
0x3055000074763202,
0x3056000074763206,
0x3057000074763402,
0x3058000074763602,
0x3059000074763606,
0x305a000074763802,
0x305b000074763a02,
0x305c000074764806,
0x305d000074765c06,
0x305e000074765e06,
0x305f000074766c06,
0x3060000074780206,
0x3061000074782802,
0x3062000074782c02,
0x3063000074783202,
0x3064000074783402,
0x3065000074783602,
0x3066000074783802,
0x3067000074783a02,
0x3068000074783e02,
0x3069000074784002,
0x306a000074784c06,
0x306b000074785406,
0x306c000074789206,
0x306d0000747a2802,
0x306e0000747a2c02,
0x306f0000747a3002,
0x30700000747a3006,
0x30710000747a3202,
0x30720000747a3402,
0x30730000747a3602,
0x30740000747a3802,
0x30750000747a3a02,
0x30760000747a3e02,
0x30770000747a4002,
0x30780000747a4406,
0x30790000747a8006,
0x307a0000747c2202,
0x307b0000747c2206,
0x307c0000747c2802,
0x307d0000747c3202,
0x307e0000747c3402,
0x307f0000747c3602,
0x30800000747c3802,
0x30810000747c3806,
0x30820000747c3a02,
0x30830000747c3a06,
0x30840000747c3c02,
0x30850000747c3c06,
0x30860000747c4a06,
0x30870000747c8806,
0x30880000747c9406,
0x30890000747e2802,
0x308a0000747e3202,
0x308b0000747e3402,
0x308c0000747e3602,
0x308d0000747e3802,
0x308e0000747e3a02,
0x308f0000747e9206,
0x3090000074802802,
0x3091000074802c02,
0x3092000074803202,
0x3093000074803402,
0x3094000074803602,
0x3095000074803802,
0x3096000074803a02,
0x3097000074803e02,
0x3098000074804002,
0x3099000074804406,
0x309a000074805a06,
0x309b000074807a06,
0x309c000074808e06,
0x309d000074861e02,
0x309e000074861e06,
0x309f000074862602,
0x30a0000074862606,
0x30a1000074862802,
0x30a2000074862c02,
0x30a3000074863002,
0x30a4000074863202,
0x30a5000074863402,
0x30a6000074863602,
0x30a7000074863802,
0x30a8000074863a02,
0x30a9000074863e02,
0x30aa000074864002,
0x30ab000074864606,
0x30ac000074865806,
0x30ad000074866006,
0x30ae000074866806,
0x30af000074882006,
0x30b0000074882802,
0x30b1000074882a06,
0x30b2000074883202,
0x30b3000074883402,
0x30b4000074883602,
0x30b5000074883802,
0x30b6000074883a02,
0x30b7000074883c02,
0x30b8000074884a06,
0x30b9000074886a06,
0x30ba000074887c06,
0x30bb0000748a0a06,
0x30bc0000748a0e06,
0x30bd0000748a1606,
0x30be0000748a1806,
0x30bf0000748a1c02,
0x30c00000748a2802,
0x30c10000748a2c02,
0x30c20000748a3002,
0x30c30000748a3202,
0x30c40000748a3402,
0x30c50000748a3602,
0x30c60000748a3802,
0x30c70000748a3a02,
0x30c80000748a3e02,
0x30c90000748a4002,
0x30ca0000748a4206,
0x30cb0000748a8e06,
0x30cc0000748c2802,
0x30cd0000748c2c02,
0x30ce0000748c3002,
0x30cf0000748c3006,
0x30d00000748c3202,
0x30d10000748c3402,
0x30d20000748c3602,
0x30d30000748c3802,
0x30d40000748c3a02,
0x30d50000748c3e02,
0x30d60000748c3e06,
0x30d70000748c4002,
0x30d80000748c5006,
0x30d90000748e0a06,
0x30da0000748e1c02,
0x30db0000748e2802,
0x30dc0000748e2c02,
0x30dd0000748e3002,
0x30de0000748e3202,
0x30df0000748e3402,
0x30e00000748e3602,
0x30e10000748e3802,
0x30e20000748e3a02,
0x30e30000748e3e02,
0x30e40000748e4002,
0x30e50000748e4406,
0x30e60000748e5406,
0x30e70000748e5a06,
0x30e80000748e8006,
0x30e90000748e8a06,
0x30ea000074901606,
0x30eb000074901e02,
0x30ec000074902406,
0x30ed000074902602,
0x30ee000074902802,
0x30ef000074902c02,
0x30f0000074903002,
0x30f1000074903202,
0x30f2000074903402,
0x30f3000074903602,
0x30f4000074903802,
0x30f5000074903a02,
0x30f6000074903e02,
0x30f7000074904002,
0x30f8000074906806,
0x30f9000074906e06,
0x30fa000074908206,
0x30fb000074922802,
0x30fc000074922c02,
0x30fd000074922c06,
0x30fe000074923202,
0x30ff000074923402,
0x3100000074923602,
0x3101000074923802,
0x3102000074923a02,
0x3103000074923e02,
0x3104000074924002,
0x3105000074924006,
0x3106000074924c06,
0x3107000074927806,
0x3108000074927e06,
0x3109000074941006,
0x310a000074942202,
0x310b000074942802,
0x310c000074942a06,
0x310d000074943202,
0x310e000074943402,
0x310f000074943602,
0x3110000074943802,
0x3111000074943a02,
0x3112000074944a06,
0x3113000074944e06,
0x3114000074947c06,
0x3115000076322806,
0x3116000076323406,
0x3117000076323606,
0x3118000076325c06,
0x3119000076363206,
0x311a000076363406,
0x311b000076363a06,
0x311c000076364806,
0x311d000076421606,
0x311e000076421c02,
0x311f000076421c06,
0x3120000076422802,
0x3121000076422c02,
0x3122000076423002,
0x3123000076423202,
0x3124000076423402,
0x3125000076423602,
0x3126000076423802,
0x3127000076423a02,
0x3128000076423e02,
0x3129000076424002,
0x312a000076426e06,
0x312b000076428a06,
0x312c000076441c02,
0x312d000076441c06,
0x312e000076442802,
0x312f000076442c02,
0x3130000076443002,
0x3131000076443202,
0x3132000076443402,
0x3133000076443602,
0x3134000076443802,
0x3135000076443a02,
0x3136000076443e02,
0x3137000076444002,
0x3138000076447a06,
0x3139000076448006,
0x313a000076448e06,
0x313b000076482802,
0x313c000076483202,
0x313d000076483402,
0x313e000076483602,
0x313f000076483606,
0x3140000076483802,
0x3141000076483a02,
0x3142000076483a06,
0x3143000076486c06,
0x31440000764c0206,
0x31450000764c1406,
0x31460000764c2802,
0x31470000764c3202,
0x31480000764c3402,
0x31490000764c3602,
0x314a0000764c3802,
0x314b0000764c3a02,
0x314c0000764c6606,
0x314d0000764c7806,
0x314e0000764c9206,
0x314f000076502802,
0x3150000076503202,
0x3151000076503402,
0x3152000076503602,
0x3153000076503802,
0x3154000076503a02,
0x3155000076504002,
0x3156000076504006,
0x3157000076508c06,
0x3158000076520206,
0x3159000076521406,
0x315a000076522802,
0x315b000076523202,
0x315c000076523402,
0x315d000076523602,
0x315e000076523802,
0x315f000076523a02,
0x3160000076526206,
0x3161000076526606,
0x3162000076540a06,
0x3163000076542802,
0x3164000076542c02,
0x3165000076543202,
0x3166000076543402,
0x3167000076543602,
0x3168000076543802,
0x3169000076543a02,
0x316a000076543e02,
0x316b000076544002,
0x316c000076545a06,
0x316d000076547806,
0x316e000076548e06,
0x316f000076581e02,
0x3170000076582602,
0x3171000076582802,
0x3172000076582c02,
0x3173000076583002,
0x3174000076583202,
0x3175000076583402,
0x3176000076583602,
0x3177000076583802,
0x3178000076583a02,
0x3179000076583e02,
0x317a000076584002,
0x317b000076584606,
0x317c000076588606,
0x317d0000765a2802,
0x317e0000765a2c02,
0x317f0000765a2c06,
0x31800000765a3202,
0x31810000765a3402,
0x31820000765a3602,
0x31830000765a3802,
0x31840000765a3a02,
0x31850000765a3e02,
0x31860000765a3e06,
0x31870000765a4002,
0x31880000765a5406,
0x31890000765a8006,
0x318a0000765a8e06,
0x318b0000765c2802,
0x318c0000765c2806,
0x318d0000765c3202,
0x318e0000765c3206,
0x318f0000765c3402,
0x31900000765c3602,
0x31910000765c3802,
0x31920000765c3a02,
0x31930000765c5e06,
0x31940000765c7406,
0x31950000765e2802,
0x31960000765e3202,
0x31970000765e3402,
0x31980000765e3602,
0x31990000765e3802,
0x319a0000765e3806,
0x319b0000765e3a02,
0x319c0000765e5c06,
0x319d0000765e6c06,
0x319e0000765e7406,
0x319f000076620206,
0x31a0000076620606,
0x31a1000076622802,
0x31a2000076622806,
0x31a3000076623202,
0x31a4000076623402,
0x31a5000076623602,
0x31a6000076623802,
0x31a7000076623806,
0x31a8000076623a02,
0x31a9000076625206,
0x31aa000076627006,
0x31ab000076661406,
0x31ac000076662802,
0x31ad000076662806,
0x31ae000076663202,
0x31af000076663402,
0x31b0000076663406,
0x31b1000076663602,
0x31b2000076663802,
0x31b3000076663a02,
0x31b4000076664c06,
0x31b5000076665206,
0x31b6000076681e02,
0x31b7000076682406,
0x31b8000076682602,
0x31b9000076682802,
0x31ba000076682c02,
0x31bb000076683002,
0x31bc000076683202,
0x31bd000076683402,
0x31be000076683602,
0x31bf000076683802,
0x31c0000076683a02,
0x31c1000076683e02,
0x31c2000076684002,
0x31c3000076686006,
0x31c4000076688606,
0x31c5000076689006,
0x31c60000766a2006,
0x31c70000766a2802,
0x31c80000766a2e02,
0x31c90000766a2e06,
0x31ca0000766a3202,
0x31cb0000766a3402,
0x31cc0000766a3602,
0x31cd0000766a3802,
0x31ce0000766a3a02,
0x31cf0000766a3c02,
0x31d00000766a3c06,
0x31d10000766a7206,
0x31d20000766a8806,
0x31d30000766c2802,
0x31d40000766c3202,
0x31d50000766c3402,
0x31d60000766c3602,
0x31d70000766c3802,
0x31d80000766c3806,
0x31d90000766c3a02,
0x31da0000766c3a06,
0x31db0000766c4806,
0x31dc0000766c5e06,
0x31dd0000766e1606,
0x31de0000766e1e02,
0x31df0000766e1e06,
0x31e00000766e2602,
0x31e10000766e2802,
0x31e20000766e2c02,
0x31e30000766e3002,
0x31e40000766e3202,
0x31e50000766e3402,
0x31e60000766e3602,
0x31e70000766e3802,
0x31e80000766e3a02,
0x31e90000766e3e02,
0x31ea0000766e4002,
0x31eb0000766e4206,
0x31ec0000766e9006,
0x31ed000076700606,
0x31ee000076702802,
0x31ef000076702e02,
0x31f0000076702e06,
0x31f1000076703202,
0x31f2000076703402,
0x31f3000076703602,
0x31f4000076703802,
0x31f5000076703a02,
0x31f6000076706206,
0x31f7000076707206,
0x31f8000076720606,
0x31f9000076721206,
0x31fa000076722006,
0x31fb000076722802,
0x31fc000076722e02,
0x31fd000076723202,
0x31fe000076723402,
0x31ff000076723602,
0x3200000076723802,
0x3201000076723a02,
0x3202000076726406,
0x3203000076726a06,
0x3204000076727006,
0x3205000076742802,
0x3206000076742806,
0x3207000076743202,
0x3208000076743402,
0x3209000076743602,
0x320a000076743802,
0x320b000076743806,
0x320c000076743a02,
0x320d000076745c06,
0x320e000076745e06,
0x320f000076780206,
0x3210000076782802,
0x3211000076782c02,
0x3212000076783202,
0x3213000076783402,
0x3214000076783602,
0x3215000076783802,
0x3216000076783a02,
0x3217000076783e02,
0x3218000076784002,
0x3219000076784c06,
0x321a000076785406,
0x321b000076789206,
0x321c0000767a2802,
0x321d0000767a2c02,
0x321e0000767a3002,
0x321f0000767a3006,
0x32200000767a3202,
0x32210000767a3402,
0x32220000767a3602,
0x32230000767a3802,
0x32240000767a3a02,
0x32250000767a3e02,
0x32260000767a4002,
0x32270000767a4406,
0x32280000767a8006,
0x32290000767c2202,
0x322a0000767c2206,
0x322b0000767c2802,
0x322c0000767c3202,
0x322d0000767c3402,
0x322e0000767c3602,
0x322f0000767c3802,
0x32300000767c3806,
0x32310000767c3a02,
0x32320000767c3a06,
0x32330000767c3c02,
0x32340000767c3c06,
0x32350000767c4a06,
0x32360000767c8806,
0x32370000767c9406,
0x32380000767e2802,
0x32390000767e3202,
0x323a0000767e3402,
0x323b0000767e3602,
0x323c0000767e3802,
0x323d0000767e3a02,
0x323e0000767e9206,
0x323f000076802802,
0x3240000076802c02,
0x3241000076803202,
0x3242000076803402,
0x3243000076803602,
0x3244000076803802,
0x3245000076803a02,
0x3246000076803e02,
0x3247000076804002,
0x3248000076804406,
0x3249000076805a06,
0x324a000076807a06,
0x324b000076808e06,
0x324c000076861e02,
0x324d000076861e06,
0x324e000076862602,
0x324f000076862606,
0x3250000076862802,
0x3251000076862c02,
0x3252000076863002,
0x3253000076863202,
0x3254000076863402,
0x3255000076863602,
0x3256000076863802,
0x3257000076863a02,
0x3258000076863e02,
0x3259000076864002,
0x325a000076864606,
0x325b000076865806,
0x325c000076866006,
0x325d000076866806,
0x325e000076882006,
0x325f000076882802,
0x3260000076882a06,
0x3261000076883202,
0x3262000076883402,
0x3263000076883602,
0x3264000076883802,
0x3265000076883a02,
0x3266000076883c02,
0x3267000076884a06,
0x3268000076886a06,
0x3269000076887c06,
0x326a0000768a0a06,
0x326b0000768a0e06,
0x326c0000768a1606,
0x326d0000768a1806,
0x326e0000768a1c02,
0x326f0000768a2802,
0x32700000768a2c02,
0x32710000768a3002,
0x32720000768a3202,
0x32730000768a3402,
0x32740000768a3602,
0x32750000768a3802,
0x32760000768a3a02,
0x32770000768a3e02,
0x32780000768a4002,
0x32790000768a4206,
0x327a0000768a8e06,
0x327b0000768c2802,
0x327c0000768c2c02,
0x327d0000768c3002,
0x327e0000768c3006,
0x327f0000768c3202,
0x32800000768c3402,
0x32810000768c3602,
0x32820000768c3802,
0x32830000768c3a02,
0x32840000768c3e02,
0x32850000768c3e06,
0x32860000768c4002,
0x32870000768c5006,
0x32880000768e0a06,
0x32890000768e1c02,
0x328a0000768e2802,
0x328b0000768e2c02,
0x328c0000768e3002,
0x328d0000768e3202,
0x328e0000768e3402,
0x328f0000768e3602,
0x32900000768e3802,
0x32910000768e3a02,
0x32920000768e3e02,
0x32930000768e4002,
0x32940000768e4406,
0x32950000768e5406,
0x32960000768e5a06,
0x32970000768e8006,
0x32980000768e8a06,
0x3299000076901606,
0x329a000076901e02,
0x329b000076902406,
0x329c000076902602,
0x329d000076902802,
0x329e000076902c02,
0x329f000076903002,
0x32a0000076903202,
0x32a1000076903402,
0x32a2000076903602,
0x32a3000076903802,
0x32a4000076903a02,
0x32a5000076903e02,
0x32a6000076904002,
0x32a7000076906806,
0x32a8000076906e06,
0x32a9000076908206,
0x32aa000076922802,
0x32ab000076922c02,
0x32ac000076922c06,
0x32ad000076923202,
0x32ae000076923402,
0x32af000076923602,
0x32b0000076923802,
0x32b1000076923a02,
0x32b2000076923e02,
0x32b3000076924002,
0x32b4000076924006,
0x32b5000076924c06,
0x32b6000076927806,
0x32b7000076927e06,
0x32b8000076941006,
0x32b9000076942202,
0x32ba000076942802,
0x32bb000076942a06,
0x32bc000076943202,
0x32bd000076943402,
0x32be000076943602,
0x32bf000076943802,
0x32c0000076943a02,
0x32c1000076944a06,
0x32c2000076944e06,
0x32c3000076947c06,
0x32c4000078020606,
0x32c5000078021206,
0x32c6000078021406,
0x32c7000078024c06,
0x32c8000078025206,
0x32c9000078026206,
0x32ca0000782c3e06,
0x32cb0000782c4006,
0x32cc0000782c5406,
0x32cd0000782c5a06,
0x32ce0000782c9206,
0x32cf000078421606,
0x32d0000078421c02,
0x32d1000078421c06,
0x32d2000078422c02,
0x32d3000078423002,
0x32d4000078423e02,
0x32d5000078424002,
0x32d6000078426e06,
0x32d7000078428a06,
0x32d8000078441c02,
0x32d9000078441c06,
0x32da000078442c02,
0x32db000078443002,
0x32dc000078443e02,
0x32dd000078444002,
0x32de000078447a06,
0x32df000078448006,
0x32e0000078448e06,
0x32e1000078482802,
0x32e2000078482c02,
0x32e3000078483202,
0x32e4000078483402,
0x32e5000078483602,
0x32e6000078483606,
0x32e7000078483802,
0x32e8000078483a02,
0x32e9000078483a06,
0x32ea000078483e02,
0x32eb000078484002,
0x32ec000078486c06,
0x32ed000078487606,
0x32ee0000784c0206,
0x32ef0000784c1406,
0x32f00000784c2c02,
0x32f10000784c3402,
0x32f20000784c3406,
0x32f30000784c3e02,
0x32f40000784c4002,
0x32f50000784c6606,
0x32f60000784c9206,
0x32f7000078502c02,
0x32f8000078503402,
0x32f9000078503406,
0x32fa000078503e02,
0x32fb000078504002,
0x32fc000078508c06,
0x32fd000078520206,
0x32fe000078521406,
0x32ff000078522802,
0x3300000078522c02,
0x3301000078523202,
0x3302000078523402,
0x3303000078523602,
0x3304000078523802,
0x3305000078523a02,
0x3306000078523e02,
0x3307000078524002,
0x3308000078526206,
0x3309000078526606,
0x330a000078540a06,
0x330b000078542c02,
0x330c000078542c06,
0x330d000078545a06,
0x330e000078548e06,
0x330f000078581e02,
0x3310000078582602,
0x3311000078582c02,
0x3312000078583002,
0x3313000078583e02,
0x3314000078584002,
0x3315000078584606,
0x3316000078588606,
0x33170000785a2c02,
0x33180000785a3e02,
0x33190000785a3e06,
0x331a0000785a4002,
0x331b0000785a5406,
0x331c0000785a8006,
0x331d0000785a8e06,
0x331e0000785c2802,
0x331f0000785c2806,
0x33200000785c2c02,
0x33210000785c3202,
0x33220000785c3206,
0x33230000785c3402,
0x33240000785c3602,
0x33250000785c3802,
0x33260000785c3a02,
0x33270000785c3e02,
0x33280000785c4002,
0x33290000785c5e06,
0x332a0000785c7406,
0x332b0000785c7606,
0x332c0000785e2802,
0x332d0000785e2c02,
0x332e0000785e3202,
0x332f0000785e3402,
0x33300000785e3602,
0x33310000785e3802,
0x33320000785e3a02,
0x33330000785e3e02,
0x33340000785e4002,
0x33350000785e5c06,
0x33360000785e6c06,
0x33370000785e7406,
0x33380000785e7606,
0x3339000078620206,
0x333a000078620606,
0x333b000078622802,
0x333c000078622806,
0x333d000078622c02,
0x333e000078623202,
0x333f000078623402,
0x3340000078623602,
0x3341000078623802,
0x3342000078623806,
0x3343000078623a02,
0x3344000078623e02,
0x3345000078624002,
0x3346000078625206,
0x3347000078627006,
0x3348000078661406,
0x3349000078662802,
0x334a000078662806,
0x334b000078662c02,
0x334c000078663202,
0x334d000078663402,
0x334e000078663602,
0x334f000078663802,
0x3350000078663a02,
0x3351000078663e02,
0x3352000078664002,
0x3353000078664c06,
0x3354000078665206,
0x3355000078681e02,
0x3356000078682406,
0x3357000078682602,
0x3358000078682c02,
0x3359000078683002,
0x335a000078683e02,
0x335b000078684002,
0x335c000078686006,
0x335d000078688606,
0x335e000078689006,
0x335f0000786a2006,
0x33600000786a2802,
0x33610000786a2c02,
0x33620000786a2e02,
0x33630000786a2e06,
0x33640000786a3202,
0x33650000786a3402,
0x33660000786a3602,
0x33670000786a3802,
0x33680000786a3a02,
0x33690000786a3c02,
0x336a0000786a3c06,
0x336b0000786a3e02,
0x336c0000786a4002,
0x336d0000786a7206,
0x336e0000786a8806,
0x336f0000786c2802,
0x33700000786c2c02,
0x33710000786c3202,
0x33720000786c3402,
0x33730000786c3602,
0x33740000786c3802,
0x33750000786c3806,
0x33760000786c3a02,
0x33770000786c3a06,
0x33780000786c3e02,
0x33790000786c4002,
0x337a0000786c4806,
0x337b0000786c5e06,
0x337c0000786c7606,
0x337d0000786e1606,
0x337e0000786e1e02,
0x337f0000786e1e06,
0x33800000786e2602,
0x33810000786e2c02,
0x33820000786e3002,
0x33830000786e3e02,
0x33840000786e4002,
0x33850000786e4206,
0x33860000786e9006,
0x3387000078700606,
0x3388000078702802,
0x3389000078702c02,
0x338a000078702e02,
0x338b000078702e06,
0x338c000078703202,
0x338d000078703402,
0x338e000078703602,
0x338f000078703802,
0x3390000078703a02,
0x3391000078703e02,
0x3392000078704002,
0x3393000078706206,
0x3394000078707206,
0x3395000078720606,
0x3396000078721206,
0x3397000078722006,
0x3398000078722802,
0x3399000078722c02,
0x339a000078722e02,
0x339b000078723202,
0x339c000078723402,
0x339d000078723602,
0x339e000078723802,
0x339f000078723a02,
0x33a0000078723e02,
0x33a1000078724002,
0x33a2000078726406,
0x33a3000078726a06,
0x33a4000078727006,
0x33a5000078742802,
0x33a6000078742806,
0x33a7000078742c02,
0x33a8000078743202,
0x33a9000078743402,
0x33aa000078743602,
0x33ab000078743802,
0x33ac000078743806,
0x33ad000078743a02,
0x33ae000078743e02,
0x33af000078744002,
0x33b0000078745c06,
0x33b1000078745e06,
0x33b2000078762802,
0x33b3000078762c02,
0x33b4000078763202,
0x33b5000078763206,
0x33b6000078763402,
0x33b7000078763602,
0x33b8000078763606,
0x33b9000078763802,
0x33ba000078763a02,
0x33bb000078763e02,
0x33bc000078764002,
0x33bd000078764806,
0x33be000078765c06,
0x33bf000078765e06,
0x33c0000078766c06,
0x33c10000787a2c02,
0x33c20000787a3002,
0x33c30000787a3006,
0x33c40000787a3e02,
0x33c50000787a4002,
0x33c60000787a4406,
0x33c70000787a8006,
0x33c80000787c2202,
0x33c90000787c2206,
0x33ca0000787c2802,
0x33cb0000787c2c02,
0x33cc0000787c3202,
0x33cd0000787c3402,
0x33ce0000787c3602,
0x33cf0000787c3802,
0x33d00000787c3806,
0x33d10000787c3a02,
0x33d20000787c3a06,
0x33d30000787c3c02,
0x33d40000787c3c06,
0x33d50000787c3e02,
0x33d60000787c4002,
0x33d70000787c4a06,
0x33d80000787c8806,
0x33d90000787c9406,
0x33da0000787e2c02,
0x33db0000787e3402,
0x33dc0000787e3e02,
0x33dd0000787e4002,
0x33de0000787e9206,
0x33df000078802c02,
0x33e0000078803e02,
0x33e1000078804002,
0x33e2000078804406,
0x33e3000078805a06,
0x33e4000078807a06,
0x33e5000078808e06,
0x33e6000078861e02,
0x33e7000078861e06,
0x33e8000078862602,
0x33e9000078862606,
0x33ea000078862c02,
0x33eb000078863002,
0x33ec000078863e02,
0x33ed000078864002,
0x33ee000078864606,
0x33ef000078865806,
0x33f0000078866006,
0x33f1000078866806,
0x33f2000078882006,
0x33f3000078882802,
0x33f4000078882a06,
0x33f5000078882c02,
0x33f6000078883202,
0x33f7000078883402,
0x33f8000078883602,
0x33f9000078883802,
0x33fa000078883a02,
0x33fb000078883c02,
0x33fc000078883e02,
0x33fd000078884002,
0x33fe000078884a06,
0x33ff000078886a06,
0x3400000078887c06,
0x34010000788a0a06,
0x34020000788a0e06,
0x34030000788a1606,
0x34040000788a1806,
0x34050000788a1c02,
0x34060000788a2c02,
0x34070000788a3002,
0x34080000788a3e02,
0x34090000788a4002,
0x340a0000788a4206,
0x340b0000788a8e06,
0x340c0000788c2c02,
0x340d0000788c3002,
0x340e0000788c3006,
0x340f0000788c3e02,
0x34100000788c3e06,
0x34110000788c4002,
0x34120000788c4006,
0x34130000788c5006,
0x34140000788e0a06,
0x34150000788e1c02,
0x34160000788e2c02,
0x34170000788e3002,
0x34180000788e3e02,
0x34190000788e4002,
0x341a0000788e4406,
0x341b0000788e5406,
0x341c0000788e5a06,
0x341d0000788e8006,
0x341e0000788e8a06,
0x341f000078901606,
0x3420000078901e02,
0x3421000078902406,
0x3422000078902602,
0x3423000078902c02,
0x3424000078903002,
0x3425000078903e02,
0x3426000078904002,
0x3427000078906806,
0x3428000078906e06,
0x3429000078908206,
0x342a000078922c02,
0x342b000078922c06,
0x342c000078923402,
0x342d000078923406,
0x342e000078923e02,
0x342f000078924002,
0x3430000078924006,
0x3431000078924c06,
0x3432000078927e06,
0x3433000078941006,
0x3434000078942202,
0x3435000078942802,
0x3436000078942a06,
0x3437000078942c02,
0x3438000078943202,
0x3439000078943402,
0x343a000078943602,
0x343b000078943802,
0x343c000078943a02,
0x343d000078943e02,
0x343e000078944002,
0x343f000078944a06,
0x3440000078944e06,
0x3441000078947c06,
0x344200007a301c06,
0x344300007a301e06,
0x344400007a302606,
0x344500007a303e06,
0x344600007a304206,
0x344700007a304406,
0x344800007a306e06,
0x344900007a308c06,
0x344a00007a3e2c06,
0x344b00007a3e3006,
0x344c00007a3e4006,
0x344d00007a3e5a06,
0x344e00007a3e8006,
0x344f00007a3e8c06,
0x345000007a421606,
0x345100007a421c02,
0x345200007a421c06,
0x345300007a423002,
0x345400007a423e02,
0x345500007a426e06,
0x345600007a428a06,
0x345700007a441c02,
0x345800007a441c06,
0x345900007a443002,
0x345a00007a443006,
0x345b00007a443e02,
0x345c00007a448006,
0x345d00007a448e06,
0x345e00007a482802,
0x345f00007a482c02,
0x346000007a483002,
0x346100007a483202,
0x346200007a483402,
0x346300007a483602,
0x346400007a483606,
0x346500007a483802,
0x346600007a483a02,
0x346700007a483a06,
0x346800007a483e02,
0x346900007a484002,
0x346a00007a486c06,
0x346b00007a487606,
0x346c00007a4c0206,
0x346d00007a4c1406,
0x346e00007a4c2c02,
0x346f00007a4c3002,
0x347000007a4c3402,
0x347100007a4c3e02,
0x347200007a4c4002,
0x347300007a4c6606,
0x347400007a4c7806,
0x347500007a4c9206,
0x347600007a502c02,
0x347700007a503002,
0x347800007a503402,
0x347900007a503406,
0x347a00007a503e02,
0x347b00007a504002,
0x347c00007a508c06,
0x347d00007a520206,
0x347e00007a521406,
0x347f00007a522802,
0x348000007a522c02,
0x348100007a523002,
0x348200007a523202,
0x348300007a523402,
0x348400007a523602,
0x348500007a523802,
0x348600007a523a02,
0x348700007a523e02,
0x348800007a524002,
0x348900007a526206,
0x348a00007a526606,
0x348b00007a540a06,
0x348c00007a542c02,
0x348d00007a543002,
0x348e00007a543e02,
0x348f00007a544002,
0x349000007a545a06,
0x349100007a547806,
0x349200007a548e06,
0x349300007a581e02,
0x349400007a582602,
0x349500007a583002,
0x349600007a583e02,
0x349700007a584606,
0x349800007a588606,
0x349900007a5a2c02,
0x349a00007a5a2c06,
0x349b00007a5a3002,
0x349c00007a5a3e02,
0x349d00007a5a4002,
0x349e00007a5a5406,
0x349f00007a5a8006,
0x34a000007a5a8e06,
0x34a100007a5c2802,
0x34a200007a5c2806,
0x34a300007a5c2c02,
0x34a400007a5c3002,
0x34a500007a5c3202,
0x34a600007a5c3206,
0x34a700007a5c3402,
0x34a800007a5c3602,
0x34a900007a5c3802,
0x34aa00007a5c3a02,
0x34ab00007a5c3e02,
0x34ac00007a5c4002,
0x34ad00007a5c5e06,
0x34ae00007a5c7406,
0x34af00007a5c7606,
0x34b000007a5e2802,
0x34b100007a5e2c02,
0x34b200007a5e3002,
0x34b300007a5e3202,
0x34b400007a5e3402,
0x34b500007a5e3602,
0x34b600007a5e3802,
0x34b700007a5e3a02,
0x34b800007a5e3e02,
0x34b900007a5e4002,
0x34ba00007a5e5c06,
0x34bb00007a5e6c06,
0x34bc00007a5e7406,
0x34bd00007a5e7606,
0x34be00007a620206,
0x34bf00007a620606,
0x34c000007a622802,
0x34c100007a622806,
0x34c200007a622c02,
0x34c300007a623002,
0x34c400007a623202,
0x34c500007a623402,
0x34c600007a623602,
0x34c700007a623802,
0x34c800007a623806,
0x34c900007a623a02,
0x34ca00007a623e02,
0x34cb00007a624002,
0x34cc00007a625206,
0x34cd00007a627006,
0x34ce00007a661406,
0x34cf00007a662802,
0x34d000007a662806,
0x34d100007a662c02,
0x34d200007a663002,
0x34d300007a663202,
0x34d400007a663402,
0x34d500007a663602,
0x34d600007a663802,
0x34d700007a663a02,
0x34d800007a663e02,
0x34d900007a664002,
0x34da00007a664c06,
0x34db00007a665206,
0x34dc00007a681e02,
0x34dd00007a682406,
0x34de00007a682602,
0x34df00007a683002,
0x34e000007a683e02,
0x34e100007a686006,
0x34e200007a688606,
0x34e300007a689006,
0x34e400007a6a2006,
0x34e500007a6a2802,
0x34e600007a6a2c02,
0x34e700007a6a2e02,
0x34e800007a6a2e06,
0x34e900007a6a3002,
0x34ea00007a6a3202,
0x34eb00007a6a3402,
0x34ec00007a6a3602,
0x34ed00007a6a3802,
0x34ee00007a6a3a02,
0x34ef00007a6a3c02,
0x34f000007a6a3c06,
0x34f100007a6a3e02,
0x34f200007a6a4002,
0x34f300007a6a7206,
0x34f400007a6a8806,
0x34f500007a6c2802,
0x34f600007a6c2c02,
0x34f700007a6c3002,
0x34f800007a6c3202,
0x34f900007a6c3402,
0x34fa00007a6c3602,
0x34fb00007a6c3802,
0x34fc00007a6c3806,
0x34fd00007a6c3a02,
0x34fe00007a6c3a06,
0x34ff00007a6c3e02,
0x350000007a6c4002,
0x350100007a6c4806,
0x350200007a6c5e06,
0x350300007a6c7606,
0x350400007a6e1606,
0x350500007a6e1e02,
0x350600007a6e1e06,
0x350700007a6e2602,
0x350800007a6e3002,
0x350900007a6e3e02,
0x350a00007a6e4206,
0x350b00007a6e9006,
0x350c00007a700606,
0x350d00007a702802,
0x350e00007a702c02,
0x350f00007a702e02,
0x351000007a702e06,
0x351100007a703002,
0x351200007a703202,
0x351300007a703402,
0x351400007a703602,
0x351500007a703802,
0x351600007a703a02,
0x351700007a703e02,
0x351800007a704002,
0x351900007a706206,
0x351a00007a707206,
0x351b00007a720606,
0x351c00007a721206,
0x351d00007a722006,
0x351e00007a722802,
0x351f00007a722c02,
0x352000007a722e02,
0x352100007a723002,
0x352200007a723202,
0x352300007a723402,
0x352400007a723602,
0x352500007a723802,
0x352600007a723a02,
0x352700007a723e02,
0x352800007a724002,
0x352900007a726406,
0x352a00007a726a06,
0x352b00007a727006,
0x352c00007a742802,
0x352d00007a742806,
0x352e00007a742c02,
0x352f00007a743002,
0x353000007a743202,
0x353100007a743402,
0x353200007a743602,
0x353300007a743802,
0x353400007a743806,
0x353500007a743a02,
0x353600007a743e02,
0x353700007a744002,
0x353800007a745c06,
0x353900007a745e06,
0x353a00007a762802,
0x353b00007a762c02,
0x353c00007a763002,
0x353d00007a763202,
0x353e00007a763206,
0x353f00007a763402,
0x354000007a763602,
0x354100007a763606,
0x354200007a763802,
0x354300007a763a02,
0x354400007a763e02,
0x354500007a764002,
0x354600007a764806,
0x354700007a765c06,
0x354800007a765e06,
0x354900007a766c06,
0x354a00007a780206,
0x354b00007a782c02,
0x354c00007a783002,
0x354d00007a783e02,
0x354e00007a784002,
0x354f00007a784c06,
0x355000007a785406,
0x355100007a789206,
0x355200007a7c2202,
0x355300007a7c2206,
0x355400007a7c2802,
0x355500007a7c2c02,
0x355600007a7c3002,
0x355700007a7c3202,
0x355800007a7c3402,
0x355900007a7c3602,
0x355a00007a7c3802,
0x355b00007a7c3806,
0x355c00007a7c3a02,
0x355d00007a7c3a06,
0x355e00007a7c3c02,
0x355f00007a7c3c06,
0x356000007a7c3e02,
0x356100007a7c4002,
0x356200007a7c4a06,
0x356300007a7c8806,
0x356400007a7c9406,
0x356500007a7e2c02,
0x356600007a7e3002,
0x356700007a7e3402,
0x356800007a7e3e02,
0x356900007a7e4002,
0x356a00007a7e9206,
0x356b00007a803002,
0x356c00007a803e02,
0x356d00007a803e06,
0x356e00007a804406,
0x356f00007a805a06,
0x357000007a808e06,
0x357100007a861e02,
0x357200007a861e06,
0x357300007a862602,
0x357400007a862606,
0x357500007a863002,
0x357600007a863e02,
0x357700007a864606,
0x357800007a865806,
0x357900007a866006,
0x357a00007a866806,
0x357b00007a882006,
0x357c00007a882802,
0x357d00007a882a06,
0x357e00007a882c02,
0x357f00007a883002,
0x358000007a883202,
0x358100007a883402,
0x358200007a883602,
0x358300007a883802,
0x358400007a883a02,
0x358500007a883c02,
0x358600007a883e02,
0x358700007a884002,
0x358800007a884a06,
0x358900007a886a06,
0x358a00007a887c06,
0x358b00007a8a0a06,
0x358c00007a8a0e06,
0x358d00007a8a1606,
0x358e00007a8a1806,
0x358f00007a8a1c02,
0x359000007a8a3002,
0x359100007a8a3e02,
0x359200007a8a4206,
0x359300007a8a8e06,
0x359400007a8c2c02,
0x359500007a8c3002,
0x359600007a8c3006,
0x359700007a8c3e02,
0x359800007a8c3e06,
0x359900007a8c4002,
0x359a00007a8c4006,
0x359b00007a8c5006,
0x359c00007a8e0a06,
0x359d00007a8e1c02,
0x359e00007a8e3002,
0x359f00007a8e3e02,
0x35a000007a8e4406,
0x35a100007a8e5406,
0x35a200007a8e5a06,
0x35a300007a8e8006,
0x35a400007a8e8a06,
0x35a500007a901606,
0x35a600007a901e02,
0x35a700007a902406,
0x35a800007a902602,
0x35a900007a903002,
0x35aa00007a903e02,
0x35ab00007a906806,
0x35ac00007a906e06,
0x35ad00007a908206,
0x35ae00007a922c02,
0x35af00007a922c06,
0x35b000007a923002,
0x35b100007a923402,
0x35b200007a923406,
0x35b300007a923e02,
0x35b400007a924002,
0x35b500007a924006,
0x35b600007a924c06,
0x35b700007a927806,
0x35b800007a927e06,
0x35b900007a941006,
0x35ba00007a942202,
0x35bb00007a942802,
0x35bc00007a942a06,
0x35bd00007a942c02,
0x35be00007a943002,
0x35bf00007a943202,
0x35c000007a943402,
0x35c100007a943602,
0x35c200007a943802,
0x35c300007a943a02,
0x35c400007a943e02,
0x35c500007a944002,
0x35c600007a944a06,
0x35c700007a944e06,
0x35c800007a947c06,
0x35c900007c223a06,
0x35ca00007c229406,
0x35cb00007c382806,
0x35cc00007c382e06,
0x35cd00007c383a06,
0x35ce00007c383c06,
0x35cf00007c385e06,
0x35d000007c386206,
0x35d100007c386a06,
0x35d200007c386c06,
0x35d300007c387006,
0x35d400007c387406,
0x35d500007c3a2206,
0x35d600007c3a3606,
0x35d700007c3a3806,
0x35d800007c3a4806,
0x35d900007c3a6c06,
0x35da00007c3c3806,
0x35db00007c3c6a06,
0x35dc00007c3c8806,
0x35dd00007c421606,
0x35de00007c421c02,
0x35df00007c421c06,
0x35e000007c422202,
0x35e100007c422802,
0x35e200007c422c02,
0x35e300007c423002,
0x35e400007c423202,
0x35e500007c423402,
0x35e600007c423602,
0x35e700007c423802,
0x35e800007c423a02,
0x35e900007c423c02,
0x35ea00007c423e02,
0x35eb00007c424002,
0x35ec00007c426e06,
0x35ed00007c428a06,
0x35ee00007c441c02,
0x35ef00007c441c06,
0x35f000007c442202,
0x35f100007c442802,
0x35f200007c442c02,
0x35f300007c443002,
0x35f400007c443202,
0x35f500007c443402,
0x35f600007c443602,
0x35f700007c443802,
0x35f800007c443a02,
0x35f900007c443c02,
0x35fa00007c443e02,
0x35fb00007c444002,
0x35fc00007c447a06,
0x35fd00007c448006,
0x35fe00007c448e06,
0x35ff00007c482202,
0x360000007c482802,
0x360100007c483202,
0x360200007c483402,
0x360300007c483602,
0x360400007c483606,
0x360500007c483802,
0x360600007c483a02,
0x360700007c483a06,
0x360800007c483c02,
0x360900007c486c06,
0x360a00007c487606,
0x360b00007c4a2a06,
0x360c00007c4a8806,
0x360d00007c4a9406,
0x360e00007c4c0206,
0x360f00007c4c1406,
0x361000007c4c2202,
0x361100007c4c2802,
0x361200007c4c3202,
0x361300007c4c3402,
0x361400007c4c3602,
0x361500007c4c3802,
0x361600007c4c3a02,
0x361700007c4c3c02,
0x361800007c4c6606,
0x361900007c4c7806,
0x361a00007c4c9206,
0x361b00007c502202,
0x361c00007c502802,
0x361d00007c503202,
0x361e00007c503402,
0x361f00007c503602,
0x362000007c503802,
0x362100007c503a02,
0x362200007c503c02,
0x362300007c504002,
0x362400007c504006,
0x362500007c508c06,
0x362600007c520206,
0x362700007c521406,
0x362800007c522202,
0x362900007c522802,
0x362a00007c523202,
0x362b00007c523402,
0x362c00007c523602,
0x362d00007c523802,
0x362e00007c523a02,
0x362f00007c523c02,
0x363000007c526206,
0x363100007c526606,
0x363200007c540a06,
0x363300007c542202,
0x363400007c542802,
0x363500007c542c02,
0x363600007c543202,
0x363700007c543402,
0x363800007c543602,
0x363900007c543802,
0x363a00007c543a02,
0x363b00007c543c02,
0x363c00007c543e02,
0x363d00007c544002,
0x363e00007c545a06,
0x363f00007c547806,
0x364000007c548e06,
0x364100007c581e02,
0x364200007c582202,
0x364300007c582602,
0x364400007c582802,
0x364500007c582c02,
0x364600007c583002,
0x364700007c583202,
0x364800007c583402,
0x364900007c583602,
0x364a00007c583802,
0x364b00007c583a02,
0x364c00007c583c02,
0x364d00007c583e02,
0x364e00007c584002,
0x364f00007c584606,
0x365000007c588606,
0x365100007c5a2202,
0x365200007c5a2802,
0x365300007c5a2c02,
0x365400007c5a2c06,
0x365500007c5a3202,
0x365600007c5a3402,
0x365700007c5a3602,
0x365800007c5a3802,
0x365900007c5a3a02,
0x365a00007c5a3c02,
0x365b00007c5a3e02,
0x365c00007c5a3e06,
0x365d00007c5a4002,
0x365e00007c5a5406,
0x365f00007c5a8006,
0x366000007c5a8e06,
0x366100007c5c2202,
0x366200007c5c2802,
0x366300007c5c2806,
0x366400007c5c3202,
0x366500007c5c3206,
0x366600007c5c3402,
0x366700007c5c3602,
0x366800007c5c3802,
0x366900007c5c3a02,
0x366a00007c5c3c02,
0x366b00007c5c5e06,
0x366c00007c5c7406,
0x366d00007c5c7606,
0x366e00007c5e2202,
0x366f00007c5e2802,
0x367000007c5e3202,
0x367100007c5e3402,
0x367200007c5e3602,
0x367300007c5e3802,
0x367400007c5e3a02,
0x367500007c5e3c02,
0x367600007c5e5c06,
0x367700007c5e6c06,
0x367800007c5e7406,
0x367900007c5e7606,
0x367a00007c620206,
0x367b00007c620606,
0x367c00007c622202,
0x367d00007c622802,
0x367e00007c622806,
0x367f00007c623202,
0x368000007c623402,
0x368100007c623602,
0x368200007c623802,
0x368300007c623806,
0x368400007c623a02,
0x368500007c623c02,
0x368600007c625206,
0x368700007c627006,
0x368800007c661406,
0x368900007c662202,
0x368a00007c662802,
0x368b00007c662806,
0x368c00007c663202,
0x368d00007c663402,
0x368e00007c663406,
0x368f00007c663602,
0x369000007c663802,
0x369100007c663a02,
0x369200007c663c02,
0x369300007c664c06,
0x369400007c665206,
0x369500007c681e02,
0x369600007c682202,
0x369700007c682406,
0x369800007c682602,
0x369900007c682802,
0x369a00007c682c02,
0x369b00007c683002,
0x369c00007c683202,
0x369d00007c683402,
0x369e00007c683602,
0x369f00007c683802,
0x36a000007c683a02,
0x36a100007c683c02,
0x36a200007c683e02,
0x36a300007c684002,
0x36a400007c686006,
0x36a500007c688606,
0x36a600007c689006,
0x36a700007c6a2006,
0x36a800007c6a2202,
0x36a900007c6a2802,
0x36aa00007c6a2e02,
0x36ab00007c6a2e06,
0x36ac00007c6a3202,
0x36ad00007c6a3402,
0x36ae00007c6a3602,
0x36af00007c6a3802,
0x36b000007c6a3806,
0x36b100007c6a3a02,
0x36b200007c6a3c02,
0x36b300007c6a3c06,
0x36b400007c6a7206,
0x36b500007c6a8806,
0x36b600007c6c2202,
0x36b700007c6c2802,
0x36b800007c6c3202,
0x36b900007c6c3402,
0x36ba00007c6c3602,
0x36bb00007c6c3802,
0x36bc00007c6c3806,
0x36bd00007c6c3a02,
0x36be00007c6c3a06,
0x36bf00007c6c3c02,
0x36c000007c6c4806,
0x36c100007c6c5e06,
0x36c200007c6c7606,
0x36c300007c6e1606,
0x36c400007c6e1e02,
0x36c500007c6e1e06,
0x36c600007c6e2202,
0x36c700007c6e2602,
0x36c800007c6e2802,
0x36c900007c6e2c02,
0x36ca00007c6e3002,
0x36cb00007c6e3202,
0x36cc00007c6e3402,
0x36cd00007c6e3602,
0x36ce00007c6e3802,
0x36cf00007c6e3a02,
0x36d000007c6e3c02,
0x36d100007c6e3e02,
0x36d200007c6e4002,
0x36d300007c6e4206,
0x36d400007c6e9006,
0x36d500007c700606,
0x36d600007c702202,
0x36d700007c702802,
0x36d800007c702e02,
0x36d900007c702e06,
0x36da00007c703202,
0x36db00007c703402,
0x36dc00007c703602,
0x36dd00007c703802,
0x36de00007c703a02,
0x36df00007c703c02,
0x36e000007c706206,
0x36e100007c707206,
0x36e200007c720606,
0x36e300007c721206,
0x36e400007c722006,
0x36e500007c722202,
0x36e600007c722802,
0x36e700007c722e02,
0x36e800007c723202,
0x36e900007c723402,
0x36ea00007c723602,
0x36eb00007c723802,
0x36ec00007c723a02,
0x36ed00007c723c02,
0x36ee00007c726406,
0x36ef00007c726a06,
0x36f000007c727006,
0x36f100007c742202,
0x36f200007c742802,
0x36f300007c742806,
0x36f400007c743202,
0x36f500007c743402,
0x36f600007c743602,
0x36f700007c743802,
0x36f800007c743806,
0x36f900007c743a02,
0x36fa00007c743c02,
0x36fb00007c745c06,
0x36fc00007c745e06,
0x36fd00007c762202,
0x36fe00007c762802,
0x36ff00007c763202,
0x370000007c763206,
0x370100007c763402,
0x370200007c763602,
0x370300007c763606,
0x370400007c763802,
0x370500007c763a02,
0x370600007c763c02,
0x370700007c764806,
0x370800007c765c06,
0x370900007c765e06,
0x370a00007c766c06,
0x370b00007c780206,
0x370c00007c782202,
0x370d00007c782802,
0x370e00007c782c02,
0x370f00007c783202,
0x371000007c783402,
0x371100007c783602,
0x371200007c783802,
0x371300007c783a02,
0x371400007c783c02,
0x371500007c783e02,
0x371600007c784002,
0x371700007c784c06,
0x371800007c785406,
0x371900007c789206,
0x371a00007c7a2202,
0x371b00007c7a2802,
0x371c00007c7a2c02,
0x371d00007c7a3002,
0x371e00007c7a3006,
0x371f00007c7a3202,
0x372000007c7a3402,
0x372100007c7a3602,
0x372200007c7a3802,
0x372300007c7a3a02,
0x372400007c7a3c02,
0x372500007c7a3e02,
0x372600007c7a4002,
0x372700007c7a4406,
0x372800007c7a8006,
0x372900007c7e2202,
0x372a00007c7e2802,
0x372b00007c7e3202,
0x372c00007c7e3402,
0x372d00007c7e3602,
0x372e00007c7e3802,
0x372f00007c7e3a02,
0x373000007c7e3c02,
0x373100007c7e9206,
0x373200007c802202,
0x373300007c802802,
0x373400007c802c02,
0x373500007c803202,
0x373600007c803402,
0x373700007c803602,
0x373800007c803802,
0x373900007c803a02,
0x373a00007c803c02,
0x373b00007c803e02,
0x373c00007c804002,
0x373d00007c804406,
0x373e00007c805a06,
0x373f00007c807a06,
0x374000007c808e06,
0x374100007c861e02,
0x374200007c861e06,
0x374300007c862202,
0x374400007c862602,
0x374500007c862606,
0x374600007c862802,
0x374700007c862c02,
0x374800007c863002,
0x374900007c863202,
0x374a00007c863402,
0x374b00007c863602,
0x374c00007c863802,
0x374d00007c863a02,
0x374e00007c863c02,
0x374f00007c863e02,
0x375000007c864002,
0x375100007c864606,
0x375200007c865806,
0x375300007c866006,
0x375400007c866806,
0x375500007c882006,
0x375600007c882202,
0x375700007c882802,
0x375800007c882a06,
0x375900007c883202,
0x375a00007c883402,
0x375b00007c883602,
0x375c00007c883802,
0x375d00007c883a02,
0x375e00007c883c02,
0x375f00007c883c06,
0x376000007c884a06,
0x376100007c886a06,
0x376200007c8a0a06,
0x376300007c8a0e06,
0x376400007c8a1606,
0x376500007c8a1806,
0x376600007c8a1c02,
0x376700007c8a2202,
0x376800007c8a2802,
0x376900007c8a2c02,
0x376a00007c8a3002,
0x376b00007c8a3202,
0x376c00007c8a3402,
0x376d00007c8a3602,
0x376e00007c8a3802,
0x376f00007c8a3a02,
0x377000007c8a3c02,
0x377100007c8a3e02,
0x377200007c8a4002,
0x377300007c8a4206,
0x377400007c8a8e06,
0x377500007c8c2202,
0x377600007c8c2802,
0x377700007c8c2c02,
0x377800007c8c3002,
0x377900007c8c3006,
0x377a00007c8c3202,
0x377b00007c8c3402,
0x377c00007c8c3602,
0x377d00007c8c3802,
0x377e00007c8c3a02,
0x377f00007c8c3c02,
0x378000007c8c3e02,
0x378100007c8c3e06,
0x378200007c8c4002,
0x378300007c8c5006,
0x378400007c8e0a06,
0x378500007c8e1c02,
0x378600007c8e2202,
0x378700007c8e2802,
0x378800007c8e2c02,
0x378900007c8e3002,
0x378a00007c8e3202,
0x378b00007c8e3402,
0x378c00007c8e3602,
0x378d00007c8e3802,
0x378e00007c8e3a02,
0x378f00007c8e3c02,
0x379000007c8e3e02,
0x379100007c8e4002,
0x379200007c8e4406,
0x379300007c8e5406,
0x379400007c8e5a06,
0x379500007c8e8006,
0x379600007c8e8a06,
0x379700007c901606,
0x379800007c901e02,
0x379900007c902202,
0x379a00007c902406,
0x379b00007c902602,
0x379c00007c902802,
0x379d00007c902c02,
0x379e00007c903002,
0x379f00007c903202,
0x37a000007c903402,
0x37a100007c903602,
0x37a200007c903802,
0x37a300007c903a02,
0x37a400007c903c02,
0x37a500007c903e02,
0x37a600007c904002,
0x37a700007c906806,
0x37a800007c906e06,
0x37a900007c908206,
0x37aa00007c922202,
0x37ab00007c922802,
0x37ac00007c922c02,
0x37ad00007c922c06,
0x37ae00007c923202,
0x37af00007c923402,
0x37b000007c923602,
0x37b100007c923802,
0x37b200007c923a02,
0x37b300007c923c02,
0x37b400007c923e02,
0x37b500007c924002,
0x37b600007c924006,
0x37b700007c924c06,
0x37b800007c927806,
0x37b900007c927e06,
0x37ba00007c941006,
0x37bb00007c942202,
0x37bc00007c942206,
0x37bd00007c942802,
0x37be00007c942a06,
0x37bf00007c943202,
0x37c000007c943402,
0x37c100007c943602,
0x37c200007c943802,
0x37c300007c943a02,
0x37c400007c943c02,
0x37c500007c944a06,
0x37c600007c944e06,
0x37c700007e342806,
0x37c800007e343206,
0x37c900007e343606,
0x37ca00007e344006,
0x37cb00007e344c06,
0x37cc00007e345006,
0x37cd00007e346606,
0x37ce00007e349206,
0x37cf00007e421606,
0x37d000007e421c02,
0x37d100007e421c06,
0x37d200007e422c02,
0x37d300007e423002,
0x37d400007e423402,
0x37d500007e423e02,
0x37d600007e424002,
0x37d700007e426e06,
0x37d800007e428a06,
0x37d900007e441c02,
0x37da00007e441c06,
0x37db00007e442c02,
0x37dc00007e443002,
0x37dd00007e443402,
0x37de00007e443e02,
0x37df00007e444002,
0x37e000007e447a06,
0x37e100007e448006,
0x37e200007e448e06,
0x37e300007e482802,
0x37e400007e483202,
0x37e500007e483402,
0x37e600007e483602,
0x37e700007e483606,
0x37e800007e483802,
0x37e900007e483a02,
0x37ea00007e483a06,
0x37eb00007e486c06,
0x37ec00007e487606,
0x37ed00007e4c0206,
0x37ee00007e4c1406,
0x37ef00007e4c3402,
0x37f000007e4c6606,
0x37f100007e4c7806,
0x37f200007e4c9206,
0x37f300007e503402,
0x37f400007e504002,
0x37f500007e504006,
0x37f600007e508c06,
0x37f700007e520206,
0x37f800007e521406,
0x37f900007e522802,
0x37fa00007e523202,
0x37fb00007e523402,
0x37fc00007e523602,
0x37fd00007e523802,
0x37fe00007e523a02,
0x37ff00007e526206,
0x380000007e526606,
0x380100007e540a06,
0x380200007e542c02,
0x380300007e543402,
0x380400007e543e02,
0x380500007e544002,
0x380600007e545a06,
0x380700007e547806,
0x380800007e548e06,
0x380900007e581e02,
0x380a00007e582602,
0x380b00007e582c02,
0x380c00007e583002,
0x380d00007e583402,
0x380e00007e583e02,
0x380f00007e584002,
0x381000007e584606,
0x381100007e588606,
0x381200007e5a2c02,
0x381300007e5a2c06,
0x381400007e5a3402,
0x381500007e5a3e02,
0x381600007e5a3e06,
0x381700007e5a4002,
0x381800007e5a5406,
0x381900007e5a8006,
0x381a00007e5a8e06,
0x381b00007e5c2802,
0x381c00007e5c2806,
0x381d00007e5c3202,
0x381e00007e5c3206,
0x381f00007e5c3402,
0x382000007e5c3602,
0x382100007e5c3802,
0x382200007e5c3a02,
0x382300007e5c5e06,
0x382400007e5c7406,
0x382500007e5c7606,
0x382600007e5e2802,
0x382700007e5e3202,
0x382800007e5e3402,
0x382900007e5e3602,
0x382a00007e5e3802,
0x382b00007e5e3a02,
0x382c00007e5e5c06,
0x382d00007e5e6c06,
0x382e00007e5e7406,
0x382f00007e5e7606,
0x383000007e620206,
0x383100007e620606,
0x383200007e622802,
0x383300007e622806,
0x383400007e623202,
0x383500007e623402,
0x383600007e623602,
0x383700007e623802,
0x383800007e623806,
0x383900007e623a02,
0x383a00007e625206,
0x383b00007e627006,
0x383c00007e661406,
0x383d00007e662802,
0x383e00007e662806,
0x383f00007e663202,
0x384000007e663402,
0x384100007e663602,
0x384200007e663802,
0x384300007e663a02,
0x384400007e664c06,
0x384500007e665206,
0x384600007e681e02,
0x384700007e682406,
0x384800007e682602,
0x384900007e682c02,
0x384a00007e683002,
0x384b00007e683402,
0x384c00007e683e02,
0x384d00007e684002,
0x384e00007e686006,
0x384f00007e688606,
0x385000007e689006,
0x385100007e6a2006,
0x385200007e6a2802,
0x385300007e6a2e02,
0x385400007e6a2e06,
0x385500007e6a3202,
0x385600007e6a3402,
0x385700007e6a3602,
0x385800007e6a3802,
0x385900007e6a3a02,
0x385a00007e6a3c02,
0x385b00007e6a3c06,
0x385c00007e6a7206,
0x385d00007e6a8806,
0x385e00007e6c2802,
0x385f00007e6c3202,
0x386000007e6c3402,
0x386100007e6c3602,
0x386200007e6c3802,
0x386300007e6c3806,
0x386400007e6c3a02,
0x386500007e6c3a06,
0x386600007e6c4806,
0x386700007e6c5e06,
0x386800007e6c7606,
0x386900007e6e1606,
0x386a00007e6e1e02,
0x386b00007e6e1e06,
0x386c00007e6e2602,
0x386d00007e6e2c02,
0x386e00007e6e3002,
0x386f00007e6e3402,
0x387000007e6e3e02,
0x387100007e6e4002,
0x387200007e6e4206,
0x387300007e6e9006,
0x387400007e700606,
0x387500007e702802,
0x387600007e702e02,
0x387700007e702e06,
0x387800007e703202,
0x387900007e703402,
0x387a00007e703602,
0x387b00007e703802,
0x387c00007e703a02,
0x387d00007e706206,
0x387e00007e707206,
0x387f00007e720606,
0x388000007e721206,
0x388100007e722006,
0x388200007e722802,
0x388300007e722e02,
0x388400007e723202,
0x388500007e723402,
0x388600007e723602,
0x388700007e723802,
0x388800007e723a02,
0x388900007e726406,
0x388a00007e726a06,
0x388b00007e727006,
0x388c00007e742802,
0x388d00007e742806,
0x388e00007e743202,
0x388f00007e743402,
0x389000007e743602,
0x389100007e743802,
0x389200007e743806,
0x389300007e743a02,
0x389400007e745c06,
0x389500007e745e06,
0x389600007e762802,
0x389700007e763202,
0x389800007e763206,
0x389900007e763402,
0x389a00007e763602,
0x389b00007e763606,
0x389c00007e763802,
0x389d00007e763a02,
0x389e00007e764806,
0x389f00007e765c06,
0x38a000007e765e06,
0x38a100007e766c06,
0x38a200007e780206,
0x38a300007e782c02,
0x38a400007e783402,
0x38a500007e783e02,
0x38a600007e784002,
0x38a700007e784c06,
0x38a800007e785406,
0x38a900007e789206,
0x38aa00007e7a2c02,
0x38ab00007e7a3002,
0x38ac00007e7a3006,
0x38ad00007e7a3402,
0x38ae00007e7a3e02,
0x38af00007e7a4002,
0x38b000007e7a4406,
0x38b100007e7a8006,
0x38b200007e7c2202,
0x38b300007e7c2206,
0x38b400007e7c2802,
0x38b500007e7c3202,
0x38b600007e7c3402,
0x38b700007e7c3602,
0x38b800007e7c3802,
0x38b900007e7c3806,
0x38ba00007e7c3a02,
0x38bb00007e7c3a06,
0x38bc00007e7c3c02,
0x38bd00007e7c3c06,
0x38be00007e7c4a06,
0x38bf00007e7c8806,
0x38c000007e7c9406,
0x38c100007e802c02,
0x38c200007e803402,
0x38c300007e803e02,
0x38c400007e804002,
0x38c500007e804406,
0x38c600007e805a06,
0x38c700007e807a06,
0x38c800007e808e06,
0x38c900007e861e02,
0x38ca00007e861e06,
0x38cb00007e862602,
0x38cc00007e862606,
0x38cd00007e862c02,
0x38ce00007e863002,
0x38cf00007e863402,
0x38d000007e863e02,
0x38d100007e864002,
0x38d200007e864606,
0x38d300007e865806,
0x38d400007e866006,
0x38d500007e866806,
0x38d600007e882006,
0x38d700007e882802,
0x38d800007e882a06,
0x38d900007e883202,
0x38da00007e883402,
0x38db00007e883602,
0x38dc00007e883802,
0x38dd00007e883a02,
0x38de00007e883c02,
0x38df00007e884a06,
0x38e000007e886a06,
0x38e100007e887c06,
0x38e200007e8a0a06,
0x38e300007e8a0e06,
0x38e400007e8a1606,
0x38e500007e8a1806,
0x38e600007e8a1c02,
0x38e700007e8a2c02,
0x38e800007e8a3002,
0x38e900007e8a3402,
0x38ea00007e8a3e02,
0x38eb00007e8a4002,
0x38ec00007e8a4206,
0x38ed00007e8a8e06,
0x38ee00007e8c2c02,
0x38ef00007e8c3002,
0x38f000007e8c3006,
0x38f100007e8c3402,
0x38f200007e8c3e02,
0x38f300007e8c3e06,
0x38f400007e8c4002,
0x38f500007e8c5006,
0x38f600007e8e0a06,
0x38f700007e8e1c02,
0x38f800007e8e2c02,
0x38f900007e8e3002,
0x38fa00007e8e3402,
0x38fb00007e8e3e02,
0x38fc00007e8e4002,
0x38fd00007e8e4406,
0x38fe00007e8e5406,
0x38ff00007e8e5a06,
0x390000007e8e8006,
0x390100007e8e8a06,
0x390200007e901606,
0x390300007e901e02,
0x390400007e902406,
0x390500007e902602,
0x390600007e902c02,
0x390700007e903002,
0x390800007e903402,
0x390900007e903e02,
0x390a00007e904002,
0x390b00007e906806,
0x390c00007e906e06,
0x390d00007e908206,
0x390e00007e922c02,
0x390f00007e922c06,
0x391000007e923402,
0x391100007e923406,
0x391200007e923e02,
0x391300007e924002,
0x391400007e924006,
0x391500007e924c06,
0x391600007e927806,
0x391700007e941006,
0x391800007e942202,
0x391900007e942802,
0x391a00007e942a06,
0x391b00007e943202,
0x391c00007e943402,
0x391d00007e943602,
0x391e00007e943802,
0x391f00007e943a02,
0x392000007e944a06,
0x392100007e944e06,
0x392200007e947c06,
0x39230000803e2c06,
0x39240000803e3006,
0x39250000803e4006,
0x39260000803e5a06,
0x39270000803e7a06,
0x39280000803e8c06,
0x3929000080421606,
0x392a000080421c02,
0x392b000080421c06,
0x392c000080423002,
0x392d000080423e02,
0x392e000080426e06,
0x392f000080428a06,
0x3930000080441c02,
0x3931000080441c06,
0x3932000080443002,
0x3933000080443006,
0x3934000080443e02,
0x3935000080447a06,
0x3936000080448e06,
0x3937000080482802,
0x3938000080482c02,
0x3939000080483202,
0x393a000080483402,
0x393b000080483602,
0x393c000080483606,
0x393d000080483802,
0x393e000080483a02,
0x393f000080483a06,
0x3940000080483e02,
0x3941000080484002,
0x3942000080486c06,
0x3943000080487606,
0x39440000804c0206,
0x39450000804c1406,
0x39460000804c2c02,
0x39470000804c3402,
0x39480000804c3e02,
0x39490000804c4002,
0x394a0000804c6606,
0x394b0000804c7806,
0x394c0000804c9206,
0x394d000080502c02,
0x394e000080503402,
0x394f000080503406,
0x3950000080503e02,
0x3951000080504002,
0x3952000080508c06,
0x3953000080520206,
0x3954000080521406,
0x3955000080522802,
0x3956000080522c02,
0x3957000080523202,
0x3958000080523402,
0x3959000080523602,
0x395a000080523802,
0x395b000080523a02,
0x395c000080523e02,
0x395d000080524002,
0x395e000080526206,
0x395f000080526606,
0x3960000080540a06,
0x3961000080542c02,
0x3962000080543e02,
0x3963000080544002,
0x3964000080545a06,
0x3965000080547806,
0x3966000080548e06,
0x3967000080581e02,
0x3968000080582602,
0x3969000080583002,
0x396a000080583e02,
0x396b000080584606,
0x396c000080588606,
0x396d0000805a2c02,
0x396e0000805a2c06,
0x396f0000805a3e02,
0x39700000805a3e06,
0x39710000805a4002,
0x39720000805a5406,
0x39730000805a8e06,
0x39740000805c2802,
0x39750000805c2806,
0x39760000805c2c02,
0x39770000805c3202,
0x39780000805c3206,
0x39790000805c3402,
0x397a0000805c3602,
0x397b0000805c3802,
0x397c0000805c3a02,
0x397d0000805c3e02,
0x397e0000805c4002,
0x397f0000805c5e06,
0x39800000805c7406,
0x39810000805c7606,
0x39820000805e2802,
0x39830000805e2c02,
0x39840000805e3202,
0x39850000805e3402,
0x39860000805e3602,
0x39870000805e3802,
0x39880000805e3a02,
0x39890000805e3e02,
0x398a0000805e4002,
0x398b0000805e5c06,
0x398c0000805e6c06,
0x398d0000805e7406,
0x398e0000805e7606,
0x398f000080620206,
0x3990000080620606,
0x3991000080622802,
0x3992000080622806,
0x3993000080622c02,
0x3994000080623202,
0x3995000080623402,
0x3996000080623602,
0x3997000080623802,
0x3998000080623806,
0x3999000080623a02,
0x399a000080623e02,
0x399b000080624002,
0x399c000080625206,
0x399d000080627006,
0x399e000080661406,
0x399f000080662802,
0x39a0000080662806,
0x39a1000080662c02,
0x39a2000080663202,
0x39a3000080663402,
0x39a4000080663602,
0x39a5000080663802,
0x39a6000080663a02,
0x39a7000080663e02,
0x39a8000080664002,
0x39a9000080664c06,
0x39aa000080665206,
0x39ab000080681e02,
0x39ac000080682406,
0x39ad000080682602,
0x39ae000080683002,
0x39af000080683e02,
0x39b0000080686006,
0x39b1000080688606,
0x39b2000080689006,
0x39b30000806a2006,
0x39b40000806a2802,
0x39b50000806a2c02,
0x39b60000806a2e02,
0x39b70000806a2e06,
0x39b80000806a3202,
0x39b90000806a3402,
0x39ba0000806a3602,
0x39bb0000806a3802,
0x39bc0000806a3a02,
0x39bd0000806a3c02,
0x39be0000806a3c06,
0x39bf0000806a3e02,
0x39c00000806a4002,
0x39c10000806a7206,
0x39c20000806a8806,
0x39c30000806c2802,
0x39c40000806c2c02,
0x39c50000806c3202,
0x39c60000806c3402,
0x39c70000806c3602,
0x39c80000806c3802,
0x39c90000806c3806,
0x39ca0000806c3a02,
0x39cb0000806c3a06,
0x39cc0000806c3e02,
0x39cd0000806c4002,
0x39ce0000806c4806,
0x39cf0000806c5e06,
0x39d00000806c7606,
0x39d10000806e1606,
0x39d20000806e1e02,
0x39d30000806e1e06,
0x39d40000806e2602,
0x39d50000806e3002,
0x39d60000806e3e02,
0x39d70000806e4206,
0x39d80000806e9006,
0x39d9000080700606,
0x39da000080702802,
0x39db000080702c02,
0x39dc000080702e02,
0x39dd000080702e06,
0x39de000080703202,
0x39df000080703402,
0x39e0000080703602,
0x39e1000080703802,
0x39e2000080703a02,
0x39e3000080703e02,
0x39e4000080704002,
0x39e5000080706206,
0x39e6000080707206,
0x39e7000080720606,
0x39e8000080721206,
0x39e9000080722006,
0x39ea000080722802,
0x39eb000080722c02,
0x39ec000080722e02,
0x39ed000080723202,
0x39ee000080723402,
0x39ef000080723602,
0x39f0000080723802,
0x39f1000080723a02,
0x39f2000080723e02,
0x39f3000080724002,
0x39f4000080726406,
0x39f5000080726a06,
0x39f6000080727006,
0x39f7000080742802,
0x39f8000080742806,
0x39f9000080742c02,
0x39fa000080743202,
0x39fb000080743402,
0x39fc000080743602,
0x39fd000080743802,
0x39fe000080743806,
0x39ff000080743a02,
0x3a00000080743e02,
0x3a01000080744002,
0x3a02000080745c06,
0x3a03000080745e06,
0x3a04000080762802,
0x3a05000080762c02,
0x3a06000080763202,
0x3a07000080763206,
0x3a08000080763402,
0x3a09000080763602,
0x3a0a000080763606,
0x3a0b000080763802,
0x3a0c000080763a02,
0x3a0d000080763e02,
0x3a0e000080764002,
0x3a0f000080764806,
0x3a10000080765c06,
0x3a11000080765e06,
0x3a12000080766c06,
0x3a13000080780206,
0x3a14000080782c02,
0x3a15000080783e02,
0x3a16000080784002,
0x3a17000080784c06,
0x3a18000080785406,
0x3a19000080789206,
0x3a1a0000807a3002,
0x3a1b0000807a3006,
0x3a1c0000807a3e02,
0x3a1d0000807a3e06,
0x3a1e0000807a4406,
0x3a1f0000807c2202,
0x3a200000807c2206,
0x3a210000807c2802,
0x3a220000807c2c02,
0x3a230000807c3202,
0x3a240000807c3402,
0x3a250000807c3602,
0x3a260000807c3802,
0x3a270000807c3806,
0x3a280000807c3a02,
0x3a290000807c3a06,
0x3a2a0000807c3c02,
0x3a2b0000807c3c06,
0x3a2c0000807c3e02,
0x3a2d0000807c4002,
0x3a2e0000807c4a06,
0x3a2f0000807c8806,
0x3a300000807c9406,
0x3a310000807e2c02,
0x3a320000807e3402,
0x3a330000807e3e02,
0x3a340000807e4002,
0x3a350000807e9206,
0x3a36000080861e02,
0x3a37000080861e06,
0x3a38000080862602,
0x3a39000080862606,
0x3a3a000080863002,
0x3a3b000080863e02,
0x3a3c000080864606,
0x3a3d000080865806,
0x3a3e000080866006,
0x3a3f000080866806,
0x3a40000080882006,
0x3a41000080882802,
0x3a42000080882a06,
0x3a43000080882c02,
0x3a44000080883202,
0x3a45000080883402,
0x3a46000080883602,
0x3a47000080883802,
0x3a48000080883a02,
0x3a49000080883c02,
0x3a4a000080883e02,
0x3a4b000080884002,
0x3a4c000080884a06,
0x3a4d000080886a06,
0x3a4e000080887c06,
0x3a4f0000808a0a06,
0x3a500000808a0e06,
0x3a510000808a1606,
0x3a520000808a1806,
0x3a530000808a1c02,
0x3a540000808a3002,
0x3a550000808a3e02,
0x3a560000808a4206,
0x3a570000808a8e06,
0x3a580000808c2c02,
0x3a590000808c3002,
0x3a5a0000808c3006,
0x3a5b0000808c3e02,
0x3a5c0000808c4002,
0x3a5d0000808c4006,
0x3a5e0000808c5006,
0x3a5f0000808e0a06,
0x3a600000808e1c02,
0x3a610000808e1c06,
0x3a620000808e3002,
0x3a630000808e3e02,
0x3a640000808e4406,
0x3a650000808e5406,
0x3a660000808e5a06,
0x3a670000808e8a06,
0x3a68000080901606,
0x3a69000080901e02,
0x3a6a000080902406,
0x3a6b000080902602,
0x3a6c000080903002,
0x3a6d000080903e02,
0x3a6e000080906806,
0x3a6f000080906e06,
0x3a70000080908206,
0x3a71000080922c02,
0x3a72000080922c06,
0x3a73000080923402,
0x3a74000080923406,
0x3a75000080923e02,
0x3a76000080924002,
0x3a77000080924006,
0x3a78000080924c06,
0x3a79000080927806,
0x3a7a000080927e06,
0x3a7b000080941006,
0x3a7c000080942202,
0x3a7d000080942802,
0x3a7e000080942a06,
0x3a7f000080942c02,
0x3a80000080943202,
0x3a81000080943402,
0x3a82000080943602,
0x3a83000080943802,
0x3a84000080943a02,
0x3a85000080943e02,
0x3a86000080944002,
0x3a87000080944a06,
0x3a88000080944e06,
0x3a89000080947c06,
0x3a8a000082040006,
0x3a8b000082040806,
0x3a8c000082040c06,
0x3a8d000082040e06,
0x3a8e000082041806,
0x3a8f000082041a06,
0x3a900000820c0406,
0x3a910000820c1006,
0x3a920000820c1a06,
0x3a930000820c8406,
0x3a940000820e0406,
0x3a950000820e1606,
0x3a960000820e1806,
0x3a970000820e8a06,
0x3a98000082160e06,
0x3a99000082164206,
0x3a9a000082166e06,
0x3a9b000082168a06,
0x3a9c000082169006,
0x3a9d000082244606,
0x3a9e000082246006,
0x3a9f000082246806,
0x3aa0000082248406,
0x3aa1000082249006,
0x3aa2000082462402,
0x3aa3000082465806,
0x3aa4000082466006,
0x3aa5000082468406,
0x3aa6000082468606,
0x3aa7000082602402,
0x3aa8000082604606,
0x3aa9000082606806,
0x3aaa000082608606,
0x3aab000082681e06,
0x3aac000082682402,
0x3aad000082686006,
0x3aae000082688606,
0x3aaf000082689006,
0x3ab0000082840c06,
0x3ab1000082841006,
0x3ab2000082842402,
0x3ab3000082842406,
0x3ab4000082844606,
0x3ab5000082901606,
0x3ab6000082901e06,
0x3ab7000082902402,
0x3ab8000082902406,
0x3ab9000082906806,
0x3aba000082906e06,
0x3abb0000840c0406,
0x3abc0000840c1006,
0x3abd0000840c1a06,
0x3abe0000840c8206,
0x3abf000084100c06,
0x3ac0000084101a06,
0x3ac1000084104e06,
0x3ac2000084109406,
0x3ac3000084244606,
0x3ac4000084246006,
0x3ac5000084246806,
0x3ac6000084248206,
0x3ac7000084249006,
0x3ac8000084462402,
0x3ac9000084462406,
0x3aca000084465806,
0x3acb000084466006,
0x3acc000084468606,
0x3acd000084602402,
0x3ace000084604606,
0x3acf000084606806,
0x3ad0000084608606,
0x3ad1000084681e06,
0x3ad2000084682402,
0x3ad3000084686006,
0x3ad4000084688606,
0x3ad5000084689006,
0x3ad6000084820406,
0x3ad7000084820c06,
0x3ad8000084820e06,
0x3ad9000084821606,
0x3ada000084822402,
0x3adb000084822406,
0x3adc000084829006,
0x3add000084901606,
0x3ade000084901e06,
0x3adf000084902402,
0x3ae0000084906806,
0x3ae1000084906e06,
0x3ae2000084908206,
0x3ae30000861e2606,
0x3ae40000861e3006,
0x3ae50000861e6806,
0x3ae60000861e6e06,
0x3ae70000861e9006,
0x3ae8000086261e06,
0x3ae9000086263006,
0x3aea000086265806,
0x3aeb000086421606,
0x3aec000086421c02,
0x3aed000086421c06,
0x3aee000086421e02,
0x3aef000086422602,
0x3af0000086423002,
0x3af1000086426e06,
0x3af2000086428a06,
0x3af3000086441c02,
0x3af4000086441c06,
0x3af5000086441e02,
0x3af6000086442602,
0x3af7000086443002,
0x3af8000086447a06,
0x3af9000086448006,
0x3afa000086448e06,
0x3afb000086462406,
0x3afc000086465806,
0x3afd000086466006,
0x3afe000086468406,
0x3aff000086481e02,
0x3b00000086482602,
0x3b01000086482802,
0x3b02000086482c02,
0x3b03000086483002,
0x3b04000086483202,
0x3b05000086483402,
0x3b06000086483602,
0x3b07000086483606,
0x3b08000086483802,
0x3b09000086483a02,
0x3b0a000086483a06,
0x3b0b000086483e02,
0x3b0c000086484002,
0x3b0d000086486c06,
0x3b0e000086487606,
0x3b0f0000864c0206,
0x3b100000864c1406,
0x3b110000864c1e02,
0x3b120000864c2602,
0x3b130000864c2c02,
0x3b140000864c3002,
0x3b150000864c3402,
0x3b160000864c3e02,
0x3b170000864c4002,
0x3b180000864c6606,
0x3b190000864c7806,
0x3b1a0000864c9206,
0x3b1b000086501e02,
0x3b1c000086502602,
0x3b1d000086502c02,
0x3b1e000086503002,
0x3b1f000086503402,
0x3b20000086503406,
0x3b21000086503e02,
0x3b22000086504002,
0x3b23000086508c06,
0x3b24000086520206,
0x3b25000086521406,
0x3b26000086521e02,
0x3b27000086522602,
0x3b28000086522802,
0x3b29000086522c02,
0x3b2a000086523002,
0x3b2b000086523202,
0x3b2c000086523402,
0x3b2d000086523602,
0x3b2e000086523802,
0x3b2f000086523a02,
0x3b30000086523e02,
0x3b31000086524002,
0x3b32000086526206,
0x3b33000086526606,
0x3b34000086540a06,
0x3b35000086541e02,
0x3b36000086542602,
0x3b37000086542c02,
0x3b38000086543002,
0x3b39000086543e02,
0x3b3a000086544002,
0x3b3b000086545a06,
0x3b3c000086547806,
0x3b3d000086548e06,
0x3b3e000086581e02,
0x3b3f000086582602,
0x3b40000086582606,
0x3b41000086583002,
0x3b42000086584606,
0x3b430000865a1e02,
0x3b440000865a2602,
0x3b450000865a2c02,
0x3b460000865a2c06,
0x3b470000865a3002,
0x3b480000865a3e02,
0x3b490000865a4002,
0x3b4a0000865a5406,
0x3b4b0000865a8006,
0x3b4c0000865a8e06,
0x3b4d0000865c1e02,
0x3b4e0000865c2602,
0x3b4f0000865c2802,
0x3b500000865c2806,
0x3b510000865c2c02,
0x3b520000865c3002,
0x3b530000865c3202,
0x3b540000865c3206,
0x3b550000865c3402,
0x3b560000865c3602,
0x3b570000865c3802,
0x3b580000865c3a02,
0x3b590000865c3e02,
0x3b5a0000865c4002,
0x3b5b0000865c5e06,
0x3b5c0000865c7406,
0x3b5d0000865c7606,
0x3b5e0000865e1e02,
0x3b5f0000865e2602,
0x3b600000865e2802,
0x3b610000865e2c02,
0x3b620000865e3002,
0x3b630000865e3202,
0x3b640000865e3402,
0x3b650000865e3602,
0x3b660000865e3802,
0x3b670000865e3a02,
0x3b680000865e3e02,
0x3b690000865e4002,
0x3b6a0000865e5c06,
0x3b6b0000865e6c06,
0x3b6c0000865e7406,
0x3b6d0000865e7606,
0x3b6e000086602406,
0x3b6f000086604606,
0x3b70000086606806,
0x3b71000086620206,
0x3b72000086620606,
0x3b73000086621e02,
0x3b74000086622602,
0x3b75000086622802,
0x3b76000086622806,
0x3b77000086622c02,
0x3b78000086623002,
0x3b79000086623202,
0x3b7a000086623402,
0x3b7b000086623602,
0x3b7c000086623802,
0x3b7d000086623806,
0x3b7e000086623a02,
0x3b7f000086623e02,
0x3b80000086624002,
0x3b81000086625206,
0x3b82000086627006,
0x3b83000086661406,
0x3b84000086661e02,
0x3b85000086662602,
0x3b86000086662802,
0x3b87000086662806,
0x3b88000086662c02,
0x3b89000086663002,
0x3b8a000086663202,
0x3b8b000086663402,
0x3b8c000086663602,
0x3b8d000086663802,
0x3b8e000086663a02,
0x3b8f000086663e02,
0x3b90000086664002,
0x3b91000086664c06,
0x3b92000086665206,
0x3b93000086681e02,
0x3b94000086681e06,
0x3b95000086682406,
0x3b96000086682602,
0x3b97000086683002,
0x3b98000086686006,
0x3b99000086689006,
0x3b9a0000866a1e02,
0x3b9b0000866a2006,
0x3b9c0000866a2602,
0x3b9d0000866a2802,
0x3b9e0000866a2c02,
0x3b9f0000866a2e02,
0x3ba00000866a2e06,
0x3ba10000866a3002,
0x3ba20000866a3202,
0x3ba30000866a3402,
0x3ba40000866a3602,
0x3ba50000866a3802,
0x3ba60000866a3a02,
0x3ba70000866a3c02,
0x3ba80000866a3c06,
0x3ba90000866a3e02,
0x3baa0000866a4002,
0x3bab0000866a7206,
0x3bac0000866a8806,
0x3bad0000866c1e02,
0x3bae0000866c2602,
0x3baf0000866c2802,
0x3bb00000866c2c02,
0x3bb10000866c3002,
0x3bb20000866c3202,
0x3bb30000866c3402,
0x3bb40000866c3602,
0x3bb50000866c3802,
0x3bb60000866c3806,
0x3bb70000866c3a02,
0x3bb80000866c3a06,
0x3bb90000866c3e02,
0x3bba0000866c4002,
0x3bbb0000866c4806,
0x3bbc0000866c5e06,
0x3bbd0000866c7606,
0x3bbe0000866e1606,
0x3bbf0000866e1e02,
0x3bc00000866e1e06,
0x3bc10000866e2602,
0x3bc20000866e3002,
0x3bc30000866e3006,
0x3bc40000866e4206,
0x3bc50000866e9006,
0x3bc6000086700606,
0x3bc7000086701e02,
0x3bc8000086702602,
0x3bc9000086702802,
0x3bca000086702c02,
0x3bcb000086702e02,
0x3bcc000086702e06,
0x3bcd000086703002,
0x3bce000086703202,
0x3bcf000086703402,
0x3bd0000086703602,
0x3bd1000086703802,
0x3bd2000086703a02,
0x3bd3000086703e02,
0x3bd4000086704002,
0x3bd5000086706206,
0x3bd6000086707206,
0x3bd7000086720606,
0x3bd8000086721206,
0x3bd9000086721e02,
0x3bda000086722006,
0x3bdb000086722602,
0x3bdc000086722802,
0x3bdd000086722c02,
0x3bde000086722e02,
0x3bdf000086723002,
0x3be0000086723202,
0x3be1000086723402,
0x3be2000086723602,
0x3be3000086723802,
0x3be4000086723a02,
0x3be5000086723e02,
0x3be6000086724002,
0x3be7000086726406,
0x3be8000086726a06,
0x3be9000086727006,
0x3bea000086741e02,
0x3beb000086742602,
0x3bec000086742802,
0x3bed000086742806,
0x3bee000086742c02,
0x3bef000086743002,
0x3bf0000086743202,
0x3bf1000086743402,
0x3bf2000086743602,
0x3bf3000086743802,
0x3bf4000086743806,
0x3bf5000086743a02,
0x3bf6000086743e02,
0x3bf7000086744002,
0x3bf8000086745c06,
0x3bf9000086745e06,
0x3bfa000086761e02,
0x3bfb000086762602,
0x3bfc000086762802,
0x3bfd000086762c02,
0x3bfe000086763002,
0x3bff000086763202,
0x3c00000086763206,
0x3c01000086763402,
0x3c02000086763602,
0x3c03000086763606,
0x3c04000086763802,
0x3c05000086763a02,
0x3c06000086763e02,
0x3c07000086764002,
0x3c08000086764806,
0x3c09000086765c06,
0x3c0a000086765e06,
0x3c0b000086766c06,
0x3c0c000086780206,
0x3c0d000086781e02,
0x3c0e000086782602,
0x3c0f000086782c02,
0x3c10000086783002,
0x3c11000086783e02,
0x3c12000086784002,
0x3c13000086784c06,
0x3c14000086785406,
0x3c15000086789206,
0x3c160000867a1e02,
0x3c170000867a2602,
0x3c180000867a3002,
0x3c190000867a3e02,
0x3c1a0000867a3e06,
0x3c1b0000867a4406,
0x3c1c0000867a8006,
0x3c1d0000867c1e02,
0x3c1e0000867c2202,
0x3c1f0000867c2206,
0x3c200000867c2602,
0x3c210000867c2802,
0x3c220000867c2c02,
0x3c230000867c3002,
0x3c240000867c3202,
0x3c250000867c3402,
0x3c260000867c3602,
0x3c270000867c3802,
0x3c280000867c3806,
0x3c290000867c3a02,
0x3c2a0000867c3a06,
0x3c2b0000867c3c02,
0x3c2c0000867c3c06,
0x3c2d0000867c3e02,
0x3c2e0000867c4002,
0x3c2f0000867c4a06,
0x3c300000867c8806,
0x3c310000867c9406,
0x3c320000867e1e02,
0x3c330000867e2602,
0x3c340000867e2c02,
0x3c350000867e3002,
0x3c360000867e3402,
0x3c370000867e3e02,
0x3c380000867e4002,
0x3c390000867e9206,
0x3c3a000086801e02,
0x3c3b000086802602,
0x3c3c000086803002,
0x3c3d000086803e02,
0x3c3e000086804406,
0x3c3f000086805a06,
0x3c40000086807a06,
0x3c41000086808e06,
0x3c42000086881e02,
0x3c43000086882006,
0x3c44000086882602,
0x3c45000086882802,
0x3c46000086882a06,
0x3c47000086882c02,
0x3c48000086883002,
0x3c49000086883202,
0x3c4a000086883402,
0x3c4b000086883602,
0x3c4c000086883802,
0x3c4d000086883a02,
0x3c4e000086883c02,
0x3c4f000086883e02,
0x3c50000086884002,
0x3c51000086884a06,
0x3c52000086886a06,
0x3c53000086887c06,
0x3c540000868a0a06,
0x3c550000868a0e06,
0x3c560000868a1606,
0x3c570000868a1806,
0x3c580000868a1c02,
0x3c590000868a1e02,
0x3c5a0000868a2602,
0x3c5b0000868a3002,
0x3c5c0000868a4206,
0x3c5d0000868a8e06,
0x3c5e0000868c1e02,
0x3c5f0000868c2602,
0x3c600000868c2c02,
0x3c610000868c3002,
0x3c620000868c3e02,
0x3c630000868c3e06,
0x3c640000868c4002,
0x3c650000868c4006,
0x3c660000868c5006,
0x3c670000868e0a06,
0x3c680000868e1c02,
0x3c690000868e1e02,
0x3c6a0000868e2602,
0x3c6b0000868e3002,
0x3c6c0000868e4406,
0x3c6d0000868e5406,
0x3c6e0000868e5a06,
0x3c6f0000868e8006,
0x3c700000868e8a06,
0x3c71000086901606,
0x3c72000086901e02,
0x3c73000086902406,
0x3c74000086902602,
0x3c75000086903002,
0x3c76000086906806,
0x3c77000086906e06,
0x3c78000086908206,
0x3c79000086921e02,
0x3c7a000086922602,
0x3c7b000086922c02,
0x3c7c000086922c06,
0x3c7d000086923002,
0x3c7e000086923402,
0x3c7f000086923406,
0x3c80000086923e02,
0x3c81000086924002,
0x3c82000086924006,
0x3c83000086924c06,
0x3c84000086927806,
0x3c85000086927e06,
0x3c86000086941006,
0x3c87000086941e02,
0x3c88000086942202,
0x3c89000086942602,
0x3c8a000086942802,
0x3c8b000086942a06,
0x3c8c000086942c02,
0x3c8d000086943002,
0x3c8e000086943202,
0x3c8f000086943402,
0x3c90000086943602,
0x3c91000086943802,
0x3c92000086943a02,
0x3c93000086943e02,
0x3c94000086944002,
0x3c95000086944a06,
0x3c96000086944e06,
0x3c97000086947c06,
0x3c98000088202a06,
0x3c99000088204e06,
0x3c9a000088205606,
0x3c9b000088206406,
0x3c9c000088206a06,
0x3c9d000088207206,
0x3c9e0000882a2006,
0x3c9f0000882a4a06,
0x3ca00000882a4e06,
0x3ca10000882a9406,
0x3ca20000883c3806,
0x3ca30000883c6a06,
0x3ca40000883c7c06,
0x3ca5000088421606,
0x3ca6000088421c02,
0x3ca7000088421c06,
0x3ca8000088422802,
0x3ca9000088422c02,
0x3caa000088423002,
0x3cab000088423202,
0x3cac000088423402,
0x3cad000088423602,
0x3cae000088423802,
0x3caf000088423a02,
0x3cb0000088423c02,
0x3cb1000088423e02,
0x3cb2000088424002,
0x3cb3000088426e06,
0x3cb4000088428a06,
0x3cb5000088441c02,
0x3cb6000088441c06,
0x3cb7000088442802,
0x3cb8000088442c02,
0x3cb9000088443002,
0x3cba000088443202,
0x3cbb000088443402,
0x3cbc000088443602,
0x3cbd000088443802,
0x3cbe000088443a02,
0x3cbf000088443c02,
0x3cc0000088443e02,
0x3cc1000088444002,
0x3cc2000088447a06,
0x3cc3000088448006,
0x3cc4000088448e06,
0x3cc5000088482802,
0x3cc6000088483202,
0x3cc7000088483402,
0x3cc8000088483602,
0x3cc9000088483606,
0x3cca000088483802,
0x3ccb000088483a02,
0x3ccc000088483a06,
0x3ccd000088483c02,
0x3cce000088486c06,
0x3ccf000088487606,
0x3cd00000884a2002,
0x3cd10000884a2a02,
0x3cd20000884a2a06,
0x3cd30000884a7c06,
0x3cd40000884a9406,
0x3cd50000884c0206,
0x3cd60000884c1406,
0x3cd70000884c2802,
0x3cd80000884c3202,
0x3cd90000884c3402,
0x3cda0000884c3602,
0x3cdb0000884c3802,
0x3cdc0000884c3a02,
0x3cdd0000884c3c02,
0x3cde0000884c6606,
0x3cdf0000884c7806,
0x3ce00000884c9206,
0x3ce10000884e1006,
0x3ce20000884e1a06,
0x3ce30000884e2002,
0x3ce40000884e2006,
0x3ce50000884e2a02,
0x3ce60000884e2a06,
0x3ce70000884e5606,
0x3ce80000884e9406,
0x3ce9000088502802,
0x3cea000088503202,
0x3ceb000088503402,
0x3cec000088503602,
0x3ced000088503802,
0x3cee000088503a02,
0x3cef000088503c02,
0x3cf0000088504002,
0x3cf1000088504006,
0x3cf2000088508c06,
0x3cf3000088520206,
0x3cf4000088521406,
0x3cf5000088522802,
0x3cf6000088523202,
0x3cf7000088523402,
0x3cf8000088523602,
0x3cf9000088523802,
0x3cfa000088523a02,
0x3cfb000088523c02,
0x3cfc000088526206,
0x3cfd000088526606,
0x3cfe000088540a06,
0x3cff000088542802,
0x3d00000088542c02,
0x3d01000088543202,
0x3d02000088543402,
0x3d03000088543602,
0x3d04000088543802,
0x3d05000088543a02,
0x3d06000088543c02,
0x3d07000088543e02,
0x3d08000088544002,
0x3d09000088545a06,
0x3d0a000088547806,
0x3d0b000088548e06,
0x3d0c000088560806,
0x3d0d000088561a06,
0x3d0e000088562002,
0x3d0f000088562a02,
0x3d10000088564e06,
0x3d11000088566406,
0x3d12000088581e02,
0x3d13000088582602,
0x3d14000088582802,
0x3d15000088582c02,
0x3d16000088583002,
0x3d17000088583202,
0x3d18000088583402,
0x3d19000088583602,
0x3d1a000088583802,
0x3d1b000088583a02,
0x3d1c000088583c02,
0x3d1d000088583e02,
0x3d1e000088584002,
0x3d1f000088584606,
0x3d20000088588606,
0x3d210000885a2802,
0x3d220000885a2c02,
0x3d230000885a2c06,
0x3d240000885a3202,
0x3d250000885a3402,
0x3d260000885a3602,
0x3d270000885a3802,
0x3d280000885a3a02,
0x3d290000885a3c02,
0x3d2a0000885a3e02,
0x3d2b0000885a3e06,
0x3d2c0000885a4002,
0x3d2d0000885a5406,
0x3d2e0000885a8006,
0x3d2f0000885a8e06,
0x3d300000885c2802,
0x3d310000885c2806,
0x3d320000885c3202,
0x3d330000885c3206,
0x3d340000885c3402,
0x3d350000885c3602,
0x3d360000885c3802,
0x3d370000885c3a02,
0x3d380000885c3c02,
0x3d390000885c5e06,
0x3d3a0000885c7406,
0x3d3b0000885c7606,
0x3d3c0000885e3802,
0x3d3d0000885e3c02,
0x3d3e0000885e5c06,
0x3d3f0000885e6c06,
0x3d400000885e7406,
0x3d410000885e7606,
0x3d42000088620206,
0x3d43000088620606,
0x3d44000088622802,
0x3d45000088622806,
0x3d46000088623202,
0x3d47000088623402,
0x3d48000088623602,
0x3d49000088623802,
0x3d4a000088623a02,
0x3d4b000088623c02,
0x3d4c000088625206,
0x3d4d000088627006,
0x3d4e000088640806,
0x3d4f000088641206,
0x3d50000088642002,
0x3d51000088642a02,
0x3d52000088645606,
0x3d53000088647206,
0x3d54000088661406,
0x3d55000088662802,
0x3d56000088662806,
0x3d57000088663202,
0x3d58000088663402,
0x3d59000088663406,
0x3d5a000088663602,
0x3d5b000088663802,
0x3d5c000088663a02,
0x3d5d000088663c02,
0x3d5e000088664c06,
0x3d5f000088665206,
0x3d60000088681e02,
0x3d61000088682406,
0x3d62000088682602,
0x3d63000088682802,
0x3d64000088682c02,
0x3d65000088683002,
0x3d66000088683202,
0x3d67000088683402,
0x3d68000088683602,
0x3d69000088683802,
0x3d6a000088683a02,
0x3d6b000088683c02,
0x3d6c000088683e02,
0x3d6d000088684002,
0x3d6e000088686006,
0x3d6f000088688606,
0x3d70000088689006,
0x3d710000886a2002,
0x3d720000886a2006,
0x3d730000886a2a02,
0x3d740000886a2e02,
0x3d750000886a2e06,
0x3d760000886a3802,
0x3d770000886a3806,
0x3d780000886a3c02,
0x3d790000886a3c06,
0x3d7a0000886a7206,
0x3d7b0000886c2802,
0x3d7c0000886c3202,
0x3d7d0000886c3402,
0x3d7e0000886c3602,
0x3d7f0000886c3802,
0x3d800000886c3a02,
0x3d810000886c3a06,
0x3d820000886c3c02,
0x3d830000886c4806,
0x3d840000886c5e06,
0x3d850000886c7606,
0x3d860000886e1606,
0x3d870000886e1e02,
0x3d880000886e1e06,
0x3d890000886e2602,
0x3d8a0000886e2802,
0x3d8b0000886e2c02,
0x3d8c0000886e3002,
0x3d8d0000886e3202,
0x3d8e0000886e3402,
0x3d8f0000886e3602,
0x3d900000886e3802,
0x3d910000886e3a02,
0x3d920000886e3c02,
0x3d930000886e3e02,
0x3d940000886e4002,
0x3d950000886e4206,
0x3d960000886e9006,
0x3d97000088700606,
0x3d98000088702e02,
0x3d99000088702e06,
0x3d9a000088703802,
0x3d9b000088703c02,
0x3d9c000088706206,
0x3d9d000088707206,
0x3d9e000088720606,
0x3d9f000088721206,
0x3da0000088722002,
0x3da1000088722006,
0x3da2000088722a02,
0x3da3000088722e02,
0x3da4000088722e06,
0x3da5000088723802,
0x3da6000088723c02,
0x3da7000088726406,
0x3da8000088726a06,
0x3da9000088727006,
0x3daa000088742802,
0x3dab000088742806,
0x3dac000088743202,
0x3dad000088743402,
0x3dae000088743602,
0x3daf000088743802,
0x3db0000088743a02,
0x3db1000088743c02,
0x3db2000088745c06,
0x3db3000088745e06,
0x3db4000088762802,
0x3db5000088763202,
0x3db6000088763206,
0x3db7000088763402,
0x3db8000088763602,
0x3db9000088763606,
0x3dba000088763802,
0x3dbb000088763a02,
0x3dbc000088763c02,
0x3dbd000088764806,
0x3dbe000088765c06,
0x3dbf000088765e06,
0x3dc0000088766c06,
0x3dc1000088780206,
0x3dc2000088782802,
0x3dc3000088782c02,
0x3dc4000088783202,
0x3dc5000088783402,
0x3dc6000088783602,
0x3dc7000088783802,
0x3dc8000088783a02,
0x3dc9000088783c02,
0x3dca000088783e02,
0x3dcb000088784002,
0x3dcc000088784c06,
0x3dcd000088785406,
0x3dce000088789206,
0x3dcf0000887a2802,
0x3dd00000887a2c02,
0x3dd10000887a3002,
0x3dd20000887a3006,
0x3dd30000887a3202,
0x3dd40000887a3402,
0x3dd50000887a3602,
0x3dd60000887a3802,
0x3dd70000887a3a02,
0x3dd80000887a3c02,
0x3dd90000887a3e02,
0x3dda0000887a4002,
0x3ddb0000887a4406,
0x3ddc0000887a8006,
0x3ddd0000887c2202,
0x3dde0000887c2206,
0x3ddf0000887c2802,
0x3de00000887c3202,
0x3de10000887c3402,
0x3de20000887c3602,
0x3de30000887c3802,
0x3de40000887c3806,
0x3de50000887c3a02,
0x3de60000887c3a06,
0x3de70000887c3c02,
0x3de80000887c3c06,
0x3de90000887c4a06,
0x3dea0000887c9406,
0x3deb0000887e2802,
0x3dec0000887e3202,
0x3ded0000887e3402,
0x3dee0000887e3602,
0x3def0000887e3802,
0x3df00000887e3a02,
0x3df10000887e3c02,
0x3df20000887e9206,
0x3df3000088802802,
0x3df4000088802c02,
0x3df5000088803202,
0x3df6000088803402,
0x3df7000088803602,
0x3df8000088803802,
0x3df9000088803a02,
0x3dfa000088803c02,
0x3dfb000088803e02,
0x3dfc000088804002,
0x3dfd000088804406,
0x3dfe000088805a06,
0x3dff000088807a06,
0x3e00000088808e06,
0x3e01000088861e02,
0x3e02000088861e06,
0x3e03000088862602,
0x3e04000088862606,
0x3e05000088862802,
0x3e06000088862c02,
0x3e07000088863002,
0x3e08000088863202,
0x3e09000088863402,
0x3e0a000088863602,
0x3e0b000088863802,
0x3e0c000088863a02,
0x3e0d000088863c02,
0x3e0e000088863e02,
0x3e0f000088864002,
0x3e10000088864606,
0x3e11000088865806,
0x3e12000088866006,
0x3e13000088866806,
0x3e140000888a0a06,
0x3e150000888a0e06,
0x3e160000888a1606,
0x3e170000888a1806,
0x3e180000888a1c02,
0x3e190000888a2802,
0x3e1a0000888a2c02,
0x3e1b0000888a3002,
0x3e1c0000888a3202,
0x3e1d0000888a3402,
0x3e1e0000888a3602,
0x3e1f0000888a3802,
0x3e200000888a3a02,
0x3e210000888a3c02,
0x3e220000888a3e02,
0x3e230000888a4002,
0x3e240000888a4206,
0x3e250000888a8e06,
0x3e260000888c2802,
0x3e270000888c2c02,
0x3e280000888c3002,
0x3e290000888c3006,
0x3e2a0000888c3202,
0x3e2b0000888c3402,
0x3e2c0000888c3602,
0x3e2d0000888c3802,
0x3e2e0000888c3a02,
0x3e2f0000888c3c02,
0x3e300000888c3e02,
0x3e310000888c3e06,
0x3e320000888c4002,
0x3e330000888c5006,
0x3e340000888e0a06,
0x3e350000888e1c02,
0x3e360000888e2802,
0x3e370000888e2c02,
0x3e380000888e3002,
0x3e390000888e3202,
0x3e3a0000888e3402,
0x3e3b0000888e3602,
0x3e3c0000888e3802,
0x3e3d0000888e3a02,
0x3e3e0000888e3c02,
0x3e3f0000888e3e02,
0x3e400000888e4002,
0x3e410000888e4406,
0x3e420000888e5406,
0x3e430000888e5a06,
0x3e440000888e8006,
0x3e450000888e8a06,
0x3e46000088901606,
0x3e47000088901e02,
0x3e48000088902406,
0x3e49000088902602,
0x3e4a000088902802,
0x3e4b000088902c02,
0x3e4c000088903002,
0x3e4d000088903202,
0x3e4e000088903402,
0x3e4f000088903602,
0x3e50000088903802,
0x3e51000088903a02,
0x3e52000088903c02,
0x3e53000088903e02,
0x3e54000088904002,
0x3e55000088906806,
0x3e56000088906e06,
0x3e57000088908206,
0x3e58000088922802,
0x3e59000088922c02,
0x3e5a000088922c06,
0x3e5b000088923202,
0x3e5c000088923402,
0x3e5d000088923602,
0x3e5e000088923802,
0x3e5f000088923a02,
0x3e60000088923c02,
0x3e61000088923e02,
0x3e62000088924002,
0x3e63000088924006,
0x3e64000088924c06,
0x3e65000088927806,
0x3e66000088927e06,
0x3e67000088941006,
0x3e68000088942002,
0x3e69000088942202,
0x3e6a000088942206,
0x3e6b000088942802,
0x3e6c000088942a02,
0x3e6d000088942a06,
0x3e6e000088943202,
0x3e6f000088943402,
0x3e70000088943602,
0x3e71000088943802,
0x3e72000088943a02,
0x3e73000088943c02,
0x3e74000088944a06,
0x3e75000088944e06,
0x3e76000088947c06,
0x3e7700008a0a0006,
0x3e7800008a0a1206,
0x3e7900008a0a1806,
0x3e7a00008a0a5406,
0x3e7b00008a0a8e06,
0x3e7c00008a0e0406,
0x3e7d00008a0e1606,
0x3e7e00008a0e1806,
0x3e7f00008a0e8206,
0x3e8000008a160e06,
0x3e8100008a164206,
0x3e8200008a166e06,
0x3e8300008a168206,
0x3e8400008a169006,
0x3e8500008a180006,
0x3e8600008a180406,
0x3e8700008a180a06,
0x3e8800008a180e06,
0x3e8900008a1c3006,
0x3e8a00008a1c4206,
0x3e8b00008a1c4406,
0x3e8c00008a1c8e06,
0x3e8d00008a421606,
0x3e8e00008a421c02,
0x3e8f00008a421c06,
0x3e9000008a423002,
0x3e9100008a423006,
0x3e9200008a426e06,
0x3e9300008a441c02,
0x3e9400008a443002,
0x3e9500008a443006,
0x3e9600008a447a06,
0x3e9700008a448006,
0x3e9800008a448e06,
0x3e9900008a481c02,
0x3e9a00008a482802,
0x3e9b00008a482c02,
0x3e9c00008a483002,
0x3e9d00008a483202,
0x3e9e00008a483402,
0x3e9f00008a483602,
0x3ea000008a483606,
0x3ea100008a483802,
0x3ea200008a483a02,
0x3ea300008a483a06,
0x3ea400008a483e02,
0x3ea500008a484002,
0x3ea600008a486c06,
0x3ea700008a487606,
0x3ea800008a4c0206,
0x3ea900008a4c1406,
0x3eaa00008a4c1c02,
0x3eab00008a4c2c02,
0x3eac00008a4c3002,
0x3ead00008a4c3402,
0x3eae00008a4c3e02,
0x3eaf00008a4c4002,
0x3eb000008a4c6606,
0x3eb100008a4c7806,
0x3eb200008a4c9206,
0x3eb300008a501c02,
0x3eb400008a502c02,
0x3eb500008a503002,
0x3eb600008a503402,
0x3eb700008a503406,
0x3eb800008a503e02,
0x3eb900008a504002,
0x3eba00008a508c06,
0x3ebb00008a520206,
0x3ebc00008a521406,
0x3ebd00008a521c02,
0x3ebe00008a522802,
0x3ebf00008a522c02,
0x3ec000008a523002,
0x3ec100008a523202,
0x3ec200008a523402,
0x3ec300008a523602,
0x3ec400008a523802,
0x3ec500008a523a02,
0x3ec600008a523e02,
0x3ec700008a524002,
0x3ec800008a526206,
0x3ec900008a526606,
0x3eca00008a540a06,
0x3ecb00008a541c02,
0x3ecc00008a542c02,
0x3ecd00008a543002,
0x3ece00008a543e02,
0x3ecf00008a544002,
0x3ed000008a545a06,
0x3ed100008a547806,
0x3ed200008a548e06,
0x3ed300008a581c02,
0x3ed400008a581e02,
0x3ed500008a582602,
0x3ed600008a583002,
0x3ed700008a584606,
0x3ed800008a588606,
0x3ed900008a5a1c02,
0x3eda00008a5a2c02,
0x3edb00008a5a2c06,
0x3edc00008a5a3002,
0x3edd00008a5a3e02,
0x3ede00008a5a4002,
0x3edf00008a5a5406,
0x3ee000008a5a8006,
0x3ee100008a5a8e06,
0x3ee200008a5c1c02,
0x3ee300008a5c2802,
0x3ee400008a5c2806,
0x3ee500008a5c2c02,
0x3ee600008a5c3002,
0x3ee700008a5c3202,
0x3ee800008a5c3206,
0x3ee900008a5c3402,
0x3eea00008a5c3602,
0x3eeb00008a5c3802,
0x3eec00008a5c3a02,
0x3eed00008a5c3e02,
0x3eee00008a5c4002,
0x3eef00008a5c5e06,
0x3ef000008a5c7406,
0x3ef100008a5c7606,
0x3ef200008a5e1c02,
0x3ef300008a5e2802,
0x3ef400008a5e2c02,
0x3ef500008a5e3002,
0x3ef600008a5e3202,
0x3ef700008a5e3402,
0x3ef800008a5e3602,
0x3ef900008a5e3802,
0x3efa00008a5e3a02,
0x3efb00008a5e3e02,
0x3efc00008a5e4002,
0x3efd00008a5e5c06,
0x3efe00008a5e6c06,
0x3eff00008a5e7406,
0x3f0000008a5e7606,
0x3f0100008a620206,
0x3f0200008a620606,
0x3f0300008a621c02,
0x3f0400008a622802,
0x3f0500008a622806,
0x3f0600008a622c02,
0x3f0700008a623002,
0x3f0800008a623202,
0x3f0900008a623402,
0x3f0a00008a623602,
0x3f0b00008a623802,
0x3f0c00008a623806,
0x3f0d00008a623a02,
0x3f0e00008a623e02,
0x3f0f00008a624002,
0x3f1000008a625206,
0x3f1100008a627006,
0x3f1200008a661406,
0x3f1300008a661c02,
0x3f1400008a662802,
0x3f1500008a662806,
0x3f1600008a662c02,
0x3f1700008a663002,
0x3f1800008a663202,
0x3f1900008a663402,
0x3f1a00008a663602,
0x3f1b00008a663802,
0x3f1c00008a663a02,
0x3f1d00008a663e02,
0x3f1e00008a664002,
0x3f1f00008a664c06,
0x3f2000008a665206,
0x3f2100008a681c02,
0x3f2200008a681e02,
0x3f2300008a682406,
0x3f2400008a682602,
0x3f2500008a683002,
0x3f2600008a686006,
0x3f2700008a688606,
0x3f2800008a689006,
0x3f2900008a6a1c02,
0x3f2a00008a6a2006,
0x3f2b00008a6a2802,
0x3f2c00008a6a2c02,
0x3f2d00008a6a2e02,
0x3f2e00008a6a2e06,
0x3f2f00008a6a3002,
0x3f3000008a6a3202,
0x3f3100008a6a3402,
0x3f3200008a6a3602,
0x3f3300008a6a3802,
0x3f3400008a6a3a02,
0x3f3500008a6a3c02,
0x3f3600008a6a3c06,
0x3f3700008a6a3e02,
0x3f3800008a6a4002,
0x3f3900008a6a7206,
0x3f3a00008a6a8806,
0x3f3b00008a6c1c02,
0x3f3c00008a6c2802,
0x3f3d00008a6c2c02,
0x3f3e00008a6c3002,
0x3f3f00008a6c3202,
0x3f4000008a6c3402,
0x3f4100008a6c3602,
0x3f4200008a6c3802,
0x3f4300008a6c3806,
0x3f4400008a6c3a02,
0x3f4500008a6c3a06,
0x3f4600008a6c3e02,
0x3f4700008a6c4002,
0x3f4800008a6c4806,
0x3f4900008a6c5e06,
0x3f4a00008a6c7606,
0x3f4b00008a6e1606,
0x3f4c00008a6e1c02,
0x3f4d00008a6e1e02,
0x3f4e00008a6e1e06,
0x3f4f00008a6e2602,
0x3f5000008a6e3002,
0x3f5100008a6e4206,
0x3f5200008a6e9006,
0x3f5300008a700606,
0x3f5400008a701c02,
0x3f5500008a702802,
0x3f5600008a702c02,
0x3f5700008a702e02,
0x3f5800008a702e06,
0x3f5900008a703002,
0x3f5a00008a703202,
0x3f5b00008a703402,
0x3f5c00008a703602,
0x3f5d00008a703802,
0x3f5e00008a703a02,
0x3f5f00008a703e02,
0x3f6000008a704002,
0x3f6100008a706206,
0x3f6200008a707206,
0x3f6300008a720606,
0x3f6400008a721206,
0x3f6500008a721c02,
0x3f6600008a722006,
0x3f6700008a722802,
0x3f6800008a722c02,
0x3f6900008a722e02,
0x3f6a00008a723002,
0x3f6b00008a723202,
0x3f6c00008a723402,
0x3f6d00008a723602,
0x3f6e00008a723802,
0x3f6f00008a723a02,
0x3f7000008a723e02,
0x3f7100008a724002,
0x3f7200008a726406,
0x3f7300008a726a06,
0x3f7400008a727006,
0x3f7500008a741c02,
0x3f7600008a742802,
0x3f7700008a742806,
0x3f7800008a742c02,
0x3f7900008a743002,
0x3f7a00008a743202,
0x3f7b00008a743402,
0x3f7c00008a743602,
0x3f7d00008a743802,
0x3f7e00008a743806,
0x3f7f00008a743a02,
0x3f8000008a743e02,
0x3f8100008a744002,
0x3f8200008a745c06,
0x3f8300008a745e06,
0x3f8400008a761c02,
0x3f8500008a762802,
0x3f8600008a762c02,
0x3f8700008a763002,
0x3f8800008a763202,
0x3f8900008a763206,
0x3f8a00008a763402,
0x3f8b00008a763602,
0x3f8c00008a763606,
0x3f8d00008a763802,
0x3f8e00008a763a02,
0x3f8f00008a763e02,
0x3f9000008a764002,
0x3f9100008a764806,
0x3f9200008a765c06,
0x3f9300008a765e06,
0x3f9400008a766c06,
0x3f9500008a780206,
0x3f9600008a781c02,
0x3f9700008a782c02,
0x3f9800008a783002,
0x3f9900008a783e02,
0x3f9a00008a784002,
0x3f9b00008a784c06,
0x3f9c00008a785406,
0x3f9d00008a789206,
0x3f9e00008a7a1c02,
0x3f9f00008a7a3002,
0x3fa000008a7a3e02,
0x3fa100008a7a3e06,
0x3fa200008a7a4406,
0x3fa300008a7a8006,
0x3fa400008a7c1c02,
0x3fa500008a7c2202,
0x3fa600008a7c2206,
0x3fa700008a7c2802,
0x3fa800008a7c2c02,
0x3fa900008a7c3002,
0x3faa00008a7c3202,
0x3fab00008a7c3402,
0x3fac00008a7c3602,
0x3fad00008a7c3802,
0x3fae00008a7c3806,
0x3faf00008a7c3a02,
0x3fb000008a7c3a06,
0x3fb100008a7c3c02,
0x3fb200008a7c3c06,
0x3fb300008a7c3e02,
0x3fb400008a7c4002,
0x3fb500008a7c4a06,
0x3fb600008a7c8806,
0x3fb700008a7c9406,
0x3fb800008a7e1c02,
0x3fb900008a7e2c02,
0x3fba00008a7e3002,
0x3fbb00008a7e3402,
0x3fbc00008a7e3e02,
0x3fbd00008a7e4002,
0x3fbe00008a7e9206,
0x3fbf00008a801c02,
0x3fc000008a803002,
0x3fc100008a803e02,
0x3fc200008a804406,
0x3fc300008a805a06,
0x3fc400008a807a06,
0x3fc500008a808e06,
0x3fc600008a861c02,
0x3fc700008a861e02,
0x3fc800008a861e06,
0x3fc900008a862602,
0x3fca00008a862606,
0x3fcb00008a863002,
0x3fcc00008a864606,
0x3fcd00008a865806,
0x3fce00008a866006,
0x3fcf00008a866806,
0x3fd000008a881c02,
0x3fd100008a882006,
0x3fd200008a882802,
0x3fd300008a882a06,
0x3fd400008a882c02,
0x3fd500008a883002,
0x3fd600008a883202,
0x3fd700008a883402,
0x3fd800008a883602,
0x3fd900008a883802,
0x3fda00008a883a02,
0x3fdb00008a883c02,
0x3fdc00008a883e02,
0x3fdd00008a884002,
0x3fde00008a884a06,
0x3fdf00008a886a06,
0x3fe000008a887c06,
0x3fe100008a8c1c02,
0x3fe200008a8c2c02,
0x3fe300008a8c3002,
0x3fe400008a8c3e02,
0x3fe500008a8c3e06,
0x3fe600008a8c4002,
0x3fe700008a8c4006,
0x3fe800008a8c5006,
0x3fe900008a8e0a06,
0x3fea00008a8e1c02,
0x3feb00008a8e1c06,
0x3fec00008a8e4406,
0x3fed00008a8e5406,
0x3fee00008a8e5a06,
0x3fef00008a8e8006,
0x3ff000008a901606,
0x3ff100008a901c02,
0x3ff200008a901e02,
0x3ff300008a902406,
0x3ff400008a902602,
0x3ff500008a903002,
0x3ff600008a906806,
0x3ff700008a906e06,
0x3ff800008a908206,
0x3ff900008a921c02,
0x3ffa00008a922c02,
0x3ffb00008a922c06,
0x3ffc00008a923002,
0x3ffd00008a923402,
0x3ffe00008a923406,
0x3fff00008a923e02,
0x400000008a924002,
0x400100008a924006,
0x400200008a924c06,
0x400300008a927806,
0x400400008a927e06,
0x400500008a941006,
0x400600008a941c02,
0x400700008a942202,
0x400800008a942802,
0x400900008a942a06,
0x400a00008a942c02,
0x400b00008a943002,
0x400c00008a943202,
0x400d00008a943402,
0x400e00008a943602,
0x400f00008a943802,
0x401000008a943a02,
0x401100008a943e02,
0x401200008a944002,
0x401300008a944a06,
0x401400008a944e06,
0x401500008a947c06,
0x401600008c301c06,
0x401700008c301e06,
0x401800008c302606,
0x401900008c303e06,
0x401a00008c304206,
0x401b00008c304406,
0x401c00008c306e06,
0x401d00008c307a06,
0x401e00008c3e2c06,
0x401f00008c3e3006,
0x402000008c3e4006,
0x402100008c3e5a06,
0x402200008c3e7a06,
0x402300008c3e8006,
0x402400008c402c06,
0x402500008c403406,
0x402600008c403e06,
0x402700008c405006,
0x402800008c409206,
0x402900008c421606,
0x402a00008c421c02,
0x402b00008c421c06,
0x402c00008c422c02,
0x402d00008c423002,
0x402e00008c423e02,
0x402f00008c424002,
0x403000008c426e06,
0x403100008c428a06,
0x403200008c441c02,
0x403300008c441c06,
0x403400008c442c02,
0x403500008c443002,
0x403600008c443e02,
0x403700008c444002,
0x403800008c447a06,
0x403900008c448006,
0x403a00008c448e06,
0x403b00008c482802,
0x403c00008c482c02,
0x403d00008c483002,
0x403e00008c483202,
0x403f00008c483402,
0x404000008c483602,
0x404100008c483606,
0x404200008c483802,
0x404300008c483a02,
0x404400008c483a06,
0x404500008c483e02,
0x404600008c484002,
0x404700008c486c06,
0x404800008c487606,
0x404900008c4c0206,
0x404a00008c4c1406,
0x404b00008c4c2c02,
0x404c00008c4c3002,
0x404d00008c4c3402,
0x404e00008c4c3e02,
0x404f00008c4c4002,
0x405000008c4c6606,
0x405100008c4c7806,
0x405200008c4c9206,
0x405300008c502c02,
0x405400008c503002,
0x405500008c503402,
0x405600008c503406,
0x405700008c503e02,
0x405800008c504002,
0x405900008c504006,
0x405a00008c520206,
0x405b00008c521406,
0x405c00008c522802,
0x405d00008c522c02,
0x405e00008c523002,
0x405f00008c523202,
0x406000008c523402,
0x406100008c523602,
0x406200008c523802,
0x406300008c523a02,
0x406400008c523e02,
0x406500008c524002,
0x406600008c526206,
0x406700008c526606,
0x406800008c540a06,
0x406900008c542c02,
0x406a00008c543002,
0x406b00008c543e02,
0x406c00008c544002,
0x406d00008c545a06,
0x406e00008c547806,
0x406f00008c548e06,
0x407000008c581e02,
0x407100008c582602,
0x407200008c582c02,
0x407300008c583002,
0x407400008c583e02,
0x407500008c584002,
0x407600008c584606,
0x407700008c588606,
0x407800008c5a2c02,
0x407900008c5a2c06,
0x407a00008c5a3002,
0x407b00008c5a3e02,
0x407c00008c5a3e06,
0x407d00008c5a4002,
0x407e00008c5a5406,
0x407f00008c5a8006,
0x408000008c5a8e06,
0x408100008c5c2802,
0x408200008c5c2806,
0x408300008c5c2c02,
0x408400008c5c3002,
0x408500008c5c3202,
0x408600008c5c3206,
0x408700008c5c3402,
0x408800008c5c3602,
0x408900008c5c3802,
0x408a00008c5c3a02,
0x408b00008c5c3e02,
0x408c00008c5c4002,
0x408d00008c5c5e06,
0x408e00008c5c7406,
0x408f00008c5c7606,
0x409000008c5e2802,
0x409100008c5e2c02,
0x409200008c5e3002,
0x409300008c5e3202,
0x409400008c5e3402,
0x409500008c5e3602,
0x409600008c5e3802,
0x409700008c5e3a02,
0x409800008c5e3e02,
0x409900008c5e4002,
0x409a00008c5e5c06,
0x409b00008c5e6c06,
0x409c00008c5e7406,
0x409d00008c5e7606,
0x409e00008c620206,
0x409f00008c620606,
0x40a000008c622802,
0x40a100008c622806,
0x40a200008c622c02,
0x40a300008c623002,
0x40a400008c623202,
0x40a500008c623402,
0x40a600008c623602,
0x40a700008c623802,
0x40a800008c623806,
0x40a900008c623a02,
0x40aa00008c623e02,
0x40ab00008c624002,
0x40ac00008c625206,
0x40ad00008c627006,
0x40ae00008c661406,
0x40af00008c662802,
0x40b000008c662806,
0x40b100008c662c02,
0x40b200008c663002,
0x40b300008c663202,
0x40b400008c663402,
0x40b500008c663602,
0x40b600008c663802,
0x40b700008c663a02,
0x40b800008c663e02,
0x40b900008c664002,
0x40ba00008c664c06,
0x40bb00008c665206,
0x40bc00008c681e02,
0x40bd00008c682406,
0x40be00008c682602,
0x40bf00008c682c02,
0x40c000008c683002,
0x40c100008c683e02,
0x40c200008c684002,
0x40c300008c686006,
0x40c400008c688606,
0x40c500008c689006,
0x40c600008c6a2006,
0x40c700008c6a2802,
0x40c800008c6a2c02,
0x40c900008c6a2e02,
0x40ca00008c6a2e06,
0x40cb00008c6a3002,
0x40cc00008c6a3202,
0x40cd00008c6a3402,
0x40ce00008c6a3602,
0x40cf00008c6a3802,
0x40d000008c6a3a02,
0x40d100008c6a3c02,
0x40d200008c6a3c06,
0x40d300008c6a3e02,
0x40d400008c6a4002,
0x40d500008c6a7206,
0x40d600008c6a8806,
0x40d700008c6c2802,
0x40d800008c6c2c02,
0x40d900008c6c3002,
0x40da00008c6c3202,
0x40db00008c6c3402,
0x40dc00008c6c3602,
0x40dd00008c6c3802,
0x40de00008c6c3806,
0x40df00008c6c3a02,
0x40e000008c6c3a06,
0x40e100008c6c3e02,
0x40e200008c6c4002,
0x40e300008c6c4806,
0x40e400008c6c5e06,
0x40e500008c6c7606,
0x40e600008c6e1606,
0x40e700008c6e1e02,
0x40e800008c6e1e06,
0x40e900008c6e2602,
0x40ea00008c6e2c02,
0x40eb00008c6e3002,
0x40ec00008c6e3e02,
0x40ed00008c6e4002,
0x40ee00008c6e4206,
0x40ef00008c6e9006,
0x40f000008c700606,
0x40f100008c702802,
0x40f200008c702c02,
0x40f300008c702e02,
0x40f400008c702e06,
0x40f500008c703002,
0x40f600008c703202,
0x40f700008c703402,
0x40f800008c703602,
0x40f900008c703802,
0x40fa00008c703a02,
0x40fb00008c703e02,
0x40fc00008c704002,
0x40fd00008c706206,
0x40fe00008c707206,
0x40ff00008c720606,
0x410000008c721206,
0x410100008c722006,
0x410200008c722802,
0x410300008c722c02,
0x410400008c722e02,
0x410500008c723002,
0x410600008c723202,
0x410700008c723402,
0x410800008c723602,
0x410900008c723802,
0x410a00008c723a02,
0x410b00008c723e02,
0x410c00008c724002,
0x410d00008c726406,
0x410e00008c726a06,
0x410f00008c727006,
0x411000008c742802,
0x411100008c742806,
0x411200008c742c02,
0x411300008c743002,
0x411400008c743202,
0x411500008c743402,
0x411600008c743602,
0x411700008c743802,
0x411800008c743806,
0x411900008c743a02,
0x411a00008c743e02,
0x411b00008c744002,
0x411c00008c745c06,
0x411d00008c745e06,
0x411e00008c762802,
0x411f00008c762c02,
0x412000008c763002,
0x412100008c763202,
0x412200008c763206,
0x412300008c763402,
0x412400008c763602,
0x412500008c763606,
0x412600008c763802,
0x412700008c763a02,
0x412800008c763e02,
0x412900008c764002,
0x412a00008c764806,
0x412b00008c765c06,
0x412c00008c765e06,
0x412d00008c766c06,
0x412e00008c780206,
0x412f00008c782c02,
0x413000008c783002,
0x413100008c783e02,
0x413200008c784002,
0x413300008c784c06,
0x413400008c785406,
0x413500008c789206,
0x413600008c7a2c02,
0x413700008c7a3002,
0x413800008c7a3006,
0x413900008c7a3e02,
0x413a00008c7a3e06,
0x413b00008c7a4002,
0x413c00008c7a4406,
0x413d00008c7a8006,
0x413e00008c7c2202,
0x413f00008c7c2206,
0x414000008c7c2802,
0x414100008c7c2c02,
0x414200008c7c3002,
0x414300008c7c3202,
0x414400008c7c3402,
0x414500008c7c3602,
0x414600008c7c3802,
0x414700008c7c3806,
0x414800008c7c3a02,
0x414900008c7c3a06,
0x414a00008c7c3c02,
0x414b00008c7c3c06,
0x414c00008c7c3e02,
0x414d00008c7c4002,
0x414e00008c7c4a06,
0x414f00008c7c8806,
0x415000008c7c9406,
0x415100008c7e2c02,
0x415200008c7e3002,
0x415300008c7e3402,
0x415400008c7e3e02,
0x415500008c7e4002,
0x415600008c7e9206,
0x415700008c802c02,
0x415800008c803002,
0x415900008c803e02,
0x415a00008c804002,
0x415b00008c804406,
0x415c00008c805a06,
0x415d00008c807a06,
0x415e00008c808e06,
0x415f00008c861e02,
0x416000008c861e06,
0x416100008c862602,
0x416200008c862606,
0x416300008c862c02,
0x416400008c863002,
0x416500008c863e02,
0x416600008c864002,
0x416700008c864606,
0x416800008c865806,
0x416900008c866006,
0x416a00008c866806,
0x416b00008c882006,
0x416c00008c882802,
0x416d00008c882a06,
0x416e00008c882c02,
0x416f00008c883002,
0x417000008c883202,
0x417100008c883402,
0x417200008c883602,
0x417300008c883802,
0x417400008c883a02,
0x417500008c883c02,
0x417600008c883e02,
0x417700008c884002,
0x417800008c884a06,
0x417900008c886a06,
0x417a00008c887c06,
0x417b00008c8a0a06,
0x417c00008c8a0e06,
0x417d00008c8a1606,
0x417e00008c8a1806,
0x417f00008c8a1c02,
0x418000008c8a2c02,
0x418100008c8a3002,
0x418200008c8a3e02,
0x418300008c8a4002,
0x418400008c8a4206,
0x418500008c8a8e06,
0x418600008c8e0a06,
0x418700008c8e1c02,
0x418800008c8e2c02,
0x418900008c8e3002,
0x418a00008c8e3e02,
0x418b00008c8e4002,
0x418c00008c8e4406,
0x418d00008c8e5406,
0x418e00008c8e5a06,
0x418f00008c8e8006,
0x419000008c8e8a06,
0x419100008c901606,
0x419200008c901e02,
0x419300008c902406,
0x419400008c902602,
0x419500008c902c02,
0x419600008c903002,
0x419700008c903e02,
0x419800008c904002,
0x419900008c906806,
0x419a00008c906e06,
0x419b00008c908206,
0x419c00008c922c02,
0x419d00008c922c06,
0x419e00008c923002,
0x419f00008c923402,
0x41a000008c923406,
0x41a100008c923e02,
0x41a200008c924002,
0x41a300008c924006,
0x41a400008c924c06,
0x41a500008c927806,
0x41a600008c927e06,
0x41a700008c941006,
0x41a800008c942202,
0x41a900008c942802,
0x41aa00008c942a06,
0x41ab00008c942c02,
0x41ac00008c943002,
0x41ad00008c943202,
0x41ae00008c943402,
0x41af00008c943602,
0x41b000008c943802,
0x41b100008c943a02,
0x41b200008c943e02,
0x41b300008c944002,
0x41b400008c944a06,
0x41b500008c944e06,
0x41b600008c947c06,
0x41b700008e0a0006,
0x41b800008e0a1206,
0x41b900008e0a1806,
0x41ba00008e0a5406,
0x41bb00008e0a8a06,
0x41bc00008e1c3006,
0x41bd00008e1c4206,
0x41be00008e1c4406,
0x41bf00008e1c8a06,
0x41c000008e421606,
0x41c100008e421c02,
0x41c200008e423002,
0x41c300008e423006,
0x41c400008e426e06,
0x41c500008e428a06,
0x41c600008e441c02,
0x41c700008e441c06,
0x41c800008e443002,
0x41c900008e443006,
0x41ca00008e447a06,
0x41cb00008e448006,
0x41cc00008e481c02,
0x41cd00008e482802,
0x41ce00008e482c02,
0x41cf00008e483002,
0x41d000008e483202,
0x41d100008e483402,
0x41d200008e483602,
0x41d300008e483606,
0x41d400008e483802,
0x41d500008e483a02,
0x41d600008e483a06,
0x41d700008e483e02,
0x41d800008e484002,
0x41d900008e486c06,
0x41da00008e487606,
0x41db00008e4c0206,
0x41dc00008e4c1406,
0x41dd00008e4c1c02,
0x41de00008e4c2c02,
0x41df00008e4c3002,
0x41e000008e4c3402,
0x41e100008e4c3e02,
0x41e200008e4c4002,
0x41e300008e4c6606,
0x41e400008e4c7806,
0x41e500008e4c9206,
0x41e600008e501c02,
0x41e700008e502c02,
0x41e800008e503002,
0x41e900008e503402,
0x41ea00008e503406,
0x41eb00008e503e02,
0x41ec00008e504002,
0x41ed00008e508c06,
0x41ee00008e520206,
0x41ef00008e521406,
0x41f000008e521c02,
0x41f100008e522802,
0x41f200008e522c02,
0x41f300008e523002,
0x41f400008e523202,
0x41f500008e523402,
0x41f600008e523602,
0x41f700008e523802,
0x41f800008e523a02,
0x41f900008e523e02,
0x41fa00008e524002,
0x41fb00008e526206,
0x41fc00008e526606,
0x41fd00008e540a06,
0x41fe00008e541c02,
0x41ff00008e542c02,
0x420000008e542c06,
0x420100008e543002,
0x420200008e543e02,
0x420300008e544002,
0x420400008e545a06,
0x420500008e547806,
0x420600008e581c02,
0x420700008e581e02,
0x420800008e582602,
0x420900008e583002,
0x420a00008e584606,
0x420b00008e588606,
0x420c00008e5a1c02,
0x420d00008e5a2c02,
0x420e00008e5a2c06,
0x420f00008e5a3002,
0x421000008e5a3e02,
0x421100008e5a3e06,
0x421200008e5a4002,
0x421300008e5a5406,
0x421400008e5a8006,
0x421500008e5c1c02,
0x421600008e5c2802,
0x421700008e5c2806,
0x421800008e5c2c02,
0x421900008e5c3002,
0x421a00008e5c3202,
0x421b00008e5c3206,
0x421c00008e5c3402,
0x421d00008e5c3602,
0x421e00008e5c3802,
0x421f00008e5c3a02,
0x422000008e5c3e02,
0x422100008e5c4002,
0x422200008e5c5e06,
0x422300008e5c7406,
0x422400008e5c7606,
0x422500008e5e1c02,
0x422600008e5e2802,
0x422700008e5e2c02,
0x422800008e5e3002,
0x422900008e5e3202,
0x422a00008e5e3402,
0x422b00008e5e3602,
0x422c00008e5e3802,
0x422d00008e5e3a02,
0x422e00008e5e3e02,
0x422f00008e5e4002,
0x423000008e5e5c06,
0x423100008e5e6c06,
0x423200008e5e7406,
0x423300008e5e7606,
0x423400008e620206,
0x423500008e620606,
0x423600008e621c02,
0x423700008e622802,
0x423800008e622806,
0x423900008e622c02,
0x423a00008e623002,
0x423b00008e623202,
0x423c00008e623402,
0x423d00008e623602,
0x423e00008e623802,
0x423f00008e623806,
0x424000008e623a02,
0x424100008e623e02,
0x424200008e624002,
0x424300008e625206,
0x424400008e627006,
0x424500008e661406,
0x424600008e661c02,
0x424700008e662802,
0x424800008e662806,
0x424900008e662c02,
0x424a00008e663002,
0x424b00008e663202,
0x424c00008e663402,
0x424d00008e663602,
0x424e00008e663802,
0x424f00008e663a02,
0x425000008e663e02,
0x425100008e664002,
0x425200008e664c06,
0x425300008e665206,
0x425400008e681c02,
0x425500008e681e02,
0x425600008e682406,
0x425700008e682602,
0x425800008e683002,
0x425900008e686006,
0x425a00008e688606,
0x425b00008e689006,
0x425c00008e6a1c02,
0x425d00008e6a2006,
0x425e00008e6a2802,
0x425f00008e6a2c02,
0x426000008e6a2e02,
0x426100008e6a2e06,
0x426200008e6a3002,
0x426300008e6a3202,
0x426400008e6a3402,
0x426500008e6a3602,
0x426600008e6a3802,
0x426700008e6a3a02,
0x426800008e6a3c02,
0x426900008e6a3c06,
0x426a00008e6a3e02,
0x426b00008e6a4002,
0x426c00008e6a7206,
0x426d00008e6a8806,
0x426e00008e6c1c02,
0x426f00008e6c2802,
0x427000008e6c2c02,
0x427100008e6c3002,
0x427200008e6c3202,
0x427300008e6c3402,
0x427400008e6c3602,
0x427500008e6c3802,
0x427600008e6c3806,
0x427700008e6c3a02,
0x427800008e6c3a06,
0x427900008e6c3e02,
0x427a00008e6c4002,
0x427b00008e6c4806,
0x427c00008e6c5e06,
0x427d00008e6c7606,
0x427e00008e6e1606,
0x427f00008e6e1c02,
0x428000008e6e1e02,
0x428100008e6e1e06,
0x428200008e6e2602,
0x428300008e6e3002,
0x428400008e6e4206,
0x428500008e6e9006,
0x428600008e700606,
0x428700008e701c02,
0x428800008e702802,
0x428900008e702c02,
0x428a00008e702e02,
0x428b00008e702e06,
0x428c00008e703002,
0x428d00008e703202,
0x428e00008e703402,
0x428f00008e703602,
0x429000008e703802,
0x429100008e703a02,
0x429200008e703e02,
0x429300008e704002,
0x429400008e706206,
0x429500008e707206,
0x429600008e720606,
0x429700008e721206,
0x429800008e721c02,
0x429900008e722006,
0x429a00008e722802,
0x429b00008e722c02,
0x429c00008e722e02,
0x429d00008e723002,
0x429e00008e723202,
0x429f00008e723402,
0x42a000008e723602,
0x42a100008e723802,
0x42a200008e723a02,
0x42a300008e723e02,
0x42a400008e724002,
0x42a500008e726406,
0x42a600008e726a06,
0x42a700008e727006,
0x42a800008e741c02,
0x42a900008e742802,
0x42aa00008e742806,
0x42ab00008e742c02,
0x42ac00008e743002,
0x42ad00008e743202,
0x42ae00008e743402,
0x42af00008e743602,
0x42b000008e743802,
0x42b100008e743806,
0x42b200008e743a02,
0x42b300008e743e02,
0x42b400008e744002,
0x42b500008e745c06,
0x42b600008e745e06,
0x42b700008e761c02,
0x42b800008e762802,
0x42b900008e762c02,
0x42ba00008e763002,
0x42bb00008e763202,
0x42bc00008e763206,
0x42bd00008e763402,
0x42be00008e763602,
0x42bf00008e763606,
0x42c000008e763802,
0x42c100008e763a02,
0x42c200008e763e02,
0x42c300008e764002,
0x42c400008e764806,
0x42c500008e765c06,
0x42c600008e765e06,
0x42c700008e766c06,
0x42c800008e780206,
0x42c900008e781c02,
0x42ca00008e782c02,
0x42cb00008e783002,
0x42cc00008e783e02,
0x42cd00008e784002,
0x42ce00008e784c06,
0x42cf00008e785406,
0x42d000008e789206,
0x42d100008e7a1c02,
0x42d200008e7a3002,
0x42d300008e7a3e02,
0x42d400008e7a3e06,
0x42d500008e7a4406,
0x42d600008e7a8006,
0x42d700008e7c1c02,
0x42d800008e7c2202,
0x42d900008e7c2206,
0x42da00008e7c2802,
0x42db00008e7c2c02,
0x42dc00008e7c3002,
0x42dd00008e7c3202,
0x42de00008e7c3402,
0x42df00008e7c3602,
0x42e000008e7c3802,
0x42e100008e7c3806,
0x42e200008e7c3a02,
0x42e300008e7c3a06,
0x42e400008e7c3c02,
0x42e500008e7c3c06,
0x42e600008e7c3e02,
0x42e700008e7c4002,
0x42e800008e7c4a06,
0x42e900008e7c8806,
0x42ea00008e7c9406,
0x42eb00008e7e1c02,
0x42ec00008e7e2c02,
0x42ed00008e7e3002,
0x42ee00008e7e3402,
0x42ef00008e7e3e02,
0x42f000008e7e4002,
0x42f100008e7e9206,
0x42f200008e801c02,
0x42f300008e803002,
0x42f400008e803e02,
0x42f500008e803e06,
0x42f600008e804406,
0x42f700008e805a06,
0x42f800008e807a06,
0x42f900008e861c02,
0x42fa00008e861e02,
0x42fb00008e861e06,
0x42fc00008e862602,
0x42fd00008e862606,
0x42fe00008e863002,
0x42ff00008e864606,
0x430000008e865806,
0x430100008e866006,
0x430200008e866806,
0x430300008e881c02,
0x430400008e882006,
0x430500008e882802,
0x430600008e882a06,
0x430700008e882c02,
0x430800008e883002,
0x430900008e883202,
0x430a00008e883402,
0x430b00008e883602,
0x430c00008e883802,
0x430d00008e883a02,
0x430e00008e883c02,
0x430f00008e883e02,
0x431000008e884002,
0x431100008e884a06,
0x431200008e886a06,
0x431300008e887c06,
0x431400008e8a0a06,
0x431500008e8a0e06,
0x431600008e8a1606,
0x431700008e8a1806,
0x431800008e8a1c02,
0x431900008e8a1c06,
0x431a00008e8a4206,
0x431b00008e8c1c02,
0x431c00008e8c2c02,
0x431d00008e8c3002,
0x431e00008e8c3e02,
0x431f00008e8c3e06,
0x432000008e8c4002,
0x432100008e8c4006,
0x432200008e8c5006,
0x432300008e901606,
0x432400008e901c02,
0x432500008e901e02,
0x432600008e902406,
0x432700008e902602,
0x432800008e903002,
0x432900008e906806,
0x432a00008e906e06,
0x432b00008e908206,
0x432c00008e921c02,
0x432d00008e922c02,
0x432e00008e922c06,
0x432f00008e923002,
0x433000008e923402,
0x433100008e923406,
0x433200008e923e02,
0x433300008e924002,
0x433400008e924006,
0x433500008e924c06,
0x433600008e927806,
0x433700008e927e06,
0x433800008e941006,
0x433900008e941c02,
0x433a00008e942202,
0x433b00008e942802,
0x433c00008e942a06,
0x433d00008e942c02,
0x433e00008e943002,
0x433f00008e943202,
0x434000008e943402,
0x434100008e943602,
0x434200008e943802,
0x434300008e943a02,
0x434400008e943e02,
0x434500008e944002,
0x434600008e944a06,
0x434700008e944e06,
0x434800008e947c06,
0x4349000090160e06,
0x434a000090164206,
0x434b000090166e06,
0x434c000090168206,
0x434d000090168a06,
0x434e0000901e2606,
0x434f0000901e3006,
0x43500000901e6806,
0x43510000901e6e06,
0x43520000901e8606,
0x4353000090244606,
0x4354000090246006,
0x4355000090246806,
0x4356000090248206,
0x4357000090248406,
0x4358000090421606,
0x4359000090421c02,
0x435a000090421c06,
0x435b000090421e02,
0x435c000090422602,
0x435d000090423002,
0x435e000090426e06,
0x435f000090428a06,
0x4360000090441c02,
0x4361000090441c06,
0x4362000090441e02,
0x4363000090442602,
0x4364000090443002,
0x4365000090447a06,
0x4366000090448006,
0x4367000090448e06,
0x4368000090462402,
0x4369000090465806,
0x436a000090466006,
0x436b000090468406,
0x436c000090468606,
0x436d000090481e02,
0x436e000090482602,
0x436f000090482802,
0x4370000090482c02,
0x4371000090483002,
0x4372000090483202,
0x4373000090483402,
0x4374000090483602,
0x4375000090483606,
0x4376000090483802,
0x4377000090483a02,
0x4378000090483a06,
0x4379000090483e02,
0x437a000090484002,
0x437b000090486c06,
0x437c000090487606,
0x437d0000904c0206,
0x437e0000904c1406,
0x437f0000904c1e02,
0x43800000904c2602,
0x43810000904c2c02,
0x43820000904c3002,
0x43830000904c3402,
0x43840000904c3e02,
0x43850000904c4002,
0x43860000904c6606,
0x43870000904c7806,
0x43880000904c9206,
0x4389000090501e02,
0x438a000090502602,
0x438b000090502c02,
0x438c000090503002,
0x438d000090503402,
0x438e000090503406,
0x438f000090503e02,
0x4390000090504002,
0x4391000090508c06,
0x4392000090520206,
0x4393000090521406,
0x4394000090521e02,
0x4395000090522602,
0x4396000090522802,
0x4397000090522c02,
0x4398000090523002,
0x4399000090523202,
0x439a000090523402,
0x439b000090523602,
0x439c000090523802,
0x439d000090523a02,
0x439e000090523e02,
0x439f000090524002,
0x43a0000090526206,
0x43a1000090526606,
0x43a2000090540a06,
0x43a3000090541e02,
0x43a4000090542602,
0x43a5000090542c02,
0x43a6000090543002,
0x43a7000090543e02,
0x43a8000090544002,
0x43a9000090545a06,
0x43aa000090547806,
0x43ab000090548e06,
0x43ac000090581e02,
0x43ad000090582602,
0x43ae000090583002,
0x43af000090584606,
0x43b0000090588606,
0x43b10000905a1e02,
0x43b20000905a2602,
0x43b30000905a2c02,
0x43b40000905a2c06,
0x43b50000905a3002,
0x43b60000905a3e02,
0x43b70000905a4002,
0x43b80000905a5406,
0x43b90000905a8006,
0x43ba0000905a8e06,
0x43bb0000905c1e02,
0x43bc0000905c2602,
0x43bd0000905c2802,
0x43be0000905c2806,
0x43bf0000905c2c02,
0x43c00000905c3002,
0x43c10000905c3202,
0x43c20000905c3206,
0x43c30000905c3402,
0x43c40000905c3602,
0x43c50000905c3802,
0x43c60000905c3a02,
0x43c70000905c3e02,
0x43c80000905c4002,
0x43c90000905c5e06,
0x43ca0000905c7406,
0x43cb0000905c7606,
0x43cc0000905e1e02,
0x43cd0000905e2602,
0x43ce0000905e2802,
0x43cf0000905e2c02,
0x43d00000905e3002,
0x43d10000905e3202,
0x43d20000905e3402,
0x43d30000905e3602,
0x43d40000905e3802,
0x43d50000905e3a02,
0x43d60000905e3e02,
0x43d70000905e4002,
0x43d80000905e5c06,
0x43d90000905e6c06,
0x43da0000905e7406,
0x43db0000905e7606,
0x43dc000090602402,
0x43dd000090604606,
0x43de000090606806,
0x43df000090608606,
0x43e0000090620206,
0x43e1000090620606,
0x43e2000090621e02,
0x43e3000090622602,
0x43e4000090622802,
0x43e5000090622806,
0x43e6000090622c02,
0x43e7000090623002,
0x43e8000090623202,
0x43e9000090623402,
0x43ea000090623602,
0x43eb000090623802,
0x43ec000090623806,
0x43ed000090623a02,
0x43ee000090623e02,
0x43ef000090624002,
0x43f0000090625206,
0x43f1000090627006,
0x43f2000090661406,
0x43f3000090661e02,
0x43f4000090662602,
0x43f5000090662802,
0x43f6000090662806,
0x43f7000090662c02,
0x43f8000090663002,
0x43f9000090663202,
0x43fa000090663402,
0x43fb000090663602,
0x43fc000090663802,
0x43fd000090663a02,
0x43fe000090663e02,
0x43ff000090664002,
0x4400000090664c06,
0x4401000090665206,
0x4402000090681e02,
0x4403000090681e06,
0x4404000090682402,
0x4405000090682406,
0x4406000090686006,
0x4407000090688606,
0x44080000906a1e02,
0x44090000906a2006,
0x440a0000906a2602,
0x440b0000906a2802,
0x440c0000906a2c02,
0x440d0000906a2e02,
0x440e0000906a2e06,
0x440f0000906a3002,
0x44100000906a3202,
0x44110000906a3402,
0x44120000906a3602,
0x44130000906a3802,
0x44140000906a3a02,
0x44150000906a3c02,
0x44160000906a3c06,
0x44170000906a3e02,
0x44180000906a4002,
0x44190000906a7206,
0x441a0000906a8806,
0x441b0000906c1e02,
0x441c0000906c2602,
0x441d0000906c2802,
0x441e0000906c2c02,
0x441f0000906c3002,
0x44200000906c3202,
0x44210000906c3402,
0x44220000906c3602,
0x44230000906c3802,
0x44240000906c3806,
0x44250000906c3a02,
0x44260000906c3a06,
0x44270000906c3e02,
0x44280000906c4002,
0x44290000906c4806,
0x442a0000906c5e06,
0x442b0000906c7606,
0x442c0000906e1606,
0x442d0000906e1e02,
0x442e0000906e1e06,
0x442f0000906e2602,
0x44300000906e3002,
0x44310000906e3006,
0x44320000906e4206,
0x4433000090700606,
0x4434000090701e02,
0x4435000090702602,
0x4436000090702802,
0x4437000090702c02,
0x4438000090702e02,
0x4439000090702e06,
0x443a000090703002,
0x443b000090703202,
0x443c000090703402,
0x443d000090703602,
0x443e000090703802,
0x443f000090703a02,
0x4440000090703e02,
0x4441000090704002,
0x4442000090706206,
0x4443000090707206,
0x4444000090720606,
0x4445000090721206,
0x4446000090721e02,
0x4447000090722006,
0x4448000090722602,
0x4449000090722802,
0x444a000090722c02,
0x444b000090722e02,
0x444c000090723002,
0x444d000090723202,
0x444e000090723402,
0x444f000090723602,
0x4450000090723802,
0x4451000090723a02,
0x4452000090723e02,
0x4453000090724002,
0x4454000090726406,
0x4455000090726a06,
0x4456000090727006,
0x4457000090741e02,
0x4458000090742602,
0x4459000090742802,
0x445a000090742806,
0x445b000090742c02,
0x445c000090743002,
0x445d000090743202,
0x445e000090743402,
0x445f000090743602,
0x4460000090743802,
0x4461000090743806,
0x4462000090743a02,
0x4463000090743e02,
0x4464000090744002,
0x4465000090745c06,
0x4466000090745e06,
0x4467000090761e02,
0x4468000090762602,
0x4469000090762802,
0x446a000090762c02,
0x446b000090763002,
0x446c000090763202,
0x446d000090763206,
0x446e000090763402,
0x446f000090763602,
0x4470000090763606,
0x4471000090763802,
0x4472000090763a02,
0x4473000090763e02,
0x4474000090764002,
0x4475000090764806,
0x4476000090765c06,
0x4477000090765e06,
0x4478000090766c06,
0x4479000090780206,
0x447a000090781e02,
0x447b000090782602,
0x447c000090782c02,
0x447d000090783002,
0x447e000090783e02,
0x447f000090784002,
0x4480000090784c06,
0x4481000090785406,
0x4482000090789206,
0x44830000907a1e02,
0x44840000907a2602,
0x44850000907a3002,
0x44860000907a3e02,
0x44870000907a3e06,
0x44880000907a4406,
0x44890000907a8006,
0x448a0000907c1e02,
0x448b0000907c2202,
0x448c0000907c2206,
0x448d0000907c2602,
0x448e0000907c2802,
0x448f0000907c2c02,
0x44900000907c3002,
0x44910000907c3202,
0x44920000907c3402,
0x44930000907c3602,
0x44940000907c3802,
0x44950000907c3806,
0x44960000907c3a02,
0x44970000907c3a06,
0x44980000907c3c02,
0x44990000907c3c06,
0x449a0000907c3e02,
0x449b0000907c4002,
0x449c0000907c4a06,
0x449d0000907c8806,
0x449e0000907c9406,
0x449f0000907e1e02,
0x44a00000907e2602,
0x44a10000907e2c02,
0x44a20000907e3002,
0x44a30000907e3402,
0x44a40000907e3e02,
0x44a50000907e4002,
0x44a60000907e9206,
0x44a7000090801e02,
0x44a8000090802602,
0x44a9000090803002,
0x44aa000090803e02,
0x44ab000090804406,
0x44ac000090805a06,
0x44ad000090807a06,
0x44ae000090808e06,
0x44af000090820406,
0x44b0000090820c06,
0x44b1000090820e06,
0x44b2000090821606,
0x44b3000090822402,
0x44b4000090822406,
0x44b5000090828406,
0x44b6000090840c06,
0x44b7000090841006,
0x44b8000090842402,
0x44b9000090844606,
0x44ba000090848206,
0x44bb000090861e02,
0x44bc000090862602,
0x44bd000090862606,
0x44be000090863002,
0x44bf000090864606,
0x44c0000090865806,
0x44c1000090866006,
0x44c2000090866806,
0x44c3000090881e02,
0x44c4000090882006,
0x44c5000090882602,
0x44c6000090882802,
0x44c7000090882a06,
0x44c8000090882c02,
0x44c9000090883002,
0x44ca000090883202,
0x44cb000090883402,
0x44cc000090883602,
0x44cd000090883802,
0x44ce000090883a02,
0x44cf000090883c02,
0x44d0000090883e02,
0x44d1000090884002,
0x44d2000090884a06,
0x44d3000090886a06,
0x44d4000090887c06,
0x44d50000908a0a06,
0x44d60000908a0e06,
0x44d70000908a1606,
0x44d80000908a1806,
0x44d90000908a1c02,
0x44da0000908a1e02,
0x44db0000908a2602,
0x44dc0000908a3002,
0x44dd0000908a4206,
0x44de0000908a8e06,
0x44df0000908c1e02,
0x44e00000908c2602,
0x44e10000908c2c02,
0x44e20000908c3002,
0x44e30000908c3e02,
0x44e40000908c3e06,
0x44e50000908c4002,
0x44e60000908c4006,
0x44e70000908c5006,
0x44e80000908e0a06,
0x44e90000908e1c02,
0x44ea0000908e1e02,
0x44eb0000908e2602,
0x44ec0000908e3002,
0x44ed0000908e4406,
0x44ee0000908e5406,
0x44ef0000908e5a06,
0x44f00000908e8006,
0x44f10000908e8a06,
0x44f2000090921e02,
0x44f3000090922602,
0x44f4000090922c02,
0x44f5000090922c06,
0x44f6000090923002,
0x44f7000090923402,
0x44f8000090923406,
0x44f9000090923e02,
0x44fa000090924002,
0x44fb000090924006,
0x44fc000090924c06,
0x44fd000090927806,
0x44fe000090927e06,
0x44ff000090941006,
0x4500000090941e02,
0x4501000090942202,
0x4502000090942602,
0x4503000090942802,
0x4504000090942a06,
0x4505000090942c02,
0x4506000090943002,
0x4507000090943202,
0x4508000090943402,
0x4509000090943602,
0x450a000090943802,
0x450b000090943a02,
0x450c000090943e02,
0x450d000090944002,
0x450e000090944a06,
0x450f000090944e06,
0x4510000090947c06,
0x45110000922c3e06,
0x45120000922c4006,
0x45130000922c5406,
0x45140000922c5a06,
0x45150000922c7806,
0x4516000092342806,
0x4517000092343206,
0x4518000092343606,
0x4519000092344006,
0x451a000092344c06,
0x451b000092345006,
0x451c000092346606,
0x451d000092347e06,
0x451e000092402c06,
0x451f000092403406,
0x4520000092403e06,
0x4521000092405006,
0x4522000092408c06,
0x4523000092421606,
0x4524000092421c02,
0x4525000092421c06,
0x4526000092422c02,
0x4527000092423002,
0x4528000092423402,
0x4529000092423e02,
0x452a000092424002,
0x452b000092426e06,
0x452c000092428a06,
0x452d000092441c02,
0x452e000092441c06,
0x452f000092442c02,
0x4530000092443002,
0x4531000092443402,
0x4532000092443e02,
0x4533000092444002,
0x4534000092447a06,
0x4535000092448006,
0x4536000092448e06,
0x4537000092482802,
0x4538000092482c02,
0x4539000092483202,
0x453a000092483402,
0x453b000092483602,
0x453c000092483606,
0x453d000092483802,
0x453e000092483a02,
0x453f000092483a06,
0x4540000092483e02,
0x4541000092484002,
0x4542000092486c06,
0x4543000092487606,
0x45440000924c0206,
0x45450000924c1406,
0x45460000924c2c02,
0x45470000924c3402,
0x45480000924c3406,
0x45490000924c3e02,
0x454a0000924c4002,
0x454b0000924c6606,
0x454c0000924c7806,
0x454d000092502c02,
0x454e000092503402,
0x454f000092503406,
0x4550000092503e02,
0x4551000092504002,
0x4552000092504006,
0x4553000092508c06,
0x4554000092520206,
0x4555000092521406,
0x4556000092522802,
0x4557000092522c02,
0x4558000092523202,
0x4559000092523402,
0x455a000092523602,
0x455b000092523802,
0x455c000092523a02,
0x455d000092523e02,
0x455e000092524002,
0x455f000092526206,
0x4560000092526606,
0x4561000092540a06,
0x4562000092542c02,
0x4563000092543402,
0x4564000092543e02,
0x4565000092544002,
0x4566000092545a06,
0x4567000092547806,
0x4568000092548e06,
0x4569000092581e02,
0x456a000092582602,
0x456b000092582c02,
0x456c000092583002,
0x456d000092583402,
0x456e000092583e02,
0x456f000092584002,
0x4570000092584606,
0x4571000092588606,
0x45720000925a2c02,
0x45730000925a2c06,
0x45740000925a3402,
0x45750000925a3e02,
0x45760000925a3e06,
0x45770000925a4002,
0x45780000925a5406,
0x45790000925a8006,
0x457a0000925a8e06,
0x457b0000925c2802,
0x457c0000925c2806,
0x457d0000925c2c02,
0x457e0000925c3202,
0x457f0000925c3206,
0x45800000925c3402,
0x45810000925c3602,
0x45820000925c3802,
0x45830000925c3a02,
0x45840000925c3e02,
0x45850000925c4002,
0x45860000925c5e06,
0x45870000925c7406,
0x45880000925c7606,
0x45890000925e2802,
0x458a0000925e2c02,
0x458b0000925e3202,
0x458c0000925e3402,
0x458d0000925e3602,
0x458e0000925e3802,
0x458f0000925e3a02,
0x45900000925e3e02,
0x45910000925e4002,
0x45920000925e5c06,
0x45930000925e6c06,
0x45940000925e7406,
0x45950000925e7606,
0x4596000092620206,
0x4597000092620606,
0x4598000092622802,
0x4599000092622806,
0x459a000092622c02,
0x459b000092623202,
0x459c000092623402,
0x459d000092623602,
0x459e000092623802,
0x459f000092623806,
0x45a0000092623a02,
0x45a1000092623e02,
0x45a2000092624002,
0x45a3000092625206,
0x45a4000092627006,
0x45a5000092661406,
0x45a6000092662802,
0x45a7000092662806,
0x45a8000092662c02,
0x45a9000092663202,
0x45aa000092663402,
0x45ab000092663602,
0x45ac000092663802,
0x45ad000092663a02,
0x45ae000092663e02,
0x45af000092664002,
0x45b0000092664c06,
0x45b1000092665206,
0x45b2000092681e02,
0x45b3000092682406,
0x45b4000092682602,
0x45b5000092682c02,
0x45b6000092683002,
0x45b7000092683402,
0x45b8000092683e02,
0x45b9000092684002,
0x45ba000092686006,
0x45bb000092688606,
0x45bc000092689006,
0x45bd0000926a2006,
0x45be0000926a2802,
0x45bf0000926a2c02,
0x45c00000926a2e02,
0x45c10000926a2e06,
0x45c20000926a3202,
0x45c30000926a3402,
0x45c40000926a3602,
0x45c50000926a3802,
0x45c60000926a3a02,
0x45c70000926a3c02,
0x45c80000926a3c06,
0x45c90000926a3e02,
0x45ca0000926a4002,
0x45cb0000926a7206,
0x45cc0000926a8806,
0x45cd0000926c2802,
0x45ce0000926c2c02,
0x45cf0000926c3202,
0x45d00000926c3402,
0x45d10000926c3602,
0x45d20000926c3802,
0x45d30000926c3806,
0x45d40000926c3a02,
0x45d50000926c3a06,
0x45d60000926c3e02,
0x45d70000926c4002,
0x45d80000926c4806,
0x45d90000926c5e06,
0x45da0000926c7606,
0x45db0000926e1606,
0x45dc0000926e1e02,
0x45dd0000926e1e06,
0x45de0000926e2602,
0x45df0000926e2c02,
0x45e00000926e3002,
0x45e10000926e3402,
0x45e20000926e3e02,
0x45e30000926e4002,
0x45e40000926e4206,
0x45e50000926e9006,
0x45e6000092700606,
0x45e7000092702802,
0x45e8000092702c02,
0x45e9000092702e02,
0x45ea000092702e06,
0x45eb000092703202,
0x45ec000092703402,
0x45ed000092703602,
0x45ee000092703802,
0x45ef000092703a02,
0x45f0000092703e02,
0x45f1000092704002,
0x45f2000092706206,
0x45f3000092707206,
0x45f4000092720606,
0x45f5000092721206,
0x45f6000092722006,
0x45f7000092722802,
0x45f8000092722c02,
0x45f9000092722e02,
0x45fa000092723202,
0x45fb000092723402,
0x45fc000092723602,
0x45fd000092723802,
0x45fe000092723a02,
0x45ff000092723e02,
0x4600000092724002,
0x4601000092726406,
0x4602000092726a06,
0x4603000092727006,
0x4604000092742802,
0x4605000092742806,
0x4606000092742c02,
0x4607000092743202,
0x4608000092743402,
0x4609000092743602,
0x460a000092743802,
0x460b000092743806,
0x460c000092743a02,
0x460d000092743e02,
0x460e000092744002,
0x460f000092745c06,
0x4610000092745e06,
0x4611000092762802,
0x4612000092762c02,
0x4613000092763202,
0x4614000092763206,
0x4615000092763402,
0x4616000092763602,
0x4617000092763606,
0x4618000092763802,
0x4619000092763a02,
0x461a000092763e02,
0x461b000092764002,
0x461c000092764806,
0x461d000092765c06,
0x461e000092765e06,
0x461f000092766c06,
0x4620000092780206,
0x4621000092782c02,
0x4622000092782c06,
0x4623000092783402,
0x4624000092783e02,
0x4625000092784002,
0x4626000092784c06,
0x4627000092785406,
0x46280000927a2c02,
0x46290000927a3002,
0x462a0000927a3006,
0x462b0000927a3402,
0x462c0000927a3e02,
0x462d0000927a4002,
0x462e0000927a4406,
0x462f0000927a8006,
0x46300000927c2202,
0x46310000927c2206,
0x46320000927c2802,
0x46330000927c2c02,
0x46340000927c3202,
0x46350000927c3402,
0x46360000927c3602,
0x46370000927c3802,
0x46380000927c3806,
0x46390000927c3a02,
0x463a0000927c3a06,
0x463b0000927c3c02,
0x463c0000927c3c06,
0x463d0000927c3e02,
0x463e0000927c4002,
0x463f0000927c4a06,
0x46400000927c8806,
0x46410000927c9406,
0x46420000927e2c02,
0x46430000927e3402,
0x46440000927e3406,
0x46450000927e3e02,
0x46460000927e4002,
0x4647000092802c02,
0x4648000092803402,
0x4649000092803e02,
0x464a000092804002,
0x464b000092804406,
0x464c000092805a06,
0x464d000092807a06,
0x464e000092808e06,
0x464f000092861e02,
0x4650000092861e06,
0x4651000092862602,
0x4652000092862606,
0x4653000092862c02,
0x4654000092863002,
0x4655000092863402,
0x4656000092863e02,
0x4657000092864002,
0x4658000092864606,
0x4659000092865806,
0x465a000092866006,
0x465b000092866806,
0x465c000092882006,
0x465d000092882802,
0x465e000092882a06,
0x465f000092882c02,
0x4660000092883202,
0x4661000092883402,
0x4662000092883602,
0x4663000092883802,
0x4664000092883a02,
0x4665000092883c02,
0x4666000092883e02,
0x4667000092884002,
0x4668000092884a06,
0x4669000092886a06,
0x466a000092887c06,
0x466b0000928a0a06,
0x466c0000928a0e06,
0x466d0000928a1606,
0x466e0000928a1806,
0x466f0000928a1c02,
0x46700000928a2c02,
0x46710000928a3002,
0x46720000928a3402,
0x46730000928a3e02,
0x46740000928a4002,
0x46750000928a4206,
0x46760000928a8e06,
0x46770000928c2c02,
0x46780000928c3002,
0x46790000928c3006,
0x467a0000928c3402,
0x467b0000928c3e02,
0x467c0000928c3e06,
0x467d0000928c4002,
0x467e0000928c4006,
0x467f0000928c5006,
0x46800000928e0a06,
0x46810000928e1c02,
0x46820000928e2c02,
0x46830000928e3002,
0x46840000928e3402,
0x46850000928e3e02,
0x46860000928e4002,
0x46870000928e4406,
0x46880000928e5406,
0x46890000928e5a06,
0x468a0000928e8006,
0x468b0000928e8a06,
0x468c000092901606,
0x468d000092901e02,
0x468e000092902406,
0x468f000092902602,
0x4690000092902c02,
0x4691000092903002,
0x4692000092903402,
0x4693000092903e02,
0x4694000092904002,
0x4695000092906806,
0x4696000092906e06,
0x4697000092908206,
0x4698000092941006,
0x4699000092942202,
0x469a000092942802,
0x469b000092942a06,
0x469c000092942c02,
0x469d000092943202,
0x469e000092943402,
0x469f000092943602,
0x46a0000092943802,
0x46a1000092943a02,
0x46a2000092943e02,
0x46a3000092944002,
0x46a4000092944a06,
0x46a5000092944e06,
0x46a6000092947c06,
0x46a7000094100c06,
0x46a8000094101a06,
0x46a9000094104e06,
0x46aa000094108406,
0x46ab000094223a06,
0x46ac000094227c06,
0x46ad0000942a2006,
0x46ae0000942a4a06,
0x46af0000942a4e06,
0x46b00000942a8806,
0x46b1000094421606,
0x46b2000094421c02,
0x46b3000094421c06,
0x46b4000094422202,
0x46b5000094422802,
0x46b6000094422c02,
0x46b7000094423002,
0x46b8000094423202,
0x46b9000094423402,
0x46ba000094423602,
0x46bb000094423802,
0x46bc000094423a02,
0x46bd000094423e02,
0x46be000094424002,
0x46bf000094426e06,
0x46c0000094428a06,
0x46c1000094441c02,
0x46c2000094441c06,
0x46c3000094442202,
0x46c4000094442802,
0x46c5000094442c02,
0x46c6000094443002,
0x46c7000094443202,
0x46c8000094443402,
0x46c9000094443602,
0x46ca000094443802,
0x46cb000094443a02,
0x46cc000094443e02,
0x46cd000094444002,
0x46ce000094447a06,
0x46cf000094448006,
0x46d0000094448e06,
0x46d1000094482202,
0x46d2000094482802,
0x46d3000094483202,
0x46d4000094483402,
0x46d5000094483602,
0x46d6000094483606,
0x46d7000094483802,
0x46d8000094483a02,
0x46d9000094486c06,
0x46da000094487606,
0x46db0000944a2a02,
0x46dc0000944a2a06,
0x46dd0000944a7c06,
0x46de0000944a8806,
0x46df0000944c0206,
0x46e00000944c1406,
0x46e10000944c2202,
0x46e20000944c2802,
0x46e30000944c3202,
0x46e40000944c3402,
0x46e50000944c3602,
0x46e60000944c3802,
0x46e70000944c3a02,
0x46e80000944c6606,
0x46e90000944c7806,
0x46ea0000944c9206,
0x46eb0000944e1006,
0x46ec0000944e1a06,
0x46ed0000944e2002,
0x46ee0000944e2006,
0x46ef0000944e2a02,
0x46f00000944e2a06,
0x46f10000944e5606,
0x46f2000094502202,
0x46f3000094502802,
0x46f4000094503202,
0x46f5000094503402,
0x46f6000094503602,
0x46f7000094503802,
0x46f8000094503a02,
0x46f9000094504002,
0x46fa000094504006,
0x46fb000094508c06,
0x46fc000094520206,
0x46fd000094521406,
0x46fe000094522202,
0x46ff000094522802,
0x4700000094523202,
0x4701000094523402,
0x4702000094523602,
0x4703000094523802,
0x4704000094523a02,
0x4705000094526206,
0x4706000094526606,
0x4707000094540a06,
0x4708000094542202,
0x4709000094542802,
0x470a000094542c02,
0x470b000094543202,
0x470c000094543402,
0x470d000094543602,
0x470e000094543802,
0x470f000094543a02,
0x4710000094543e02,
0x4711000094544002,
0x4712000094545a06,
0x4713000094547806,
0x4714000094548e06,
0x4715000094560806,
0x4716000094561a06,
0x4717000094562002,
0x4718000094562a02,
0x4719000094564e06,
0x471a000094566406,
0x471b000094581e02,
0x471c000094582202,
0x471d000094582602,
0x471e000094582802,
0x471f000094582c02,
0x4720000094583002,
0x4721000094583202,
0x4722000094583402,
0x4723000094583602,
0x4724000094583802,
0x4725000094583a02,
0x4726000094583e02,
0x4727000094584002,
0x4728000094584606,
0x4729000094588606,
0x472a0000945a2202,
0x472b0000945a2802,
0x472c0000945a2c02,
0x472d0000945a2c06,
0x472e0000945a3202,
0x472f0000945a3402,
0x47300000945a3602,
0x47310000945a3802,
0x47320000945a3a02,
0x47330000945a3e02,
0x47340000945a3e06,
0x47350000945a4002,
0x47360000945a5406,
0x47370000945a8006,
0x47380000945a8e06,
0x47390000945c2202,
0x473a0000945c2802,
0x473b0000945c2806,
0x473c0000945c3202,
0x473d0000945c3206,
0x473e0000945c3402,
0x473f0000945c3602,
0x47400000945c3802,
0x47410000945c3a02,
0x47420000945c5e06,
0x47430000945c7406,
0x47440000945c7606,
0x47450000945e2202,
0x47460000945e2802,
0x47470000945e3202,
0x47480000945e3402,
0x47490000945e3602,
0x474a0000945e3802,
0x474b0000945e3a02,
0x474c0000945e5c06,
0x474d0000945e6c06,
0x474e0000945e7406,
0x474f0000945e7606,
0x4750000094620206,
0x4751000094620606,
0x4752000094622202,
0x4753000094622802,
0x4754000094622806,
0x4755000094623202,
0x4756000094623402,
0x4757000094623602,
0x4758000094623802,
0x4759000094623806,
0x475a000094623a02,
0x475b000094625206,
0x475c000094627006,
0x475d000094640806,
0x475e000094641206,
0x475f000094642002,
0x4760000094642a02,
0x4761000094645606,
0x4762000094647206,
0x4763000094661406,
0x4764000094662202,
0x4765000094662802,
0x4766000094662806,
0x4767000094663202,
0x4768000094663402,
0x4769000094663406,
0x476a000094663602,
0x476b000094663802,
0x476c000094663a02,
0x476d000094664c06,
0x476e000094665206,
0x476f000094681e02,
0x4770000094682202,
0x4771000094682406,
0x4772000094682602,
0x4773000094682802,
0x4774000094682c02,
0x4775000094683002,
0x4776000094683202,
0x4777000094683402,
0x4778000094683602,
0x4779000094683802,
0x477a000094683a02,
0x477b000094683e02,
0x477c000094684002,
0x477d000094686006,
0x477e000094688606,
0x477f000094689006,
0x47800000946a2002,
0x47810000946a2006,
0x47820000946a2202,
0x47830000946a2802,
0x47840000946a2a02,
0x47850000946a2e02,
0x47860000946a2e06,
0x47870000946a3202,
0x47880000946a3402,
0x47890000946a3602,
0x478a0000946a3802,
0x478b0000946a3806,
0x478c0000946a3a02,
0x478d0000946a3c02,
0x478e0000946a3c06,
0x478f0000946a7206,
0x47900000946a8806,
0x47910000946c2202,
0x47920000946c2802,
0x47930000946c3202,
0x47940000946c3402,
0x47950000946c3602,
0x47960000946c3802,
0x47970000946c3806,
0x47980000946c3a02,
0x47990000946c4806,
0x479a0000946c5e06,
0x479b0000946c7606,
0x479c0000946e1606,
0x479d0000946e1e02,
0x479e0000946e1e06,
0x479f0000946e2202,
0x47a00000946e2602,
0x47a10000946e2802,
0x47a20000946e2c02,
0x47a30000946e3002,
0x47a40000946e3202,
0x47a50000946e3402,
0x47a60000946e3602,
0x47a70000946e3802,
0x47a80000946e3a02,
0x47a90000946e3e02,
0x47aa0000946e4002,
0x47ab0000946e4206,
0x47ac0000946e9006,
0x47ad000094700606,
0x47ae000094702202,
0x47af000094702802,
0x47b0000094702e02,
0x47b1000094702e06,
0x47b2000094703202,
0x47b3000094703402,
0x47b4000094703602,
0x47b5000094703802,
0x47b6000094703a02,
0x47b7000094706206,
0x47b8000094707206,
0x47b9000094720606,
0x47ba000094721206,
0x47bb000094722002,
0x47bc000094722006,
0x47bd000094722202,
0x47be000094722802,
0x47bf000094722a02,
0x47c0000094722e02,
0x47c1000094722e06,
0x47c2000094723202,
0x47c3000094723402,
0x47c4000094723602,
0x47c5000094723802,
0x47c6000094723a02,
0x47c7000094726406,
0x47c8000094726a06,
0x47c9000094727006,
0x47ca000094742202,
0x47cb000094742802,
0x47cc000094742806,
0x47cd000094743202,
0x47ce000094743402,
0x47cf000094743602,
0x47d0000094743802,
0x47d1000094743806,
0x47d2000094743a02,
0x47d3000094745c06,
0x47d4000094745e06,
0x47d5000094762202,
0x47d6000094762802,
0x47d7000094763202,
0x47d8000094763206,
0x47d9000094763402,
0x47da000094763602,
0x47db000094763606,
0x47dc000094763802,
0x47dd000094763a02,
0x47de000094764806,
0x47df000094765c06,
0x47e0000094765e06,
0x47e1000094766c06,
0x47e2000094780206,
0x47e3000094782202,
0x47e4000094782802,
0x47e5000094782c02,
0x47e6000094783202,
0x47e7000094783402,
0x47e8000094783602,
0x47e9000094783802,
0x47ea000094783a02,
0x47eb000094783e02,
0x47ec000094784002,
0x47ed000094784c06,
0x47ee000094785406,
0x47ef000094789206,
0x47f00000947a2202,
0x47f10000947a2802,
0x47f20000947a2c02,
0x47f30000947a3002,
0x47f40000947a3006,
0x47f50000947a3202,
0x47f60000947a3402,
0x47f70000947a3602,
0x47f80000947a3802,
0x47f90000947a3a02,
0x47fa0000947a3e02,
0x47fb0000947a4002,
0x47fc0000947a4406,
0x47fd0000947a8006,
0x47fe0000947c2202,
0x47ff0000947c2206,
0x48000000947c2802,
0x48010000947c3202,
0x48020000947c3402,
0x48030000947c3602,
0x48040000947c3802,
0x48050000947c3806,
0x48060000947c3a02,
0x48070000947c3a06,
0x48080000947c3c02,
0x48090000947c3c06,
0x480a0000947c4a06,
0x480b0000947c8806,
0x480c0000947e2202,
0x480d0000947e2802,
0x480e0000947e3202,
0x480f0000947e3402,
0x48100000947e3602,
0x48110000947e3802,
0x48120000947e3a02,
0x48130000947e9206,
0x4814000094802202,
0x4815000094802802,
0x4816000094802c02,
0x4817000094803202,
0x4818000094803402,
0x4819000094803602,
0x481a000094803802,
0x481b000094803a02,
0x481c000094803e02,
0x481d000094804002,
0x481e000094804406,
0x481f000094805a06,
0x4820000094807a06,
0x4821000094808e06,
0x4822000094861e02,
0x4823000094861e06,
0x4824000094862202,
0x4825000094862602,
0x4826000094862606,
0x4827000094862802,
0x4828000094862c02,
0x4829000094863002,
0x482a000094863202,
0x482b000094863402,
0x482c000094863602,
0x482d000094863802,
0x482e000094863a02,
0x482f000094863e02,
0x4830000094864002,
0x4831000094864606,
0x4832000094865806,
0x4833000094866006,
0x4834000094866806,
0x4835000094882002,
0x4836000094882006,
0x4837000094882202,
0x4838000094882802,
0x4839000094882a02,
0x483a000094882a06,
0x483b000094883202,
0x483c000094883402,
0x483d000094883602,
0x483e000094883802,
0x483f000094883a02,
0x4840000094883c02,
0x4841000094883c06,
0x4842000094884a06,
0x4843000094886a06,
0x4844000094887c06,
0x48450000948a0a06,
0x48460000948a0e06,
0x48470000948a1606,
0x48480000948a1806,
0x48490000948a1c02,
0x484a0000948a2202,
0x484b0000948a2802,
0x484c0000948a2c02,
0x484d0000948a3002,
0x484e0000948a3202,
0x484f0000948a3402,
0x48500000948a3602,
0x48510000948a3802,
0x48520000948a3a02,
0x48530000948a3e02,
0x48540000948a4002,
0x48550000948a4206,
0x48560000948a8e06,
0x48570000948c2202,
0x48580000948c2802,
0x48590000948c2c02,
0x485a0000948c3002,
0x485b0000948c3006,
0x485c0000948c3202,
0x485d0000948c3402,
0x485e0000948c3602,
0x485f0000948c3802,
0x48600000948c3a02,
0x48610000948c3e02,
0x48620000948c3e06,
0x48630000948c4002,
0x48640000948c5006,
0x48650000948e0a06,
0x48660000948e1c02,
0x48670000948e2202,
0x48680000948e2802,
0x48690000948e2c02,
0x486a0000948e3002,
0x486b0000948e3202,
0x486c0000948e3402,
0x486d0000948e3602,
0x486e0000948e3802,
0x486f0000948e3a02,
0x48700000948e3e02,
0x48710000948e4002,
0x48720000948e4406,
0x48730000948e5406,
0x48740000948e5a06,
0x48750000948e8006,
0x48760000948e8a06,
0x4877000094901606,
0x4878000094901e02,
0x4879000094902202,
0x487a000094902406,
0x487b000094902602,
0x487c000094902802,
0x487d000094902c02,
0x487e000094903002,
0x487f000094903202,
0x4880000094903402,
0x4881000094903602,
0x4882000094903802,
0x4883000094903a02,
0x4884000094903e02,
0x4885000094904002,
0x4886000094906806,
0x4887000094906e06,
0x4888000094908206,
0x4889000094922202,
0x488a000094922802,
0x488b000094922c02,
0x488c000094922c06,
0x488d000094923202,
0x488e000094923402,
0x488f000094923602,
0x4890000094923802,
0x4891000094923a02,
0x4892000094923e02,
0x4893000094924002,
0x4894000094924006,
0x4895000094924c06,
0x4896000094927806,
0x4897000094927e06,
))
POSSIBLE_ACTIONS.setflags(write=False)
MILA_ACTIONS_LIST = (
'WAIVE',
'A ALB - APU VIA',
'A ALB - BRE VIA',
'A ALB - BUL VIA',
'A ALB - CON VIA',
'A ALB - GAS VIA',
'A ALB - GRE',
'A ALB - GRE VIA',
'A ALB - MAR VIA',
'A ALB - NAF VIA',
'A ALB - NAP VIA',
'A ALB - PIE VIA',
'A ALB - POR VIA',
'A ALB - ROM VIA',
'A ALB - SER',
'A ALB - SMY VIA',
'A ALB - SPA VIA',
'A ALB - SYR VIA',
'A ALB - TRI',
'A ALB - TRI VIA',
'A ALB - TUN VIA',
'A ALB - TUS VIA',
'A ALB - VEN VIA',
'A ALB D',
'A ALB H',
'A ALB R GRE',
'A ALB R SER',
'A ALB R TRI',
'A ALB S A APU - GRE',
'A ALB S A APU - TRI',
'A ALB S A BRE - GRE',
'A ALB S A BUD - SER',
'A ALB S A BUD - TRI',
'A ALB S A BUL - GRE',
'A ALB S A BUL - SER',
'A ALB S A BUL - TRI',
'A ALB S A CON - GRE',
'A ALB S A CON - TRI',
'A ALB S A GAS - GRE',
'A ALB S A GRE',
'A ALB S A GRE - SER',
'A ALB S A GRE - TRI',
'A ALB S A MAR - GRE',
'A ALB S A MAR - TRI',
'A ALB S A NAF - GRE',
'A ALB S A NAF - TRI',
'A ALB S A NAP - GRE',
'A ALB S A NAP - TRI',
'A ALB S A PIE - GRE',
'A ALB S A PIE - TRI',
'A ALB S A POR - GRE',
'A ALB S A ROM - GRE',
'A ALB S A ROM - TRI',
'A ALB S A RUM - SER',
'A ALB S A SER',
'A ALB S A SER - GRE',
'A ALB S A SER - TRI',
'A ALB S A SMY - GRE',
'A ALB S A SMY - TRI',
'A ALB S A SPA - GRE',
'A ALB S A SPA - TRI',
'A ALB S A SYR - GRE',
'A ALB S A SYR - TRI',
'A ALB S A TRI',
'A ALB S A TRI - GRE',
'A ALB S A TRI - SER',
'A ALB S A TUN - GRE',
'A ALB S A TUN - TRI',
'A ALB S A TUS - GRE',
'A ALB S A TUS - TRI',
'A ALB S A TYR - TRI',
'A ALB S A VEN - GRE',
'A ALB S A VEN - TRI',
'A ALB S A VIE - TRI',
'A ALB S F ADR - TRI',
'A ALB S F AEG - GRE',
'A ALB S F BUL/SC - GRE',
'A ALB S F GRE',
'A ALB S F ION - GRE',
'A ALB S F TRI',
'A ALB S F VEN - TRI',
'A ANK - ARM',
'A ANK - ARM VIA',
'A ANK - BUL VIA',
'A ANK - CON',
'A ANK - CON VIA',
'A ANK - RUM VIA',
'A ANK - SEV VIA',
'A ANK - SMY',
'A ANK B',
'A ANK D',
'A ANK H',
'A ANK R ARM',
'A ANK R CON',
'A ANK R SMY',
'A ANK S A ALB - CON',
'A ANK S A ALB - SMY',
'A ANK S A APU - CON',
'A ANK S A APU - SMY',
'A ANK S A ARM',
'A ANK S A ARM - CON',
'A ANK S A ARM - SMY',
'A ANK S A BUL - ARM',
'A ANK S A BUL - CON',
'A ANK S A BUL - SMY',
'A ANK S A CON',
'A ANK S A CON - ARM',
'A ANK S A CON - SMY',
'A ANK S A GRE - CON',
'A ANK S A GRE - SMY',
'A ANK S A MAR - CON',
'A ANK S A MAR - SMY',
'A ANK S A NAF - CON',
'A ANK S A NAF - SMY',
'A ANK S A NAP - CON',
'A ANK S A NAP - SMY',
'A ANK S A PIE - CON',
'A ANK S A PIE - SMY',
'A ANK S A ROM - CON',
'A ANK S A ROM - SMY',
'A ANK S A RUM - ARM',
'A ANK S A RUM - CON',
'A ANK S A SEV - ARM',
'A ANK S A SEV - CON',
'A ANK S A SMY',
'A ANK S A SMY - ARM',
'A ANK S A SMY - CON',
'A ANK S A SPA - CON',
'A ANK S A SPA - SMY',
'A ANK S A SYR - ARM',
'A ANK S A SYR - CON',
'A ANK S A SYR - SMY',
'A ANK S A TRI - CON',
'A ANK S A TRI - SMY',
'A ANK S A TUN - CON',
'A ANK S A TUN - SMY',
'A ANK S A TUS - CON',
'A ANK S A TUS - SMY',
'A ANK S A VEN - CON',
'A ANK S A VEN - SMY',
'A ANK S F AEG - CON',
'A ANK S F AEG - SMY',
'A ANK S F ARM',
'A ANK S F BLA - ARM',
'A ANK S F BLA - CON',
'A ANK S F BUL/EC - CON',
'A ANK S F BUL/SC - CON',
'A ANK S F CON',
'A ANK S F CON - SMY',
'A ANK S F EAS - SMY',
'A ANK S F SEV - ARM',
'A ANK S F SMY',
'A ANK S F SMY - CON',
'A ANK S F SYR - SMY',
'A APU - ALB VIA',
'A APU - BRE VIA',
'A APU - BUL VIA',
'A APU - CON VIA',
'A APU - GAS VIA',
'A APU - GRE VIA',
'A APU - MAR VIA',
'A APU - NAF VIA',
'A APU - NAP',
'A APU - NAP VIA',
'A APU - PIE VIA',
'A APU - POR VIA',
'A APU - ROM',
'A APU - ROM VIA',
'A APU - SMY VIA',
'A APU - SPA VIA',
'A APU - SYR VIA',
'A APU - TRI VIA',
'A APU - TUN VIA',
'A APU - TUS VIA',
'A APU - VEN',
'A APU - VEN VIA',
'A APU D',
'A APU H',
'A APU R NAP',
'A APU R ROM',
'A APU R VEN',
'A APU S A ALB - NAP',
'A APU S A ALB - ROM',
'A APU S A ALB - VEN',
'A APU S A BEL - NAP',
'A APU S A BEL - ROM',
'A APU S A BRE - NAP',
'A APU S A BRE - ROM',
'A APU S A BUL - NAP',
'A APU S A BUL - ROM',
'A APU S A BUL - VEN',
'A APU S A CLY - NAP',
'A APU S A CLY - ROM',
'A APU S A CON - NAP',
'A APU S A CON - ROM',
'A APU S A CON - VEN',
'A APU S A GAS - NAP',
'A APU S A GAS - ROM',
'A APU S A GRE - NAP',
'A APU S A GRE - ROM',
'A APU S A GRE - VEN',
'A APU S A LON - NAP',
'A APU S A LON - ROM',
'A APU S A LVP - NAP',
'A APU S A LVP - ROM',
'A APU S A MAR - NAP',
'A APU S A MAR - ROM',
'A APU S A MAR - VEN',
'A APU S A NAF - NAP',
'A APU S A NAF - ROM',
'A APU S A NAF - VEN',
'A APU S A NAP',
'A APU S A NAP - ROM',
'A APU S A NAP - VEN',
'A APU S A PIC - NAP',
'A APU S A PIC - ROM',
'A APU S A PIE - NAP',
'A APU S A PIE - ROM',
'A APU S A PIE - VEN',
'A APU S A POR - NAP',
'A APU S A POR - ROM',
'A APU S A ROM',
'A APU S A ROM - NAP',
'A APU S A ROM - VEN',
'A APU S A SMY - NAP',
'A APU S A SMY - ROM',
'A APU S A SMY - VEN',
'A APU S A SPA - NAP',
'A APU S A SPA - ROM',
'A APU S A SPA - VEN',
'A APU S A SYR - NAP',
'A APU S A SYR - ROM',
'A APU S A SYR - VEN',
'A APU S A TRI - NAP',
'A APU S A TRI - ROM',
'A APU S A TRI - VEN',
'A APU S A TUN - NAP',
'A APU S A TUN - ROM',
'A APU S A TUN - VEN',
'A APU S A TUS - NAP',
'A APU S A TUS - ROM',
'A APU S A TUS - VEN',
'A APU S A TYR - VEN',
'A APU S A VEN',
'A APU S A VEN - NAP',
'A APU S A VEN - ROM',
'A APU S A WAL - NAP',
'A APU S A WAL - ROM',
'A APU S F ADR - VEN',
'A APU S F ION - NAP',
'A APU S F NAP',
'A APU S F NAP - ROM',
'A APU S F ROM',
'A APU S F ROM - NAP',
'A APU S F TRI - VEN',
'A APU S F TUS - ROM',
'A APU S F TYS - NAP',
'A APU S F TYS - ROM',
'A APU S F VEN',
'A ARM - ANK',
'A ARM - ANK VIA',
'A ARM - BUL VIA',
'A ARM - CON VIA',
'A ARM - RUM VIA',
'A ARM - SEV',
'A ARM - SEV VIA',
'A ARM - SMY',
'A ARM - SYR',
'A ARM D',
'A ARM H',
'A ARM R ANK',
'A ARM R SEV',
'A ARM R SMY',
'A ARM R SYR',
'A ARM S A ALB - SMY',
'A ARM S A ALB - SYR',
'A ARM S A ANK',
'A ARM S A ANK - SEV',
'A ARM S A ANK - SMY',
'A ARM S A APU - SMY',
'A ARM S A APU - SYR',
'A ARM S A BUL - ANK',
'A ARM S A BUL - SEV',
'A ARM S A BUL - SMY',
'A ARM S A BUL - SYR',
'A ARM S A CON - ANK',
'A ARM S A CON - SEV',
'A ARM S A CON - SMY',
'A ARM S A CON - SYR',
'A ARM S A GRE - SMY',
'A ARM S A GRE - SYR',
'A ARM S A MAR - SMY',
'A ARM S A MAR - SYR',
'A ARM S A MOS - SEV',
'A ARM S A NAF - SMY',
'A ARM S A NAF - SYR',
'A ARM S A NAP - SMY',
'A ARM S A NAP - SYR',
'A ARM S A PIE - SMY',
'A ARM S A PIE - SYR',
'A ARM S A ROM - SMY',
'A ARM S A ROM - SYR',
'A ARM S A RUM - ANK',
'A ARM S A RUM - SEV',
'A ARM S A SEV',
'A ARM S A SEV - ANK',
'A ARM S A SMY',
'A ARM S A SMY - ANK',
'A ARM S A SMY - SYR',
'A ARM S A SPA - SMY',
'A ARM S A SPA - SYR',
'A ARM S A SYR',
'A ARM S A SYR - SMY',
'A ARM S A TRI - SMY',
'A ARM S A TRI - SYR',
'A ARM S A TUN - SMY',
'A ARM S A TUN - SYR',
'A ARM S A TUS - SMY',
'A ARM S A TUS - SYR',
'A ARM S A UKR - SEV',
'A ARM S A VEN - SMY',
'A ARM S A VEN - SYR',
'A ARM S F AEG - SMY',
'A ARM S F ANK',
'A ARM S F BLA - ANK',
'A ARM S F BLA - SEV',
'A ARM S F CON - ANK',
'A ARM S F CON - SMY',
'A ARM S F EAS - SMY',
'A ARM S F EAS - SYR',
'A ARM S F RUM - SEV',
'A ARM S F SEV',
'A ARM S F SMY',
'A ARM S F SMY - SYR',
'A ARM S F SYR',
'A ARM S F SYR - SMY',
'A BEL - BRE VIA',
'A BEL - BUR',
'A BEL - CLY VIA',
'A BEL - DEN VIA',
'A BEL - EDI VIA',
'A BEL - GAS VIA',
'A BEL - HOL',
'A BEL - HOL VIA',
'A BEL - KIE VIA',
'A BEL - LON VIA',
'A BEL - LVP VIA',
'A BEL - MAR VIA',
'A BEL - NAF VIA',
'A BEL - NAP VIA',
'A BEL - NWY VIA',
'A BEL - PIC',
'A BEL - PIC VIA',
'A BEL - PIE VIA',
'A BEL - POR VIA',
'A BEL - ROM VIA',
'A BEL - RUH',
'A BEL - SPA VIA',
'A BEL - STP VIA',
'A BEL - SWE VIA',
'A BEL - TUN VIA',
'A BEL - TUS VIA',
'A BEL - WAL VIA',
'A BEL - YOR VIA',
'A BEL D',
'A BEL H',
'A BEL R BUR',
'A BEL R HOL',
'A BEL R PIC',
'A BEL R RUH',
'A BEL S A BRE - HOL',
'A BEL S A BRE - PIC',
'A BEL S A BUR',
'A BEL S A BUR - PIC',
'A BEL S A BUR - RUH',
'A BEL S A CLY - HOL',
'A BEL S A CLY - PIC',
'A BEL S A DEN - HOL',
'A BEL S A DEN - PIC',
'A BEL S A EDI - HOL',
'A BEL S A EDI - PIC',
'A BEL S A GAS - BUR',
'A BEL S A GAS - HOL',
'A BEL S A GAS - PIC',
'A BEL S A HOL',
'A BEL S A HOL - PIC',
'A BEL S A HOL - RUH',
'A BEL S A KIE - HOL',
'A BEL S A KIE - PIC',
'A BEL S A KIE - RUH',
'A BEL S A LON - HOL',
'A BEL S A LON - PIC',
'A BEL S A LVP - HOL',
'A BEL S A LVP - PIC',
'A BEL S A MAR - BUR',
'A BEL S A MAR - PIC',
'A BEL S A MUN - BUR',
'A BEL S A MUN - RUH',
'A BEL S A NAF - HOL',
'A BEL S A NAF - PIC',
'A BEL S A NAP - PIC',
'A BEL S A NWY - HOL',
'A BEL S A NWY - PIC',
'A BEL S A PAR - BUR',
'A BEL S A PAR - PIC',
'A BEL S A PIC',
'A BEL S A PIC - BUR',
'A BEL S A PIC - HOL',
'A BEL S A PIE - PIC',
'A BEL S A POR - HOL',
'A BEL S A POR - PIC',
'A BEL S A ROM - PIC',
'A BEL S A RUH',
'A BEL S A RUH - BUR',
'A BEL S A RUH - HOL',
'A BEL S A SPA - HOL',
'A BEL S A SPA - PIC',
'A BEL S A STP - HOL',
'A BEL S A STP - PIC',
'A BEL S A SWE - HOL',
'A BEL S A SWE - PIC',
'A BEL S A TUN - HOL',
'A BEL S A TUN - PIC',
'A BEL S A TUS - PIC',
'A BEL S A WAL - HOL',
'A BEL S A WAL - PIC',
'A BEL S A YOR - HOL',
'A BEL S A YOR - PIC',
'A BEL S F BRE - PIC',
'A BEL S F ENG - PIC',
'A BEL S F HEL - HOL',
'A BEL S F HOL',
'A BEL S F KIE - HOL',
'A BEL S F NTH - HOL',
'A BEL S F PIC',
'A BER - DEN VIA',
'A BER - FIN VIA',
'A BER - KIE',
'A BER - KIE VIA',
'A BER - LVN VIA',
'A BER - MUN',
'A BER - PRU',
'A BER - PRU VIA',
'A BER - SIL',
'A BER - STP VIA',
'A BER - SWE VIA',
'A BER B',
'A BER D',
'A BER H',
'A BER R KIE',
'A BER R MUN',
'A BER R PRU',
'A BER R SIL',
'A BER S A BEL - KIE',
'A BER S A BOH - MUN',
'A BER S A BOH - SIL',
'A BER S A BRE - KIE',
'A BER S A BUR - MUN',
'A BER S A CLY - KIE',
'A BER S A DEN - KIE',
'A BER S A DEN - PRU',
'A BER S A EDI - KIE',
'A BER S A FIN - KIE',
'A BER S A FIN - PRU',
'A BER S A GAL - SIL',
'A BER S A GAS - KIE',
'A BER S A HOL - KIE',
'A BER S A KIE',
'A BER S A KIE - MUN',
'A BER S A KIE - PRU',
'A BER S A LON - KIE',
'A BER S A LVN - KIE',
'A BER S A LVN - PRU',
'A BER S A LVP - KIE',
'A BER S A MUN',
'A BER S A MUN - KIE',
'A BER S A MUN - SIL',
'A BER S A NAF - KIE',
'A BER S A NWY - KIE',
'A BER S A PIC - KIE',
'A BER S A POR - KIE',
'A BER S A PRU',
'A BER S A PRU - KIE',
'A BER S A PRU - SIL',
'A BER S A RUH - KIE',
'A BER S A RUH - MUN',
'A BER S A SIL',
'A BER S A SIL - MUN',
'A BER S A SIL - PRU',
'A BER S A SPA - KIE',
'A BER S A STP - KIE',
'A BER S A STP - PRU',
'A BER S A SWE - KIE',
'A BER S A SWE - PRU',
'A BER S A TYR - MUN',
'A BER S A WAL - KIE',
'A BER S A WAR - PRU',
'A BER S A WAR - SIL',
'A BER S A YOR - KIE',
'A BER S F BAL - KIE',
'A BER S F BAL - PRU',
'A BER S F DEN - KIE',
'A BER S F HEL - KIE',
'A BER S F HOL - KIE',
'A BER S F KIE',
'A BER S F LVN - PRU',
'A BER S F PRU',
'A BOH - GAL',
'A BOH - MUN',
'A BOH - SIL',
'A BOH - TYR',
'A BOH - VIE',
'A BOH D',
'A BOH H',
'A BOH R GAL',
'A BOH R MUN',
'A BOH R SIL',
'A BOH R TYR',
'A BOH R VIE',
'A BOH S A BER - MUN',
'A BOH S A BER - SIL',
'A BOH S A BUD - GAL',
'A BOH S A BUD - VIE',
'A BOH S A BUR - MUN',
'A BOH S A GAL',
'A BOH S A GAL - SIL',
'A BOH S A GAL - VIE',
'A BOH S A KIE - MUN',
'A BOH S A MUN',
'A BOH S A MUN - SIL',
'A BOH S A MUN - TYR',
'A BOH S A PIE - TYR',
'A BOH S A PRU - SIL',
'A BOH S A RUH - MUN',
'A BOH S A RUM - GAL',
'A BOH S A SIL',
'A BOH S A SIL - GAL',
'A BOH S A SIL - MUN',
'A BOH S A TRI - TYR',
'A BOH S A TRI - VIE',
'A BOH S A TYR',
'A BOH S A TYR - MUN',
'A BOH S A TYR - VIE',
'A BOH S A UKR - GAL',
'A BOH S A VEN - TYR',
'A BOH S A VIE',
'A BOH S A VIE - GAL',
'A BOH S A VIE - TYR',
'A BOH S A WAR - GAL',
'A BOH S A WAR - SIL',
'A BRE - ALB VIA',
'A BRE - APU VIA',
'A BRE - BEL VIA',
'A BRE - CLY VIA',
'A BRE - DEN VIA',
'A BRE - EDI VIA',
'A BRE - GAS',
'A BRE - GAS VIA',
'A BRE - GRE VIA',
'A BRE - HOL VIA',
'A BRE - KIE VIA',
'A BRE - LON VIA',
'A BRE - LVP VIA',
'A BRE - MAR VIA',
'A BRE - NAF VIA',
'A BRE - NAP VIA',
'A BRE - NWY VIA',
'A BRE - PAR',
'A BRE - PIC',
'A BRE - PIC VIA',
'A BRE - PIE VIA',
'A BRE - POR VIA',
'A BRE - ROM VIA',
'A BRE - SPA VIA',
'A BRE - STP VIA',
'A BRE - SWE VIA',
'A BRE - TUN VIA',
'A BRE - TUS VIA',
'A BRE - WAL VIA',
'A BRE - YOR VIA',
'A BRE B',
'A BRE D',
'A BRE H',
'A BRE R GAS',
'A BRE R PAR',
'A BRE R PIC',
'A BRE S A ALB - GAS',
'A BRE S A APU - GAS',
'A BRE S A BEL - GAS',
'A BRE S A BEL - PIC',
'A BRE S A BUR - GAS',
'A BRE S A BUR - PAR',
'A BRE S A BUR - PIC',
'A BRE S A CLY - GAS',
'A BRE S A CLY - PIC',
'A BRE S A DEN - GAS',
'A BRE S A DEN - PIC',
'A BRE S A EDI - GAS',
'A BRE S A EDI - PIC',
'A BRE S A GAS',
'A BRE S A GAS - PAR',
'A BRE S A GAS - PIC',
'A BRE S A GRE - GAS',
'A BRE S A HOL - GAS',
'A BRE S A HOL - PIC',
'A BRE S A KIE - GAS',
'A BRE S A KIE - PIC',
'A BRE S A LON - GAS',
'A BRE S A LON - PIC',
'A BRE S A LVP - GAS',
'A BRE S A LVP - PIC',
'A BRE S A MAR - GAS',
'A BRE S A MAR - PIC',
'A BRE S A NAF - GAS',
'A BRE S A NAF - PIC',
'A BRE S A NAP - GAS',
'A BRE S A NAP - PIC',
'A BRE S A NWY - GAS',
'A BRE S A NWY - PIC',
'A BRE S A PAR',
'A BRE S A PAR - GAS',
'A BRE S A PAR - PIC',
'A BRE S A PIC',
'A BRE S A PIC - GAS',
'A BRE S A PIC - PAR',
'A BRE S A PIE - GAS',
'A BRE S A PIE - PIC',
'A BRE S A POR - GAS',
'A BRE S A POR - PIC',
'A BRE S A ROM - GAS',
'A BRE S A ROM - PIC',
'A BRE S A SPA - GAS',
'A BRE S A SPA - PIC',
'A BRE S A STP - GAS',
'A BRE S A STP - PIC',
'A BRE S A SWE - GAS',
'A BRE S A SWE - PIC',
'A BRE S A TUN - GAS',
'A BRE S A TUN - PIC',
'A BRE S A TUS - GAS',
'A BRE S A TUS - PIC',
'A BRE S A WAL - GAS',
'A BRE S A WAL - PIC',
'A BRE S A YOR - GAS',
'A BRE S A YOR - PIC',
'A BRE S F BEL - PIC',
'A BRE S F ENG - PIC',
'A BRE S F GAS',
'A BRE S F MAO - GAS',
'A BRE S F PIC',
'A BRE S F SPA/NC - GAS',
'A BUD - GAL',
'A BUD - RUM',
'A BUD - SER',
'A BUD - TRI',
'A BUD - VIE',
'A BUD B',
'A BUD D',
'A BUD H',
'A BUD R GAL',
'A BUD R RUM',
'A BUD R SER',
'A BUD R TRI',
'A BUD R VIE',
'A BUD S A ALB - SER',
'A BUD S A ALB - TRI',
'A BUD S A ANK - RUM',
'A BUD S A APU - TRI',
'A BUD S A ARM - RUM',
'A BUD S A BOH - GAL',
'A BUD S A BOH - VIE',
'A BUD S A BUL - RUM',
'A BUD S A BUL - SER',
'A BUD S A BUL - TRI',
'A BUD S A CON - RUM',
'A BUD S A CON - TRI',
'A BUD S A GAL',
'A BUD S A GAL - RUM',
'A BUD S A GAL - VIE',
'A BUD S A GRE - SER',
'A BUD S A GRE - TRI',
'A BUD S A MAR - TRI',
'A BUD S A NAF - TRI',
'A BUD S A NAP - TRI',
'A BUD S A PIE - TRI',
'A BUD S A ROM - TRI',
'A BUD S A RUM',
'A BUD S A RUM - GAL',
'A BUD S A RUM - SER',
'A BUD S A SER',
'A BUD S A SER - RUM',
'A BUD S A SER - TRI',
'A BUD S A SEV - RUM',
'A BUD S A SIL - GAL',
'A BUD S A SMY - TRI',
'A BUD S A SPA - TRI',
'A BUD S A SYR - TRI',
'A BUD S A TRI',
'A BUD S A TRI - SER',
'A BUD S A TRI - VIE',
'A BUD S A TUN - TRI',
'A BUD S A TUS - TRI',
'A BUD S A TYR - TRI',
'A BUD S A TYR - VIE',
'A BUD S A UKR - GAL',
'A BUD S A UKR - RUM',
'A BUD S A VEN - TRI',
'A BUD S A VIE',
'A BUD S A VIE - GAL',
'A BUD S A VIE - TRI',
'A BUD S A WAR - GAL',
'A BUD S F ADR - TRI',
'A BUD S F ALB - TRI',
'A BUD S F BLA - RUM',
'A BUD S F BUL/EC - RUM',
'A BUD S F RUM',
'A BUD S F SEV - RUM',
'A BUD S F TRI',
'A BUD S F VEN - TRI',
'A BUL - ALB VIA',
'A BUL - ANK VIA',
'A BUL - APU VIA',
'A BUL - ARM VIA',
'A BUL - CON',
'A BUL - CON VIA',
'A BUL - GRE',
'A BUL - GRE VIA',
'A BUL - MAR VIA',
'A BUL - NAF VIA',
'A BUL - NAP VIA',
'A BUL - PIE VIA',
'A BUL - ROM VIA',
'A BUL - RUM',
'A BUL - RUM VIA',
'A BUL - SER',
'A BUL - SEV VIA',
'A BUL - SMY VIA',
'A BUL - SPA VIA',
'A BUL - SYR VIA',
'A BUL - TRI VIA',
'A BUL - TUN VIA',
'A BUL - TUS VIA',
'A BUL - VEN VIA',
'A BUL D',
'A BUL H',
'A BUL R CON',
'A BUL R GRE',
'A BUL R RUM',
'A BUL R SER',
'A BUL S A ALB - CON',
'A BUL S A ALB - GRE',
'A BUL S A ALB - SER',
'A BUL S A ANK - CON',
'A BUL S A ANK - RUM',
'A BUL S A APU - CON',
'A BUL S A APU - GRE',
'A BUL S A ARM - CON',
'A BUL S A ARM - RUM',
'A BUL S A BRE - GRE',
'A BUL S A BUD - RUM',
'A BUL S A BUD - SER',
'A BUL S A CON',
'A BUL S A CON - GRE',
'A BUL S A CON - RUM',
'A BUL S A GAL - RUM',
'A BUL S A GAS - GRE',
'A BUL S A GRE',
'A BUL S A GRE - CON',
'A BUL S A GRE - SER',
'A BUL S A MAR - CON',
'A BUL S A MAR - GRE',
'A BUL S A NAF - CON',
'A BUL S A NAF - GRE',
'A BUL S A NAP - CON',
'A BUL S A NAP - GRE',
'A BUL S A PIE - CON',
'A BUL S A PIE - GRE',
'A BUL S A POR - GRE',
'A BUL S A ROM - CON',
'A BUL S A ROM - GRE',
'A BUL S A RUM',
'A BUL S A RUM - CON',
'A BUL S A RUM - SER',
'A BUL S A SER',
'A BUL S A SER - GRE',
'A BUL S A SER - RUM',
'A BUL S A SEV - CON',
'A BUL S A SEV - RUM',
'A BUL S A SMY - CON',
'A BUL S A SMY - GRE',
'A BUL S A SPA - CON',
'A BUL S A SPA - GRE',
'A BUL S A SYR - CON',
'A BUL S A SYR - GRE',
'A BUL S A TRI - CON',
'A BUL S A TRI - GRE',
'A BUL S A TRI - SER',
'A BUL S A TUN - CON',
'A BUL S A TUN - GRE',
'A BUL S A TUS - CON',
'A BUL S A TUS - GRE',
'A BUL S A UKR - RUM',
'A BUL S A VEN - CON',
'A BUL S A VEN - GRE',
'A BUL S F AEG - CON',
'A BUL S F AEG - GRE',
'A BUL S F ALB - GRE',
'A BUL S F ANK - CON',
'A BUL S F BLA - CON',
'A BUL S F BLA - RUM',
'A BUL S F CON',
'A BUL S F GRE',
'A BUL S F ION - GRE',
'A BUL S F RUM',
'A BUL S F SEV - RUM',
'A BUL S F SMY - CON',
'A BUR - BEL',
'A BUR - GAS',
'A BUR - MAR',
'A BUR - MUN',
'A BUR - PAR',
'A BUR - PIC',
'A BUR - RUH',
'A BUR D',
'A BUR H',
'A BUR R BEL',
'A BUR R GAS',
'A BUR R MAR',
'A BUR R MUN',
'A BUR R PAR',
'A BUR R PIC',
'A BUR R RUH',
'A BUR S A ALB - GAS',
'A BUR S A ALB - MAR',
'A BUR S A APU - GAS',
'A BUR S A APU - MAR',
'A BUR S A BEL',
'A BUR S A BEL - GAS',
'A BUR S A BEL - MAR',
'A BUR S A BEL - PIC',
'A BUR S A BEL - RUH',
'A BUR S A BER - MUN',
'A BUR S A BOH - MUN',
'A BUR S A BRE - BEL',
'A BUR S A BRE - GAS',
'A BUR S A BRE - MAR',
'A BUR S A BRE - PAR',
'A BUR S A BRE - PIC',
'A BUR S A BUL - MAR',
'A BUR S A CLY - BEL',
'A BUR S A CLY - GAS',
'A BUR S A CLY - MAR',
'A BUR S A CLY - PIC',
'A BUR S A CON - MAR',
'A BUR S A DEN - BEL',
'A BUR S A DEN - GAS',
'A BUR S A DEN - PIC',
'A BUR S A EDI - BEL',
'A BUR S A EDI - GAS',
'A BUR S A EDI - PIC',
'A BUR S A GAS',
'A BUR S A GAS - BEL',
'A BUR S A GAS - MAR',
'A BUR S A GAS - PAR',
'A BUR S A GAS - PIC',
'A BUR S A GRE - GAS',
'A BUR S A GRE - MAR',
'A BUR S A HOL - BEL',
'A BUR S A HOL - GAS',
'A BUR S A HOL - PIC',
'A BUR S A HOL - RUH',
'A BUR S A KIE - BEL',
'A BUR S A KIE - GAS',
'A BUR S A KIE - MUN',
'A BUR S A KIE - PIC',
'A BUR S A KIE - RUH',
'A BUR S A LON - BEL',
'A BUR S A LON - GAS',
'A BUR S A LON - MAR',
'A BUR S A LON - PIC',
'A BUR S A LVP - BEL',
'A BUR S A LVP - GAS',
'A BUR S A LVP - MAR',
'A BUR S A LVP - PIC',
'A BUR S A MAR',
'A BUR S A MAR - BEL',
'A BUR S A MAR - GAS',
'A BUR S A MAR - PIC',
'A BUR S A MUN',
'A BUR S A MUN - RUH',
'A BUR S A NAF - BEL',
'A BUR S A NAF - GAS',
'A BUR S A NAF - MAR',
'A BUR S A NAF - PIC',
'A BUR S A NAP - BEL',
'A BUR S A NAP - GAS',
'A BUR S A NAP - MAR',
'A BUR S A NAP - PIC',
'A BUR S A NWY - BEL',
'A BUR S A NWY - GAS',
'A BUR S A NWY - PIC',
'A BUR S A PAR',
'A BUR S A PAR - GAS',
'A BUR S A PAR - PIC',
'A BUR S A PIC',
'A BUR S A PIC - BEL',
'A BUR S A PIC - GAS',
'A BUR S A PIC - MAR',
'A BUR S A PIC - PAR',
'A BUR S A PIE - BEL',
'A BUR S A PIE - GAS',
'A BUR S A PIE - MAR',
'A BUR S A PIE - PIC',
'A BUR S A POR - BEL',
'A BUR S A POR - GAS',
'A BUR S A POR - MAR',
'A BUR S A POR - PIC',
'A BUR S A ROM - BEL',
'A BUR S A ROM - GAS',
'A BUR S A ROM - MAR',
'A BUR S A ROM - PIC',
'A BUR S A RUH',
'A BUR S A RUH - BEL',
'A BUR S A RUH - MUN',
'A BUR S A SIL - MUN',
'A BUR S A SMY - MAR',
'A BUR S A SPA - BEL',
'A BUR S A SPA - GAS',
'A BUR S A SPA - MAR',
'A BUR S A SPA - PIC',
'A BUR S A STP - BEL',
'A BUR S A STP - GAS',
'A BUR S A STP - PIC',
'A BUR S A SWE - BEL',
'A BUR S A SWE - GAS',
'A BUR S A SWE - PIC',
'A BUR S A SYR - MAR',
'A BUR S A TRI - MAR',
'A BUR S A TUN - BEL',
'A BUR S A TUN - GAS',
'A BUR S A TUN - MAR',
'A BUR S A TUN - PIC',
'A BUR S A TUS - BEL',
'A BUR S A TUS - GAS',
'A BUR S A TUS - MAR',
'A BUR S A TUS - PIC',
'A BUR S A TYR - MUN',
'A BUR S A VEN - MAR',
'A BUR S A WAL - BEL',
'A BUR S A WAL - GAS',
'A BUR S A WAL - MAR',
'A BUR S A WAL - PIC',
'A BUR S A YOR - BEL',
'A BUR S A YOR - GAS',
'A BUR S A YOR - PIC',
'A BUR S F BEL',
'A BUR S F BEL - PIC',
'A BUR S F BRE - GAS',
'A BUR S F BRE - PIC',
'A BUR S F ENG - BEL',
'A BUR S F ENG - PIC',
'A BUR S F GAS',
'A BUR S F HOL - BEL',
'A BUR S F LYO - MAR',
'A BUR S F MAO - GAS',
'A BUR S F MAR',
'A BUR S F NTH - BEL',
'A BUR S F PIC',
'A BUR S F PIC - BEL',
'A BUR S F PIE - MAR',
'A BUR S F SPA/NC - GAS',
'A BUR S F SPA/SC - MAR',
'A CLY - BEL VIA',
'A CLY - BRE VIA',
'A CLY - DEN VIA',
'A CLY - EDI',
'A CLY - EDI VIA',
'A CLY - GAS VIA',
'A CLY - HOL VIA',
'A CLY - KIE VIA',
'A CLY - LON VIA',
'A CLY - LVP',
'A CLY - LVP VIA',
'A CLY - MAR VIA',
'A CLY - NAF VIA',
'A CLY - NAP VIA',
'A CLY - NWY VIA',
'A CLY - PIC VIA',
'A CLY - PIE VIA',
'A CLY - POR VIA',
'A CLY - ROM VIA',
'A CLY - SPA VIA',
'A CLY - STP VIA',
'A CLY - SWE VIA',
'A CLY - TUN VIA',
'A CLY - TUS VIA',
'A CLY - WAL VIA',
'A CLY - YOR VIA',
'A CLY D',
'A CLY H',
'A CLY R EDI',
'A CLY R LVP',
'A CLY S A BEL - EDI',
'A CLY S A BEL - LVP',
'A CLY S A BRE - EDI',
'A CLY S A BRE - LVP',
'A CLY S A DEN - EDI',
'A CLY S A DEN - LVP',
'A CLY S A EDI',
'A CLY S A EDI - LVP',
'A CLY S A GAS - EDI',
'A CLY S A GAS - LVP',
'A CLY S A HOL - EDI',
'A CLY S A HOL - LVP',
'A CLY S A KIE - EDI',
'A CLY S A KIE - LVP',
'A CLY S A LON - EDI',
'A CLY S A LON - LVP',
'A CLY S A LVP',
'A CLY S A LVP - EDI',
'A CLY S A MAR - LVP',
'A CLY S A NAF - EDI',
'A CLY S A NAF - LVP',
'A CLY S A NAP - LVP',
'A CLY S A NWY - EDI',
'A CLY S A NWY - LVP',
'A CLY S A PIC - EDI',
'A CLY S A PIC - LVP',
'A CLY S A PIE - LVP',
'A CLY S A POR - EDI',
'A CLY S A POR - LVP',
'A CLY S A ROM - LVP',
'A CLY S A SPA - EDI',
'A CLY S A SPA - LVP',
'A CLY S A STP - EDI',
'A CLY S A STP - LVP',
'A CLY S A SWE - EDI',
'A CLY S A SWE - LVP',
'A CLY S A TUN - EDI',
'A CLY S A TUN - LVP',
'A CLY S A TUS - LVP',
'A CLY S A WAL - EDI',
'A CLY S A WAL - LVP',
'A CLY S A YOR - EDI',
'A CLY S A YOR - LVP',
'A CLY S F EDI',
'A CLY S F IRI - LVP',
'A CLY S F LVP',
'A CLY S F NAO - LVP',
'A CLY S F NTH - EDI',
'A CLY S F NWG - EDI',
'A CLY S F WAL - LVP',
'A CLY S F YOR - EDI',
'A CON - ALB VIA',
'A CON - ANK',
'A CON - ANK VIA',
'A CON - APU VIA',
'A CON - ARM VIA',
'A CON - BUL',
'A CON - BUL VIA',
'A CON - GRE VIA',
'A CON - MAR VIA',
'A CON - NAF VIA',
'A CON - NAP VIA',
'A CON - PIE VIA',
'A CON - ROM VIA',
'A CON - RUM VIA',
'A CON - SEV VIA',
'A CON - SMY',
'A CON - SMY VIA',
'A CON - SPA VIA',
'A CON - SYR VIA',
'A CON - TRI VIA',
'A CON - TUN VIA',
'A CON - TUS VIA',
'A CON - VEN VIA',
'A CON B',
'A CON D',
'A CON H',
'A CON R ANK',
'A CON R BUL',
'A CON R SMY',
'A CON S A ALB - BUL',
'A CON S A ALB - SMY',
'A CON S A ANK',
'A CON S A ANK - BUL',
'A CON S A ANK - SMY',
'A CON S A APU - BUL',
'A CON S A APU - SMY',
'A CON S A ARM - ANK',
'A CON S A ARM - BUL',
'A CON S A ARM - SMY',
'A CON S A BUL',
'A CON S A BUL - ANK',
'A CON S A BUL - SMY',
'A CON S A GRE - BUL',
'A CON S A GRE - SMY',
'A CON S A MAR - BUL',
'A CON S A MAR - SMY',
'A CON S A NAF - BUL',
'A CON S A NAF - SMY',
'A CON S A NAP - BUL',
'A CON S A NAP - SMY',
'A CON S A PIE - BUL',
'A CON S A PIE - SMY',
'A CON S A ROM - BUL',
'A CON S A ROM - SMY',
'A CON S A RUM - ANK',
'A CON S A RUM - BUL',
'A CON S A SER - BUL',
'A CON S A SEV - ANK',
'A CON S A SEV - BUL',
'A CON S A SMY',
'A CON S A SMY - ANK',
'A CON S A SMY - BUL',
'A CON S A SPA - BUL',
'A CON S A SPA - SMY',
'A CON S A SYR - BUL',
'A CON S A SYR - SMY',
'A CON S A TRI - BUL',
'A CON S A TRI - SMY',
'A CON S A TUN - BUL',
'A CON S A TUN - SMY',
'A CON S A TUS - BUL',
'A CON S A TUS - SMY',
'A CON S A VEN - BUL',
'A CON S A VEN - SMY',
'A CON S F AEG - BUL',
'A CON S F AEG - SMY',
'A CON S F ANK',
'A CON S F ARM - ANK',
'A CON S F BLA - ANK',
'A CON S F BLA - BUL',
'A CON S F BUL/EC',
'A CON S F BUL/SC',
'A CON S F EAS - SMY',
'A CON S F GRE - BUL',
'A CON S F RUM - BUL',
'A CON S F SMY',
'A CON S F SYR - SMY',
'A DEN - BEL VIA',
'A DEN - BER VIA',
'A DEN - BRE VIA',
'A DEN - CLY VIA',
'A DEN - EDI VIA',
'A DEN - FIN VIA',
'A DEN - GAS VIA',
'A DEN - HOL VIA',
'A DEN - KIE',
'A DEN - KIE VIA',
'A DEN - LON VIA',
'A DEN - LVN VIA',
'A DEN - LVP VIA',
'A DEN - NAF VIA',
'A DEN - NWY VIA',
'A DEN - PIC VIA',
'A DEN - POR VIA',
'A DEN - PRU VIA',
'A DEN - SPA VIA',
'A DEN - STP VIA',
'A DEN - SWE',
'A DEN - SWE VIA',
'A DEN - TUN VIA',
'A DEN - WAL VIA',
'A DEN - YOR VIA',
'A DEN D',
'A DEN H',
'A DEN R KIE',
'A DEN R SWE',
'A DEN S A BEL - KIE',
'A DEN S A BEL - SWE',
'A DEN S A BER - KIE',
'A DEN S A BER - SWE',
'A DEN S A BRE - KIE',
'A DEN S A BRE - SWE',
'A DEN S A CLY - KIE',
'A DEN S A CLY - SWE',
'A DEN S A EDI - KIE',
'A DEN S A EDI - SWE',
'A DEN S A FIN - KIE',
'A DEN S A FIN - SWE',
'A DEN S A GAS - KIE',
'A DEN S A GAS - SWE',
'A DEN S A HOL - KIE',
'A DEN S A HOL - SWE',
'A DEN S A KIE',
'A DEN S A KIE - SWE',
'A DEN S A LON - KIE',
'A DEN S A LON - SWE',
'A DEN S A LVN - KIE',
'A DEN S A LVN - SWE',
'A DEN S A LVP - KIE',
'A DEN S A LVP - SWE',
'A DEN S A MUN - KIE',
'A DEN S A NAF - KIE',
'A DEN S A NAF - SWE',
'A DEN S A NWY - KIE',
'A DEN S A NWY - SWE',
'A DEN S A PIC - KIE',
'A DEN S A PIC - SWE',
'A DEN S A POR - KIE',
'A DEN S A POR - SWE',
'A DEN S A PRU - KIE',
'A DEN S A PRU - SWE',
'A DEN S A RUH - KIE',
'A DEN S A SPA - KIE',
'A DEN S A SPA - SWE',
'A DEN S A STP - KIE',
'A DEN S A STP - SWE',
'A DEN S A SWE',
'A DEN S A SWE - KIE',
'A DEN S A WAL - KIE',
'A DEN S A WAL - SWE',
'A DEN S A YOR - KIE',
'A DEN S A YOR - SWE',
'A DEN S F BAL - KIE',
'A DEN S F BAL - SWE',
'A DEN S F BER - KIE',
'A DEN S F BOT - SWE',
'A DEN S F FIN - SWE',
'A DEN S F HEL - KIE',
'A DEN S F HOL - KIE',
'A DEN S F KIE',
'A DEN S F NWY - SWE',
'A DEN S F SKA - SWE',
'A DEN S F SWE',
'A EDI - BEL VIA',
'A EDI - BRE VIA',
'A EDI - CLY',
'A EDI - CLY VIA',
'A EDI - DEN VIA',
'A EDI - GAS VIA',
'A EDI - HOL VIA',
'A EDI - KIE VIA',
'A EDI - LON VIA',
'A EDI - LVP',
'A EDI - LVP VIA',
'A EDI - NAF VIA',
'A EDI - NWY VIA',
'A EDI - PIC VIA',
'A EDI - POR VIA',
'A EDI - SPA VIA',
'A EDI - STP VIA',
'A EDI - SWE VIA',
'A EDI - TUN VIA',
'A EDI - WAL VIA',
'A EDI - YOR',
'A EDI - YOR VIA',
'A EDI B',
'A EDI D',
'A EDI H',
'A EDI R CLY',
'A EDI R LVP',
'A EDI R YOR',
'A EDI S A BEL - CLY',
'A EDI S A BEL - LVP',
'A EDI S A BEL - YOR',
'A EDI S A BRE - CLY',
'A EDI S A BRE - LVP',
'A EDI S A BRE - YOR',
'A EDI S A CLY',
'A EDI S A CLY - LVP',
'A EDI S A CLY - YOR',
'A EDI S A DEN - CLY',
'A EDI S A DEN - LVP',
'A EDI S A DEN - YOR',
'A EDI S A GAS - CLY',
'A EDI S A GAS - LVP',
'A EDI S A GAS - YOR',
'A EDI S A HOL - CLY',
'A EDI S A HOL - LVP',
'A EDI S A HOL - YOR',
'A EDI S A KIE - CLY',
'A EDI S A KIE - LVP',
'A EDI S A KIE - YOR',
'A EDI S A LON - CLY',
'A EDI S A LON - LVP',
'A EDI S A LON - YOR',
'A EDI S A LVP',
'A EDI S A LVP - CLY',
'A EDI S A LVP - YOR',
'A EDI S A MAR - CLY',
'A EDI S A MAR - LVP',
'A EDI S A NAF - CLY',
'A EDI S A NAF - LVP',
'A EDI S A NAF - YOR',
'A EDI S A NAP - CLY',
'A EDI S A NAP - LVP',
'A EDI S A NWY - CLY',
'A EDI S A NWY - LVP',
'A EDI S A NWY - YOR',
'A EDI S A PIC - CLY',
'A EDI S A PIC - LVP',
'A EDI S A PIC - YOR',
'A EDI S A PIE - CLY',
'A EDI S A PIE - LVP',
'A EDI S A POR - CLY',
'A EDI S A POR - LVP',
'A EDI S A POR - YOR',
'A EDI S A ROM - CLY',
'A EDI S A ROM - LVP',
'A EDI S A SPA - CLY',
'A EDI S A SPA - LVP',
'A EDI S A SPA - YOR',
'A EDI S A STP - CLY',
'A EDI S A STP - LVP',
'A EDI S A STP - YOR',
'A EDI S A SWE - CLY',
'A EDI S A SWE - LVP',
'A EDI S A SWE - YOR',
'A EDI S A TUN - CLY',
'A EDI S A TUN - LVP',
'A EDI S A TUN - YOR',
'A EDI S A TUS - CLY',
'A EDI S A TUS - LVP',
'A EDI S A WAL - CLY',
'A EDI S A WAL - LVP',
'A EDI S A WAL - YOR',
'A EDI S A YOR',
'A EDI S A YOR - CLY',
'A EDI S A YOR - LVP',
'A EDI S F CLY',
'A EDI S F CLY - LVP',
'A EDI S F IRI - LVP',
'A EDI S F LON - YOR',
'A EDI S F LVP',
'A EDI S F LVP - CLY',
'A EDI S F NAO - CLY',
'A EDI S F NAO - LVP',
'A EDI S F NTH - YOR',
'A EDI S F NWG - CLY',
'A EDI S F WAL - LVP',
'A EDI S F YOR',
'A FIN - BER VIA',
'A FIN - DEN VIA',
'A FIN - KIE VIA',
'A FIN - LVN VIA',
'A FIN - NWY',
'A FIN - PRU VIA',
'A FIN - STP',
'A FIN - STP VIA',
'A FIN - SWE',
'A FIN - SWE VIA',
'A FIN D',
'A FIN H',
'A FIN R NWY',
'A FIN R STP',
'A FIN R SWE',
'A FIN S A BEL - NWY',
'A FIN S A BEL - STP',
'A FIN S A BEL - SWE',
'A FIN S A BER - STP',
'A FIN S A BER - SWE',
'A FIN S A BRE - NWY',
'A FIN S A BRE - STP',
'A FIN S A BRE - SWE',
'A FIN S A CLY - NWY',
'A FIN S A CLY - STP',
'A FIN S A CLY - SWE',
'A FIN S A DEN - NWY',
'A FIN S A DEN - STP',
'A FIN S A DEN - SWE',
'A FIN S A EDI - NWY',
'A FIN S A EDI - STP',
'A FIN S A EDI - SWE',
'A FIN S A GAS - NWY',
'A FIN S A GAS - STP',
'A FIN S A GAS - SWE',
'A FIN S A HOL - NWY',
'A FIN S A HOL - STP',
'A FIN S A HOL - SWE',
'A FIN S A KIE - NWY',
'A FIN S A KIE - STP',
'A FIN S A KIE - SWE',
'A FIN S A LON - NWY',
'A FIN S A LON - STP',
'A FIN S A LON - SWE',
'A FIN S A LVN - STP',
'A FIN S A LVN - SWE',
'A FIN S A LVP - NWY',
'A FIN S A LVP - STP',
'A FIN S A LVP - SWE',
'A FIN S A MOS - STP',
'A FIN S A NAF - NWY',
'A FIN S A NAF - STP',
'A FIN S A NAF - SWE',
'A FIN S A NWY',
'A FIN S A NWY - STP',
'A FIN S A NWY - SWE',
'A FIN S A PIC - NWY',
'A FIN S A PIC - STP',
'A FIN S A PIC - SWE',
'A FIN S A POR - NWY',
'A FIN S A POR - STP',
'A FIN S A POR - SWE',
'A FIN S A PRU - STP',
'A FIN S A PRU - SWE',
'A FIN S A SPA - NWY',
'A FIN S A SPA - STP',
'A FIN S A SPA - SWE',
'A FIN S A STP',
'A FIN S A STP - NWY',
'A FIN S A STP - SWE',
'A FIN S A SWE',
'A FIN S A SWE - NWY',
'A FIN S A SWE - STP',
'A FIN S A TUN - NWY',
'A FIN S A WAL - NWY',
'A FIN S A WAL - STP',
'A FIN S A WAL - SWE',
'A FIN S A YOR - NWY',
'A FIN S A YOR - STP',
'A FIN S A YOR - SWE',
'A FIN S F BAL - SWE',
'A FIN S F BAR - NWY',
'A FIN S F BAR - STP',
'A FIN S F BOT - STP',
'A FIN S F BOT - SWE',
'A FIN S F DEN - SWE',
'A FIN S F LVN - STP',
'A FIN S F NTH - NWY',
'A FIN S F NWG - NWY',
'A FIN S F NWY',
'A FIN S F NWY - STP',
'A FIN S F NWY - SWE',
'A FIN S F SKA - NWY',
'A FIN S F SKA - SWE',
'A FIN S F STP/NC',
'A FIN S F STP/NC - NWY',
'A FIN S F STP/SC',
'A FIN S F SWE',
'A FIN S F SWE - NWY',
'A GAL - BOH',
'A GAL - BUD',
'A GAL - RUM',
'A GAL - SIL',
'A GAL - UKR',
'A GAL - VIE',
'A GAL - WAR',
'A GAL D',
'A GAL H',
'A GAL R BOH',
'A GAL R BUD',
'A GAL R RUM',
'A GAL R SIL',
'A GAL R UKR',
'A GAL R VIE',
'A GAL R WAR',
'A GAL S A ANK - RUM',
'A GAL S A ARM - RUM',
'A GAL S A BER - SIL',
'A GAL S A BOH',
'A GAL S A BOH - SIL',
'A GAL S A BOH - VIE',
'A GAL S A BUD',
'A GAL S A BUD - RUM',
'A GAL S A BUD - VIE',
'A GAL S A BUL - RUM',
'A GAL S A CON - RUM',
'A GAL S A LVN - WAR',
'A GAL S A MOS - UKR',
'A GAL S A MOS - WAR',
'A GAL S A MUN - BOH',
'A GAL S A MUN - SIL',
'A GAL S A PRU - SIL',
'A GAL S A PRU - WAR',
'A GAL S A RUM',
'A GAL S A RUM - BUD',
'A GAL S A RUM - UKR',
'A GAL S A SER - BUD',
'A GAL S A SER - RUM',
'A GAL S A SEV - RUM',
'A GAL S A SEV - UKR',
'A GAL S A SIL',
'A GAL S A SIL - BOH',
'A GAL S A SIL - WAR',
'A GAL S A TRI - BUD',
'A GAL S A TRI - VIE',
'A GAL S A TYR - BOH',
'A GAL S A TYR - VIE',
'A GAL S A UKR',
'A GAL S A UKR - RUM',
'A GAL S A UKR - WAR',
'A GAL S A VIE',
'A GAL S A VIE - BOH',
'A GAL S A VIE - BUD',
'A GAL S A WAR',
'A GAL S A WAR - SIL',
'A GAL S A WAR - UKR',
'A GAL S F BLA - RUM',
'A GAL S F BUL/EC - RUM',
'A GAL S F RUM',
'A GAL S F SEV - RUM',
'A GAS - ALB VIA',
'A GAS - APU VIA',
'A GAS - BEL VIA',
'A GAS - BRE',
'A GAS - BRE VIA',
'A GAS - BUR',
'A GAS - CLY VIA',
'A GAS - DEN VIA',
'A GAS - EDI VIA',
'A GAS - GRE VIA',
'A GAS - HOL VIA',
'A GAS - KIE VIA',
'A GAS - LON VIA',
'A GAS - LVP VIA',
'A GAS - MAR',
'A GAS - MAR VIA',
'A GAS - NAF VIA',
'A GAS - NAP VIA',
'A GAS - NWY VIA',
'A GAS - PAR',
'A GAS - PIC VIA',
'A GAS - PIE VIA',
'A GAS - POR VIA',
'A GAS - ROM VIA',
'A GAS - SPA',
'A GAS - SPA VIA',
'A GAS - STP VIA',
'A GAS - SWE VIA',
'A GAS - TUN VIA',
'A GAS - TUS VIA',
'A GAS - WAL VIA',
'A GAS - YOR VIA',
'A GAS D',
'A GAS H',
'A GAS R BRE',
'A GAS R BUR',
'A GAS R MAR',
'A GAS R PAR',
'A GAS R SPA',
'A GAS S A ALB - BRE',
'A GAS S A ALB - MAR',
'A GAS S A ALB - SPA',
'A GAS S A APU - BRE',
'A GAS S A APU - MAR',
'A GAS S A APU - SPA',
'A GAS S A BEL - BRE',
'A GAS S A BEL - BUR',
'A GAS S A BEL - MAR',
'A GAS S A BEL - SPA',
'A GAS S A BRE',
'A GAS S A BRE - MAR',
'A GAS S A BRE - PAR',
'A GAS S A BRE - SPA',
'A GAS S A BUL - MAR',
'A GAS S A BUL - SPA',
'A GAS S A BUR',
'A GAS S A BUR - MAR',
'A GAS S A BUR - PAR',
'A GAS S A CLY - BRE',
'A GAS S A CLY - MAR',
'A GAS S A CLY - SPA',
'A GAS S A CON - MAR',
'A GAS S A CON - SPA',
'A GAS S A DEN - BRE',
'A GAS S A DEN - SPA',
'A GAS S A EDI - BRE',
'A GAS S A EDI - SPA',
'A GAS S A GRE - BRE',
'A GAS S A GRE - MAR',
'A GAS S A GRE - SPA',
'A GAS S A HOL - BRE',
'A GAS S A HOL - SPA',
'A GAS S A KIE - BRE',
'A GAS S A KIE - SPA',
'A GAS S A LON - BRE',
'A GAS S A LON - MAR',
'A GAS S A LON - SPA',
'A GAS S A LVP - BRE',
'A GAS S A LVP - MAR',
'A GAS S A LVP - SPA',
'A GAS S A MAR',
'A GAS S A MAR - BRE',
'A GAS S A MAR - BUR',
'A GAS S A MAR - SPA',
'A GAS S A MUN - BUR',
'A GAS S A NAF - BRE',
'A GAS S A NAF - MAR',
'A GAS S A NAF - SPA',
'A GAS S A NAP - BRE',
'A GAS S A NAP - MAR',
'A GAS S A NAP - SPA',
'A GAS S A NWY - BRE',
'A GAS S A NWY - SPA',
'A GAS S A PAR',
'A GAS S A PAR - BRE',
'A GAS S A PAR - BUR',
'A GAS S A PIC - BRE',
'A GAS S A PIC - BUR',
'A GAS S A PIC - MAR',
'A GAS S A PIC - PAR',
'A GAS S A PIC - SPA',
'A GAS S A PIE - BRE',
'A GAS S A PIE - MAR',
'A GAS S A PIE - SPA',
'A GAS S A POR - BRE',
'A GAS S A POR - MAR',
'A GAS S A POR - SPA',
'A GAS S A ROM - BRE',
'A GAS S A ROM - MAR',
'A GAS S A ROM - SPA',
'A GAS S A RUH - BUR',
'A GAS S A SMY - MAR',
'A GAS S A SMY - SPA',
'A GAS S A SPA',
'A GAS S A SPA - BRE',
'A GAS S A SPA - MAR',
'A GAS S A STP - BRE',
'A GAS S A STP - SPA',
'A GAS S A SWE - BRE',
'A GAS S A SWE - SPA',
'A GAS S A SYR - MAR',
'A GAS S A SYR - SPA',
'A GAS S A TRI - MAR',
'A GAS S A TRI - SPA',
'A GAS S A TUN - BRE',
'A GAS S A TUN - MAR',
'A GAS S A TUN - SPA',
'A GAS S A TUS - BRE',
'A GAS S A TUS - MAR',
'A GAS S A TUS - SPA',
'A GAS S A VEN - MAR',
'A GAS S A VEN - SPA',
'A GAS S A WAL - BRE',
'A GAS S A WAL - MAR',
'A GAS S A WAL - SPA',
'A GAS S A YOR - BRE',
'A GAS S A YOR - SPA',
'A GAS S F BRE',
'A GAS S F ENG - BRE',
'A GAS S F LYO - MAR',
'A GAS S F LYO - SPA',
'A GAS S F MAO - BRE',
'A GAS S F MAO - SPA',
'A GAS S F MAR',
'A GAS S F MAR - SPA',
'A GAS S F PIC - BRE',
'A GAS S F PIE - MAR',
'A GAS S F POR - SPA',
'A GAS S F SPA/NC',
'A GAS S F SPA/SC',
'A GAS S F SPA/SC - MAR',
'A GAS S F WES - SPA',
'A GRE - ALB',
'A GRE - ALB VIA',
'A GRE - APU VIA',
'A GRE - BRE VIA',
'A GRE - BUL',
'A GRE - BUL VIA',
'A GRE - CON VIA',
'A GRE - GAS VIA',
'A GRE - MAR VIA',
'A GRE - NAF VIA',
'A GRE - NAP VIA',
'A GRE - PIE VIA',
'A GRE - POR VIA',
'A GRE - ROM VIA',
'A GRE - SER',
'A GRE - SMY VIA',
'A GRE - SPA VIA',
'A GRE - SYR VIA',
'A GRE - TRI VIA',
'A GRE - TUN VIA',
'A GRE - TUS VIA',
'A GRE - VEN VIA',
'A GRE D',
'A GRE H',
'A GRE R ALB',
'A GRE R BUL',
'A GRE R SER',
'A GRE S A ALB',
'A GRE S A ALB - BUL',
'A GRE S A ALB - SER',
'A GRE S A ANK - BUL',
'A GRE S A APU - ALB',
'A GRE S A APU - BUL',
'A GRE S A ARM - BUL',
'A GRE S A BRE - ALB',
'A GRE S A BUD - SER',
'A GRE S A BUL',
'A GRE S A BUL - ALB',
'A GRE S A BUL - SER',
'A GRE S A CON - ALB',
'A GRE S A CON - BUL',
'A GRE S A GAS - ALB',
'A GRE S A MAR - ALB',
'A GRE S A MAR - BUL',
'A GRE S A NAF - ALB',
'A GRE S A NAF - BUL',
'A GRE S A NAP - ALB',
'A GRE S A NAP - BUL',
'A GRE S A PIE - ALB',
'A GRE S A PIE - BUL',
'A GRE S A POR - ALB',
'A GRE S A ROM - ALB',
'A GRE S A ROM - BUL',
'A GRE S A RUM - BUL',
'A GRE S A RUM - SER',
'A GRE S A SER',
'A GRE S A SER - ALB',
'A GRE S A SER - BUL',
'A GRE S A SEV - BUL',
'A GRE S A SMY - ALB',
'A GRE S A SMY - BUL',
'A GRE S A SPA - ALB',
'A GRE S A SPA - BUL',
'A GRE S A SYR - ALB',
'A GRE S A SYR - BUL',
'A GRE S A TRI - ALB',
'A GRE S A TRI - BUL',
'A GRE S A TRI - SER',
'A GRE S A TUN - ALB',
'A GRE S A TUN - BUL',
'A GRE S A TUS - ALB',
'A GRE S A TUS - BUL',
'A GRE S A VEN - ALB',
'A GRE S A VEN - BUL',
'A GRE S F ADR - ALB',
'A GRE S F AEG - BUL',
'A GRE S F ALB',
'A GRE S F BLA - BUL',
'A GRE S F BUL/EC',
'A GRE S F BUL/SC',
'A GRE S F CON - BUL',
'A GRE S F ION - ALB',
'A GRE S F RUM - BUL',
'A GRE S F TRI - ALB',
'A HOL - BEL',
'A HOL - BEL VIA',
'A HOL - BRE VIA',
'A HOL - CLY VIA',
'A HOL - DEN VIA',
'A HOL - EDI VIA',
'A HOL - GAS VIA',
'A HOL - KIE',
'A HOL - KIE VIA',
'A HOL - LON VIA',
'A HOL - LVP VIA',
'A HOL - NAF VIA',
'A HOL - NWY VIA',
'A HOL - PIC VIA',
'A HOL - POR VIA',
'A HOL - RUH',
'A HOL - SPA VIA',
'A HOL - STP VIA',
'A HOL - SWE VIA',
'A HOL - TUN VIA',
'A HOL - WAL VIA',
'A HOL - YOR VIA',
'A HOL D',
'A HOL H',
'A HOL R BEL',
'A HOL R KIE',
'A HOL R RUH',
'A HOL S A BEL',
'A HOL S A BEL - KIE',
'A HOL S A BEL - RUH',
'A HOL S A BER - KIE',
'A HOL S A BRE - BEL',
'A HOL S A BRE - KIE',
'A HOL S A BUR - BEL',
'A HOL S A BUR - RUH',
'A HOL S A CLY - BEL',
'A HOL S A CLY - KIE',
'A HOL S A DEN - BEL',
'A HOL S A DEN - KIE',
'A HOL S A EDI - BEL',
'A HOL S A EDI - KIE',
'A HOL S A FIN - KIE',
'A HOL S A GAS - BEL',
'A HOL S A GAS - KIE',
'A HOL S A KIE',
'A HOL S A KIE - BEL',
'A HOL S A KIE - RUH',
'A HOL S A LON - BEL',
'A HOL S A LON - KIE',
'A HOL S A LVN - KIE',
'A HOL S A LVP - BEL',
'A HOL S A LVP - KIE',
'A HOL S A MAR - BEL',
'A HOL S A MUN - KIE',
'A HOL S A MUN - RUH',
'A HOL S A NAF - BEL',
'A HOL S A NAF - KIE',
'A HOL S A NAP - BEL',
'A HOL S A NWY - BEL',
'A HOL S A NWY - KIE',
'A HOL S A PIC - BEL',
'A HOL S A PIC - KIE',
'A HOL S A PIE - BEL',
'A HOL S A POR - BEL',
'A HOL S A POR - KIE',
'A HOL S A PRU - KIE',
'A HOL S A ROM - BEL',
'A HOL S A RUH',
'A HOL S A RUH - BEL',
'A HOL S A RUH - KIE',
'A HOL S A SPA - BEL',
'A HOL S A SPA - KIE',
'A HOL S A STP - BEL',
'A HOL S A STP - KIE',
'A HOL S A SWE - BEL',
'A HOL S A SWE - KIE',
'A HOL S A TUN - BEL',
'A HOL S A TUS - BEL',
'A HOL S A WAL - BEL',
'A HOL S A WAL - KIE',
'A HOL S A YOR - BEL',
'A HOL S A YOR - KIE',
'A HOL S F BAL - KIE',
'A HOL S F BEL',
'A HOL S F BER - KIE',
'A HOL S F DEN - KIE',
'A HOL S F ENG - BEL',
'A HOL S F HEL - KIE',
'A HOL S F KIE',
'A HOL S F NTH - BEL',
'A HOL S F PIC - BEL',
'A KIE - BEL VIA',
'A KIE - BER',
'A KIE - BER VIA',
'A KIE - BRE VIA',
'A KIE - CLY VIA',
'A KIE - DEN',
'A KIE - DEN VIA',
'A KIE - EDI VIA',
'A KIE - FIN VIA',
'A KIE - GAS VIA',
'A KIE - HOL',
'A KIE - HOL VIA',
'A KIE - LON VIA',
'A KIE - LVN VIA',
'A KIE - LVP VIA',
'A KIE - MUN',
'A KIE - NAF VIA',
'A KIE - NWY VIA',
'A KIE - PIC VIA',
'A KIE - POR VIA',
'A KIE - PRU VIA',
'A KIE - RUH',
'A KIE - SPA VIA',
'A KIE - STP VIA',
'A KIE - SWE VIA',
'A KIE - WAL VIA',
'A KIE - YOR VIA',
'A KIE B',
'A KIE D',
'A KIE H',
'A KIE R BER',
'A KIE R DEN',
'A KIE R HOL',
'A KIE R MUN',
'A KIE R RUH',
'A KIE S A BEL - DEN',
'A KIE S A BEL - HOL',
'A KIE S A BEL - RUH',
'A KIE S A BER',
'A KIE S A BER - DEN',
'A KIE S A BER - MUN',
'A KIE S A BOH - MUN',
'A KIE S A BRE - DEN',
'A KIE S A BRE - HOL',
'A KIE S A BUR - MUN',
'A KIE S A BUR - RUH',
'A KIE S A CLY - DEN',
'A KIE S A CLY - HOL',
'A KIE S A DEN',
'A KIE S A DEN - BER',
'A KIE S A DEN - HOL',
'A KIE S A EDI - DEN',
'A KIE S A EDI - HOL',
'A KIE S A FIN - BER',
'A KIE S A FIN - DEN',
'A KIE S A GAS - DEN',
'A KIE S A GAS - HOL',
'A KIE S A HOL',
'A KIE S A HOL - DEN',
'A KIE S A HOL - RUH',
'A KIE S A LON - DEN',
'A KIE S A LON - HOL',
'A KIE S A LVN - BER',
'A KIE S A LVN - DEN',
'A KIE S A LVP - DEN',
'A KIE S A LVP - HOL',
'A KIE S A MUN',
'A KIE S A MUN - BER',
'A KIE S A MUN - RUH',
'A KIE S A NAF - DEN',
'A KIE S A NAF - HOL',
'A KIE S A NWY - DEN',
'A KIE S A NWY - HOL',
'A KIE S A PIC - DEN',
'A KIE S A PIC - HOL',
'A KIE S A POR - DEN',
'A KIE S A POR - HOL',
'A KIE S A PRU - BER',
'A KIE S A PRU - DEN',
'A KIE S A RUH',
'A KIE S A RUH - HOL',
'A KIE S A RUH - MUN',
'A KIE S A SIL - BER',
'A KIE S A SIL - MUN',
'A KIE S A SPA - DEN',
'A KIE S A SPA - HOL',
'A KIE S A STP - BER',
'A KIE S A STP - DEN',
'A KIE S A STP - HOL',
'A KIE S A SWE - BER',
'A KIE S A SWE - DEN',
'A KIE S A SWE - HOL',
'A KIE S A TUN - DEN',
'A KIE S A TUN - HOL',
'A KIE S A TYR - MUN',
'A KIE S A WAL - DEN',
'A KIE S A WAL - HOL',
'A KIE S A YOR - DEN',
'A KIE S A YOR - HOL',
'A KIE S F BAL - BER',
'A KIE S F BAL - DEN',
'A KIE S F BEL - HOL',
'A KIE S F BER',
'A KIE S F DEN',
'A KIE S F HEL - DEN',
'A KIE S F HEL - HOL',
'A KIE S F HOL',
'A KIE S F NTH - DEN',
'A KIE S F NTH - HOL',
'A KIE S F PRU - BER',
'A KIE S F SKA - DEN',
'A KIE S F SWE - DEN',
'A LON - BEL VIA',
'A LON - BRE VIA',
'A LON - CLY VIA',
'A LON - DEN VIA',
'A LON - EDI VIA',
'A LON - GAS VIA',
'A LON - HOL VIA',
'A LON - KIE VIA',
'A LON - LVP VIA',
'A LON - MAR VIA',
'A LON - NAF VIA',
'A LON - NAP VIA',
'A LON - NWY VIA',
'A LON - PIC VIA',
'A LON - PIE VIA',
'A LON - POR VIA',
'A LON - ROM VIA',
'A LON - SPA VIA',
'A LON - STP VIA',
'A LON - SWE VIA',
'A LON - TUN VIA',
'A LON - TUS VIA',
'A LON - WAL',
'A LON - WAL VIA',
'A LON - YOR',
'A LON - YOR VIA',
'A LON B',
'A LON D',
'A LON H',
'A LON R WAL',
'A LON R YOR',
'A LON S A BEL - WAL',
'A LON S A BEL - YOR',
'A LON S A BRE - WAL',
'A LON S A BRE - YOR',
'A LON S A CLY - WAL',
'A LON S A CLY - YOR',
'A LON S A DEN - WAL',
'A LON S A DEN - YOR',
'A LON S A EDI - WAL',
'A LON S A EDI - YOR',
'A LON S A GAS - WAL',
'A LON S A GAS - YOR',
'A LON S A HOL - WAL',
'A LON S A HOL - YOR',
'A LON S A KIE - WAL',
'A LON S A KIE - YOR',
'A LON S A LVP - WAL',
'A LON S A LVP - YOR',
'A LON S A MAR - WAL',
'A LON S A NAF - WAL',
'A LON S A NAF - YOR',
'A LON S A NAP - WAL',
'A LON S A NWY - WAL',
'A LON S A NWY - YOR',
'A LON S A PIC - WAL',
'A LON S A PIC - YOR',
'A LON S A PIE - WAL',
'A LON S A POR - WAL',
'A LON S A POR - YOR',
'A LON S A ROM - WAL',
'A LON S A SPA - WAL',
'A LON S A SPA - YOR',
'A LON S A STP - WAL',
'A LON S A STP - YOR',
'A LON S A SWE - WAL',
'A LON S A SWE - YOR',
'A LON S A TUN - WAL',
'A LON S A TUN - YOR',
'A LON S A TUS - WAL',
'A LON S A WAL',
'A LON S A WAL - YOR',
'A LON S A YOR',
'A LON S A YOR - WAL',
'A LON S F EDI - YOR',
'A LON S F ENG - WAL',
'A LON S F IRI - WAL',
'A LON S F LVP - WAL',
'A LON S F NTH - YOR',
'A LON S F WAL',
'A LON S F YOR',
'A LVN - BER VIA',
'A LVN - DEN VIA',
'A LVN - FIN VIA',
'A LVN - KIE VIA',
'A LVN - MOS',
'A LVN - PRU',
'A LVN - PRU VIA',
'A LVN - STP',
'A LVN - STP VIA',
'A LVN - SWE VIA',
'A LVN - WAR',
'A LVN D',
'A LVN H',
'A LVN R MOS',
'A LVN R PRU',
'A LVN R STP',
'A LVN R WAR',
'A LVN S A BEL - STP',
'A LVN S A BER - PRU',
'A LVN S A BER - STP',
'A LVN S A BRE - STP',
'A LVN S A CLY - STP',
'A LVN S A DEN - PRU',
'A LVN S A DEN - STP',
'A LVN S A EDI - STP',
'A LVN S A FIN - PRU',
'A LVN S A FIN - STP',
'A LVN S A GAL - WAR',
'A LVN S A GAS - STP',
'A LVN S A HOL - STP',
'A LVN S A KIE - PRU',
'A LVN S A KIE - STP',
'A LVN S A LON - STP',
'A LVN S A LVP - STP',
'A LVN S A MOS',
'A LVN S A MOS - STP',
'A LVN S A MOS - WAR',
'A LVN S A NAF - STP',
'A LVN S A NWY - STP',
'A LVN S A PIC - STP',
'A LVN S A POR - STP',
'A LVN S A PRU',
'A LVN S A PRU - STP',
'A LVN S A PRU - WAR',
'A LVN S A SEV - MOS',
'A LVN S A SIL - PRU',
'A LVN S A SIL - WAR',
'A LVN S A SPA - STP',
'A LVN S A STP',
'A LVN S A STP - MOS',
'A LVN S A STP - PRU',
'A LVN S A SWE - PRU',
'A LVN S A SWE - STP',
'A LVN S A UKR - MOS',
'A LVN S A UKR - WAR',
'A LVN S A WAL - STP',
'A LVN S A WAR',
'A LVN S A WAR - MOS',
'A LVN S A WAR - PRU',
'A LVN S A YOR - STP',
'A LVN S F BAL - PRU',
'A LVN S F BAR - STP',
'A LVN S F BER - PRU',
'A LVN S F BOT - STP',
'A LVN S F FIN - STP',
'A LVN S F NWY - STP',
'A LVN S F PRU',
'A LVN S F STP/NC',
'A LVN S F STP/SC',
'A LVP - BEL VIA',
'A LVP - BRE VIA',
'A LVP - CLY',
'A LVP - CLY VIA',
'A LVP - DEN VIA',
'A LVP - EDI',
'A LVP - EDI VIA',
'A LVP - GAS VIA',
'A LVP - HOL VIA',
'A LVP - KIE VIA',
'A LVP - LON VIA',
'A LVP - MAR VIA',
'A LVP - NAF VIA',
'A LVP - NAP VIA',
'A LVP - NWY VIA',
'A LVP - PIC VIA',
'A LVP - PIE VIA',
'A LVP - POR VIA',
'A LVP - ROM VIA',
'A LVP - SPA VIA',
'A LVP - STP VIA',
'A LVP - SWE VIA',
'A LVP - TUN VIA',
'A LVP - TUS VIA',
'A LVP - WAL',
'A LVP - WAL VIA',
'A LVP - YOR',
'A LVP - YOR VIA',
'A LVP B',
'A LVP D',
'A LVP H',
'A LVP R CLY',
'A LVP R EDI',
'A LVP R WAL',
'A LVP R YOR',
'A LVP S A BEL - CLY',
'A LVP S A BEL - EDI',
'A LVP S A BEL - WAL',
'A LVP S A BEL - YOR',
'A LVP S A BRE - CLY',
'A LVP S A BRE - EDI',
'A LVP S A BRE - WAL',
'A LVP S A BRE - YOR',
'A LVP S A CLY',
'A LVP S A CLY - EDI',
'A LVP S A CLY - WAL',
'A LVP S A CLY - YOR',
'A LVP S A DEN - CLY',
'A LVP S A DEN - EDI',
'A LVP S A DEN - WAL',
'A LVP S A DEN - YOR',
'A LVP S A EDI',
'A LVP S A EDI - CLY',
'A LVP S A EDI - WAL',
'A LVP S A EDI - YOR',
'A LVP S A GAS - CLY',
'A LVP S A GAS - EDI',
'A LVP S A GAS - WAL',
'A LVP S A GAS - YOR',
'A LVP S A HOL - CLY',
'A LVP S A HOL - EDI',
'A LVP S A HOL - WAL',
'A LVP S A HOL - YOR',
'A LVP S A KIE - CLY',
'A LVP S A KIE - EDI',
'A LVP S A KIE - WAL',
'A LVP S A KIE - YOR',
'A LVP S A LON - CLY',
'A LVP S A LON - EDI',
'A LVP S A LON - WAL',
'A LVP S A LON - YOR',
'A LVP S A MAR - CLY',
'A LVP S A MAR - WAL',
'A LVP S A NAF - CLY',
'A LVP S A NAF - EDI',
'A LVP S A NAF - WAL',
'A LVP S A NAF - YOR',
'A LVP S A NAP - CLY',
'A LVP S A NAP - WAL',
'A LVP S A NWY - CLY',
'A LVP S A NWY - EDI',
'A LVP S A NWY - WAL',
'A LVP S A NWY - YOR',
'A LVP S A PIC - CLY',
'A LVP S A PIC - EDI',
'A LVP S A PIC - WAL',
'A LVP S A PIC - YOR',
'A LVP S A PIE - CLY',
'A LVP S A PIE - WAL',
'A LVP S A POR - CLY',
'A LVP S A POR - EDI',
'A LVP S A POR - WAL',
'A LVP S A POR - YOR',
'A LVP S A ROM - CLY',
'A LVP S A ROM - WAL',
'A LVP S A SPA - CLY',
'A LVP S A SPA - EDI',
'A LVP S A SPA - WAL',
'A LVP S A SPA - YOR',
'A LVP S A STP - CLY',
'A LVP S A STP - EDI',
'A LVP S A STP - WAL',
'A LVP S A STP - YOR',
'A LVP S A SWE - CLY',
'A LVP S A SWE - EDI',
'A LVP S A SWE - WAL',
'A LVP S A SWE - YOR',
'A LVP S A TUN - CLY',
'A LVP S A TUN - EDI',
'A LVP S A TUN - WAL',
'A LVP S A TUN - YOR',
'A LVP S A TUS - CLY',
'A LVP S A TUS - WAL',
'A LVP S A WAL',
'A LVP S A WAL - CLY',
'A LVP S A WAL - EDI',
'A LVP S A WAL - YOR',
'A LVP S A YOR',
'A LVP S A YOR - CLY',
'A LVP S A YOR - EDI',
'A LVP S A YOR - WAL',
'A LVP S F CLY',
'A LVP S F CLY - EDI',
'A LVP S F EDI',
'A LVP S F EDI - CLY',
'A LVP S F EDI - YOR',
'A LVP S F ENG - WAL',
'A LVP S F IRI - WAL',
'A LVP S F LON - WAL',
'A LVP S F LON - YOR',
'A LVP S F NAO - CLY',
'A LVP S F NTH - EDI',
'A LVP S F NTH - YOR',
'A LVP S F NWG - CLY',
'A LVP S F NWG - EDI',
'A LVP S F WAL',
'A LVP S F YOR',
'A LVP S F YOR - EDI',
'A MAR - ALB VIA',
'A MAR - APU VIA',
'A MAR - BEL VIA',
'A MAR - BRE VIA',
'A MAR - BUL VIA',
'A MAR - BUR',
'A MAR - CLY VIA',
'A MAR - CON VIA',
'A MAR - GAS',
'A MAR - GAS VIA',
'A MAR - GRE VIA',
'A MAR - LON VIA',
'A MAR - LVP VIA',
'A MAR - NAF VIA',
'A MAR - NAP VIA',
'A MAR - PIC VIA',
'A MAR - PIE',
'A MAR - PIE VIA',
'A MAR - POR VIA',
'A MAR - ROM VIA',
'A MAR - SMY VIA',
'A MAR - SPA',
'A MAR - SPA VIA',
'A MAR - SYR VIA',
'A MAR - TRI VIA',
'A MAR - TUN VIA',
'A MAR - TUS VIA',
'A MAR - VEN VIA',
'A MAR - WAL VIA',
'A MAR B',
'A MAR D',
'A MAR H',
'A MAR R BUR',
'A MAR R GAS',
'A MAR R PIE',
'A MAR R SPA',
'A MAR S A ALB - GAS',
'A MAR S A ALB - PIE',
'A MAR S A ALB - SPA',
'A MAR S A APU - GAS',
'A MAR S A APU - PIE',
'A MAR S A APU - SPA',
'A MAR S A BEL - BUR',
'A MAR S A BEL - GAS',
'A MAR S A BEL - PIE',
'A MAR S A BEL - SPA',
'A MAR S A BRE - GAS',
'A MAR S A BRE - PIE',
'A MAR S A BRE - SPA',
'A MAR S A BUL - PIE',
'A MAR S A BUL - SPA',
'A MAR S A BUR',
'A MAR S A BUR - GAS',
'A MAR S A CLY - GAS',
'A MAR S A CLY - PIE',
'A MAR S A CLY - SPA',
'A MAR S A CON - PIE',
'A MAR S A CON - SPA',
'A MAR S A DEN - GAS',
'A MAR S A DEN - SPA',
'A MAR S A EDI - GAS',
'A MAR S A EDI - SPA',
'A MAR S A GAS',
'A MAR S A GAS - BUR',
'A MAR S A GAS - PIE',
'A MAR S A GAS - SPA',
'A MAR S A GRE - GAS',
'A MAR S A GRE - PIE',
'A MAR S A GRE - SPA',
'A MAR S A HOL - GAS',
'A MAR S A HOL - SPA',
'A MAR S A KIE - GAS',
'A MAR S A KIE - SPA',
'A MAR S A LON - GAS',
'A MAR S A LON - PIE',
'A MAR S A LON - SPA',
'A MAR S A LVP - GAS',
'A MAR S A LVP - PIE',
'A MAR S A LVP - SPA',
'A MAR S A MUN - BUR',
'A MAR S A NAF - GAS',
'A MAR S A NAF - PIE',
'A MAR S A NAF - SPA',
'A MAR S A NAP - GAS',
'A MAR S A NAP - PIE',
'A MAR S A NAP - SPA',
'A MAR S A NWY - GAS',
'A MAR S A NWY - SPA',
'A MAR S A PAR - BUR',
'A MAR S A PAR - GAS',
'A MAR S A PIC - BUR',
'A MAR S A PIC - GAS',
'A MAR S A PIC - PIE',
'A MAR S A PIC - SPA',
'A MAR S A PIE',
'A MAR S A PIE - GAS',
'A MAR S A PIE - SPA',
'A MAR S A POR - GAS',
'A MAR S A POR - PIE',
'A MAR S A POR - SPA',
'A MAR S A ROM - GAS',
'A MAR S A ROM - PIE',
'A MAR S A ROM - SPA',
'A MAR S A RUH - BUR',
'A MAR S A SMY - PIE',
'A MAR S A SMY - SPA',
'A MAR S A SPA',
'A MAR S A SPA - GAS',
'A MAR S A SPA - PIE',
'A MAR S A STP - GAS',
'A MAR S A STP - SPA',
'A MAR S A SWE - GAS',
'A MAR S A SWE - SPA',
'A MAR S A SYR - PIE',
'A MAR S A SYR - SPA',
'A MAR S A TRI - PIE',
'A MAR S A TRI - SPA',
'A MAR S A TUN - GAS',
'A MAR S A TUN - PIE',
'A MAR S A TUN - SPA',
'A MAR S A TUS - GAS',
'A MAR S A TUS - PIE',
'A MAR S A TUS - SPA',
'A MAR S A TYR - PIE',
'A MAR S A VEN - PIE',
'A MAR S A VEN - SPA',
'A MAR S A WAL - GAS',
'A MAR S A WAL - PIE',
'A MAR S A WAL - SPA',
'A MAR S A YOR - GAS',
'A MAR S A YOR - SPA',
'A MAR S F BRE - GAS',
'A MAR S F GAS',
'A MAR S F GAS - SPA',
'A MAR S F LYO - PIE',
'A MAR S F LYO - SPA',
'A MAR S F MAO - GAS',
'A MAR S F MAO - SPA',
'A MAR S F PIE',
'A MAR S F POR - SPA',
'A MAR S F SPA/NC',
'A MAR S F SPA/NC - GAS',
'A MAR S F SPA/SC',
'A MAR S F TUS - PIE',
'A MAR S F WES - SPA',
'A MOS - LVN',
'A MOS - SEV',
'A MOS - STP',
'A MOS - UKR',
'A MOS - WAR',
'A MOS B',
'A MOS D',
'A MOS H',
'A MOS R LVN',
'A MOS R SEV',
'A MOS R STP',
'A MOS R UKR',
'A MOS R WAR',
'A MOS S A ANK - SEV',
'A MOS S A ARM - SEV',
'A MOS S A BEL - STP',
'A MOS S A BER - LVN',
'A MOS S A BER - STP',
'A MOS S A BRE - STP',
'A MOS S A BUL - SEV',
'A MOS S A CLY - STP',
'A MOS S A CON - SEV',
'A MOS S A DEN - LVN',
'A MOS S A DEN - STP',
'A MOS S A EDI - STP',
'A MOS S A FIN - LVN',
'A MOS S A FIN - STP',
'A MOS S A GAL - UKR',
'A MOS S A GAL - WAR',
'A MOS S A GAS - STP',
'A MOS S A HOL - STP',
'A MOS S A KIE - LVN',
'A MOS S A KIE - STP',
'A MOS S A LON - STP',
'A MOS S A LVN',
'A MOS S A LVN - STP',
'A MOS S A LVN - WAR',
'A MOS S A LVP - STP',
'A MOS S A NAF - STP',
'A MOS S A NWY - STP',
'A MOS S A PIC - STP',
'A MOS S A POR - STP',
'A MOS S A PRU - LVN',
'A MOS S A PRU - STP',
'A MOS S A PRU - WAR',
'A MOS S A RUM - SEV',
'A MOS S A RUM - UKR',
'A MOS S A SEV',
'A MOS S A SEV - UKR',
'A MOS S A SIL - WAR',
'A MOS S A SPA - STP',
'A MOS S A STP',
'A MOS S A STP - LVN',
'A MOS S A SWE - LVN',
'A MOS S A SWE - STP',
'A MOS S A UKR',
'A MOS S A UKR - SEV',
'A MOS S A UKR - WAR',
'A MOS S A WAL - STP',
'A MOS S A WAR',
'A MOS S A WAR - LVN',
'A MOS S A WAR - UKR',
'A MOS S A YOR - STP',
'A MOS S F ARM - SEV',
'A MOS S F BAL - LVN',
'A MOS S F BAR - STP',
'A MOS S F BLA - SEV',
'A MOS S F BOT - LVN',
'A MOS S F BOT - STP',
'A MOS S F FIN - STP',
'A MOS S F LVN',
'A MOS S F LVN - STP',
'A MOS S F NWY - STP',
'A MOS S F PRU - LVN',
'A MOS S F RUM - SEV',
'A MOS S F SEV',
'A MOS S F STP/NC',
'A MOS S F STP/SC',
'A MOS S F STP/SC - LVN',
'A MUN - BER',
'A MUN - BOH',
'A MUN - BUR',
'A MUN - KIE',
'A MUN - RUH',
'A MUN - SIL',
'A MUN - TYR',
'A MUN B',
'A MUN D',
'A MUN H',
'A MUN R BER',
'A MUN R BOH',
'A MUN R BUR',
'A MUN R KIE',
'A MUN R RUH',
'A MUN R SIL',
'A MUN R TYR',
'A MUN S A BEL - BUR',
'A MUN S A BEL - KIE',
'A MUN S A BEL - RUH',
'A MUN S A BER',
'A MUN S A BER - KIE',
'A MUN S A BER - SIL',
'A MUN S A BOH',
'A MUN S A BOH - SIL',
'A MUN S A BOH - TYR',
'A MUN S A BRE - KIE',
'A MUN S A BUR',
'A MUN S A BUR - RUH',
'A MUN S A CLY - KIE',
'A MUN S A DEN - BER',
'A MUN S A DEN - KIE',
'A MUN S A EDI - KIE',
'A MUN S A FIN - BER',
'A MUN S A FIN - KIE',
'A MUN S A GAL - BOH',
'A MUN S A GAL - SIL',
'A MUN S A GAS - BUR',
'A MUN S A GAS - KIE',
'A MUN S A HOL - KIE',
'A MUN S A HOL - RUH',
'A MUN S A KIE',
'A MUN S A KIE - BER',
'A MUN S A KIE - RUH',
'A MUN S A LON - KIE',
'A MUN S A LVN - BER',
'A MUN S A LVN - KIE',
'A MUN S A LVP - KIE',
'A MUN S A MAR - BUR',
'A MUN S A NAF - KIE',
'A MUN S A NWY - KIE',
'A MUN S A PAR - BUR',
'A MUN S A PIC - BUR',
'A MUN S A PIC - KIE',
'A MUN S A PIE - TYR',
'A MUN S A POR - KIE',
'A MUN S A PRU - BER',
'A MUN S A PRU - KIE',
'A MUN S A PRU - SIL',
'A MUN S A RUH',
'A MUN S A RUH - BUR',
'A MUN S A RUH - KIE',
'A MUN S A SIL',
'A MUN S A SIL - BER',
'A MUN S A SIL - BOH',
'A MUN S A SPA - KIE',
'A MUN S A STP - BER',
'A MUN S A STP - KIE',
'A MUN S A SWE - BER',
'A MUN S A SWE - KIE',
'A MUN S A TRI - TYR',
'A MUN S A TYR',
'A MUN S A TYR - BOH',
'A MUN S A VEN - TYR',
'A MUN S A VIE - BOH',
'A MUN S A VIE - TYR',
'A MUN S A WAL - KIE',
'A MUN S A WAR - SIL',
'A MUN S A YOR - KIE',
'A MUN S F BAL - BER',
'A MUN S F BAL - KIE',
'A MUN S F BER',
'A MUN S F BER - KIE',
'A MUN S F DEN - KIE',
'A MUN S F HEL - KIE',
'A MUN S F HOL - KIE',
'A MUN S F KIE',
'A MUN S F KIE - BER',
'A MUN S F PRU - BER',
'A NAF - ALB VIA',
'A NAF - APU VIA',
'A NAF - BEL VIA',
'A NAF - BRE VIA',
'A NAF - BUL VIA',
'A NAF - CLY VIA',
'A NAF - CON VIA',
'A NAF - DEN VIA',
'A NAF - EDI VIA',
'A NAF - GAS VIA',
'A NAF - GRE VIA',
'A NAF - HOL VIA',
'A NAF - KIE VIA',
'A NAF - LON VIA',
'A NAF - LVP VIA',
'A NAF - MAR VIA',
'A NAF - NAP VIA',
'A NAF - NWY VIA',
'A NAF - PIC VIA',
'A NAF - PIE VIA',
'A NAF - POR VIA',
'A NAF - ROM VIA',
'A NAF - SMY VIA',
'A NAF - SPA VIA',
'A NAF - STP VIA',
'A NAF - SWE VIA',
'A NAF - SYR VIA',
'A NAF - TRI VIA',
'A NAF - TUN',
'A NAF - TUN VIA',
'A NAF - TUS VIA',
'A NAF - VEN VIA',
'A NAF - WAL VIA',
'A NAF - YOR VIA',
'A NAF D',
'A NAF H',
'A NAF R TUN',
'A NAF S A ALB - TUN',
'A NAF S A APU - TUN',
'A NAF S A BEL - TUN',
'A NAF S A BRE - TUN',
'A NAF S A BUL - TUN',
'A NAF S A CLY - TUN',
'A NAF S A CON - TUN',
'A NAF S A DEN - TUN',
'A NAF S A EDI - TUN',
'A NAF S A GAS - TUN',
'A NAF S A GRE - TUN',
'A NAF S A HOL - TUN',
'A NAF S A LON - TUN',
'A NAF S A LVP - TUN',
'A NAF S A MAR - TUN',
'A NAF S A NAP - TUN',
'A NAF S A NWY - TUN',
'A NAF S A PIC - TUN',
'A NAF S A PIE - TUN',
'A NAF S A POR - TUN',
'A NAF S A ROM - TUN',
'A NAF S A SMY - TUN',
'A NAF S A SPA - TUN',
'A NAF S A SYR - TUN',
'A NAF S A TRI - TUN',
'A NAF S A TUN',
'A NAF S A TUS - TUN',
'A NAF S A VEN - TUN',
'A NAF S A WAL - TUN',
'A NAF S A YOR - TUN',
'A NAF S F ION - TUN',
'A NAF S F TUN',
'A NAF S F TYS - TUN',
'A NAF S F WES - TUN',
'A NAP - ALB VIA',
'A NAP - APU',
'A NAP - APU VIA',
'A NAP - BEL VIA',
'A NAP - BRE VIA',
'A NAP - BUL VIA',
'A NAP - CLY VIA',
'A NAP - CON VIA',
'A NAP - GAS VIA',
'A NAP - GRE VIA',
'A NAP - LON VIA',
'A NAP - LVP VIA',
'A NAP - MAR VIA',
'A NAP - NAF VIA',
'A NAP - PIC VIA',
'A NAP - PIE VIA',
'A NAP - POR VIA',
'A NAP - ROM',
'A NAP - ROM VIA',
'A NAP - SMY VIA',
'A NAP - SPA VIA',
'A NAP - SYR VIA',
'A NAP - TRI VIA',
'A NAP - TUN VIA',
'A NAP - TUS VIA',
'A NAP - VEN VIA',
'A NAP - WAL VIA',
'A NAP B',
'A NAP D',
'A NAP H',
'A NAP R APU',
'A NAP R ROM',
'A NAP S A ALB - APU',
'A NAP S A ALB - ROM',
'A NAP S A APU',
'A NAP S A APU - ROM',
'A NAP S A BEL - ROM',
'A NAP S A BRE - APU',
'A NAP S A BRE - ROM',
'A NAP S A BUL - APU',
'A NAP S A BUL - ROM',
'A NAP S A CLY - ROM',
'A NAP S A CON - APU',
'A NAP S A CON - ROM',
'A NAP S A GAS - APU',
'A NAP S A GAS - ROM',
'A NAP S A GRE - APU',
'A NAP S A GRE - ROM',
'A NAP S A LON - ROM',
'A NAP S A LVP - ROM',
'A NAP S A MAR - APU',
'A NAP S A MAR - ROM',
'A NAP S A NAF - APU',
'A NAP S A NAF - ROM',
'A NAP S A PIC - ROM',
'A NAP S A PIE - APU',
'A NAP S A PIE - ROM',
'A NAP S A POR - APU',
'A NAP S A POR - ROM',
'A NAP S A ROM',
'A NAP S A ROM - APU',
'A NAP S A SMY - APU',
'A NAP S A SMY - ROM',
'A NAP S A SPA - APU',
'A NAP S A SPA - ROM',
'A NAP S A SYR - APU',
'A NAP S A SYR - ROM',
'A NAP S A TRI - APU',
'A NAP S A TRI - ROM',
'A NAP S A TUN - APU',
'A NAP S A TUN - ROM',
'A NAP S A TUS - APU',
'A NAP S A TUS - ROM',
'A NAP S A VEN - APU',
'A NAP S A VEN - ROM',
'A NAP S A WAL - ROM',
'A NAP S F ADR - APU',
'A NAP S F APU',
'A NAP S F ION - APU',
'A NAP S F ROM',
'A NAP S F TUS - ROM',
'A NAP S F TYS - ROM',
'A NAP S F VEN - APU',
'A NWY - BEL VIA',
'A NWY - BRE VIA',
'A NWY - CLY VIA',
'A NWY - DEN VIA',
'A NWY - EDI VIA',
'A NWY - FIN',
'A NWY - GAS VIA',
'A NWY - HOL VIA',
'A NWY - KIE VIA',
'A NWY - LON VIA',
'A NWY - LVP VIA',
'A NWY - NAF VIA',
'A NWY - PIC VIA',
'A NWY - POR VIA',
'A NWY - SPA VIA',
'A NWY - STP',
'A NWY - STP VIA',
'A NWY - SWE',
'A NWY - SWE VIA',
'A NWY - TUN VIA',
'A NWY - WAL VIA',
'A NWY - YOR VIA',
'A NWY D',
'A NWY H',
'A NWY R FIN',
'A NWY R STP',
'A NWY R SWE',
'A NWY S A BEL - STP',
'A NWY S A BEL - SWE',
'A NWY S A BER - FIN',
'A NWY S A BER - STP',
'A NWY S A BER - SWE',
'A NWY S A BRE - STP',
'A NWY S A BRE - SWE',
'A NWY S A CLY - STP',
'A NWY S A CLY - SWE',
'A NWY S A DEN - FIN',
'A NWY S A DEN - STP',
'A NWY S A DEN - SWE',
'A NWY S A EDI - STP',
'A NWY S A EDI - SWE',
'A NWY S A FIN',
'A NWY S A FIN - STP',
'A NWY S A FIN - SWE',
'A NWY S A GAS - STP',
'A NWY S A GAS - SWE',
'A NWY S A HOL - STP',
'A NWY S A HOL - SWE',
'A NWY S A KIE - FIN',
'A NWY S A KIE - STP',
'A NWY S A KIE - SWE',
'A NWY S A LON - STP',
'A NWY S A LON - SWE',
'A NWY S A LVN - FIN',
'A NWY S A LVN - STP',
'A NWY S A LVN - SWE',
'A NWY S A LVP - STP',
'A NWY S A LVP - SWE',
'A NWY S A MOS - STP',
'A NWY S A NAF - STP',
'A NWY S A NAF - SWE',
'A NWY S A PIC - STP',
'A NWY S A PIC - SWE',
'A NWY S A POR - STP',
'A NWY S A POR - SWE',
'A NWY S A PRU - FIN',
'A NWY S A PRU - STP',
'A NWY S A PRU - SWE',
'A NWY S A SPA - STP',
'A NWY S A SPA - SWE',
'A NWY S A STP',
'A NWY S A STP - FIN',
'A NWY S A STP - SWE',
'A NWY S A SWE',
'A NWY S A SWE - FIN',
'A NWY S A SWE - STP',
'A NWY S A WAL - STP',
'A NWY S A WAL - SWE',
'A NWY S A YOR - STP',
'A NWY S A YOR - SWE',
'A NWY S F BAL - SWE',
'A NWY S F BAR - STP',
'A NWY S F BOT - FIN',
'A NWY S F BOT - STP',
'A NWY S F BOT - SWE',
'A NWY S F DEN - SWE',
'A NWY S F FIN',
'A NWY S F FIN - STP',
'A NWY S F FIN - SWE',
'A NWY S F LVN - STP',
'A NWY S F SKA - SWE',
'A NWY S F STP/NC',
'A NWY S F STP/SC',
'A NWY S F STP/SC - FIN',
'A NWY S F SWE',
'A NWY S F SWE - FIN',
'A PAR - BRE',
'A PAR - BUR',
'A PAR - GAS',
'A PAR - PIC',
'A PAR B',
'A PAR D',
'A PAR H',
'A PAR R BRE',
'A PAR R BUR',
'A PAR R GAS',
'A PAR R PIC',
'A PAR S A ALB - BRE',
'A PAR S A ALB - GAS',
'A PAR S A APU - BRE',
'A PAR S A APU - GAS',
'A PAR S A BEL - BRE',
'A PAR S A BEL - BUR',
'A PAR S A BEL - GAS',
'A PAR S A BEL - PIC',
'A PAR S A BRE',
'A PAR S A BRE - GAS',
'A PAR S A BRE - PIC',
'A PAR S A BUR',
'A PAR S A BUR - GAS',
'A PAR S A BUR - PIC',
'A PAR S A CLY - BRE',
'A PAR S A CLY - GAS',
'A PAR S A CLY - PIC',
'A PAR S A DEN - BRE',
'A PAR S A DEN - GAS',
'A PAR S A DEN - PIC',
'A PAR S A EDI - BRE',
'A PAR S A EDI - GAS',
'A PAR S A EDI - PIC',
'A PAR S A GAS',
'A PAR S A GAS - BRE',
'A PAR S A GAS - BUR',
'A PAR S A GAS - PIC',
'A PAR S A GRE - BRE',
'A PAR S A GRE - GAS',
'A PAR S A HOL - BRE',
'A PAR S A HOL - GAS',
'A PAR S A HOL - PIC',
'A PAR S A KIE - BRE',
'A PAR S A KIE - GAS',
'A PAR S A KIE - PIC',
'A PAR S A LON - BRE',
'A PAR S A LON - GAS',
'A PAR S A LON - PIC',
'A PAR S A LVP - BRE',
'A PAR S A LVP - GAS',
'A PAR S A LVP - PIC',
'A PAR S A MAR - BRE',
'A PAR S A MAR - BUR',
'A PAR S A MAR - GAS',
'A PAR S A MAR - PIC',
'A PAR S A MUN - BUR',
'A PAR S A NAF - BRE',
'A PAR S A NAF - GAS',
'A PAR S A NAF - PIC',
'A PAR S A NAP - BRE',
'A PAR S A NAP - GAS',
'A PAR S A NAP - PIC',
'A PAR S A NWY - BRE',
'A PAR S A NWY - GAS',
'A PAR S A NWY - PIC',
'A PAR S A PIC',
'A PAR S A PIC - BRE',
'A PAR S A PIC - BUR',
'A PAR S A PIC - GAS',
'A PAR S A PIE - BRE',
'A PAR S A PIE - GAS',
'A PAR S A PIE - PIC',
'A PAR S A POR - BRE',
'A PAR S A POR - GAS',
'A PAR S A POR - PIC',
'A PAR S A ROM - BRE',
'A PAR S A ROM - GAS',
'A PAR S A ROM - PIC',
'A PAR S A RUH - BUR',
'A PAR S A SPA - BRE',
'A PAR S A SPA - GAS',
'A PAR S A SPA - PIC',
'A PAR S A STP - BRE',
'A PAR S A STP - GAS',
'A PAR S A STP - PIC',
'A PAR S A SWE - BRE',
'A PAR S A SWE - GAS',
'A PAR S A SWE - PIC',
'A PAR S A TUN - BRE',
'A PAR S A TUN - GAS',
'A PAR S A TUN - PIC',
'A PAR S A TUS - BRE',
'A PAR S A TUS - GAS',
'A PAR S A TUS - PIC',
'A PAR S A WAL - BRE',
'A PAR S A WAL - GAS',
'A PAR S A WAL - PIC',
'A PAR S A YOR - BRE',
'A PAR S A YOR - GAS',
'A PAR S A YOR - PIC',
'A PAR S F BEL - PIC',
'A PAR S F BRE',
'A PAR S F BRE - GAS',
'A PAR S F BRE - PIC',
'A PAR S F ENG - BRE',
'A PAR S F ENG - PIC',
'A PAR S F GAS',
'A PAR S F GAS - BRE',
'A PAR S F MAO - BRE',
'A PAR S F MAO - GAS',
'A PAR S F PIC',
'A PAR S F PIC - BRE',
'A PAR S F SPA/NC - GAS',
'A PIC - BEL',
'A PIC - BEL VIA',
'A PIC - BRE',
'A PIC - BRE VIA',
'A PIC - BUR',
'A PIC - CLY VIA',
'A PIC - DEN VIA',
'A PIC - EDI VIA',
'A PIC - GAS VIA',
'A PIC - HOL VIA',
'A PIC - KIE VIA',
'A PIC - LON VIA',
'A PIC - LVP VIA',
'A PIC - MAR VIA',
'A PIC - NAF VIA',
'A PIC - NAP VIA',
'A PIC - NWY VIA',
'A PIC - PAR',
'A PIC - PIE VIA',
'A PIC - POR VIA',
'A PIC - ROM VIA',
'A PIC - SPA VIA',
'A PIC - STP VIA',
'A PIC - SWE VIA',
'A PIC - TUN VIA',
'A PIC - TUS VIA',
'A PIC - WAL VIA',
'A PIC - YOR VIA',
'A PIC D',
'A PIC H',
'A PIC R BEL',
'A PIC R BRE',
'A PIC R BUR',
'A PIC R PAR',
'A PIC S A ALB - BRE',
'A PIC S A APU - BRE',
'A PIC S A BEL',
'A PIC S A BEL - BRE',
'A PIC S A BEL - BUR',
'A PIC S A BRE',
'A PIC S A BRE - BEL',
'A PIC S A BRE - PAR',
'A PIC S A BUR',
'A PIC S A BUR - BEL',
'A PIC S A BUR - PAR',
'A PIC S A CLY - BEL',
'A PIC S A CLY - BRE',
'A PIC S A DEN - BEL',
'A PIC S A DEN - BRE',
'A PIC S A EDI - BEL',
'A PIC S A EDI - BRE',
'A PIC S A GAS - BEL',
'A PIC S A GAS - BRE',
'A PIC S A GAS - BUR',
'A PIC S A GAS - PAR',
'A PIC S A GRE - BRE',
'A PIC S A HOL - BEL',
'A PIC S A HOL - BRE',
'A PIC S A KIE - BEL',
'A PIC S A KIE - BRE',
'A PIC S A LON - BEL',
'A PIC S A LON - BRE',
'A PIC S A LVP - BEL',
'A PIC S A LVP - BRE',
'A PIC S A MAR - BEL',
'A PIC S A MAR - BRE',
'A PIC S A MAR - BUR',
'A PIC S A MUN - BUR',
'A PIC S A NAF - BEL',
'A PIC S A NAF - BRE',
'A PIC S A NAP - BEL',
'A PIC S A NAP - BRE',
'A PIC S A NWY - BEL',
'A PIC S A NWY - BRE',
'A PIC S A PAR',
'A PIC S A PAR - BRE',
'A PIC S A PAR - BUR',
'A PIC S A PIE - BEL',
'A PIC S A PIE - BRE',
'A PIC S A POR - BEL',
'A PIC S A POR - BRE',
'A PIC S A ROM - BEL',
'A PIC S A ROM - BRE',
'A PIC S A RUH - BEL',
'A PIC S A RUH - BUR',
'A PIC S A SPA - BEL',
'A PIC S A SPA - BRE',
'A PIC S A STP - BEL',
'A PIC S A STP - BRE',
'A PIC S A SWE - BEL',
'A PIC S A SWE - BRE',
'A PIC S A TUN - BEL',
'A PIC S A TUN - BRE',
'A PIC S A TUS - BEL',
'A PIC S A TUS - BRE',
'A PIC S A WAL - BEL',
'A PIC S A WAL - BRE',
'A PIC S A YOR - BEL',
'A PIC S A YOR - BRE',
'A PIC S F BEL',
'A PIC S F BRE',
'A PIC S F ENG - BEL',
'A PIC S F ENG - BRE',
'A PIC S F GAS - BRE',
'A PIC S F HOL - BEL',
'A PIC S F MAO - BRE',
'A PIC S F NTH - BEL',
'A PIE - ALB VIA',
'A PIE - APU VIA',
'A PIE - BEL VIA',
'A PIE - BRE VIA',
'A PIE - BUL VIA',
'A PIE - CLY VIA',
'A PIE - CON VIA',
'A PIE - GAS VIA',
'A PIE - GRE VIA',
'A PIE - LON VIA',
'A PIE - LVP VIA',
'A PIE - MAR',
'A PIE - MAR VIA',
'A PIE - NAF VIA',
'A PIE - NAP VIA',
'A PIE - PIC VIA',
'A PIE - POR VIA',
'A PIE - ROM VIA',
'A PIE - SMY VIA',
'A PIE - SPA VIA',
'A PIE - SYR VIA',
'A PIE - TRI VIA',
'A PIE - TUN VIA',
'A PIE - TUS',
'A PIE - TUS VIA',
'A PIE - TYR',
'A PIE - VEN',
'A PIE - VEN VIA',
'A PIE - WAL VIA',
'A PIE D',
'A PIE H',
'A PIE R MAR',
'A PIE R TUS',
'A PIE R TYR',
'A PIE R VEN',
'A PIE S A ALB - MAR',
'A PIE S A ALB - TUS',
'A PIE S A ALB - VEN',
'A PIE S A APU - MAR',
'A PIE S A APU - TUS',
'A PIE S A APU - VEN',
'A PIE S A BEL - MAR',
'A PIE S A BEL - TUS',
'A PIE S A BOH - TYR',
'A PIE S A BRE - MAR',
'A PIE S A BRE - TUS',
'A PIE S A BUL - MAR',
'A PIE S A BUL - TUS',
'A PIE S A BUL - VEN',
'A PIE S A BUR - MAR',
'A PIE S A CLY - MAR',
'A PIE S A CLY - TUS',
'A PIE S A CON - MAR',
'A PIE S A CON - TUS',
'A PIE S A CON - VEN',
'A PIE S A GAS - MAR',
'A PIE S A GAS - TUS',
'A PIE S A GRE - MAR',
'A PIE S A GRE - TUS',
'A PIE S A GRE - VEN',
'A PIE S A LON - MAR',
'A PIE S A LON - TUS',
'A PIE S A LVP - MAR',
'A PIE S A LVP - TUS',
'A PIE S A MAR',
'A PIE S A MAR - TUS',
'A PIE S A MAR - VEN',
'A PIE S A MUN - TYR',
'A PIE S A NAF - MAR',
'A PIE S A NAF - TUS',
'A PIE S A NAF - VEN',
'A PIE S A NAP - MAR',
'A PIE S A NAP - TUS',
'A PIE S A NAP - VEN',
'A PIE S A PIC - MAR',
'A PIE S A PIC - TUS',
'A PIE S A POR - MAR',
'A PIE S A POR - TUS',
'A PIE S A ROM - MAR',
'A PIE S A ROM - TUS',
'A PIE S A ROM - VEN',
'A PIE S A SMY - MAR',
'A PIE S A SMY - TUS',
'A PIE S A SMY - VEN',
'A PIE S A SPA - MAR',
'A PIE S A SPA - TUS',
'A PIE S A SPA - VEN',
'A PIE S A SYR - MAR',
'A PIE S A SYR - TUS',
'A PIE S A SYR - VEN',
'A PIE S A TRI - MAR',
'A PIE S A TRI - TUS',
'A PIE S A TRI - TYR',
'A PIE S A TRI - VEN',
'A PIE S A TUN - MAR',
'A PIE S A TUN - TUS',
'A PIE S A TUN - VEN',
'A PIE S A TUS',
'A PIE S A TUS - MAR',
'A PIE S A TUS - VEN',
'A PIE S A TYR',
'A PIE S A TYR - VEN',
'A PIE S A VEN',
'A PIE S A VEN - MAR',
'A PIE S A VEN - TUS',
'A PIE S A VEN - TYR',
'A PIE S A VIE - TYR',
'A PIE S A WAL - MAR',
'A PIE S A WAL - TUS',
'A PIE S F ADR - VEN',
'A PIE S F APU - VEN',
'A PIE S F LYO - MAR',
'A PIE S F LYO - TUS',
'A PIE S F MAR',
'A PIE S F ROM - TUS',
'A PIE S F SPA/SC - MAR',
'A PIE S F TRI - VEN',
'A PIE S F TUS',
'A PIE S F TYS - TUS',
'A PIE S F VEN',
'A POR - ALB VIA',
'A POR - APU VIA',
'A POR - BEL VIA',
'A POR - BRE VIA',
'A POR - CLY VIA',
'A POR - DEN VIA',
'A POR - EDI VIA',
'A POR - GAS VIA',
'A POR - GRE VIA',
'A POR - HOL VIA',
'A POR - KIE VIA',
'A POR - LON VIA',
'A POR - LVP VIA',
'A POR - MAR VIA',
'A POR - NAF VIA',
'A POR - NAP VIA',
'A POR - NWY VIA',
'A POR - PIC VIA',
'A POR - PIE VIA',
'A POR - ROM VIA',
'A POR - SPA',
'A POR - SPA VIA',
'A POR - STP VIA',
'A POR - SWE VIA',
'A POR - TUN VIA',
'A POR - TUS VIA',
'A POR - WAL VIA',
'A POR - YOR VIA',
'A POR D',
'A POR H',
'A POR R SPA',
'A POR S A ALB - SPA',
'A POR S A APU - SPA',
'A POR S A BEL - SPA',
'A POR S A BRE - SPA',
'A POR S A BUL - SPA',
'A POR S A CLY - SPA',
'A POR S A CON - SPA',
'A POR S A DEN - SPA',
'A POR S A EDI - SPA',
'A POR S A GAS - SPA',
'A POR S A GRE - SPA',
'A POR S A HOL - SPA',
'A POR S A KIE - SPA',
'A POR S A LON - SPA',
'A POR S A LVP - SPA',
'A POR S A MAR - SPA',
'A POR S A NAF - SPA',
'A POR S A NAP - SPA',
'A POR S A NWY - SPA',
'A POR S A PIC - SPA',
'A POR S A PIE - SPA',
'A POR S A ROM - SPA',
'A POR S A SMY - SPA',
'A POR S A SPA',
'A POR S A STP - SPA',
'A POR S A SWE - SPA',
'A POR S A SYR - SPA',
'A POR S A TRI - SPA',
'A POR S A TUN - SPA',
'A POR S A TUS - SPA',
'A POR S A VEN - SPA',
'A POR S A WAL - SPA',
'A POR S A YOR - SPA',
'A POR S F GAS - SPA',
'A POR S F LYO - SPA',
'A POR S F MAO - SPA',
'A POR S F MAR - SPA',
'A POR S F SPA/NC',
'A POR S F SPA/SC',
'A POR S F WES - SPA',
'A PRU - BER',
'A PRU - BER VIA',
'A PRU - DEN VIA',
'A PRU - FIN VIA',
'A PRU - KIE VIA',
'A PRU - LVN',
'A PRU - LVN VIA',
'A PRU - SIL',
'A PRU - STP VIA',
'A PRU - SWE VIA',
'A PRU - WAR',
'A PRU D',
'A PRU H',
'A PRU R BER',
'A PRU R LVN',
'A PRU R SIL',
'A PRU R WAR',
'A PRU S A BER',
'A PRU S A BER - LVN',
'A PRU S A BER - SIL',
'A PRU S A BOH - SIL',
'A PRU S A DEN - BER',
'A PRU S A DEN - LVN',
'A PRU S A FIN - BER',
'A PRU S A FIN - LVN',
'A PRU S A GAL - SIL',
'A PRU S A GAL - WAR',
'A PRU S A KIE - BER',
'A PRU S A KIE - LVN',
'A PRU S A LVN',
'A PRU S A LVN - BER',
'A PRU S A LVN - WAR',
'A PRU S A MOS - LVN',
'A PRU S A MOS - WAR',
'A PRU S A MUN - BER',
'A PRU S A MUN - SIL',
'A PRU S A SIL',
'A PRU S A SIL - BER',
'A PRU S A SIL - WAR',
'A PRU S A STP - BER',
'A PRU S A STP - LVN',
'A PRU S A SWE - BER',
'A PRU S A SWE - LVN',
'A PRU S A UKR - WAR',
'A PRU S A WAR',
'A PRU S A WAR - LVN',
'A PRU S A WAR - SIL',
'A PRU S F BAL - BER',
'A PRU S F BAL - LVN',
'A PRU S F BER',
'A PRU S F BOT - LVN',
'A PRU S F KIE - BER',
'A PRU S F LVN',
'A PRU S F STP/SC - LVN',
'A ROM - ALB VIA',
'A ROM - APU',
'A ROM - APU VIA',
'A ROM - BEL VIA',
'A ROM - BRE VIA',
'A ROM - BUL VIA',
'A ROM - CLY VIA',
'A ROM - CON VIA',
'A ROM - GAS VIA',
'A ROM - GRE VIA',
'A ROM - LON VIA',
'A ROM - LVP VIA',
'A ROM - MAR VIA',
'A ROM - NAF VIA',
'A ROM - NAP',
'A ROM - NAP VIA',
'A ROM - PIC VIA',
'A ROM - PIE VIA',
'A ROM - POR VIA',
'A ROM - SMY VIA',
'A ROM - SPA VIA',
'A ROM - SYR VIA',
'A ROM - TRI VIA',
'A ROM - TUN VIA',
'A ROM - TUS',
'A ROM - TUS VIA',
'A ROM - VEN',
'A ROM - VEN VIA',
'A ROM - WAL VIA',
'A ROM B',
'A ROM D',
'A ROM H',
'A ROM R APU',
'A ROM R NAP',
'A ROM R TUS',
'A ROM R VEN',
'A ROM S A ALB - APU',
'A ROM S A ALB - NAP',
'A ROM S A ALB - TUS',
'A ROM S A ALB - VEN',
'A ROM S A APU',
'A ROM S A APU - NAP',
'A ROM S A APU - TUS',
'A ROM S A APU - VEN',
'A ROM S A BEL - NAP',
'A ROM S A BEL - TUS',
'A ROM S A BRE - APU',
'A ROM S A BRE - NAP',
'A ROM S A BRE - TUS',
'A ROM S A BUL - APU',
'A ROM S A BUL - NAP',
'A ROM S A BUL - TUS',
'A ROM S A BUL - VEN',
'A ROM S A CLY - NAP',
'A ROM S A CLY - TUS',
'A ROM S A CON - APU',
'A ROM S A CON - NAP',
'A ROM S A CON - TUS',
'A ROM S A CON - VEN',
'A ROM S A GAS - APU',
'A ROM S A GAS - NAP',
'A ROM S A GAS - TUS',
'A ROM S A GRE - APU',
'A ROM S A GRE - NAP',
'A ROM S A GRE - TUS',
'A ROM S A GRE - VEN',
'A ROM S A LON - NAP',
'A ROM S A LON - TUS',
'A ROM S A LVP - NAP',
'A ROM S A LVP - TUS',
'A ROM S A MAR - APU',
'A ROM S A MAR - NAP',
'A ROM S A MAR - TUS',
'A ROM S A MAR - VEN',
'A ROM S A NAF - APU',
'A ROM S A NAF - NAP',
'A ROM S A NAF - TUS',
'A ROM S A NAF - VEN',
'A ROM S A NAP',
'A ROM S A NAP - APU',
'A ROM S A NAP - TUS',
'A ROM S A NAP - VEN',
'A ROM S A PIC - NAP',
'A ROM S A PIC - TUS',
'A ROM S A PIE - APU',
'A ROM S A PIE - NAP',
'A ROM S A PIE - TUS',
'A ROM S A PIE - VEN',
'A ROM S A POR - APU',
'A ROM S A POR - NAP',
'A ROM S A POR - TUS',
'A ROM S A SMY - APU',
'A ROM S A SMY - NAP',
'A ROM S A SMY - TUS',
'A ROM S A SMY - VEN',
'A ROM S A SPA - APU',
'A ROM S A SPA - NAP',
'A ROM S A SPA - TUS',
'A ROM S A SPA - VEN',
'A ROM S A SYR - APU',
'A ROM S A SYR - NAP',
'A ROM S A SYR - TUS',
'A ROM S A SYR - VEN',
'A ROM S A TRI - APU',
'A ROM S A TRI - NAP',
'A ROM S A TRI - TUS',
'A ROM S A TRI - VEN',
'A ROM S A TUN - APU',
'A ROM S A TUN - NAP',
'A ROM S A TUN - TUS',
'A ROM S A TUN - VEN',
'A ROM S A TUS',
'A ROM S A TUS - APU',
'A ROM S A TUS - NAP',
'A ROM S A TUS - VEN',
'A ROM S A TYR - VEN',
'A ROM S A VEN',
'A ROM S A VEN - APU',
'A ROM S A VEN - NAP',
'A ROM S A VEN - TUS',
'A ROM S A WAL - NAP',
'A ROM S A WAL - TUS',
'A ROM S F ADR - APU',
'A ROM S F ADR - VEN',
'A ROM S F APU',
'A ROM S F APU - NAP',
'A ROM S F APU - VEN',
'A ROM S F ION - APU',
'A ROM S F ION - NAP',
'A ROM S F LYO - TUS',
'A ROM S F NAP',
'A ROM S F NAP - APU',
'A ROM S F PIE - TUS',
'A ROM S F TRI - VEN',
'A ROM S F TUS',
'A ROM S F TYS - NAP',
'A ROM S F TYS - TUS',
'A ROM S F VEN',
'A ROM S F VEN - APU',
'A RUH - BEL',
'A RUH - BUR',
'A RUH - HOL',
'A RUH - KIE',
'A RUH - MUN',
'A RUH D',
'A RUH H',
'A RUH R BEL',
'A RUH R BUR',
'A RUH R HOL',
'A RUH R KIE',
'A RUH R MUN',
'A RUH S A BEL',
'A RUH S A BEL - BUR',
'A RUH S A BEL - HOL',
'A RUH S A BEL - KIE',
'A RUH S A BER - KIE',
'A RUH S A BER - MUN',
'A RUH S A BOH - MUN',
'A RUH S A BRE - BEL',
'A RUH S A BRE - HOL',
'A RUH S A BRE - KIE',
'A RUH S A BUR',
'A RUH S A BUR - BEL',
'A RUH S A BUR - MUN',
'A RUH S A CLY - BEL',
'A RUH S A CLY - HOL',
'A RUH S A CLY - KIE',
'A RUH S A DEN - BEL',
'A RUH S A DEN - HOL',
'A RUH S A DEN - KIE',
'A RUH S A EDI - BEL',
'A RUH S A EDI - HOL',
'A RUH S A EDI - KIE',
'A RUH S A FIN - KIE',
'A RUH S A GAS - BEL',
'A RUH S A GAS - BUR',
'A RUH S A GAS - HOL',
'A RUH S A GAS - KIE',
'A RUH S A HOL',
'A RUH S A HOL - BEL',
'A RUH S A HOL - KIE',
'A RUH S A KIE',
'A RUH S A KIE - BEL',
'A RUH S A KIE - HOL',
'A RUH S A KIE - MUN',
'A RUH S A LON - BEL',
'A RUH S A LON - HOL',
'A RUH S A LON - KIE',
'A RUH S A LVN - KIE',
'A RUH S A LVP - BEL',
'A RUH S A LVP - HOL',
'A RUH S A LVP - KIE',
'A RUH S A MAR - BEL',
'A RUH S A MAR - BUR',
'A RUH S A MUN',
'A RUH S A MUN - BUR',
'A RUH S A MUN - KIE',
'A RUH S A NAF - BEL',
'A RUH S A NAF - HOL',
'A RUH S A NAF - KIE',
'A RUH S A NAP - BEL',
'A RUH S A NWY - BEL',
'A RUH S A NWY - HOL',
'A RUH S A NWY - KIE',
'A RUH S A PAR - BUR',
'A RUH S A PIC - BEL',
'A RUH S A PIC - BUR',
'A RUH S A PIC - HOL',
'A RUH S A PIC - KIE',
'A RUH S A PIE - BEL',
'A RUH S A POR - BEL',
'A RUH S A POR - HOL',
'A RUH S A POR - KIE',
'A RUH S A PRU - KIE',
'A RUH S A ROM - BEL',
'A RUH S A SIL - MUN',
'A RUH S A SPA - BEL',
'A RUH S A SPA - HOL',
'A RUH S A SPA - KIE',
'A RUH S A STP - BEL',
'A RUH S A STP - HOL',
'A RUH S A STP - KIE',
'A RUH S A SWE - BEL',
'A RUH S A SWE - HOL',
'A RUH S A SWE - KIE',
'A RUH S A TUN - BEL',
'A RUH S A TUN - HOL',
'A RUH S A TUS - BEL',
'A RUH S A TYR - MUN',
'A RUH S A WAL - BEL',
'A RUH S A WAL - HOL',
'A RUH S A WAL - KIE',
'A RUH S A YOR - BEL',
'A RUH S A YOR - HOL',
'A RUH S A YOR - KIE',
'A RUH S F BAL - KIE',
'A RUH S F BEL',
'A RUH S F BEL - HOL',
'A RUH S F BER - KIE',
'A RUH S F DEN - KIE',
'A RUH S F ENG - BEL',
'A RUH S F HEL - HOL',
'A RUH S F HEL - KIE',
'A RUH S F HOL',
'A RUH S F HOL - BEL',
'A RUH S F HOL - KIE',
'A RUH S F KIE',
'A RUH S F KIE - HOL',
'A RUH S F NTH - BEL',
'A RUH S F NTH - HOL',
'A RUH S F PIC - BEL',
'A RUM - ANK VIA',
'A RUM - ARM VIA',
'A RUM - BUD',
'A RUM - BUL',
'A RUM - BUL VIA',
'A RUM - CON VIA',
'A RUM - GAL',
'A RUM - SER',
'A RUM - SEV',
'A RUM - SEV VIA',
'A RUM - UKR',
'A RUM D',
'A RUM H',
'A RUM R BUD',
'A RUM R BUL',
'A RUM R GAL',
'A RUM R SER',
'A RUM R SEV',
'A RUM R UKR',
'A RUM S A ALB - BUL',
'A RUM S A ALB - SER',
'A RUM S A ANK - BUL',
'A RUM S A ANK - SEV',
'A RUM S A APU - BUL',
'A RUM S A ARM - BUL',
'A RUM S A ARM - SEV',
'A RUM S A BOH - GAL',
'A RUM S A BUD',
'A RUM S A BUD - GAL',
'A RUM S A BUD - SER',
'A RUM S A BUL',
'A RUM S A BUL - SER',
'A RUM S A BUL - SEV',
'A RUM S A CON - BUL',
'A RUM S A CON - SEV',
'A RUM S A GAL',
'A RUM S A GAL - BUD',
'A RUM S A GAL - UKR',
'A RUM S A GRE - BUL',
'A RUM S A GRE - SER',
'A RUM S A MAR - BUL',
'A RUM S A MOS - SEV',
'A RUM S A MOS - UKR',
'A RUM S A NAF - BUL',
'A RUM S A NAP - BUL',
'A RUM S A PIE - BUL',
'A RUM S A ROM - BUL',
'A RUM S A SER',
'A RUM S A SER - BUD',
'A RUM S A SER - BUL',
'A RUM S A SEV',
'A RUM S A SEV - BUL',
'A RUM S A SEV - UKR',
'A RUM S A SIL - GAL',
'A RUM S A SMY - BUL',
'A RUM S A SPA - BUL',
'A RUM S A SYR - BUL',
'A RUM S A TRI - BUD',
'A RUM S A TRI - BUL',
'A RUM S A TRI - SER',
'A RUM S A TUN - BUL',
'A RUM S A TUS - BUL',
'A RUM S A UKR',
'A RUM S A UKR - GAL',
'A RUM S A UKR - SEV',
'A RUM S A VEN - BUL',
'A RUM S A VIE - BUD',
'A RUM S A VIE - GAL',
'A RUM S A WAR - GAL',
'A RUM S A WAR - UKR',
'A RUM S F AEG - BUL',
'A RUM S F ARM - SEV',
'A RUM S F BLA - BUL',
'A RUM S F BLA - SEV',
'A RUM S F BUL/EC',
'A RUM S F BUL/SC',
'A RUM S F CON - BUL',
'A RUM S F GRE - BUL',
'A RUM S F SEV',
'A SER - ALB',
'A SER - BUD',
'A SER - BUL',
'A SER - GRE',
'A SER - RUM',
'A SER - TRI',
'A SER D',
'A SER H',
'A SER R ALB',
'A SER R BUD',
'A SER R BUL',
'A SER R GRE',
'A SER R RUM',
'A SER R TRI',
'A SER S A ALB',
'A SER S A ALB - BUL',
'A SER S A ALB - GRE',
'A SER S A ALB - TRI',
'A SER S A ANK - BUL',
'A SER S A ANK - RUM',
'A SER S A APU - ALB',
'A SER S A APU - BUL',
'A SER S A APU - GRE',
'A SER S A APU - TRI',
'A SER S A ARM - BUL',
'A SER S A ARM - RUM',
'A SER S A BRE - ALB',
'A SER S A BRE - GRE',
'A SER S A BUD',
'A SER S A BUD - RUM',
'A SER S A BUD - TRI',
'A SER S A BUL',
'A SER S A BUL - ALB',
'A SER S A BUL - GRE',
'A SER S A BUL - RUM',
'A SER S A BUL - TRI',
'A SER S A CON - ALB',
'A SER S A CON - BUL',
'A SER S A CON - GRE',
'A SER S A CON - RUM',
'A SER S A CON - TRI',
'A SER S A GAL - BUD',
'A SER S A GAL - RUM',
'A SER S A GAS - ALB',
'A SER S A GAS - GRE',
'A SER S A GRE',
'A SER S A GRE - ALB',
'A SER S A GRE - BUL',
'A SER S A GRE - TRI',
'A SER S A MAR - ALB',
'A SER S A MAR - BUL',
'A SER S A MAR - GRE',
'A SER S A MAR - TRI',
'A SER S A NAF - ALB',
'A SER S A NAF - BUL',
'A SER S A NAF - GRE',
'A SER S A NAF - TRI',
'A SER S A NAP - ALB',
'A SER S A NAP - BUL',
'A SER S A NAP - GRE',
'A SER S A NAP - TRI',
'A SER S A PIE - ALB',
'A SER S A PIE - BUL',
'A SER S A PIE - GRE',
'A SER S A PIE - TRI',
'A SER S A POR - ALB',
'A SER S A POR - GRE',
'A SER S A ROM - ALB',
'A SER S A ROM - BUL',
'A SER S A ROM - GRE',
'A SER S A ROM - TRI',
'A SER S A RUM',
'A SER S A RUM - BUD',
'A SER S A RUM - BUL',
'A SER S A SEV - BUL',
'A SER S A SEV - RUM',
'A SER S A SMY - ALB',
'A SER S A SMY - BUL',
'A SER S A SMY - GRE',
'A SER S A SMY - TRI',
'A SER S A SPA - ALB',
'A SER S A SPA - BUL',
'A SER S A SPA - GRE',
'A SER S A SPA - TRI',
'A SER S A SYR - ALB',
'A SER S A SYR - BUL',
'A SER S A SYR - GRE',
'A SER S A SYR - TRI',
'A SER S A TRI',
'A SER S A TRI - ALB',
'A SER S A TRI - BUD',
'A SER S A TRI - BUL',
'A SER S A TRI - GRE',
'A SER S A TUN - ALB',
'A SER S A TUN - BUL',
'A SER S A TUN - GRE',
'A SER S A TUN - TRI',
'A SER S A TUS - ALB',
'A SER S A TUS - BUL',
'A SER S A TUS - GRE',
'A SER S A TUS - TRI',
'A SER S A TYR - TRI',
'A SER S A UKR - RUM',
'A SER S A VEN - ALB',
'A SER S A VEN - BUL',
'A SER S A VEN - GRE',
'A SER S A VEN - TRI',
'A SER S A VIE - BUD',
'A SER S A VIE - TRI',
'A SER S F ADR - ALB',
'A SER S F ADR - TRI',
'A SER S F AEG - BUL',
'A SER S F AEG - GRE',
'A SER S F ALB',
'A SER S F ALB - GRE',
'A SER S F ALB - TRI',
'A SER S F BLA - BUL',
'A SER S F BLA - RUM',
'A SER S F BUL/EC',
'A SER S F BUL/EC - RUM',
'A SER S F BUL/SC',
'A SER S F BUL/SC - GRE',
'A SER S F CON - BUL',
'A SER S F GRE',
'A SER S F GRE - ALB',
'A SER S F GRE - BUL',
'A SER S F ION - ALB',
'A SER S F ION - GRE',
'A SER S F RUM',
'A SER S F RUM - BUL',
'A SER S F SEV - RUM',
'A SER S F TRI',
'A SER S F TRI - ALB',
'A SER S F VEN - TRI',
'A SEV - ANK VIA',
'A SEV - ARM',
'A SEV - ARM VIA',
'A SEV - BUL VIA',
'A SEV - CON VIA',
'A SEV - MOS',
'A SEV - RUM',
'A SEV - RUM VIA',
'A SEV - UKR',
'A SEV B',
'A SEV D',
'A SEV H',
'A SEV R ARM',
'A SEV R MOS',
'A SEV R RUM',
'A SEV R UKR',
'A SEV S A ANK - ARM',
'A SEV S A ANK - RUM',
'A SEV S A ARM',
'A SEV S A ARM - RUM',
'A SEV S A BUD - RUM',
'A SEV S A BUL - ARM',
'A SEV S A BUL - RUM',
'A SEV S A CON - ARM',
'A SEV S A CON - RUM',
'A SEV S A GAL - RUM',
'A SEV S A GAL - UKR',
'A SEV S A LVN - MOS',
'A SEV S A MOS',
'A SEV S A MOS - UKR',
'A SEV S A RUM',
'A SEV S A RUM - ARM',
'A SEV S A RUM - UKR',
'A SEV S A SER - RUM',
'A SEV S A SMY - ARM',
'A SEV S A STP - MOS',
'A SEV S A SYR - ARM',
'A SEV S A UKR',
'A SEV S A UKR - MOS',
'A SEV S A UKR - RUM',
'A SEV S A WAR - MOS',
'A SEV S A WAR - UKR',
'A SEV S F ANK - ARM',
'A SEV S F ARM',
'A SEV S F BLA - ARM',
'A SEV S F BLA - RUM',
'A SEV S F BUL/EC - RUM',
'A SEV S F RUM',
'A SIL - BER',
'A SIL - BOH',
'A SIL - GAL',
'A SIL - MUN',
'A SIL - PRU',
'A SIL - WAR',
'A SIL D',
'A SIL H',
'A SIL R BER',
'A SIL R BOH',
'A SIL R GAL',
'A SIL R MUN',
'A SIL R PRU',
'A SIL R WAR',
'A SIL S A BER',
'A SIL S A BER - MUN',
'A SIL S A BER - PRU',
'A SIL S A BOH',
'A SIL S A BOH - GAL',
'A SIL S A BOH - MUN',
'A SIL S A BUD - GAL',
'A SIL S A BUR - MUN',
'A SIL S A DEN - BER',
'A SIL S A DEN - PRU',
'A SIL S A FIN - BER',
'A SIL S A FIN - PRU',
'A SIL S A GAL',
'A SIL S A GAL - BOH',
'A SIL S A GAL - WAR',
'A SIL S A KIE - BER',
'A SIL S A KIE - MUN',
'A SIL S A KIE - PRU',
'A SIL S A LVN - BER',
'A SIL S A LVN - PRU',
'A SIL S A LVN - WAR',
'A SIL S A MOS - WAR',
'A SIL S A MUN',
'A SIL S A MUN - BER',
'A SIL S A MUN - BOH',
'A SIL S A PRU',
'A SIL S A PRU - BER',
'A SIL S A PRU - WAR',
'A SIL S A RUH - MUN',
'A SIL S A RUM - GAL',
'A SIL S A STP - BER',
'A SIL S A STP - PRU',
'A SIL S A SWE - BER',
'A SIL S A SWE - PRU',
'A SIL S A TYR - BOH',
'A SIL S A TYR - MUN',
'A SIL S A UKR - GAL',
'A SIL S A UKR - WAR',
'A SIL S A VIE - BOH',
'A SIL S A VIE - GAL',
'A SIL S A WAR',
'A SIL S A WAR - GAL',
'A SIL S A WAR - PRU',
'A SIL S F BAL - BER',
'A SIL S F BAL - PRU',
'A SIL S F BER',
'A SIL S F BER - PRU',
'A SIL S F KIE - BER',
'A SIL S F LVN - PRU',
'A SIL S F PRU',
'A SIL S F PRU - BER',
'A SMY - ALB VIA',
'A SMY - ANK',
'A SMY - APU VIA',
'A SMY - ARM',
'A SMY - BUL VIA',
'A SMY - CON',
'A SMY - CON VIA',
'A SMY - GRE VIA',
'A SMY - MAR VIA',
'A SMY - NAF VIA',
'A SMY - NAP VIA',
'A SMY - PIE VIA',
'A SMY - ROM VIA',
'A SMY - SPA VIA',
'A SMY - SYR',
'A SMY - SYR VIA',
'A SMY - TRI VIA',
'A SMY - TUN VIA',
'A SMY - TUS VIA',
'A SMY - VEN VIA',
'A SMY B',
'A SMY D',
'A SMY H',
'A SMY R ANK',
'A SMY R ARM',
'A SMY R CON',
'A SMY R SYR',
'A SMY S A ALB - CON',
'A SMY S A ALB - SYR',
'A SMY S A ANK',
'A SMY S A ANK - ARM',
'A SMY S A ANK - CON',
'A SMY S A APU - CON',
'A SMY S A APU - SYR',
'A SMY S A ARM',
'A SMY S A ARM - ANK',
'A SMY S A ARM - CON',
'A SMY S A ARM - SYR',
'A SMY S A BUL - ANK',
'A SMY S A BUL - ARM',
'A SMY S A BUL - CON',
'A SMY S A BUL - SYR',
'A SMY S A CON',
'A SMY S A CON - ANK',
'A SMY S A CON - ARM',
'A SMY S A CON - SYR',
'A SMY S A GRE - CON',
'A SMY S A GRE - SYR',
'A SMY S A MAR - CON',
'A SMY S A MAR - SYR',
'A SMY S A NAF - CON',
'A SMY S A NAF - SYR',
'A SMY S A NAP - CON',
'A SMY S A NAP - SYR',
'A SMY S A PIE - CON',
'A SMY S A PIE - SYR',
'A SMY S A ROM - CON',
'A SMY S A ROM - SYR',
'A SMY S A RUM - ANK',
'A SMY S A RUM - ARM',
'A SMY S A RUM - CON',
'A SMY S A SEV - ANK',
'A SMY S A SEV - ARM',
'A SMY S A SEV - CON',
'A SMY S A SPA - CON',
'A SMY S A SPA - SYR',
'A SMY S A SYR',
'A SMY S A SYR - ARM',
'A SMY S A SYR - CON',
'A SMY S A TRI - CON',
'A SMY S A TRI - SYR',
'A SMY S A TUN - CON',
'A SMY S A TUN - SYR',
'A SMY S A TUS - CON',
'A SMY S A TUS - SYR',
'A SMY S A VEN - CON',
'A SMY S A VEN - SYR',
'A SMY S F AEG - CON',
'A SMY S F ANK',
'A SMY S F ANK - ARM',
'A SMY S F ANK - CON',
'A SMY S F ARM',
'A SMY S F ARM - ANK',
'A SMY S F BLA - ANK',
'A SMY S F BLA - ARM',
'A SMY S F BLA - CON',
'A SMY S F BUL/EC - CON',
'A SMY S F BUL/SC - CON',
'A SMY S F CON',
'A SMY S F CON - ANK',
'A SMY S F EAS - SYR',
'A SMY S F SEV - ARM',
'A SMY S F SYR',
'A SPA - ALB VIA',
'A SPA - APU VIA',
'A SPA - BEL VIA',
'A SPA - BRE VIA',
'A SPA - BUL VIA',
'A SPA - CLY VIA',
'A SPA - CON VIA',
'A SPA - DEN VIA',
'A SPA - EDI VIA',
'A SPA - GAS',
'A SPA - GAS VIA',
'A SPA - GRE VIA',
'A SPA - HOL VIA',
'A SPA - KIE VIA',
'A SPA - LON VIA',
'A SPA - LVP VIA',
'A SPA - MAR',
'A SPA - MAR VIA',
'A SPA - NAF VIA',
'A SPA - NAP VIA',
'A SPA - NWY VIA',
'A SPA - PIC VIA',
'A SPA - PIE VIA',
'A SPA - POR',
'A SPA - POR VIA',
'A SPA - ROM VIA',
'A SPA - SMY VIA',
'A SPA - STP VIA',
'A SPA - SWE VIA',
'A SPA - SYR VIA',
'A SPA - TRI VIA',
'A SPA - TUN VIA',
'A SPA - TUS VIA',
'A SPA - VEN VIA',
'A SPA - WAL VIA',
'A SPA - YOR VIA',
'A SPA D',
'A SPA H',
'A SPA R GAS',
'A SPA R MAR',
'A SPA R POR',
'A SPA S A ALB - GAS',
'A SPA S A ALB - MAR',
'A SPA S A ALB - POR',
'A SPA S A APU - GAS',
'A SPA S A APU - MAR',
'A SPA S A APU - POR',
'A SPA S A BEL - GAS',
'A SPA S A BEL - MAR',
'A SPA S A BEL - POR',
'A SPA S A BRE - GAS',
'A SPA S A BRE - MAR',
'A SPA S A BRE - POR',
'A SPA S A BUL - MAR',
'A SPA S A BUR - GAS',
'A SPA S A BUR - MAR',
'A SPA S A CLY - GAS',
'A SPA S A CLY - MAR',
'A SPA S A CLY - POR',
'A SPA S A CON - MAR',
'A SPA S A DEN - GAS',
'A SPA S A DEN - POR',
'A SPA S A EDI - GAS',
'A SPA S A EDI - POR',
'A SPA S A GAS',
'A SPA S A GAS - MAR',
'A SPA S A GAS - POR',
'A SPA S A GRE - GAS',
'A SPA S A GRE - MAR',
'A SPA S A GRE - POR',
'A SPA S A HOL - GAS',
'A SPA S A HOL - POR',
'A SPA S A KIE - GAS',
'A SPA S A KIE - POR',
'A SPA S A LON - GAS',
'A SPA S A LON - MAR',
'A SPA S A LON - POR',
'A SPA S A LVP - GAS',
'A SPA S A LVP - MAR',
'A SPA S A LVP - POR',
'A SPA S A MAR',
'A SPA S A MAR - GAS',
'A SPA S A MAR - POR',
'A SPA S A NAF - GAS',
'A SPA S A NAF - MAR',
'A SPA S A NAF - POR',
'A SPA S A NAP - GAS',
'A SPA S A NAP - MAR',
'A SPA S A NAP - POR',
'A SPA S A NWY - GAS',
'A SPA S A NWY - POR',
'A SPA S A PAR - GAS',
'A SPA S A PIC - GAS',
'A SPA S A PIC - MAR',
'A SPA S A PIC - POR',
'A SPA S A PIE - GAS',
'A SPA S A PIE - MAR',
'A SPA S A PIE - POR',
'A SPA S A POR',
'A SPA S A POR - GAS',
'A SPA S A POR - MAR',
'A SPA S A ROM - GAS',
'A SPA S A ROM - MAR',
'A SPA S A ROM - POR',
'A SPA S A SMY - MAR',
'A SPA S A STP - GAS',
'A SPA S A STP - POR',
'A SPA S A SWE - GAS',
'A SPA S A SWE - POR',
'A SPA S A SYR - MAR',
'A SPA S A TRI - MAR',
'A SPA S A TUN - GAS',
'A SPA S A TUN - MAR',
'A SPA S A TUN - POR',
'A SPA S A TUS - GAS',
'A SPA S A TUS - MAR',
'A SPA S A TUS - POR',
'A SPA S A VEN - MAR',
'A SPA S A WAL - GAS',
'A SPA S A WAL - MAR',
'A SPA S A WAL - POR',
'A SPA S A YOR - GAS',
'A SPA S A YOR - POR',
'A SPA S F BRE - GAS',
'A SPA S F GAS',
'A SPA S F LYO - MAR',
'A SPA S F MAO - GAS',
'A SPA S F MAO - POR',
'A SPA S F MAR',
'A SPA S F PIE - MAR',
'A SPA S F POR',
'A STP - BEL VIA',
'A STP - BER VIA',
'A STP - BRE VIA',
'A STP - CLY VIA',
'A STP - DEN VIA',
'A STP - EDI VIA',
'A STP - FIN',
'A STP - FIN VIA',
'A STP - GAS VIA',
'A STP - HOL VIA',
'A STP - KIE VIA',
'A STP - LON VIA',
'A STP - LVN',
'A STP - LVN VIA',
'A STP - LVP VIA',
'A STP - MOS',
'A STP - NAF VIA',
'A STP - NWY',
'A STP - NWY VIA',
'A STP - PIC VIA',
'A STP - POR VIA',
'A STP - PRU VIA',
'A STP - SPA VIA',
'A STP - SWE VIA',
'A STP - WAL VIA',
'A STP - YOR VIA',
'A STP B',
'A STP D',
'A STP H',
'A STP R FIN',
'A STP R LVN',
'A STP R MOS',
'A STP R NWY',
'A STP S A BEL - NWY',
'A STP S A BER - FIN',
'A STP S A BER - LVN',
'A STP S A BRE - NWY',
'A STP S A CLY - NWY',
'A STP S A DEN - FIN',
'A STP S A DEN - LVN',
'A STP S A DEN - NWY',
'A STP S A EDI - NWY',
'A STP S A FIN',
'A STP S A FIN - LVN',
'A STP S A FIN - NWY',
'A STP S A GAS - NWY',
'A STP S A HOL - NWY',
'A STP S A KIE - FIN',
'A STP S A KIE - LVN',
'A STP S A KIE - NWY',
'A STP S A LON - NWY',
'A STP S A LVN',
'A STP S A LVN - FIN',
'A STP S A LVN - MOS',
'A STP S A LVP - NWY',
'A STP S A MOS',
'A STP S A MOS - LVN',
'A STP S A NAF - NWY',
'A STP S A NWY',
'A STP S A NWY - FIN',
'A STP S A PIC - NWY',
'A STP S A POR - NWY',
'A STP S A PRU - FIN',
'A STP S A PRU - LVN',
'A STP S A SEV - MOS',
'A STP S A SPA - NWY',
'A STP S A SWE - FIN',
'A STP S A SWE - LVN',
'A STP S A SWE - NWY',
'A STP S A TUN - NWY',
'A STP S A UKR - MOS',
'A STP S A WAL - NWY',
'A STP S A WAR - LVN',
'A STP S A WAR - MOS',
'A STP S A YOR - NWY',
'A STP S F BAL - LVN',
'A STP S F BAR - NWY',
'A STP S F BOT - FIN',
'A STP S F BOT - LVN',
'A STP S F FIN',
'A STP S F LVN',
'A STP S F NTH - NWY',
'A STP S F NWG - NWY',
'A STP S F NWY',
'A STP S F PRU - LVN',
'A STP S F SKA - NWY',
'A STP S F SWE - FIN',
'A STP S F SWE - NWY',
'A SWE - BEL VIA',
'A SWE - BER VIA',
'A SWE - BRE VIA',
'A SWE - CLY VIA',
'A SWE - DEN',
'A SWE - DEN VIA',
'A SWE - EDI VIA',
'A SWE - FIN',
'A SWE - FIN VIA',
'A SWE - GAS VIA',
'A SWE - HOL VIA',
'A SWE - KIE VIA',
'A SWE - LON VIA',
'A SWE - LVN VIA',
'A SWE - LVP VIA',
'A SWE - NAF VIA',
'A SWE - NWY',
'A SWE - NWY VIA',
'A SWE - PIC VIA',
'A SWE - POR VIA',
'A SWE - PRU VIA',
'A SWE - SPA VIA',
'A SWE - STP VIA',
'A SWE - WAL VIA',
'A SWE - YOR VIA',
'A SWE D',
'A SWE H',
'A SWE R DEN',
'A SWE R FIN',
'A SWE R NWY',
'A SWE S A BEL - DEN',
'A SWE S A BEL - NWY',
'A SWE S A BER - DEN',
'A SWE S A BER - FIN',
'A SWE S A BRE - DEN',
'A SWE S A BRE - NWY',
'A SWE S A CLY - DEN',
'A SWE S A CLY - NWY',
'A SWE S A DEN',
'A SWE S A DEN - FIN',
'A SWE S A DEN - NWY',
'A SWE S A EDI - DEN',
'A SWE S A EDI - NWY',
'A SWE S A FIN',
'A SWE S A FIN - DEN',
'A SWE S A FIN - NWY',
'A SWE S A GAS - DEN',
'A SWE S A GAS - NWY',
'A SWE S A HOL - DEN',
'A SWE S A HOL - NWY',
'A SWE S A KIE - DEN',
'A SWE S A KIE - FIN',
'A SWE S A KIE - NWY',
'A SWE S A LON - DEN',
'A SWE S A LON - NWY',
'A SWE S A LVN - DEN',
'A SWE S A LVN - FIN',
'A SWE S A LVP - DEN',
'A SWE S A LVP - NWY',
'A SWE S A NAF - DEN',
'A SWE S A NAF - NWY',
'A SWE S A NWY',
'A SWE S A NWY - DEN',
'A SWE S A NWY - FIN',
'A SWE S A PIC - DEN',
'A SWE S A PIC - NWY',
'A SWE S A POR - DEN',
'A SWE S A POR - NWY',
'A SWE S A PRU - DEN',
'A SWE S A PRU - FIN',
'A SWE S A SPA - DEN',
'A SWE S A SPA - NWY',
'A SWE S A STP - DEN',
'A SWE S A STP - FIN',
'A SWE S A STP - NWY',
'A SWE S A TUN - DEN',
'A SWE S A TUN - NWY',
'A SWE S A WAL - DEN',
'A SWE S A WAL - NWY',
'A SWE S A YOR - DEN',
'A SWE S A YOR - NWY',
'A SWE S F BAL - DEN',
'A SWE S F BAR - NWY',
'A SWE S F BOT - FIN',
'A SWE S F DEN',
'A SWE S F FIN',
'A SWE S F HEL - DEN',
'A SWE S F KIE - DEN',
'A SWE S F NTH - DEN',
'A SWE S F NTH - NWY',
'A SWE S F NWG - NWY',
'A SWE S F NWY',
'A SWE S F SKA - DEN',
'A SWE S F SKA - NWY',
'A SWE S F STP/NC - NWY',
'A SWE S F STP/SC - FIN',
'A SYR - ALB VIA',
'A SYR - APU VIA',
'A SYR - ARM',
'A SYR - BUL VIA',
'A SYR - CON VIA',
'A SYR - GRE VIA',
'A SYR - MAR VIA',
'A SYR - NAF VIA',
'A SYR - NAP VIA',
'A SYR - PIE VIA',
'A SYR - ROM VIA',
'A SYR - SMY',
'A SYR - SMY VIA',
'A SYR - SPA VIA',
'A SYR - TRI VIA',
'A SYR - TUN VIA',
'A SYR - TUS VIA',
'A SYR - VEN VIA',
'A SYR D',
'A SYR H',
'A SYR R ARM',
'A SYR R SMY',
'A SYR S A ALB - SMY',
'A SYR S A ANK - ARM',
'A SYR S A ANK - SMY',
'A SYR S A APU - SMY',
'A SYR S A ARM',
'A SYR S A ARM - SMY',
'A SYR S A BUL - ARM',
'A SYR S A BUL - SMY',
'A SYR S A CON - ARM',
'A SYR S A CON - SMY',
'A SYR S A GRE - SMY',
'A SYR S A MAR - SMY',
'A SYR S A NAF - SMY',
'A SYR S A NAP - SMY',
'A SYR S A PIE - SMY',
'A SYR S A ROM - SMY',
'A SYR S A RUM - ARM',
'A SYR S A SEV - ARM',
'A SYR S A SMY',
'A SYR S A SMY - ARM',
'A SYR S A SPA - SMY',
'A SYR S A TRI - SMY',
'A SYR S A TUN - SMY',
'A SYR S A TUS - SMY',
'A SYR S A VEN - SMY',
'A SYR S F AEG - SMY',
'A SYR S F ANK - ARM',
'A SYR S F ARM',
'A SYR S F BLA - ARM',
'A SYR S F CON - SMY',
'A SYR S F EAS - SMY',
'A SYR S F SEV - ARM',
'A SYR S F SMY',
'A TRI - ALB',
'A TRI - ALB VIA',
'A TRI - APU VIA',
'A TRI - BUD',
'A TRI - BUL VIA',
'A TRI - CON VIA',
'A TRI - GRE VIA',
'A TRI - MAR VIA',
'A TRI - NAF VIA',
'A TRI - NAP VIA',
'A TRI - PIE VIA',
'A TRI - ROM VIA',
'A TRI - SER',
'A TRI - SMY VIA',
'A TRI - SPA VIA',
'A TRI - SYR VIA',
'A TRI - TUN VIA',
'A TRI - TUS VIA',
'A TRI - TYR',
'A TRI - VEN',
'A TRI - VEN VIA',
'A TRI - VIE',
'A TRI B',
'A TRI D',
'A TRI H',
'A TRI R ALB',
'A TRI R BUD',
'A TRI R SER',
'A TRI R TYR',
'A TRI R VEN',
'A TRI R VIE',
'A TRI S A ALB',
'A TRI S A ALB - SER',
'A TRI S A ALB - VEN',
'A TRI S A APU - ALB',
'A TRI S A APU - VEN',
'A TRI S A BOH - TYR',
'A TRI S A BOH - VIE',
'A TRI S A BRE - ALB',
'A TRI S A BUD',
'A TRI S A BUD - SER',
'A TRI S A BUD - VIE',
'A TRI S A BUL - ALB',
'A TRI S A BUL - SER',
'A TRI S A BUL - VEN',
'A TRI S A CON - ALB',
'A TRI S A CON - VEN',
'A TRI S A GAL - BUD',
'A TRI S A GAL - VIE',
'A TRI S A GAS - ALB',
'A TRI S A GRE - ALB',
'A TRI S A GRE - SER',
'A TRI S A GRE - VEN',
'A TRI S A MAR - ALB',
'A TRI S A MAR - VEN',
'A TRI S A MUN - TYR',
'A TRI S A NAF - ALB',
'A TRI S A NAF - VEN',
'A TRI S A NAP - ALB',
'A TRI S A NAP - VEN',
'A TRI S A PIE - ALB',
'A TRI S A PIE - TYR',
'A TRI S A PIE - VEN',
'A TRI S A POR - ALB',
'A TRI S A ROM - ALB',
'A TRI S A ROM - VEN',
'A TRI S A RUM - BUD',
'A TRI S A RUM - SER',
'A TRI S A SER',
'A TRI S A SER - ALB',
'A TRI S A SER - BUD',
'A TRI S A SMY - ALB',
'A TRI S A SMY - VEN',
'A TRI S A SPA - ALB',
'A TRI S A SPA - VEN',
'A TRI S A SYR - ALB',
'A TRI S A SYR - VEN',
'A TRI S A TUN - ALB',
'A TRI S A TUN - VEN',
'A TRI S A TUS - ALB',
'A TRI S A TUS - VEN',
'A TRI S A TYR',
'A TRI S A TYR - VEN',
'A TRI S A TYR - VIE',
'A TRI S A VEN',
'A TRI S A VEN - ALB',
'A TRI S A VEN - TYR',
'A TRI S A VIE',
'A TRI S A VIE - BUD',
'A TRI S A VIE - TYR',
'A TRI S F ADR - ALB',
'A TRI S F ADR - VEN',
'A TRI S F ALB',
'A TRI S F APU - VEN',
'A TRI S F GRE - ALB',
'A TRI S F ION - ALB',
'A TRI S F VEN',
'A TUN - ALB VIA',
'A TUN - APU VIA',
'A TUN - BEL VIA',
'A TUN - BRE VIA',
'A TUN - BUL VIA',
'A TUN - CLY VIA',
'A TUN - CON VIA',
'A TUN - DEN VIA',
'A TUN - EDI VIA',
'A TUN - GAS VIA',
'A TUN - GRE VIA',
'A TUN - HOL VIA',
'A TUN - LON VIA',
'A TUN - LVP VIA',
'A TUN - MAR VIA',
'A TUN - NAF',
'A TUN - NAF VIA',
'A TUN - NAP VIA',
'A TUN - NWY VIA',
'A TUN - PIC VIA',
'A TUN - PIE VIA',
'A TUN - POR VIA',
'A TUN - ROM VIA',
'A TUN - SMY VIA',
'A TUN - SPA VIA',
'A TUN - SYR VIA',
'A TUN - TRI VIA',
'A TUN - TUS VIA',
'A TUN - VEN VIA',
'A TUN - WAL VIA',
'A TUN - YOR VIA',
'A TUN D',
'A TUN H',
'A TUN R NAF',
'A TUN S A ALB - NAF',
'A TUN S A APU - NAF',
'A TUN S A BEL - NAF',
'A TUN S A BRE - NAF',
'A TUN S A BUL - NAF',
'A TUN S A CLY - NAF',
'A TUN S A CON - NAF',
'A TUN S A DEN - NAF',
'A TUN S A EDI - NAF',
'A TUN S A GAS - NAF',
'A TUN S A GRE - NAF',
'A TUN S A HOL - NAF',
'A TUN S A KIE - NAF',
'A TUN S A LON - NAF',
'A TUN S A LVP - NAF',
'A TUN S A MAR - NAF',
'A TUN S A NAF',
'A TUN S A NAP - NAF',
'A TUN S A NWY - NAF',
'A TUN S A PIC - NAF',
'A TUN S A PIE - NAF',
'A TUN S A POR - NAF',
'A TUN S A ROM - NAF',
'A TUN S A SMY - NAF',
'A TUN S A SPA - NAF',
'A TUN S A STP - NAF',
'A TUN S A SWE - NAF',
'A TUN S A SYR - NAF',
'A TUN S A TRI - NAF',
'A TUN S A TUS - NAF',
'A TUN S A VEN - NAF',
'A TUN S A WAL - NAF',
'A TUN S A YOR - NAF',
'A TUN S F MAO - NAF',
'A TUN S F NAF',
'A TUN S F WES - NAF',
'A TUS - ALB VIA',
'A TUS - APU VIA',
'A TUS - BEL VIA',
'A TUS - BRE VIA',
'A TUS - BUL VIA',
'A TUS - CLY VIA',
'A TUS - CON VIA',
'A TUS - GAS VIA',
'A TUS - GRE VIA',
'A TUS - LON VIA',
'A TUS - LVP VIA',
'A TUS - MAR VIA',
'A TUS - NAF VIA',
'A TUS - NAP VIA',
'A TUS - PIC VIA',
'A TUS - PIE',
'A TUS - PIE VIA',
'A TUS - POR VIA',
'A TUS - ROM',
'A TUS - ROM VIA',
'A TUS - SMY VIA',
'A TUS - SPA VIA',
'A TUS - SYR VIA',
'A TUS - TRI VIA',
'A TUS - TUN VIA',
'A TUS - VEN',
'A TUS - VEN VIA',
'A TUS - WAL VIA',
'A TUS D',
'A TUS H',
'A TUS R PIE',
'A TUS R ROM',
'A TUS R VEN',
'A TUS S A ALB - PIE',
'A TUS S A ALB - ROM',
'A TUS S A ALB - VEN',
'A TUS S A APU - PIE',
'A TUS S A APU - ROM',
'A TUS S A APU - VEN',
'A TUS S A BEL - PIE',
'A TUS S A BEL - ROM',
'A TUS S A BRE - PIE',
'A TUS S A BRE - ROM',
'A TUS S A BUL - PIE',
'A TUS S A BUL - ROM',
'A TUS S A BUL - VEN',
'A TUS S A CLY - PIE',
'A TUS S A CLY - ROM',
'A TUS S A CON - PIE',
'A TUS S A CON - ROM',
'A TUS S A CON - VEN',
'A TUS S A GAS - PIE',
'A TUS S A GAS - ROM',
'A TUS S A GRE - PIE',
'A TUS S A GRE - ROM',
'A TUS S A GRE - VEN',
'A TUS S A LON - PIE',
'A TUS S A LON - ROM',
'A TUS S A LVP - PIE',
'A TUS S A LVP - ROM',
'A TUS S A MAR - PIE',
'A TUS S A MAR - ROM',
'A TUS S A MAR - VEN',
'A TUS S A NAF - PIE',
'A TUS S A NAF - ROM',
'A TUS S A NAF - VEN',
'A TUS S A NAP - PIE',
'A TUS S A NAP - ROM',
'A TUS S A NAP - VEN',
'A TUS S A PIC - PIE',
'A TUS S A PIC - ROM',
'A TUS S A PIE',
'A TUS S A PIE - ROM',
'A TUS S A PIE - VEN',
'A TUS S A POR - PIE',
'A TUS S A POR - ROM',
'A TUS S A ROM',
'A TUS S A ROM - PIE',
'A TUS S A ROM - VEN',
'A TUS S A SMY - PIE',
'A TUS S A SMY - ROM',
'A TUS S A SMY - VEN',
'A TUS S A SPA - PIE',
'A TUS S A SPA - ROM',
'A TUS S A SPA - VEN',
'A TUS S A SYR - PIE',
'A TUS S A SYR - ROM',
'A TUS S A SYR - VEN',
'A TUS S A TRI - PIE',
'A TUS S A TRI - ROM',
'A TUS S A TRI - VEN',
'A TUS S A TUN - PIE',
'A TUS S A TUN - ROM',
'A TUS S A TUN - VEN',
'A TUS S A TYR - PIE',
'A TUS S A TYR - VEN',
'A TUS S A VEN',
'A TUS S A VEN - PIE',
'A TUS S A VEN - ROM',
'A TUS S A WAL - PIE',
'A TUS S A WAL - ROM',
'A TUS S F ADR - VEN',
'A TUS S F APU - VEN',
'A TUS S F LYO - PIE',
'A TUS S F MAR - PIE',
'A TUS S F NAP - ROM',
'A TUS S F PIE',
'A TUS S F ROM',
'A TUS S F TRI - VEN',
'A TUS S F TYS - ROM',
'A TUS S F VEN',
'A TYR - BOH',
'A TYR - MUN',
'A TYR - PIE',
'A TYR - TRI',
'A TYR - VEN',
'A TYR - VIE',
'A TYR D',
'A TYR H',
'A TYR R BOH',
'A TYR R MUN',
'A TYR R PIE',
'A TYR R TRI',
'A TYR R VEN',
'A TYR R VIE',
'A TYR S A ALB - PIE',
'A TYR S A ALB - TRI',
'A TYR S A ALB - VEN',
'A TYR S A APU - PIE',
'A TYR S A APU - TRI',
'A TYR S A APU - VEN',
'A TYR S A BEL - PIE',
'A TYR S A BER - MUN',
'A TYR S A BOH',
'A TYR S A BOH - MUN',
'A TYR S A BOH - VIE',
'A TYR S A BRE - PIE',
'A TYR S A BUD - TRI',
'A TYR S A BUD - VIE',
'A TYR S A BUL - PIE',
'A TYR S A BUL - TRI',
'A TYR S A BUL - VEN',
'A TYR S A BUR - MUN',
'A TYR S A CLY - PIE',
'A TYR S A CON - PIE',
'A TYR S A CON - TRI',
'A TYR S A CON - VEN',
'A TYR S A GAL - BOH',
'A TYR S A GAL - VIE',
'A TYR S A GAS - PIE',
'A TYR S A GRE - PIE',
'A TYR S A GRE - TRI',
'A TYR S A GRE - VEN',
'A TYR S A KIE - MUN',
'A TYR S A LON - PIE',
'A TYR S A LVP - PIE',
'A TYR S A MAR - PIE',
'A TYR S A MAR - TRI',
'A TYR S A MAR - VEN',
'A TYR S A MUN',
'A TYR S A MUN - BOH',
'A TYR S A NAF - PIE',
'A TYR S A NAF - TRI',
'A TYR S A NAF - VEN',
'A TYR S A NAP - PIE',
'A TYR S A NAP - TRI',
'A TYR S A NAP - VEN',
'A TYR S A PIC - PIE',
'A TYR S A PIE',
'A TYR S A PIE - TRI',
'A TYR S A PIE - VEN',
'A TYR S A POR - PIE',
'A TYR S A ROM - PIE',
'A TYR S A ROM - TRI',
'A TYR S A ROM - VEN',
'A TYR S A RUH - MUN',
'A TYR S A SER - TRI',
'A TYR S A SIL - BOH',
'A TYR S A SIL - MUN',
'A TYR S A SMY - PIE',
'A TYR S A SMY - TRI',
'A TYR S A SMY - VEN',
'A TYR S A SPA - PIE',
'A TYR S A SPA - TRI',
'A TYR S A SPA - VEN',
'A TYR S A SYR - PIE',
'A TYR S A SYR - TRI',
'A TYR S A SYR - VEN',
'A TYR S A TRI',
'A TYR S A TRI - PIE',
'A TYR S A TRI - VEN',
'A TYR S A TRI - VIE',
'A TYR S A TUN - PIE',
'A TYR S A TUN - TRI',
'A TYR S A TUN - VEN',
'A TYR S A TUS - PIE',
'A TYR S A TUS - TRI',
'A TYR S A TUS - VEN',
'A TYR S A VEN',
'A TYR S A VEN - PIE',
'A TYR S A VEN - TRI',
'A TYR S A VIE',
'A TYR S A VIE - BOH',
'A TYR S A VIE - TRI',
'A TYR S A WAL - PIE',
'A TYR S F ADR - TRI',
'A TYR S F ADR - VEN',
'A TYR S F ALB - TRI',
'A TYR S F APU - VEN',
'A TYR S F LYO - PIE',
'A TYR S F MAR - PIE',
'A TYR S F PIE',
'A TYR S F TRI',
'A TYR S F TRI - VEN',
'A TYR S F TUS - PIE',
'A TYR S F VEN',
'A TYR S F VEN - TRI',
'A UKR - GAL',
'A UKR - MOS',
'A UKR - RUM',
'A UKR - SEV',
'A UKR - WAR',
'A UKR D',
'A UKR H',
'A UKR R GAL',
'A UKR R MOS',
'A UKR R RUM',
'A UKR R SEV',
'A UKR R WAR',
'A UKR S A ANK - RUM',
'A UKR S A ANK - SEV',
'A UKR S A ARM - RUM',
'A UKR S A ARM - SEV',
'A UKR S A BOH - GAL',
'A UKR S A BUD - GAL',
'A UKR S A BUD - RUM',
'A UKR S A BUL - RUM',
'A UKR S A BUL - SEV',
'A UKR S A CON - RUM',
'A UKR S A CON - SEV',
'A UKR S A GAL',
'A UKR S A GAL - RUM',
'A UKR S A GAL - WAR',
'A UKR S A LVN - MOS',
'A UKR S A LVN - WAR',
'A UKR S A MOS',
'A UKR S A MOS - SEV',
'A UKR S A MOS - WAR',
'A UKR S A PRU - WAR',
'A UKR S A RUM',
'A UKR S A RUM - GAL',
'A UKR S A RUM - SEV',
'A UKR S A SER - RUM',
'A UKR S A SEV',
'A UKR S A SEV - MOS',
'A UKR S A SEV - RUM',
'A UKR S A SIL - GAL',
'A UKR S A SIL - WAR',
'A UKR S A STP - MOS',
'A UKR S A VIE - GAL',
'A UKR S A WAR',
'A UKR S A WAR - GAL',
'A UKR S A WAR - MOS',
'A UKR S F ARM - SEV',
'A UKR S F BLA - RUM',
'A UKR S F BLA - SEV',
'A UKR S F BUL/EC - RUM',
'A UKR S F RUM',
'A UKR S F RUM - SEV',
'A UKR S F SEV',
'A UKR S F SEV - RUM',
'A VEN - ALB VIA',
'A VEN - APU',
'A VEN - APU VIA',
'A VEN - BUL VIA',
'A VEN - CON VIA',
'A VEN - GRE VIA',
'A VEN - MAR VIA',
'A VEN - NAF VIA',
'A VEN - NAP VIA',
'A VEN - PIE',
'A VEN - PIE VIA',
'A VEN - ROM',
'A VEN - ROM VIA',
'A VEN - SMY VIA',
'A VEN - SPA VIA',
'A VEN - SYR VIA',
'A VEN - TRI',
'A VEN - TRI VIA',
'A VEN - TUN VIA',
'A VEN - TUS',
'A VEN - TUS VIA',
'A VEN - TYR',
'A VEN B',
'A VEN D',
'A VEN H',
'A VEN R APU',
'A VEN R PIE',
'A VEN R ROM',
'A VEN R TRI',
'A VEN R TUS',
'A VEN R TYR',
'A VEN S A ALB - APU',
'A VEN S A ALB - PIE',
'A VEN S A ALB - ROM',
'A VEN S A ALB - TRI',
'A VEN S A ALB - TUS',
'A VEN S A APU',
'A VEN S A APU - PIE',
'A VEN S A APU - ROM',
'A VEN S A APU - TRI',
'A VEN S A APU - TUS',
'A VEN S A BEL - PIE',
'A VEN S A BEL - ROM',
'A VEN S A BEL - TUS',
'A VEN S A BOH - TYR',
'A VEN S A BRE - APU',
'A VEN S A BRE - PIE',
'A VEN S A BRE - ROM',
'A VEN S A BRE - TUS',
'A VEN S A BUD - TRI',
'A VEN S A BUL - APU',
'A VEN S A BUL - PIE',
'A VEN S A BUL - ROM',
'A VEN S A BUL - TRI',
'A VEN S A BUL - TUS',
'A VEN S A CLY - PIE',
'A VEN S A CLY - ROM',
'A VEN S A CLY - TUS',
'A VEN S A CON - APU',
'A VEN S A CON - PIE',
'A VEN S A CON - ROM',
'A VEN S A CON - TRI',
'A VEN S A CON - TUS',
'A VEN S A GAS - APU',
'A VEN S A GAS - PIE',
'A VEN S A GAS - ROM',
'A VEN S A GAS - TUS',
'A VEN S A GRE - APU',
'A VEN S A GRE - PIE',
'A VEN S A GRE - ROM',
'A VEN S A GRE - TRI',
'A VEN S A GRE - TUS',
'A VEN S A LON - PIE',
'A VEN S A LON - ROM',
'A VEN S A LON - TUS',
'A VEN S A LVP - PIE',
'A VEN S A LVP - ROM',
'A VEN S A LVP - TUS',
'A VEN S A MAR - APU',
'A VEN S A MAR - PIE',
'A VEN S A MAR - ROM',
'A VEN S A MAR - TRI',
'A VEN S A MAR - TUS',
'A VEN S A MUN - TYR',
'A VEN S A NAF - APU',
'A VEN S A NAF - PIE',
'A VEN S A NAF - ROM',
'A VEN S A NAF - TRI',
'A VEN S A NAF - TUS',
'A VEN S A NAP - APU',
'A VEN S A NAP - PIE',
'A VEN S A NAP - ROM',
'A VEN S A NAP - TRI',
'A VEN S A NAP - TUS',
'A VEN S A PIC - PIE',
'A VEN S A PIC - ROM',
'A VEN S A PIC - TUS',
'A VEN S A PIE',
'A VEN S A PIE - APU',
'A VEN S A PIE - ROM',
'A VEN S A PIE - TRI',
'A VEN S A PIE - TUS',
'A VEN S A PIE - TYR',
'A VEN S A POR - APU',
'A VEN S A POR - PIE',
'A VEN S A POR - ROM',
'A VEN S A POR - TUS',
'A VEN S A ROM',
'A VEN S A ROM - APU',
'A VEN S A ROM - PIE',
'A VEN S A ROM - TRI',
'A VEN S A ROM - TUS',
'A VEN S A SER - TRI',
'A VEN S A SMY - APU',
'A VEN S A SMY - PIE',
'A VEN S A SMY - ROM',
'A VEN S A SMY - TRI',
'A VEN S A SMY - TUS',
'A VEN S A SPA - APU',
'A VEN S A SPA - PIE',
'A VEN S A SPA - ROM',
'A VEN S A SPA - TRI',
'A VEN S A SPA - TUS',
'A VEN S A SYR - APU',
'A VEN S A SYR - PIE',
'A VEN S A SYR - ROM',
'A VEN S A SYR - TRI',
'A VEN S A SYR - TUS',
'A VEN S A TRI',
'A VEN S A TRI - APU',
'A VEN S A TRI - PIE',
'A VEN S A TRI - ROM',
'A VEN S A TRI - TUS',
'A VEN S A TRI - TYR',
'A VEN S A TUN - APU',
'A VEN S A TUN - PIE',
'A VEN S A TUN - ROM',
'A VEN S A TUN - TRI',
'A VEN S A TUN - TUS',
'A VEN S A TUS',
'A VEN S A TUS - APU',
'A VEN S A TUS - PIE',
'A VEN S A TUS - ROM',
'A VEN S A TUS - TRI',
'A VEN S A TYR',
'A VEN S A TYR - PIE',
'A VEN S A TYR - TRI',
'A VEN S A VIE - TRI',
'A VEN S A VIE - TYR',
'A VEN S A WAL - PIE',
'A VEN S A WAL - ROM',
'A VEN S A WAL - TUS',
'A VEN S F ADR - APU',
'A VEN S F ADR - TRI',
'A VEN S F ALB - TRI',
'A VEN S F APU',
'A VEN S F ION - APU',
'A VEN S F LYO - PIE',
'A VEN S F LYO - TUS',
'A VEN S F MAR - PIE',
'A VEN S F NAP - APU',
'A VEN S F NAP - ROM',
'A VEN S F PIE',
'A VEN S F PIE - TUS',
'A VEN S F ROM',
'A VEN S F ROM - TUS',
'A VEN S F TRI',
'A VEN S F TUS',
'A VEN S F TUS - PIE',
'A VEN S F TUS - ROM',
'A VEN S F TYS - ROM',
'A VEN S F TYS - TUS',
'A VIE - BOH',
'A VIE - BUD',
'A VIE - GAL',
'A VIE - TRI',
'A VIE - TYR',
'A VIE B',
'A VIE D',
'A VIE H',
'A VIE R BOH',
'A VIE R BUD',
'A VIE R GAL',
'A VIE R TRI',
'A VIE R TYR',
'A VIE S A ALB - TRI',
'A VIE S A APU - TRI',
'A VIE S A BOH',
'A VIE S A BOH - GAL',
'A VIE S A BOH - TYR',
'A VIE S A BUD',
'A VIE S A BUD - GAL',
'A VIE S A BUD - TRI',
'A VIE S A BUL - TRI',
'A VIE S A CON - TRI',
'A VIE S A GAL',
'A VIE S A GAL - BOH',
'A VIE S A GAL - BUD',
'A VIE S A GRE - TRI',
'A VIE S A MAR - TRI',
'A VIE S A MUN - BOH',
'A VIE S A MUN - TYR',
'A VIE S A NAF - TRI',
'A VIE S A NAP - TRI',
'A VIE S A PIE - TRI',
'A VIE S A PIE - TYR',
'A VIE S A ROM - TRI',
'A VIE S A RUM - BUD',
'A VIE S A RUM - GAL',
'A VIE S A SER - BUD',
'A VIE S A SER - TRI',
'A VIE S A SIL - BOH',
'A VIE S A SIL - GAL',
'A VIE S A SMY - TRI',
'A VIE S A SPA - TRI',
'A VIE S A SYR - TRI',
'A VIE S A TRI',
'A VIE S A TRI - BUD',
'A VIE S A TRI - TYR',
'A VIE S A TUN - TRI',
'A VIE S A TUS - TRI',
'A VIE S A TYR',
'A VIE S A TYR - BOH',
'A VIE S A TYR - TRI',
'A VIE S A UKR - GAL',
'A VIE S A VEN - TRI',
'A VIE S A VEN - TYR',
'A VIE S A WAR - GAL',
'A VIE S F ADR - TRI',
'A VIE S F ALB - TRI',
'A VIE S F TRI',
'A VIE S F VEN - TRI',
'A WAL - BEL VIA',
'A WAL - BRE VIA',
'A WAL - CLY VIA',
'A WAL - DEN VIA',
'A WAL - EDI VIA',
'A WAL - GAS VIA',
'A WAL - HOL VIA',
'A WAL - KIE VIA',
'A WAL - LON',
'A WAL - LON VIA',
'A WAL - LVP',
'A WAL - LVP VIA',
'A WAL - MAR VIA',
'A WAL - NAF VIA',
'A WAL - NAP VIA',
'A WAL - NWY VIA',
'A WAL - PIC VIA',
'A WAL - PIE VIA',
'A WAL - POR VIA',
'A WAL - ROM VIA',
'A WAL - SPA VIA',
'A WAL - STP VIA',
'A WAL - SWE VIA',
'A WAL - TUN VIA',
'A WAL - TUS VIA',
'A WAL - YOR',
'A WAL - YOR VIA',
'A WAL D',
'A WAL H',
'A WAL R LON',
'A WAL R LVP',
'A WAL R YOR',
'A WAL S A BEL - LON',
'A WAL S A BEL - LVP',
'A WAL S A BEL - YOR',
'A WAL S A BRE - LON',
'A WAL S A BRE - LVP',
'A WAL S A BRE - YOR',
'A WAL S A CLY - LON',
'A WAL S A CLY - LVP',
'A WAL S A CLY - YOR',
'A WAL S A DEN - LON',
'A WAL S A DEN - LVP',
'A WAL S A DEN - YOR',
'A WAL S A EDI - LON',
'A WAL S A EDI - LVP',
'A WAL S A EDI - YOR',
'A WAL S A GAS - LON',
'A WAL S A GAS - LVP',
'A WAL S A GAS - YOR',
'A WAL S A HOL - LON',
'A WAL S A HOL - LVP',
'A WAL S A HOL - YOR',
'A WAL S A KIE - LON',
'A WAL S A KIE - LVP',
'A WAL S A KIE - YOR',
'A WAL S A LON',
'A WAL S A LON - LVP',
'A WAL S A LON - YOR',
'A WAL S A LVP',
'A WAL S A LVP - LON',
'A WAL S A LVP - YOR',
'A WAL S A MAR - LON',
'A WAL S A MAR - LVP',
'A WAL S A NAF - LON',
'A WAL S A NAF - LVP',
'A WAL S A NAF - YOR',
'A WAL S A NAP - LON',
'A WAL S A NAP - LVP',
'A WAL S A NWY - LON',
'A WAL S A NWY - LVP',
'A WAL S A NWY - YOR',
'A WAL S A PIC - LON',
'A WAL S A PIC - LVP',
'A WAL S A PIC - YOR',
'A WAL S A PIE - LON',
'A WAL S A PIE - LVP',
'A WAL S A POR - LON',
'A WAL S A POR - LVP',
'A WAL S A POR - YOR',
'A WAL S A ROM - LON',
'A WAL S A ROM - LVP',
'A WAL S A SPA - LON',
'A WAL S A SPA - LVP',
'A WAL S A SPA - YOR',
'A WAL S A STP - LON',
'A WAL S A STP - LVP',
'A WAL S A STP - YOR',
'A WAL S A SWE - LON',
'A WAL S A SWE - LVP',
'A WAL S A SWE - YOR',
'A WAL S A TUN - LON',
'A WAL S A TUN - LVP',
'A WAL S A TUN - YOR',
'A WAL S A TUS - LON',
'A WAL S A TUS - LVP',
'A WAL S A YOR',
'A WAL S A YOR - LON',
'A WAL S A YOR - LVP',
'A WAL S F CLY - LVP',
'A WAL S F EDI - YOR',
'A WAL S F ENG - LON',
'A WAL S F IRI - LVP',
'A WAL S F LON',
'A WAL S F LON - YOR',
'A WAL S F LVP',
'A WAL S F NAO - LVP',
'A WAL S F NTH - LON',
'A WAL S F NTH - YOR',
'A WAL S F YOR',
'A WAL S F YOR - LON',
'A WAR - GAL',
'A WAR - LVN',
'A WAR - MOS',
'A WAR - PRU',
'A WAR - SIL',
'A WAR - UKR',
'A WAR B',
'A WAR D',
'A WAR H',
'A WAR R GAL',
'A WAR R LVN',
'A WAR R MOS',
'A WAR R PRU',
'A WAR R SIL',
'A WAR R UKR',
'A WAR S A BER - LVN',
'A WAR S A BER - PRU',
'A WAR S A BER - SIL',
'A WAR S A BOH - GAL',
'A WAR S A BOH - SIL',
'A WAR S A BUD - GAL',
'A WAR S A DEN - LVN',
'A WAR S A DEN - PRU',
'A WAR S A FIN - LVN',
'A WAR S A FIN - PRU',
'A WAR S A GAL',
'A WAR S A GAL - SIL',
'A WAR S A GAL - UKR',
'A WAR S A KIE - LVN',
'A WAR S A KIE - PRU',
'A WAR S A LVN',
'A WAR S A LVN - MOS',
'A WAR S A LVN - PRU',
'A WAR S A MOS',
'A WAR S A MOS - LVN',
'A WAR S A MOS - UKR',
'A WAR S A MUN - SIL',
'A WAR S A PRU',
'A WAR S A PRU - LVN',
'A WAR S A PRU - SIL',
'A WAR S A RUM - GAL',
'A WAR S A RUM - UKR',
'A WAR S A SEV - MOS',
'A WAR S A SEV - UKR',
'A WAR S A SIL',
'A WAR S A SIL - GAL',
'A WAR S A SIL - PRU',
'A WAR S A STP - LVN',
'A WAR S A STP - MOS',
'A WAR S A STP - PRU',
'A WAR S A SWE - LVN',
'A WAR S A SWE - PRU',
'A WAR S A UKR',
'A WAR S A UKR - GAL',
'A WAR S A UKR - MOS',
'A WAR S A VIE - GAL',
'A WAR S F BAL - LVN',
'A WAR S F BAL - PRU',
'A WAR S F BER - PRU',
'A WAR S F BOT - LVN',
'A WAR S F LVN',
'A WAR S F LVN - PRU',
'A WAR S F PRU',
'A WAR S F PRU - LVN',
'A WAR S F STP/SC - LVN',
'A YOR - BEL VIA',
'A YOR - BRE VIA',
'A YOR - CLY VIA',
'A YOR - DEN VIA',
'A YOR - EDI',
'A YOR - EDI VIA',
'A YOR - GAS VIA',
'A YOR - HOL VIA',
'A YOR - KIE VIA',
'A YOR - LON',
'A YOR - LON VIA',
'A YOR - LVP',
'A YOR - LVP VIA',
'A YOR - NAF VIA',
'A YOR - NWY VIA',
'A YOR - PIC VIA',
'A YOR - POR VIA',
'A YOR - SPA VIA',
'A YOR - STP VIA',
'A YOR - SWE VIA',
'A YOR - TUN VIA',
'A YOR - WAL',
'A YOR - WAL VIA',
'A YOR D',
'A YOR H',
'A YOR R EDI',
'A YOR R LON',
'A YOR R LVP',
'A YOR R WAL',
'A YOR S A BEL - EDI',
'A YOR S A BEL - LON',
'A YOR S A BEL - LVP',
'A YOR S A BEL - WAL',
'A YOR S A BRE - EDI',
'A YOR S A BRE - LON',
'A YOR S A BRE - LVP',
'A YOR S A BRE - WAL',
'A YOR S A CLY - EDI',
'A YOR S A CLY - LON',
'A YOR S A CLY - LVP',
'A YOR S A CLY - WAL',
'A YOR S A DEN - EDI',
'A YOR S A DEN - LON',
'A YOR S A DEN - LVP',
'A YOR S A DEN - WAL',
'A YOR S A EDI',
'A YOR S A EDI - LON',
'A YOR S A EDI - LVP',
'A YOR S A EDI - WAL',
'A YOR S A GAS - EDI',
'A YOR S A GAS - LON',
'A YOR S A GAS - LVP',
'A YOR S A GAS - WAL',
'A YOR S A HOL - EDI',
'A YOR S A HOL - LON',
'A YOR S A HOL - LVP',
'A YOR S A HOL - WAL',
'A YOR S A KIE - EDI',
'A YOR S A KIE - LON',
'A YOR S A KIE - LVP',
'A YOR S A KIE - WAL',
'A YOR S A LON',
'A YOR S A LON - EDI',
'A YOR S A LON - LVP',
'A YOR S A LON - WAL',
'A YOR S A LVP',
'A YOR S A LVP - EDI',
'A YOR S A LVP - LON',
'A YOR S A LVP - WAL',
'A YOR S A MAR - LON',
'A YOR S A MAR - LVP',
'A YOR S A MAR - WAL',
'A YOR S A NAF - EDI',
'A YOR S A NAF - LON',
'A YOR S A NAF - LVP',
'A YOR S A NAF - WAL',
'A YOR S A NAP - LON',
'A YOR S A NAP - LVP',
'A YOR S A NAP - WAL',
'A YOR S A NWY - EDI',
'A YOR S A NWY - LON',
'A YOR S A NWY - LVP',
'A YOR S A NWY - WAL',
'A YOR S A PIC - EDI',
'A YOR S A PIC - LON',
'A YOR S A PIC - LVP',
'A YOR S A PIC - WAL',
'A YOR S A PIE - LON',
'A YOR S A PIE - LVP',
'A YOR S A PIE - WAL',
'A YOR S A POR - EDI',
'A YOR S A POR - LON',
'A YOR S A POR - LVP',
'A YOR S A POR - WAL',
'A YOR S A ROM - LON',
'A YOR S A ROM - LVP',
'A YOR S A ROM - WAL',
'A YOR S A SPA - EDI',
'A YOR S A SPA - LON',
'A YOR S A SPA - LVP',
'A YOR S A SPA - WAL',
'A YOR S A STP - EDI',
'A YOR S A STP - LON',
'A YOR S A STP - LVP',
'A YOR S A STP - WAL',
'A YOR S A SWE - EDI',
'A YOR S A SWE - LON',
'A YOR S A SWE - LVP',
'A YOR S A SWE - WAL',
'A YOR S A TUN - EDI',
'A YOR S A TUN - LON',
'A YOR S A TUN - LVP',
'A YOR S A TUN - WAL',
'A YOR S A TUS - LON',
'A YOR S A TUS - LVP',
'A YOR S A TUS - WAL',
'A YOR S A WAL',
'A YOR S A WAL - EDI',
'A YOR S A WAL - LON',
'A YOR S A WAL - LVP',
'A YOR S F CLY - EDI',
'A YOR S F CLY - LVP',
'A YOR S F EDI',
'A YOR S F ENG - LON',
'A YOR S F ENG - WAL',
'A YOR S F IRI - LVP',
'A YOR S F IRI - WAL',
'A YOR S F LON',
'A YOR S F LON - WAL',
'A YOR S F LVP',
'A YOR S F LVP - WAL',
'A YOR S F NAO - LVP',
'A YOR S F NTH - EDI',
'A YOR S F NTH - LON',
'A YOR S F NWG - EDI',
'A YOR S F WAL',
'A YOR S F WAL - LON',
'A YOR S F WAL - LVP',
'F ADR - ALB',
'F ADR - APU',
'F ADR - ION',
'F ADR - TRI',
'F ADR - VEN',
'F ADR C A ALB - APU',
'F ADR C A ALB - TRI',
'F ADR C A ALB - VEN',
'F ADR C A APU - ALB',
'F ADR C A APU - TRI',
'F ADR C A APU - VEN',
'F ADR C A BUL - TRI',
'F ADR C A BUL - VEN',
'F ADR C A CON - TRI',
'F ADR C A CON - VEN',
'F ADR C A GRE - TRI',
'F ADR C A GRE - VEN',
'F ADR C A MAR - TRI',
'F ADR C A MAR - VEN',
'F ADR C A NAF - TRI',
'F ADR C A NAF - VEN',
'F ADR C A NAP - TRI',
'F ADR C A NAP - VEN',
'F ADR C A PIE - TRI',
'F ADR C A PIE - VEN',
'F ADR C A ROM - TRI',
'F ADR C A ROM - VEN',
'F ADR C A SMY - TRI',
'F ADR C A SMY - VEN',
'F ADR C A SPA - TRI',
'F ADR C A SPA - VEN',
'F ADR C A SYR - TRI',
'F ADR C A SYR - VEN',
'F ADR C A TRI - ALB',
'F ADR C A TRI - APU',
'F ADR C A TRI - BUL',
'F ADR C A TRI - CON',
'F ADR C A TRI - GRE',
'F ADR C A TRI - MAR',
'F ADR C A TRI - NAF',
'F ADR C A TRI - NAP',
'F ADR C A TRI - PIE',
'F ADR C A TRI - ROM',
'F ADR C A TRI - SMY',
'F ADR C A TRI - SPA',
'F ADR C A TRI - SYR',
'F ADR C A TRI - TUN',
'F ADR C A TRI - TUS',
'F ADR C A TRI - VEN',
'F ADR C A TUN - TRI',
'F ADR C A TUN - VEN',
'F ADR C A TUS - TRI',
'F ADR C A TUS - VEN',
'F ADR C A VEN - ALB',
'F ADR C A VEN - APU',
'F ADR C A VEN - BUL',
'F ADR C A VEN - CON',
'F ADR C A VEN - GRE',
'F ADR C A VEN - MAR',
'F ADR C A VEN - NAF',
'F ADR C A VEN - NAP',
'F ADR C A VEN - PIE',
'F ADR C A VEN - ROM',
'F ADR C A VEN - SMY',
'F ADR C A VEN - SPA',
'F ADR C A VEN - SYR',
'F ADR C A VEN - TRI',
'F ADR C A VEN - TUN',
'F ADR C A VEN - TUS',
'F ADR D',
'F ADR H',
'F ADR R ALB',
'F ADR R APU',
'F ADR R ION',
'F ADR R TRI',
'F ADR R VEN',
'F ADR S A ALB',
'F ADR S A ALB - APU',
'F ADR S A ALB - TRI',
'F ADR S A APU',
'F ADR S A APU - ALB',
'F ADR S A APU - VEN',
'F ADR S A BRE - ALB',
'F ADR S A BRE - APU',
'F ADR S A BUD - TRI',
'F ADR S A BUL - ALB',
'F ADR S A BUL - APU',
'F ADR S A CON - ALB',
'F ADR S A CON - APU',
'F ADR S A GAS - ALB',
'F ADR S A GAS - APU',
'F ADR S A GRE - ALB',
'F ADR S A GRE - APU',
'F ADR S A MAR - ALB',
'F ADR S A MAR - APU',
'F ADR S A NAF - ALB',
'F ADR S A NAF - APU',
'F ADR S A NAP - ALB',
'F ADR S A NAP - APU',
'F ADR S A PIE - ALB',
'F ADR S A PIE - APU',
'F ADR S A PIE - VEN',
'F ADR S A POR - ALB',
'F ADR S A POR - APU',
'F ADR S A ROM - ALB',
'F ADR S A ROM - APU',
'F ADR S A ROM - VEN',
'F ADR S A SER - ALB',
'F ADR S A SER - TRI',
'F ADR S A SMY - ALB',
'F ADR S A SMY - APU',
'F ADR S A SPA - ALB',
'F ADR S A SPA - APU',
'F ADR S A SYR - ALB',
'F ADR S A SYR - APU',
'F ADR S A TRI',
'F ADR S A TRI - ALB',
'F ADR S A TRI - VEN',
'F ADR S A TUN - ALB',
'F ADR S A TUN - APU',
'F ADR S A TUS - ALB',
'F ADR S A TUS - APU',
'F ADR S A TUS - VEN',
'F ADR S A TYR - TRI',
'F ADR S A TYR - VEN',
'F ADR S A VEN',
'F ADR S A VEN - APU',
'F ADR S A VEN - TRI',
'F ADR S A VIE - TRI',
'F ADR S F AEG - ION',
'F ADR S F ALB',
'F ADR S F ALB - ION',
'F ADR S F ALB - TRI',
'F ADR S F APU',
'F ADR S F APU - ION',
'F ADR S F APU - VEN',
'F ADR S F EAS - ION',
'F ADR S F GRE - ALB',
'F ADR S F GRE - ION',
'F ADR S F ION',
'F ADR S F ION - ALB',
'F ADR S F ION - APU',
'F ADR S F NAP - APU',
'F ADR S F NAP - ION',
'F ADR S F TRI',
'F ADR S F TRI - ALB',
'F ADR S F TRI - VEN',
'F ADR S F TUN - ION',
'F ADR S F TYS - ION',
'F ADR S F VEN',
'F ADR S F VEN - APU',
'F ADR S F VEN - TRI',
'F AEG - BUL/SC',
'F AEG - CON',
'F AEG - EAS',
'F AEG - GRE',
'F AEG - ION',
'F AEG - SMY',
'F AEG C A ALB - BUL',
'F AEG C A ALB - CON',
'F AEG C A ALB - SMY',
'F AEG C A APU - BUL',
'F AEG C A APU - CON',
'F AEG C A APU - SMY',
'F AEG C A BUL - ALB',
'F AEG C A BUL - APU',
'F AEG C A BUL - CON',
'F AEG C A BUL - GRE',
'F AEG C A BUL - MAR',
'F AEG C A BUL - NAF',
'F AEG C A BUL - NAP',
'F AEG C A BUL - PIE',
'F AEG C A BUL - ROM',
'F AEG C A BUL - SMY',
'F AEG C A BUL - SPA',
'F AEG C A BUL - SYR',
'F AEG C A BUL - TRI',
'F AEG C A BUL - TUN',
'F AEG C A BUL - TUS',
'F AEG C A BUL - VEN',
'F AEG C A CON - ALB',
'F AEG C A CON - APU',
'F AEG C A CON - BUL',
'F AEG C A CON - GRE',
'F AEG C A CON - MAR',
'F AEG C A CON - NAF',
'F AEG C A CON - NAP',
'F AEG C A CON - PIE',
'F AEG C A CON - ROM',
'F AEG C A CON - SMY',
'F AEG C A CON - SPA',
'F AEG C A CON - SYR',
'F AEG C A CON - TRI',
'F AEG C A CON - TUN',
'F AEG C A CON - TUS',
'F AEG C A CON - VEN',
'F AEG C A GRE - BUL',
'F AEG C A GRE - CON',
'F AEG C A GRE - SMY',
'F AEG C A GRE - SYR',
'F AEG C A MAR - BUL',
'F AEG C A MAR - CON',
'F AEG C A MAR - SMY',
'F AEG C A NAF - BUL',
'F AEG C A NAF - CON',
'F AEG C A NAF - SMY',
'F AEG C A NAP - BUL',
'F AEG C A NAP - CON',
'F AEG C A NAP - SMY',
'F AEG C A PIE - BUL',
'F AEG C A PIE - CON',
'F AEG C A PIE - SMY',
'F AEG C A ROM - BUL',
'F AEG C A ROM - CON',
'F AEG C A ROM - SMY',
'F AEG C A SMY - ALB',
'F AEG C A SMY - APU',
'F AEG C A SMY - BUL',
'F AEG C A SMY - CON',
'F AEG C A SMY - GRE',
'F AEG C A SMY - MAR',
'F AEG C A SMY - NAF',
'F AEG C A SMY - NAP',
'F AEG C A SMY - PIE',
'F AEG C A SMY - ROM',
'F AEG C A SMY - SPA',
'F AEG C A SMY - TRI',
'F AEG C A SMY - TUN',
'F AEG C A SMY - TUS',
'F AEG C A SMY - VEN',
'F AEG C A SPA - BUL',
'F AEG C A SPA - CON',
'F AEG C A SPA - SMY',
'F AEG C A SYR - BUL',
'F AEG C A SYR - CON',
'F AEG C A SYR - GRE',
'F AEG C A TRI - BUL',
'F AEG C A TRI - CON',
'F AEG C A TRI - SMY',
'F AEG C A TUN - BUL',
'F AEG C A TUN - CON',
'F AEG C A TUN - SMY',
'F AEG C A TUS - BUL',
'F AEG C A TUS - CON',
'F AEG C A TUS - SMY',
'F AEG C A VEN - BUL',
'F AEG C A VEN - CON',
'F AEG C A VEN - SMY',
'F AEG D',
'F AEG H',
'F AEG R BUL/SC',
'F AEG R CON',
'F AEG R EAS',
'F AEG R GRE',
'F AEG R ION',
'F AEG R SMY',
'F AEG S A ALB - GRE',
'F AEG S A ALB - SMY',
'F AEG S A ANK - BUL',
'F AEG S A ANK - CON',
'F AEG S A ANK - SMY',
'F AEG S A APU - GRE',
'F AEG S A APU - SMY',
'F AEG S A ARM - BUL',
'F AEG S A ARM - CON',
'F AEG S A ARM - SMY',
'F AEG S A BRE - GRE',
'F AEG S A BUL',
'F AEG S A BUL - CON',
'F AEG S A BUL - GRE',
'F AEG S A CON',
'F AEG S A CON - BUL',
'F AEG S A CON - SMY',
'F AEG S A GAS - GRE',
'F AEG S A GRE',
'F AEG S A GRE - BUL',
'F AEG S A GRE - SMY',
'F AEG S A MAR - GRE',
'F AEG S A MAR - SMY',
'F AEG S A NAF - GRE',
'F AEG S A NAF - SMY',
'F AEG S A NAP - GRE',
'F AEG S A NAP - SMY',
'F AEG S A PIE - GRE',
'F AEG S A PIE - SMY',
'F AEG S A POR - GRE',
'F AEG S A ROM - GRE',
'F AEG S A ROM - SMY',
'F AEG S A RUM - BUL',
'F AEG S A RUM - CON',
'F AEG S A SER - BUL',
'F AEG S A SER - GRE',
'F AEG S A SEV - BUL',
'F AEG S A SEV - CON',
'F AEG S A SMY',
'F AEG S A SMY - CON',
'F AEG S A SMY - GRE',
'F AEG S A SPA - GRE',
'F AEG S A SPA - SMY',
'F AEG S A SYR - GRE',
'F AEG S A SYR - SMY',
'F AEG S A TRI - GRE',
'F AEG S A TRI - SMY',
'F AEG S A TUN - GRE',
'F AEG S A TUN - SMY',
'F AEG S A TUS - GRE',
'F AEG S A TUS - SMY',
'F AEG S A VEN - GRE',
'F AEG S A VEN - SMY',
'F AEG S F ADR - ION',
'F AEG S F ALB - GRE',
'F AEG S F ALB - ION',
'F AEG S F ANK - CON',
'F AEG S F APU - ION',
'F AEG S F BLA - BUL',
'F AEG S F BLA - CON',
'F AEG S F BUL/EC',
'F AEG S F BUL/EC - CON',
'F AEG S F BUL/SC',
'F AEG S F BUL/SC - CON',
'F AEG S F BUL/SC - GRE',
'F AEG S F CON',
'F AEG S F CON - BUL',
'F AEG S F CON - SMY',
'F AEG S F EAS',
'F AEG S F EAS - ION',
'F AEG S F EAS - SMY',
'F AEG S F GRE',
'F AEG S F GRE - BUL',
'F AEG S F GRE - ION',
'F AEG S F ION',
'F AEG S F ION - EAS',
'F AEG S F ION - GRE',
'F AEG S F NAP - ION',
'F AEG S F RUM - BUL',
'F AEG S F SMY',
'F AEG S F SMY - CON',
'F AEG S F SMY - EAS',
'F AEG S F SYR - EAS',
'F AEG S F SYR - SMY',
'F AEG S F TUN - ION',
'F AEG S F TYS - ION',
'F ALB - ADR',
'F ALB - GRE',
'F ALB - ION',
'F ALB - TRI',
'F ALB D',
'F ALB H',
'F ALB R ADR',
'F ALB R GRE',
'F ALB R ION',
'F ALB R TRI',
'F ALB S A APU - GRE',
'F ALB S A APU - TRI',
'F ALB S A BRE - GRE',
'F ALB S A BUD - TRI',
'F ALB S A BUL - GRE',
'F ALB S A BUL - TRI',
'F ALB S A CON - GRE',
'F ALB S A CON - TRI',
'F ALB S A GAS - GRE',
'F ALB S A GRE',
'F ALB S A GRE - TRI',
'F ALB S A MAR - GRE',
'F ALB S A MAR - TRI',
'F ALB S A NAF - GRE',
'F ALB S A NAF - TRI',
'F ALB S A NAP - GRE',
'F ALB S A NAP - TRI',
'F ALB S A PIE - GRE',
'F ALB S A PIE - TRI',
'F ALB S A POR - GRE',
'F ALB S A ROM - GRE',
'F ALB S A ROM - TRI',
'F ALB S A SER - GRE',
'F ALB S A SER - TRI',
'F ALB S A SMY - GRE',
'F ALB S A SMY - TRI',
'F ALB S A SPA - GRE',
'F ALB S A SPA - TRI',
'F ALB S A SYR - GRE',
'F ALB S A SYR - TRI',
'F ALB S A TRI',
'F ALB S A TRI - GRE',
'F ALB S A TUN - GRE',
'F ALB S A TUN - TRI',
'F ALB S A TUS - GRE',
'F ALB S A TUS - TRI',
'F ALB S A TYR - TRI',
'F ALB S A VEN - GRE',
'F ALB S A VEN - TRI',
'F ALB S A VIE - TRI',
'F ALB S F ADR',
'F ALB S F ADR - ION',
'F ALB S F ADR - TRI',
'F ALB S F AEG - GRE',
'F ALB S F AEG - ION',
'F ALB S F APU - ADR',
'F ALB S F APU - ION',
'F ALB S F BUL/SC - GRE',
'F ALB S F EAS - ION',
'F ALB S F GRE',
'F ALB S F GRE - ION',
'F ALB S F ION',
'F ALB S F ION - ADR',
'F ALB S F ION - GRE',
'F ALB S F NAP - ION',
'F ALB S F TRI',
'F ALB S F TRI - ADR',
'F ALB S F TUN - ION',
'F ALB S F TYS - ION',
'F ALB S F VEN - ADR',
'F ALB S F VEN - TRI',
'F ANK - ARM',
'F ANK - BLA',
'F ANK - CON',
'F ANK B',
'F ANK D',
'F ANK H',
'F ANK R ARM',
'F ANK R BLA',
'F ANK R CON',
'F ANK S A ALB - CON',
'F ANK S A APU - CON',
'F ANK S A ARM',
'F ANK S A ARM - CON',
'F ANK S A BUL - ARM',
'F ANK S A BUL - CON',
'F ANK S A CON',
'F ANK S A CON - ARM',
'F ANK S A GRE - CON',
'F ANK S A MAR - CON',
'F ANK S A NAF - CON',
'F ANK S A NAP - CON',
'F ANK S A PIE - CON',
'F ANK S A ROM - CON',
'F ANK S A RUM - ARM',
'F ANK S A RUM - CON',
'F ANK S A SEV - ARM',
'F ANK S A SEV - CON',
'F ANK S A SMY - ARM',
'F ANK S A SMY - CON',
'F ANK S A SPA - CON',
'F ANK S A SYR - ARM',
'F ANK S A SYR - CON',
'F ANK S A TRI - CON',
'F ANK S A TUN - CON',
'F ANK S A TUS - CON',
'F ANK S A VEN - CON',
'F ANK S F AEG - CON',
'F ANK S F ARM',
'F ANK S F ARM - BLA',
'F ANK S F BLA',
'F ANK S F BLA - ARM',
'F ANK S F BLA - CON',
'F ANK S F BUL/EC - BLA',
'F ANK S F BUL/EC - CON',
'F ANK S F BUL/SC - CON',
'F ANK S F CON',
'F ANK S F CON - BLA',
'F ANK S F RUM - BLA',
'F ANK S F SEV - ARM',
'F ANK S F SEV - BLA',
'F ANK S F SMY - CON',
'F APU - ADR',
'F APU - ION',
'F APU - NAP',
'F APU - VEN',
'F APU D',
'F APU H',
'F APU R ADR',
'F APU R ION',
'F APU R NAP',
'F APU R VEN',
'F APU S A ALB - NAP',
'F APU S A ALB - VEN',
'F APU S A BEL - NAP',
'F APU S A BRE - NAP',
'F APU S A BUL - NAP',
'F APU S A BUL - VEN',
'F APU S A CLY - NAP',
'F APU S A CON - NAP',
'F APU S A CON - VEN',
'F APU S A GAS - NAP',
'F APU S A GRE - NAP',
'F APU S A GRE - VEN',
'F APU S A LON - NAP',
'F APU S A LVP - NAP',
'F APU S A MAR - NAP',
'F APU S A MAR - VEN',
'F APU S A NAF - NAP',
'F APU S A NAF - VEN',
'F APU S A NAP',
'F APU S A NAP - VEN',
'F APU S A PIC - NAP',
'F APU S A PIE - NAP',
'F APU S A PIE - VEN',
'F APU S A POR - NAP',
'F APU S A ROM - NAP',
'F APU S A ROM - VEN',
'F APU S A SMY - NAP',
'F APU S A SMY - VEN',
'F APU S A SPA - NAP',
'F APU S A SPA - VEN',
'F APU S A SYR - NAP',
'F APU S A SYR - VEN',
'F APU S A TRI - NAP',
'F APU S A TRI - VEN',
'F APU S A TUN - NAP',
'F APU S A TUN - VEN',
'F APU S A TUS - NAP',
'F APU S A TUS - VEN',
'F APU S A TYR - VEN',
'F APU S A VEN',
'F APU S A VEN - NAP',
'F APU S A WAL - NAP',
'F APU S F ADR',
'F APU S F ADR - ION',
'F APU S F ADR - VEN',
'F APU S F AEG - ION',
'F APU S F ALB - ADR',
'F APU S F ALB - ION',
'F APU S F EAS - ION',
'F APU S F GRE - ION',
'F APU S F ION',
'F APU S F ION - ADR',
'F APU S F ION - NAP',
'F APU S F NAP',
'F APU S F NAP - ION',
'F APU S F ROM - NAP',
'F APU S F TRI - ADR',
'F APU S F TRI - VEN',
'F APU S F TUN - ION',
'F APU S F TYS - ION',
'F APU S F TYS - NAP',
'F APU S F VEN',
'F APU S F VEN - ADR',
'F ARM - ANK',
'F ARM - BLA',
'F ARM - SEV',
'F ARM D',
'F ARM H',
'F ARM R ANK',
'F ARM R BLA',
'F ARM R SEV',
'F ARM S A ANK',
'F ARM S A ANK - SEV',
'F ARM S A BUL - ANK',
'F ARM S A BUL - SEV',
'F ARM S A CON - ANK',
'F ARM S A CON - SEV',
'F ARM S A MOS - SEV',
'F ARM S A RUM - ANK',
'F ARM S A RUM - SEV',
'F ARM S A SEV',
'F ARM S A SEV - ANK',
'F ARM S A SMY - ANK',
'F ARM S A UKR - SEV',
'F ARM S F ANK',
'F ARM S F ANK - BLA',
'F ARM S F BLA',
'F ARM S F BLA - ANK',
'F ARM S F BLA - SEV',
'F ARM S F BUL/EC - BLA',
'F ARM S F CON - ANK',
'F ARM S F CON - BLA',
'F ARM S F RUM - BLA',
'F ARM S F RUM - SEV',
'F ARM S F SEV',
'F ARM S F SEV - BLA',
'F BAL - BER',
'F BAL - BOT',
'F BAL - DEN',
'F BAL - KIE',
'F BAL - LVN',
'F BAL - PRU',
'F BAL - SWE',
'F BAL C A BER - DEN',
'F BAL C A BER - FIN',
'F BAL C A BER - KIE',
'F BAL C A BER - LVN',
'F BAL C A BER - PRU',
'F BAL C A BER - STP',
'F BAL C A BER - SWE',
'F BAL C A DEN - BER',
'F BAL C A DEN - FIN',
'F BAL C A DEN - KIE',
'F BAL C A DEN - LVN',
'F BAL C A DEN - PRU',
'F BAL C A DEN - STP',
'F BAL C A DEN - SWE',
'F BAL C A FIN - BER',
'F BAL C A FIN - DEN',
'F BAL C A FIN - KIE',
'F BAL C A FIN - PRU',
'F BAL C A KIE - BER',
'F BAL C A KIE - DEN',
'F BAL C A KIE - FIN',
'F BAL C A KIE - LVN',
'F BAL C A KIE - PRU',
'F BAL C A KIE - STP',
'F BAL C A KIE - SWE',
'F BAL C A LVN - BER',
'F BAL C A LVN - DEN',
'F BAL C A LVN - KIE',
'F BAL C A LVN - PRU',
'F BAL C A LVN - SWE',
'F BAL C A PRU - BER',
'F BAL C A PRU - DEN',
'F BAL C A PRU - FIN',
'F BAL C A PRU - KIE',
'F BAL C A PRU - LVN',
'F BAL C A PRU - STP',
'F BAL C A PRU - SWE',
'F BAL C A STP - BER',
'F BAL C A STP - DEN',
'F BAL C A STP - KIE',
'F BAL C A STP - PRU',
'F BAL C A SWE - BER',
'F BAL C A SWE - DEN',
'F BAL C A SWE - KIE',
'F BAL C A SWE - LVN',
'F BAL C A SWE - PRU',
'F BAL D',
'F BAL H',
'F BAL R BER',
'F BAL R BOT',
'F BAL R DEN',
'F BAL R KIE',
'F BAL R LVN',
'F BAL R PRU',
'F BAL R SWE',
'F BAL S A BEL - DEN',
'F BAL S A BEL - KIE',
'F BAL S A BEL - SWE',
'F BAL S A BER',
'F BAL S A BER - KIE',
'F BAL S A BER - PRU',
'F BAL S A BRE - DEN',
'F BAL S A BRE - KIE',
'F BAL S A BRE - SWE',
'F BAL S A CLY - DEN',
'F BAL S A CLY - KIE',
'F BAL S A CLY - SWE',
'F BAL S A DEN',
'F BAL S A DEN - KIE',
'F BAL S A DEN - SWE',
'F BAL S A EDI - DEN',
'F BAL S A EDI - KIE',
'F BAL S A EDI - SWE',
'F BAL S A FIN - LVN',
'F BAL S A FIN - SWE',
'F BAL S A GAS - DEN',
'F BAL S A GAS - KIE',
'F BAL S A GAS - SWE',
'F BAL S A HOL - DEN',
'F BAL S A HOL - KIE',
'F BAL S A HOL - SWE',
'F BAL S A KIE',
'F BAL S A KIE - BER',
'F BAL S A KIE - DEN',
'F BAL S A KIE - SWE',
'F BAL S A LON - DEN',
'F BAL S A LON - KIE',
'F BAL S A LON - SWE',
'F BAL S A LVN',
'F BAL S A LVN - PRU',
'F BAL S A LVN - SWE',
'F BAL S A LVP - DEN',
'F BAL S A LVP - KIE',
'F BAL S A LVP - SWE',
'F BAL S A MOS - LVN',
'F BAL S A MUN - BER',
'F BAL S A MUN - KIE',
'F BAL S A NAF - DEN',
'F BAL S A NAF - KIE',
'F BAL S A NAF - SWE',
'F BAL S A NWY - DEN',
'F BAL S A NWY - KIE',
'F BAL S A NWY - SWE',
'F BAL S A PIC - DEN',
'F BAL S A PIC - KIE',
'F BAL S A PIC - SWE',
'F BAL S A POR - DEN',
'F BAL S A POR - KIE',
'F BAL S A POR - SWE',
'F BAL S A PRU',
'F BAL S A PRU - BER',
'F BAL S A PRU - LVN',
'F BAL S A RUH - KIE',
'F BAL S A SIL - BER',
'F BAL S A SIL - PRU',
'F BAL S A SPA - DEN',
'F BAL S A SPA - KIE',
'F BAL S A SPA - SWE',
'F BAL S A STP - DEN',
'F BAL S A STP - KIE',
'F BAL S A STP - LVN',
'F BAL S A STP - SWE',
'F BAL S A SWE',
'F BAL S A SWE - DEN',
'F BAL S A SWE - KIE',
'F BAL S A SWE - LVN',
'F BAL S A TUN - DEN',
'F BAL S A WAL - DEN',
'F BAL S A WAL - KIE',
'F BAL S A WAL - SWE',
'F BAL S A WAR - LVN',
'F BAL S A WAR - PRU',
'F BAL S A YOR - DEN',
'F BAL S A YOR - KIE',
'F BAL S A YOR - SWE',
'F BAL S F BER',
'F BAL S F BER - KIE',
'F BAL S F BER - PRU',
'F BAL S F BOT',
'F BAL S F BOT - LVN',
'F BAL S F BOT - SWE',
'F BAL S F DEN',
'F BAL S F DEN - KIE',
'F BAL S F DEN - SWE',
'F BAL S F FIN - BOT',
'F BAL S F FIN - SWE',
'F BAL S F HEL - DEN',
'F BAL S F HEL - KIE',
'F BAL S F HOL - KIE',
'F BAL S F KIE',
'F BAL S F KIE - BER',
'F BAL S F KIE - DEN',
'F BAL S F LVN',
'F BAL S F LVN - BOT',
'F BAL S F LVN - PRU',
'F BAL S F NTH - DEN',
'F BAL S F NWY - SWE',
'F BAL S F PRU',
'F BAL S F PRU - BER',
'F BAL S F PRU - LVN',
'F BAL S F SKA - DEN',
'F BAL S F SKA - SWE',
'F BAL S F STP/SC - BOT',
'F BAL S F STP/SC - LVN',
'F BAL S F SWE',
'F BAL S F SWE - BOT',
'F BAL S F SWE - DEN',
'F BAR - NWG',
'F BAR - NWY',
'F BAR - STP/NC',
'F BAR C A BEL - STP',
'F BAR C A BRE - STP',
'F BAR C A CLY - STP',
'F BAR C A DEN - STP',
'F BAR C A EDI - STP',
'F BAR C A GAS - STP',
'F BAR C A HOL - STP',
'F BAR C A KIE - STP',
'F BAR C A LON - STP',
'F BAR C A LVP - STP',
'F BAR C A NAF - STP',
'F BAR C A NWY - STP',
'F BAR C A PIC - STP',
'F BAR C A POR - STP',
'F BAR C A SPA - STP',
'F BAR C A STP - BEL',
'F BAR C A STP - BRE',
'F BAR C A STP - CLY',
'F BAR C A STP - DEN',
'F BAR C A STP - EDI',
'F BAR C A STP - GAS',
'F BAR C A STP - HOL',
'F BAR C A STP - KIE',
'F BAR C A STP - LON',
'F BAR C A STP - LVP',
'F BAR C A STP - NAF',
'F BAR C A STP - NWY',
'F BAR C A STP - PIC',
'F BAR C A STP - POR',
'F BAR C A STP - SPA',
'F BAR C A STP - SWE',
'F BAR C A STP - WAL',
'F BAR C A STP - YOR',
'F BAR C A SWE - STP',
'F BAR C A WAL - STP',
'F BAR C A YOR - STP',
'F BAR D',
'F BAR H',
'F BAR R NWG',
'F BAR R NWY',
'F BAR R STP/NC',
'F BAR S A BEL - NWY',
'F BAR S A BER - STP',
'F BAR S A BRE - NWY',
'F BAR S A CLY - NWY',
'F BAR S A DEN - NWY',
'F BAR S A DEN - STP',
'F BAR S A EDI - NWY',
'F BAR S A FIN - NWY',
'F BAR S A FIN - STP',
'F BAR S A GAS - NWY',
'F BAR S A HOL - NWY',
'F BAR S A KIE - NWY',
'F BAR S A KIE - STP',
'F BAR S A LON - NWY',
'F BAR S A LVN - STP',
'F BAR S A LVP - NWY',
'F BAR S A MOS - STP',
'F BAR S A NAF - NWY',
'F BAR S A NWY',
'F BAR S A NWY - STP',
'F BAR S A PIC - NWY',
'F BAR S A POR - NWY',
'F BAR S A PRU - STP',
'F BAR S A SPA - NWY',
'F BAR S A STP',
'F BAR S A STP - NWY',
'F BAR S A SWE - NWY',
'F BAR S A SWE - STP',
'F BAR S A TUN - NWY',
'F BAR S A WAL - NWY',
'F BAR S A YOR - NWY',
'F BAR S F BOT - STP',
'F BAR S F CLY - NWG',
'F BAR S F EDI - NWG',
'F BAR S F FIN - STP',
'F BAR S F LVN - STP',
'F BAR S F NAO - NWG',
'F BAR S F NTH - NWG',
'F BAR S F NTH - NWY',
'F BAR S F NWG',
'F BAR S F NWG - NWY',
'F BAR S F NWY',
'F BAR S F NWY - NWG',
'F BAR S F NWY - STP',
'F BAR S F SKA - NWY',
'F BAR S F STP/NC',
'F BAR S F STP/NC - NWY',
'F BAR S F STP/SC',
'F BAR S F SWE - NWY',
'F BEL - ENG',
'F BEL - HOL',
'F BEL - NTH',
'F BEL - PIC',
'F BEL D',
'F BEL H',
'F BEL R ENG',
'F BEL R HOL',
'F BEL R NTH',
'F BEL R PIC',
'F BEL S A BRE - HOL',
'F BEL S A BRE - PIC',
'F BEL S A BUR - PIC',
'F BEL S A CLY - HOL',
'F BEL S A CLY - PIC',
'F BEL S A DEN - HOL',
'F BEL S A DEN - PIC',
'F BEL S A EDI - HOL',
'F BEL S A EDI - PIC',
'F BEL S A GAS - HOL',
'F BEL S A GAS - PIC',
'F BEL S A HOL',
'F BEL S A HOL - PIC',
'F BEL S A KIE - HOL',
'F BEL S A KIE - PIC',
'F BEL S A LON - HOL',
'F BEL S A LON - PIC',
'F BEL S A LVP - HOL',
'F BEL S A LVP - PIC',
'F BEL S A MAR - PIC',
'F BEL S A NAF - HOL',
'F BEL S A NAF - PIC',
'F BEL S A NAP - PIC',
'F BEL S A NWY - HOL',
'F BEL S A NWY - PIC',
'F BEL S A PAR - PIC',
'F BEL S A PIC',
'F BEL S A PIC - HOL',
'F BEL S A PIE - PIC',
'F BEL S A POR - HOL',
'F BEL S A POR - PIC',
'F BEL S A ROM - PIC',
'F BEL S A RUH - HOL',
'F BEL S A SPA - HOL',
'F BEL S A SPA - PIC',
'F BEL S A STP - HOL',
'F BEL S A STP - PIC',
'F BEL S A SWE - HOL',
'F BEL S A SWE - PIC',
'F BEL S A TUN - HOL',
'F BEL S A TUN - PIC',
'F BEL S A TUS - PIC',
'F BEL S A WAL - HOL',
'F BEL S A WAL - PIC',
'F BEL S A YOR - HOL',
'F BEL S A YOR - PIC',
'F BEL S F BRE - ENG',
'F BEL S F BRE - PIC',
'F BEL S F DEN - NTH',
'F BEL S F EDI - NTH',
'F BEL S F ENG',
'F BEL S F ENG - NTH',
'F BEL S F ENG - PIC',
'F BEL S F HEL - HOL',
'F BEL S F HEL - NTH',
'F BEL S F HOL',
'F BEL S F HOL - NTH',
'F BEL S F IRI - ENG',
'F BEL S F KIE - HOL',
'F BEL S F LON - ENG',
'F BEL S F LON - NTH',
'F BEL S F MAO - ENG',
'F BEL S F NTH',
'F BEL S F NTH - ENG',
'F BEL S F NTH - HOL',
'F BEL S F NWG - NTH',
'F BEL S F NWY - NTH',
'F BEL S F PIC',
'F BEL S F PIC - ENG',
'F BEL S F SKA - NTH',
'F BEL S F WAL - ENG',
'F BEL S F YOR - NTH',
'F BER - BAL',
'F BER - KIE',
'F BER - PRU',
'F BER B',
'F BER D',
'F BER H',
'F BER R BAL',
'F BER R KIE',
'F BER R PRU',
'F BER S A BEL - KIE',
'F BER S A BRE - KIE',
'F BER S A CLY - KIE',
'F BER S A DEN - KIE',
'F BER S A DEN - PRU',
'F BER S A EDI - KIE',
'F BER S A FIN - KIE',
'F BER S A FIN - PRU',
'F BER S A GAS - KIE',
'F BER S A HOL - KIE',
'F BER S A KIE',
'F BER S A KIE - PRU',
'F BER S A LON - KIE',
'F BER S A LVN - KIE',
'F BER S A LVN - PRU',
'F BER S A LVP - KIE',
'F BER S A MUN - KIE',
'F BER S A NAF - KIE',
'F BER S A NWY - KIE',
'F BER S A PIC - KIE',
'F BER S A POR - KIE',
'F BER S A PRU',
'F BER S A PRU - KIE',
'F BER S A RUH - KIE',
'F BER S A SIL - PRU',
'F BER S A SPA - KIE',
'F BER S A STP - KIE',
'F BER S A STP - PRU',
'F BER S A SWE - KIE',
'F BER S A SWE - PRU',
'F BER S A WAL - KIE',
'F BER S A WAR - PRU',
'F BER S A YOR - KIE',
'F BER S F BAL',
'F BER S F BAL - KIE',
'F BER S F BAL - PRU',
'F BER S F BOT - BAL',
'F BER S F DEN - BAL',
'F BER S F DEN - KIE',
'F BER S F HEL - KIE',
'F BER S F HOL - KIE',
'F BER S F KIE',
'F BER S F KIE - BAL',
'F BER S F LVN - BAL',
'F BER S F LVN - PRU',
'F BER S F PRU',
'F BER S F PRU - BAL',
'F BER S F SWE - BAL',
'F BLA - ANK',
'F BLA - ARM',
'F BLA - BUL/EC',
'F BLA - CON',
'F BLA - RUM',
'F BLA - SEV',
'F BLA C A ANK - ARM',
'F BLA C A ANK - BUL',
'F BLA C A ANK - CON',
'F BLA C A ANK - RUM',
'F BLA C A ANK - SEV',
'F BLA C A ARM - ANK',
'F BLA C A ARM - BUL',
'F BLA C A ARM - CON',
'F BLA C A ARM - RUM',
'F BLA C A ARM - SEV',
'F BLA C A BUL - ANK',
'F BLA C A BUL - ARM',
'F BLA C A BUL - CON',
'F BLA C A BUL - RUM',
'F BLA C A BUL - SEV',
'F BLA C A CON - ANK',
'F BLA C A CON - ARM',
'F BLA C A CON - BUL',
'F BLA C A CON - RUM',
'F BLA C A CON - SEV',
'F BLA C A RUM - ANK',
'F BLA C A RUM - ARM',
'F BLA C A RUM - BUL',
'F BLA C A RUM - CON',
'F BLA C A RUM - SEV',
'F BLA C A SEV - ANK',
'F BLA C A SEV - ARM',
'F BLA C A SEV - BUL',
'F BLA C A SEV - CON',
'F BLA C A SEV - RUM',
'F BLA D',
'F BLA H',
'F BLA R ANK',
'F BLA R ARM',
'F BLA R BUL/EC',
'F BLA R CON',
'F BLA R RUM',
'F BLA R SEV',
'F BLA S A ALB - BUL',
'F BLA S A ALB - CON',
'F BLA S A ANK',
'F BLA S A ANK - ARM',
'F BLA S A ANK - CON',
'F BLA S A APU - BUL',
'F BLA S A APU - CON',
'F BLA S A ARM',
'F BLA S A ARM - ANK',
'F BLA S A ARM - SEV',
'F BLA S A BUD - RUM',
'F BLA S A BUL',
'F BLA S A BUL - CON',
'F BLA S A BUL - RUM',
'F BLA S A CON',
'F BLA S A CON - ANK',
'F BLA S A CON - BUL',
'F BLA S A GAL - RUM',
'F BLA S A GRE - BUL',
'F BLA S A GRE - CON',
'F BLA S A MAR - BUL',
'F BLA S A MAR - CON',
'F BLA S A MOS - SEV',
'F BLA S A NAF - BUL',
'F BLA S A NAF - CON',
'F BLA S A NAP - BUL',
'F BLA S A NAP - CON',
'F BLA S A PIE - BUL',
'F BLA S A PIE - CON',
'F BLA S A ROM - BUL',
'F BLA S A ROM - CON',
'F BLA S A RUM',
'F BLA S A RUM - BUL',
'F BLA S A RUM - SEV',
'F BLA S A SER - BUL',
'F BLA S A SER - RUM',
'F BLA S A SEV',
'F BLA S A SEV - ARM',
'F BLA S A SEV - RUM',
'F BLA S A SMY - ANK',
'F BLA S A SMY - ARM',
'F BLA S A SMY - BUL',
'F BLA S A SMY - CON',
'F BLA S A SPA - BUL',
'F BLA S A SPA - CON',
'F BLA S A SYR - ARM',
'F BLA S A SYR - BUL',
'F BLA S A SYR - CON',
'F BLA S A TRI - BUL',
'F BLA S A TRI - CON',
'F BLA S A TUN - BUL',
'F BLA S A TUN - CON',
'F BLA S A TUS - BUL',
'F BLA S A TUS - CON',
'F BLA S A UKR - RUM',
'F BLA S A UKR - SEV',
'F BLA S A VEN - BUL',
'F BLA S A VEN - CON',
'F BLA S F AEG - BUL',
'F BLA S F AEG - CON',
'F BLA S F ANK',
'F BLA S F ANK - ARM',
'F BLA S F ANK - CON',
'F BLA S F ARM',
'F BLA S F ARM - ANK',
'F BLA S F ARM - SEV',
'F BLA S F BUL/EC',
'F BLA S F BUL/EC - CON',
'F BLA S F BUL/EC - RUM',
'F BLA S F BUL/SC',
'F BLA S F BUL/SC - CON',
'F BLA S F CON',
'F BLA S F CON - ANK',
'F BLA S F CON - BUL',
'F BLA S F GRE - BUL',
'F BLA S F RUM',
'F BLA S F RUM - BUL',
'F BLA S F RUM - SEV',
'F BLA S F SEV',
'F BLA S F SEV - ARM',
'F BLA S F SEV - RUM',
'F BLA S F SMY - CON',
'F BOT - BAL',
'F BOT - FIN',
'F BOT - LVN',
'F BOT - STP/SC',
'F BOT - SWE',
'F BOT C A BER - FIN',
'F BOT C A BER - STP',
'F BOT C A DEN - FIN',
'F BOT C A DEN - STP',
'F BOT C A FIN - BER',
'F BOT C A FIN - DEN',
'F BOT C A FIN - KIE',
'F BOT C A FIN - LVN',
'F BOT C A FIN - PRU',
'F BOT C A FIN - STP',
'F BOT C A FIN - SWE',
'F BOT C A KIE - FIN',
'F BOT C A KIE - STP',
'F BOT C A LVN - FIN',
'F BOT C A LVN - STP',
'F BOT C A LVN - SWE',
'F BOT C A PRU - FIN',
'F BOT C A PRU - STP',
'F BOT C A STP - BER',
'F BOT C A STP - DEN',
'F BOT C A STP - FIN',
'F BOT C A STP - KIE',
'F BOT C A STP - LVN',
'F BOT C A STP - PRU',
'F BOT C A STP - SWE',
'F BOT C A SWE - FIN',
'F BOT C A SWE - LVN',
'F BOT C A SWE - STP',
'F BOT D',
'F BOT H',
'F BOT R BAL',
'F BOT R FIN',
'F BOT R LVN',
'F BOT R STP/SC',
'F BOT R SWE',
'F BOT S A BEL - STP',
'F BOT S A BEL - SWE',
'F BOT S A BER - LVN',
'F BOT S A BER - SWE',
'F BOT S A BRE - STP',
'F BOT S A BRE - SWE',
'F BOT S A CLY - STP',
'F BOT S A CLY - SWE',
'F BOT S A DEN - LVN',
'F BOT S A DEN - STP',
'F BOT S A DEN - SWE',
'F BOT S A EDI - STP',
'F BOT S A EDI - SWE',
'F BOT S A FIN',
'F BOT S A FIN - STP',
'F BOT S A FIN - SWE',
'F BOT S A GAS - STP',
'F BOT S A GAS - SWE',
'F BOT S A HOL - STP',
'F BOT S A HOL - SWE',
'F BOT S A KIE - LVN',
'F BOT S A KIE - STP',
'F BOT S A KIE - SWE',
'F BOT S A LON - STP',
'F BOT S A LON - SWE',
'F BOT S A LVN',
'F BOT S A LVN - STP',
'F BOT S A LVN - SWE',
'F BOT S A LVP - STP',
'F BOT S A LVP - SWE',
'F BOT S A MOS - LVN',
'F BOT S A MOS - STP',
'F BOT S A NAF - STP',
'F BOT S A NAF - SWE',
'F BOT S A NWY - FIN',
'F BOT S A NWY - STP',
'F BOT S A NWY - SWE',
'F BOT S A PIC - STP',
'F BOT S A PIC - SWE',
'F BOT S A POR - STP',
'F BOT S A POR - SWE',
'F BOT S A PRU - LVN',
'F BOT S A PRU - SWE',
'F BOT S A SPA - STP',
'F BOT S A SPA - SWE',
'F BOT S A STP',
'F BOT S A STP - FIN',
'F BOT S A STP - LVN',
'F BOT S A STP - SWE',
'F BOT S A SWE',
'F BOT S A SWE - FIN',
'F BOT S A SWE - LVN',
'F BOT S A SWE - STP',
'F BOT S A WAL - STP',
'F BOT S A WAL - SWE',
'F BOT S A WAR - LVN',
'F BOT S A YOR - STP',
'F BOT S A YOR - SWE',
'F BOT S F BAL',
'F BOT S F BAL - LVN',
'F BOT S F BAL - SWE',
'F BOT S F BAR - STP',
'F BOT S F BER - BAL',
'F BOT S F DEN - BAL',
'F BOT S F DEN - SWE',
'F BOT S F FIN',
'F BOT S F FIN - STP',
'F BOT S F FIN - SWE',
'F BOT S F KIE - BAL',
'F BOT S F LVN',
'F BOT S F LVN - BAL',
'F BOT S F LVN - STP',
'F BOT S F NWY - STP',
'F BOT S F NWY - SWE',
'F BOT S F PRU - BAL',
'F BOT S F PRU - LVN',
'F BOT S F SKA - SWE',
'F BOT S F STP/NC',
'F BOT S F STP/SC',
'F BOT S F STP/SC - FIN',
'F BOT S F STP/SC - LVN',
'F BOT S F SWE',
'F BOT S F SWE - BAL',
'F BOT S F SWE - FIN',
'F BRE - ENG',
'F BRE - GAS',
'F BRE - MAO',
'F BRE - PIC',
'F BRE B',
'F BRE D',
'F BRE H',
'F BRE R ENG',
'F BRE R GAS',
'F BRE R MAO',
'F BRE R PIC',
'F BRE S A ALB - GAS',
'F BRE S A APU - GAS',
'F BRE S A BEL - GAS',
'F BRE S A BEL - PIC',
'F BRE S A BUR - GAS',
'F BRE S A BUR - PIC',
'F BRE S A CLY - GAS',
'F BRE S A CLY - PIC',
'F BRE S A DEN - GAS',
'F BRE S A DEN - PIC',
'F BRE S A EDI - GAS',
'F BRE S A EDI - PIC',
'F BRE S A GAS',
'F BRE S A GAS - PIC',
'F BRE S A GRE - GAS',
'F BRE S A HOL - GAS',
'F BRE S A HOL - PIC',
'F BRE S A KIE - GAS',
'F BRE S A KIE - PIC',
'F BRE S A LON - GAS',
'F BRE S A LON - PIC',
'F BRE S A LVP - GAS',
'F BRE S A LVP - PIC',
'F BRE S A MAR - GAS',
'F BRE S A MAR - PIC',
'F BRE S A NAF - GAS',
'F BRE S A NAF - PIC',
'F BRE S A NAP - GAS',
'F BRE S A NAP - PIC',
'F BRE S A NWY - GAS',
'F BRE S A NWY - PIC',
'F BRE S A PAR - GAS',
'F BRE S A PAR - PIC',
'F BRE S A PIC',
'F BRE S A PIC - GAS',
'F BRE S A PIE - GAS',
'F BRE S A PIE - PIC',
'F BRE S A POR - GAS',
'F BRE S A POR - PIC',
'F BRE S A ROM - GAS',
'F BRE S A ROM - PIC',
'F BRE S A SPA - GAS',
'F BRE S A SPA - PIC',
'F BRE S A STP - GAS',
'F BRE S A STP - PIC',
'F BRE S A SWE - GAS',
'F BRE S A SWE - PIC',
'F BRE S A TUN - GAS',
'F BRE S A TUN - PIC',
'F BRE S A TUS - GAS',
'F BRE S A TUS - PIC',
'F BRE S A WAL - GAS',
'F BRE S A WAL - PIC',
'F BRE S A YOR - GAS',
'F BRE S A YOR - PIC',
'F BRE S F BEL - ENG',
'F BRE S F BEL - PIC',
'F BRE S F ENG',
'F BRE S F ENG - MAO',
'F BRE S F ENG - PIC',
'F BRE S F GAS',
'F BRE S F GAS - MAO',
'F BRE S F IRI - ENG',
'F BRE S F IRI - MAO',
'F BRE S F LON - ENG',
'F BRE S F MAO',
'F BRE S F MAO - ENG',
'F BRE S F MAO - GAS',
'F BRE S F NAF - MAO',
'F BRE S F NAO - MAO',
'F BRE S F NTH - ENG',
'F BRE S F PIC',
'F BRE S F PIC - ENG',
'F BRE S F POR - MAO',
'F BRE S F SPA/NC - GAS',
'F BRE S F SPA/NC - MAO',
'F BRE S F SPA/SC - MAO',
'F BRE S F WAL - ENG',
'F BRE S F WES - MAO',
'F BUL/EC - BLA',
'F BUL/EC - CON',
'F BUL/EC - RUM',
'F BUL/EC D',
'F BUL/EC H',
'F BUL/EC R BLA',
'F BUL/EC R CON',
'F BUL/EC R RUM',
'F BUL/EC S A ALB - CON',
'F BUL/EC S A ANK - CON',
'F BUL/EC S A ANK - RUM',
'F BUL/EC S A APU - CON',
'F BUL/EC S A ARM - CON',
'F BUL/EC S A ARM - RUM',
'F BUL/EC S A BUD - RUM',
'F BUL/EC S A CON',
'F BUL/EC S A CON - RUM',
'F BUL/EC S A GAL - RUM',
'F BUL/EC S A GRE - CON',
'F BUL/EC S A MAR - CON',
'F BUL/EC S A NAF - CON',
'F BUL/EC S A NAP - CON',
'F BUL/EC S A PIE - CON',
'F BUL/EC S A ROM - CON',
'F BUL/EC S A RUM',
'F BUL/EC S A RUM - CON',
'F BUL/EC S A SER - RUM',
'F BUL/EC S A SEV - CON',
'F BUL/EC S A SEV - RUM',
'F BUL/EC S A SMY - CON',
'F BUL/EC S A SPA - CON',
'F BUL/EC S A SYR - CON',
'F BUL/EC S A TRI - CON',
'F BUL/EC S A TUN - CON',
'F BUL/EC S A TUS - CON',
'F BUL/EC S A UKR - RUM',
'F BUL/EC S A VEN - CON',
'F BUL/EC S F AEG - CON',
'F BUL/EC S F ANK - BLA',
'F BUL/EC S F ANK - CON',
'F BUL/EC S F ARM - BLA',
'F BUL/EC S F BLA',
'F BUL/EC S F BLA - CON',
'F BUL/EC S F BLA - RUM',
'F BUL/EC S F CON',
'F BUL/EC S F CON - BLA',
'F BUL/EC S F RUM',
'F BUL/EC S F RUM - BLA',
'F BUL/EC S F SEV - BLA',
'F BUL/EC S F SEV - RUM',
'F BUL/EC S F SMY - CON',
'F BUL/SC - AEG',
'F BUL/SC - CON',
'F BUL/SC - GRE',
'F BUL/SC D',
'F BUL/SC H',
'F BUL/SC R AEG',
'F BUL/SC R CON',
'F BUL/SC R GRE',
'F BUL/SC S A ALB - CON',
'F BUL/SC S A ALB - GRE',
'F BUL/SC S A ANK - CON',
'F BUL/SC S A APU - CON',
'F BUL/SC S A APU - GRE',
'F BUL/SC S A ARM - CON',
'F BUL/SC S A BRE - GRE',
'F BUL/SC S A CON',
'F BUL/SC S A CON - GRE',
'F BUL/SC S A GAS - GRE',
'F BUL/SC S A GRE',
'F BUL/SC S A GRE - CON',
'F BUL/SC S A MAR - CON',
'F BUL/SC S A MAR - GRE',
'F BUL/SC S A NAF - CON',
'F BUL/SC S A NAF - GRE',
'F BUL/SC S A NAP - CON',
'F BUL/SC S A NAP - GRE',
'F BUL/SC S A PIE - CON',
'F BUL/SC S A PIE - GRE',
'F BUL/SC S A POR - GRE',
'F BUL/SC S A ROM - CON',
'F BUL/SC S A ROM - GRE',
'F BUL/SC S A RUM - CON',
'F BUL/SC S A SER - GRE',
'F BUL/SC S A SEV - CON',
'F BUL/SC S A SMY - CON',
'F BUL/SC S A SMY - GRE',
'F BUL/SC S A SPA - CON',
'F BUL/SC S A SPA - GRE',
'F BUL/SC S A SYR - CON',
'F BUL/SC S A SYR - GRE',
'F BUL/SC S A TRI - CON',
'F BUL/SC S A TRI - GRE',
'F BUL/SC S A TUN - CON',
'F BUL/SC S A TUN - GRE',
'F BUL/SC S A TUS - CON',
'F BUL/SC S A TUS - GRE',
'F BUL/SC S A VEN - CON',
'F BUL/SC S A VEN - GRE',
'F BUL/SC S F AEG',
'F BUL/SC S F AEG - CON',
'F BUL/SC S F AEG - GRE',
'F BUL/SC S F ALB - GRE',
'F BUL/SC S F ANK - CON',
'F BUL/SC S F BLA - CON',
'F BUL/SC S F CON',
'F BUL/SC S F CON - AEG',
'F BUL/SC S F EAS - AEG',
'F BUL/SC S F GRE',
'F BUL/SC S F GRE - AEG',
'F BUL/SC S F ION - AEG',
'F BUL/SC S F ION - GRE',
'F BUL/SC S F SMY - AEG',
'F BUL/SC S F SMY - CON',
'F CLY - EDI',
'F CLY - LVP',
'F CLY - NAO',
'F CLY - NWG',
'F CLY D',
'F CLY H',
'F CLY R EDI',
'F CLY R LVP',
'F CLY R NAO',
'F CLY R NWG',
'F CLY S A BEL - EDI',
'F CLY S A BEL - LVP',
'F CLY S A BRE - EDI',
'F CLY S A BRE - LVP',
'F CLY S A DEN - EDI',
'F CLY S A DEN - LVP',
'F CLY S A EDI',
'F CLY S A EDI - LVP',
'F CLY S A GAS - EDI',
'F CLY S A GAS - LVP',
'F CLY S A HOL - EDI',
'F CLY S A HOL - LVP',
'F CLY S A KIE - EDI',
'F CLY S A KIE - LVP',
'F CLY S A LON - EDI',
'F CLY S A LON - LVP',
'F CLY S A LVP',
'F CLY S A LVP - EDI',
'F CLY S A MAR - LVP',
'F CLY S A NAF - EDI',
'F CLY S A NAF - LVP',
'F CLY S A NAP - LVP',
'F CLY S A NWY - EDI',
'F CLY S A NWY - LVP',
'F CLY S A PIC - EDI',
'F CLY S A PIC - LVP',
'F CLY S A PIE - LVP',
'F CLY S A POR - EDI',
'F CLY S A POR - LVP',
'F CLY S A ROM - LVP',
'F CLY S A SPA - EDI',
'F CLY S A SPA - LVP',
'F CLY S A STP - EDI',
'F CLY S A STP - LVP',
'F CLY S A SWE - EDI',
'F CLY S A SWE - LVP',
'F CLY S A TUN - EDI',
'F CLY S A TUN - LVP',
'F CLY S A TUS - LVP',
'F CLY S A WAL - EDI',
'F CLY S A WAL - LVP',
'F CLY S A YOR - EDI',
'F CLY S A YOR - LVP',
'F CLY S F BAR - NWG',
'F CLY S F EDI',
'F CLY S F EDI - NWG',
'F CLY S F IRI - LVP',
'F CLY S F IRI - NAO',
'F CLY S F LVP',
'F CLY S F LVP - NAO',
'F CLY S F MAO - NAO',
'F CLY S F NAO',
'F CLY S F NAO - LVP',
'F CLY S F NAO - NWG',
'F CLY S F NTH - EDI',
'F CLY S F NTH - NWG',
'F CLY S F NWG',
'F CLY S F NWG - EDI',
'F CLY S F NWG - NAO',
'F CLY S F NWY - NWG',
'F CLY S F WAL - LVP',
'F CLY S F YOR - EDI',
'F CON - AEG',
'F CON - ANK',
'F CON - BLA',
'F CON - BUL/EC',
'F CON - BUL/SC',
'F CON - SMY',
'F CON B',
'F CON D',
'F CON H',
'F CON R AEG',
'F CON R ANK',
'F CON R BLA',
'F CON R BUL/EC',
'F CON R BUL/SC',
'F CON R SMY',
'F CON S A ALB - BUL',
'F CON S A ALB - SMY',
'F CON S A ANK',
'F CON S A ANK - BUL',
'F CON S A ANK - SMY',
'F CON S A APU - BUL',
'F CON S A APU - SMY',
'F CON S A ARM - ANK',
'F CON S A ARM - BUL',
'F CON S A ARM - SMY',
'F CON S A BUL',
'F CON S A BUL - ANK',
'F CON S A BUL - SMY',
'F CON S A GRE - BUL',
'F CON S A GRE - SMY',
'F CON S A MAR - BUL',
'F CON S A MAR - SMY',
'F CON S A NAF - BUL',
'F CON S A NAF - SMY',
'F CON S A NAP - BUL',
'F CON S A NAP - SMY',
'F CON S A PIE - BUL',
'F CON S A PIE - SMY',
'F CON S A ROM - BUL',
'F CON S A ROM - SMY',
'F CON S A RUM - ANK',
'F CON S A RUM - BUL',
'F CON S A SER - BUL',
'F CON S A SEV - ANK',
'F CON S A SEV - BUL',
'F CON S A SMY',
'F CON S A SMY - ANK',
'F CON S A SMY - BUL',
'F CON S A SPA - BUL',
'F CON S A SPA - SMY',
'F CON S A SYR - BUL',
'F CON S A SYR - SMY',
'F CON S A TRI - BUL',
'F CON S A TRI - SMY',
'F CON S A TUN - BUL',
'F CON S A TUN - SMY',
'F CON S A TUS - BUL',
'F CON S A TUS - SMY',
'F CON S A VEN - BUL',
'F CON S A VEN - SMY',
'F CON S F AEG',
'F CON S F AEG - BUL',
'F CON S F AEG - SMY',
'F CON S F ANK',
'F CON S F ANK - BLA',
'F CON S F ARM - ANK',
'F CON S F ARM - BLA',
'F CON S F BLA',
'F CON S F BLA - ANK',
'F CON S F BLA - BUL',
'F CON S F BUL/EC',
'F CON S F BUL/EC - BLA',
'F CON S F BUL/SC',
'F CON S F BUL/SC - AEG',
'F CON S F EAS - AEG',
'F CON S F EAS - SMY',
'F CON S F GRE - AEG',
'F CON S F GRE - BUL',
'F CON S F ION - AEG',
'F CON S F RUM - BLA',
'F CON S F RUM - BUL',
'F CON S F SEV - BLA',
'F CON S F SMY',
'F CON S F SMY - AEG',
'F CON S F SYR - SMY',
'F DEN - BAL',
'F DEN - HEL',
'F DEN - KIE',
'F DEN - NTH',
'F DEN - SKA',
'F DEN - SWE',
'F DEN D',
'F DEN H',
'F DEN R BAL',
'F DEN R HEL',
'F DEN R KIE',
'F DEN R NTH',
'F DEN R SKA',
'F DEN R SWE',
'F DEN S A BEL - KIE',
'F DEN S A BEL - SWE',
'F DEN S A BER - KIE',
'F DEN S A BER - SWE',
'F DEN S A BRE - KIE',
'F DEN S A BRE - SWE',
'F DEN S A CLY - KIE',
'F DEN S A CLY - SWE',
'F DEN S A EDI - KIE',
'F DEN S A EDI - SWE',
'F DEN S A FIN - KIE',
'F DEN S A FIN - SWE',
'F DEN S A GAS - KIE',
'F DEN S A GAS - SWE',
'F DEN S A HOL - KIE',
'F DEN S A HOL - SWE',
'F DEN S A KIE',
'F DEN S A KIE - SWE',
'F DEN S A LON - KIE',
'F DEN S A LON - SWE',
'F DEN S A LVN - KIE',
'F DEN S A LVN - SWE',
'F DEN S A LVP - KIE',
'F DEN S A LVP - SWE',
'F DEN S A MUN - KIE',
'F DEN S A NAF - KIE',
'F DEN S A NAF - SWE',
'F DEN S A NWY - KIE',
'F DEN S A NWY - SWE',
'F DEN S A PIC - KIE',
'F DEN S A PIC - SWE',
'F DEN S A POR - KIE',
'F DEN S A POR - SWE',
'F DEN S A PRU - KIE',
'F DEN S A PRU - SWE',
'F DEN S A RUH - KIE',
'F DEN S A SPA - KIE',
'F DEN S A SPA - SWE',
'F DEN S A STP - KIE',
'F DEN S A STP - SWE',
'F DEN S A SWE',
'F DEN S A SWE - KIE',
'F DEN S A WAL - KIE',
'F DEN S A WAL - SWE',
'F DEN S A YOR - KIE',
'F DEN S A YOR - SWE',
'F DEN S F BAL',
'F DEN S F BAL - KIE',
'F DEN S F BAL - SWE',
'F DEN S F BEL - NTH',
'F DEN S F BER - BAL',
'F DEN S F BER - KIE',
'F DEN S F BOT - BAL',
'F DEN S F BOT - SWE',
'F DEN S F EDI - NTH',
'F DEN S F ENG - NTH',
'F DEN S F FIN - SWE',
'F DEN S F HEL',
'F DEN S F HEL - KIE',
'F DEN S F HEL - NTH',
'F DEN S F HOL - HEL',
'F DEN S F HOL - KIE',
'F DEN S F HOL - NTH',
'F DEN S F KIE',
'F DEN S F KIE - BAL',
'F DEN S F KIE - HEL',
'F DEN S F LON - NTH',
'F DEN S F LVN - BAL',
'F DEN S F NTH',
'F DEN S F NTH - HEL',
'F DEN S F NTH - SKA',
'F DEN S F NWG - NTH',
'F DEN S F NWY - NTH',
'F DEN S F NWY - SKA',
'F DEN S F NWY - SWE',
'F DEN S F PRU - BAL',
'F DEN S F SKA',
'F DEN S F SKA - NTH',
'F DEN S F SKA - SWE',
'F DEN S F SWE',
'F DEN S F SWE - BAL',
'F DEN S F SWE - SKA',
'F DEN S F YOR - NTH',
'F EAS - AEG',
'F EAS - ION',
'F EAS - SMY',
'F EAS - SYR',
'F EAS C A ALB - SMY',
'F EAS C A ALB - SYR',
'F EAS C A APU - SMY',
'F EAS C A APU - SYR',
'F EAS C A BUL - SYR',
'F EAS C A CON - SYR',
'F EAS C A GRE - SMY',
'F EAS C A GRE - SYR',
'F EAS C A MAR - SMY',
'F EAS C A MAR - SYR',
'F EAS C A NAF - SMY',
'F EAS C A NAF - SYR',
'F EAS C A NAP - SMY',
'F EAS C A NAP - SYR',
'F EAS C A PIE - SMY',
'F EAS C A PIE - SYR',
'F EAS C A ROM - SMY',
'F EAS C A ROM - SYR',
'F EAS C A SMY - ALB',
'F EAS C A SMY - APU',
'F EAS C A SMY - GRE',
'F EAS C A SMY - MAR',
'F EAS C A SMY - NAF',
'F EAS C A SMY - NAP',
'F EAS C A SMY - PIE',
'F EAS C A SMY - ROM',
'F EAS C A SMY - SPA',
'F EAS C A SMY - SYR',
'F EAS C A SMY - TRI',
'F EAS C A SMY - TUN',
'F EAS C A SMY - TUS',
'F EAS C A SMY - VEN',
'F EAS C A SPA - SMY',
'F EAS C A SPA - SYR',
'F EAS C A SYR - ALB',
'F EAS C A SYR - APU',
'F EAS C A SYR - BUL',
'F EAS C A SYR - CON',
'F EAS C A SYR - GRE',
'F EAS C A SYR - MAR',
'F EAS C A SYR - NAF',
'F EAS C A SYR - NAP',
'F EAS C A SYR - PIE',
'F EAS C A SYR - ROM',
'F EAS C A SYR - SMY',
'F EAS C A SYR - SPA',
'F EAS C A SYR - TRI',
'F EAS C A SYR - TUN',
'F EAS C A SYR - TUS',
'F EAS C A SYR - VEN',
'F EAS C A TRI - SMY',
'F EAS C A TRI - SYR',
'F EAS C A TUN - SMY',
'F EAS C A TUN - SYR',
'F EAS C A TUS - SMY',
'F EAS C A TUS - SYR',
'F EAS C A VEN - SMY',
'F EAS C A VEN - SYR',
'F EAS D',
'F EAS H',
'F EAS R AEG',
'F EAS R ION',
'F EAS R SMY',
'F EAS R SYR',
'F EAS S A ALB - SMY',
'F EAS S A ANK - SMY',
'F EAS S A APU - SMY',
'F EAS S A ARM - SMY',
'F EAS S A ARM - SYR',
'F EAS S A BUL - SMY',
'F EAS S A CON - SMY',
'F EAS S A GRE - SMY',
'F EAS S A MAR - SMY',
'F EAS S A NAF - SMY',
'F EAS S A NAP - SMY',
'F EAS S A PIE - SMY',
'F EAS S A ROM - SMY',
'F EAS S A SMY',
'F EAS S A SMY - SYR',
'F EAS S A SPA - SMY',
'F EAS S A SYR',
'F EAS S A SYR - SMY',
'F EAS S A TRI - SMY',
'F EAS S A TUN - SMY',
'F EAS S A TUS - SMY',
'F EAS S A VEN - SMY',
'F EAS S F ADR - ION',
'F EAS S F AEG',
'F EAS S F AEG - ION',
'F EAS S F AEG - SMY',
'F EAS S F ALB - ION',
'F EAS S F APU - ION',
'F EAS S F BUL/SC - AEG',
'F EAS S F CON - AEG',
'F EAS S F CON - SMY',
'F EAS S F GRE - AEG',
'F EAS S F GRE - ION',
'F EAS S F ION',
'F EAS S F ION - AEG',
'F EAS S F NAP - ION',
'F EAS S F SMY',
'F EAS S F SMY - AEG',
'F EAS S F SMY - SYR',
'F EAS S F SYR',
'F EAS S F SYR - SMY',
'F EAS S F TUN - ION',
'F EAS S F TYS - ION',
'F EDI - CLY',
'F EDI - NTH',
'F EDI - NWG',
'F EDI - YOR',
'F EDI B',
'F EDI D',
'F EDI H',
'F EDI R CLY',
'F EDI R NTH',
'F EDI R NWG',
'F EDI R YOR',
'F EDI S A BEL - CLY',
'F EDI S A BEL - YOR',
'F EDI S A BRE - CLY',
'F EDI S A BRE - YOR',
'F EDI S A CLY',
'F EDI S A CLY - YOR',
'F EDI S A DEN - CLY',
'F EDI S A DEN - YOR',
'F EDI S A GAS - CLY',
'F EDI S A GAS - YOR',
'F EDI S A HOL - CLY',
'F EDI S A HOL - YOR',
'F EDI S A KIE - CLY',
'F EDI S A KIE - YOR',
'F EDI S A LON - CLY',
'F EDI S A LON - YOR',
'F EDI S A LVP - CLY',
'F EDI S A LVP - YOR',
'F EDI S A MAR - CLY',
'F EDI S A NAF - CLY',
'F EDI S A NAF - YOR',
'F EDI S A NAP - CLY',
'F EDI S A NWY - CLY',
'F EDI S A NWY - YOR',
'F EDI S A PIC - CLY',
'F EDI S A PIC - YOR',
'F EDI S A PIE - CLY',
'F EDI S A POR - CLY',
'F EDI S A POR - YOR',
'F EDI S A ROM - CLY',
'F EDI S A SPA - CLY',
'F EDI S A SPA - YOR',
'F EDI S A STP - CLY',
'F EDI S A STP - YOR',
'F EDI S A SWE - CLY',
'F EDI S A SWE - YOR',
'F EDI S A TUN - CLY',
'F EDI S A TUN - YOR',
'F EDI S A TUS - CLY',
'F EDI S A WAL - CLY',
'F EDI S A WAL - YOR',
'F EDI S A YOR',
'F EDI S A YOR - CLY',
'F EDI S F BAR - NWG',
'F EDI S F BEL - NTH',
'F EDI S F CLY',
'F EDI S F CLY - NWG',
'F EDI S F DEN - NTH',
'F EDI S F ENG - NTH',
'F EDI S F HEL - NTH',
'F EDI S F HOL - NTH',
'F EDI S F LON - NTH',
'F EDI S F LON - YOR',
'F EDI S F LVP - CLY',
'F EDI S F NAO - CLY',
'F EDI S F NAO - NWG',
'F EDI S F NTH',
'F EDI S F NTH - NWG',
'F EDI S F NTH - YOR',
'F EDI S F NWG',
'F EDI S F NWG - CLY',
'F EDI S F NWG - NTH',
'F EDI S F NWY - NTH',
'F EDI S F NWY - NWG',
'F EDI S F SKA - NTH',
'F EDI S F YOR',
'F EDI S F YOR - NTH',
'F ENG - BEL',
'F ENG - BRE',
'F ENG - IRI',
'F ENG - LON',
'F ENG - MAO',
'F ENG - NTH',
'F ENG - PIC',
'F ENG - WAL',
'F ENG C A BEL - BRE',
'F ENG C A BEL - CLY',
'F ENG C A BEL - EDI',
'F ENG C A BEL - GAS',
'F ENG C A BEL - LON',
'F ENG C A BEL - LVP',
'F ENG C A BEL - MAR',
'F ENG C A BEL - NAF',
'F ENG C A BEL - NAP',
'F ENG C A BEL - NWY',
'F ENG C A BEL - PIC',
'F ENG C A BEL - PIE',
'F ENG C A BEL - POR',
'F ENG C A BEL - ROM',
'F ENG C A BEL - SPA',
'F ENG C A BEL - TUN',
'F ENG C A BEL - TUS',
'F ENG C A BEL - WAL',
'F ENG C A BRE - BEL',
'F ENG C A BRE - CLY',
'F ENG C A BRE - DEN',
'F ENG C A BRE - EDI',
'F ENG C A BRE - HOL',
'F ENG C A BRE - KIE',
'F ENG C A BRE - LON',
'F ENG C A BRE - LVP',
'F ENG C A BRE - NWY',
'F ENG C A BRE - PIC',
'F ENG C A BRE - STP',
'F ENG C A BRE - SWE',
'F ENG C A BRE - WAL',
'F ENG C A BRE - YOR',
'F ENG C A CLY - BEL',
'F ENG C A CLY - BRE',
'F ENG C A CLY - DEN',
'F ENG C A CLY - EDI',
'F ENG C A CLY - GAS',
'F ENG C A CLY - HOL',
'F ENG C A CLY - LON',
'F ENG C A CLY - LVP',
'F ENG C A CLY - NAF',
'F ENG C A CLY - NWY',
'F ENG C A CLY - PIC',
'F ENG C A CLY - POR',
'F ENG C A CLY - SPA',
'F ENG C A CLY - WAL',
'F ENG C A CLY - YOR',
'F ENG C A DEN - BRE',
'F ENG C A DEN - CLY',
'F ENG C A DEN - GAS',
'F ENG C A DEN - LVP',
'F ENG C A DEN - NAF',
'F ENG C A DEN - PIC',
'F ENG C A DEN - POR',
'F ENG C A DEN - SPA',
'F ENG C A DEN - TUN',
'F ENG C A DEN - WAL',
'F ENG C A EDI - BEL',
'F ENG C A EDI - BRE',
'F ENG C A EDI - CLY',
'F ENG C A EDI - GAS',
'F ENG C A EDI - LON',
'F ENG C A EDI - LVP',
'F ENG C A EDI - NAF',
'F ENG C A EDI - PIC',
'F ENG C A EDI - POR',
'F ENG C A EDI - SPA',
'F ENG C A EDI - TUN',
'F ENG C A EDI - WAL',
'F ENG C A GAS - BEL',
'F ENG C A GAS - CLY',
'F ENG C A GAS - DEN',
'F ENG C A GAS - EDI',
'F ENG C A GAS - HOL',
'F ENG C A GAS - KIE',
'F ENG C A GAS - LON',
'F ENG C A GAS - NWY',
'F ENG C A GAS - PIC',
'F ENG C A GAS - SWE',
'F ENG C A GAS - WAL',
'F ENG C A GAS - YOR',
'F ENG C A HOL - BRE',
'F ENG C A HOL - CLY',
'F ENG C A HOL - GAS',
'F ENG C A HOL - LVP',
'F ENG C A HOL - NAF',
'F ENG C A HOL - PIC',
'F ENG C A HOL - POR',
'F ENG C A HOL - SPA',
'F ENG C A HOL - TUN',
'F ENG C A HOL - WAL',
'F ENG C A KIE - BRE',
'F ENG C A KIE - GAS',
'F ENG C A KIE - LVP',
'F ENG C A KIE - NAF',
'F ENG C A KIE - PIC',
'F ENG C A KIE - POR',
'F ENG C A KIE - SPA',
'F ENG C A KIE - WAL',
'F ENG C A LON - BEL',
'F ENG C A LON - BRE',
'F ENG C A LON - CLY',
'F ENG C A LON - EDI',
'F ENG C A LON - GAS',
'F ENG C A LON - LVP',
'F ENG C A LON - MAR',
'F ENG C A LON - NAF',
'F ENG C A LON - NAP',
'F ENG C A LON - NWY',
'F ENG C A LON - PIC',
'F ENG C A LON - PIE',
'F ENG C A LON - POR',
'F ENG C A LON - ROM',
'F ENG C A LON - SPA',
'F ENG C A LON - TUN',
'F ENG C A LON - TUS',
'F ENG C A LON - WAL',
'F ENG C A LVP - BEL',
'F ENG C A LVP - BRE',
'F ENG C A LVP - CLY',
'F ENG C A LVP - DEN',
'F ENG C A LVP - EDI',
'F ENG C A LVP - HOL',
'F ENG C A LVP - KIE',
'F ENG C A LVP - LON',
'F ENG C A LVP - NWY',
'F ENG C A LVP - PIC',
'F ENG C A LVP - SWE',
'F ENG C A LVP - WAL',
'F ENG C A LVP - YOR',
'F ENG C A MAR - BEL',
'F ENG C A MAR - LON',
'F ENG C A MAR - PIC',
'F ENG C A MAR - WAL',
'F ENG C A NAF - BEL',
'F ENG C A NAF - CLY',
'F ENG C A NAF - DEN',
'F ENG C A NAF - EDI',
'F ENG C A NAF - HOL',
'F ENG C A NAF - KIE',
'F ENG C A NAF - LON',
'F ENG C A NAF - NWY',
'F ENG C A NAF - PIC',
'F ENG C A NAF - SWE',
'F ENG C A NAF - WAL',
'F ENG C A NAF - YOR',
'F ENG C A NAP - BEL',
'F ENG C A NAP - LON',
'F ENG C A NAP - PIC',
'F ENG C A NAP - WAL',
'F ENG C A NWY - BEL',
'F ENG C A NWY - BRE',
'F ENG C A NWY - CLY',
'F ENG C A NWY - GAS',
'F ENG C A NWY - LON',
'F ENG C A NWY - LVP',
'F ENG C A NWY - NAF',
'F ENG C A NWY - PIC',
'F ENG C A NWY - POR',
'F ENG C A NWY - SPA',
'F ENG C A NWY - TUN',
'F ENG C A NWY - WAL',
'F ENG C A PIC - BEL',
'F ENG C A PIC - BRE',
'F ENG C A PIC - CLY',
'F ENG C A PIC - DEN',
'F ENG C A PIC - EDI',
'F ENG C A PIC - GAS',
'F ENG C A PIC - HOL',
'F ENG C A PIC - KIE',
'F ENG C A PIC - LON',
'F ENG C A PIC - LVP',
'F ENG C A PIC - MAR',
'F ENG C A PIC - NAF',
'F ENG C A PIC - NAP',
'F ENG C A PIC - NWY',
'F ENG C A PIC - PIE',
'F ENG C A PIC - POR',
'F ENG C A PIC - ROM',
'F ENG C A PIC - SPA',
'F ENG C A PIC - STP',
'F ENG C A PIC - SWE',
'F ENG C A PIC - TUN',
'F ENG C A PIC - TUS',
'F ENG C A PIC - WAL',
'F ENG C A PIC - YOR',
'F ENG C A PIE - BEL',
'F ENG C A PIE - LON',
'F ENG C A PIE - PIC',
'F ENG C A PIE - WAL',
'F ENG C A POR - BEL',
'F ENG C A POR - CLY',
'F ENG C A POR - DEN',
'F ENG C A POR - EDI',
'F ENG C A POR - HOL',
'F ENG C A POR - KIE',
'F ENG C A POR - LON',
'F ENG C A POR - NWY',
'F ENG C A POR - PIC',
'F ENG C A POR - SWE',
'F ENG C A POR - WAL',
'F ENG C A POR - YOR',
'F ENG C A ROM - BEL',
'F ENG C A ROM - LON',
'F ENG C A ROM - PIC',
'F ENG C A ROM - WAL',
'F ENG C A SPA - BEL',
'F ENG C A SPA - CLY',
'F ENG C A SPA - DEN',
'F ENG C A SPA - EDI',
'F ENG C A SPA - HOL',
'F ENG C A SPA - KIE',
'F ENG C A SPA - LON',
'F ENG C A SPA - NWY',
'F ENG C A SPA - PIC',
'F ENG C A SPA - SWE',
'F ENG C A SPA - WAL',
'F ENG C A SPA - YOR',
'F ENG C A STP - BRE',
'F ENG C A STP - PIC',
'F ENG C A STP - WAL',
'F ENG C A SWE - BRE',
'F ENG C A SWE - GAS',
'F ENG C A SWE - LVP',
'F ENG C A SWE - NAF',
'F ENG C A SWE - PIC',
'F ENG C A SWE - POR',
'F ENG C A SWE - SPA',
'F ENG C A SWE - WAL',
'F ENG C A TUN - BEL',
'F ENG C A TUN - DEN',
'F ENG C A TUN - EDI',
'F ENG C A TUN - HOL',
'F ENG C A TUN - LON',
'F ENG C A TUN - NWY',
'F ENG C A TUN - PIC',
'F ENG C A TUN - WAL',
'F ENG C A TUN - YOR',
'F ENG C A TUS - BEL',
'F ENG C A TUS - LON',
'F ENG C A TUS - PIC',
'F ENG C A TUS - WAL',
'F ENG C A WAL - BEL',
'F ENG C A WAL - BRE',
'F ENG C A WAL - CLY',
'F ENG C A WAL - DEN',
'F ENG C A WAL - EDI',
'F ENG C A WAL - GAS',
'F ENG C A WAL - HOL',
'F ENG C A WAL - KIE',
'F ENG C A WAL - LON',
'F ENG C A WAL - LVP',
'F ENG C A WAL - MAR',
'F ENG C A WAL - NAF',
'F ENG C A WAL - NAP',
'F ENG C A WAL - NWY',
'F ENG C A WAL - PIC',
'F ENG C A WAL - PIE',
'F ENG C A WAL - POR',
'F ENG C A WAL - ROM',
'F ENG C A WAL - SPA',
'F ENG C A WAL - STP',
'F ENG C A WAL - SWE',
'F ENG C A WAL - TUN',
'F ENG C A WAL - TUS',
'F ENG C A WAL - YOR',
'F ENG C A YOR - BRE',
'F ENG C A YOR - CLY',
'F ENG C A YOR - GAS',
'F ENG C A YOR - LVP',
'F ENG C A YOR - NAF',
'F ENG C A YOR - PIC',
'F ENG C A YOR - POR',
'F ENG C A YOR - SPA',
'F ENG C A YOR - TUN',
'F ENG C A YOR - WAL',
'F ENG D',
'F ENG H',
'F ENG R BEL',
'F ENG R BRE',
'F ENG R IRI',
'F ENG R LON',
'F ENG R MAO',
'F ENG R NTH',
'F ENG R PIC',
'F ENG R WAL',
'F ENG S A ALB - BRE',
'F ENG S A APU - BRE',
'F ENG S A BEL',
'F ENG S A BEL - BRE',
'F ENG S A BEL - LON',
'F ENG S A BEL - PIC',
'F ENG S A BEL - WAL',
'F ENG S A BRE',
'F ENG S A BRE - BEL',
'F ENG S A BRE - LON',
'F ENG S A BRE - PIC',
'F ENG S A BRE - WAL',
'F ENG S A BUR - BEL',
'F ENG S A BUR - PIC',
'F ENG S A CLY - BEL',
'F ENG S A CLY - BRE',
'F ENG S A CLY - LON',
'F ENG S A CLY - WAL',
'F ENG S A DEN - BEL',
'F ENG S A DEN - BRE',
'F ENG S A DEN - LON',
'F ENG S A DEN - WAL',
'F ENG S A EDI - BEL',
'F ENG S A EDI - BRE',
'F ENG S A EDI - LON',
'F ENG S A EDI - WAL',
'F ENG S A GAS - BEL',
'F ENG S A GAS - BRE',
'F ENG S A GAS - LON',
'F ENG S A GAS - WAL',
'F ENG S A GRE - BRE',
'F ENG S A HOL - BEL',
'F ENG S A HOL - BRE',
'F ENG S A HOL - LON',
'F ENG S A HOL - WAL',
'F ENG S A KIE - BEL',
'F ENG S A KIE - LON',
'F ENG S A LON',
'F ENG S A LON - BEL',
'F ENG S A LON - BRE',
'F ENG S A LON - WAL',
'F ENG S A LVP - BEL',
'F ENG S A LVP - BRE',
'F ENG S A LVP - LON',
'F ENG S A LVP - WAL',
'F ENG S A MAR - BRE',
'F ENG S A MAR - WAL',
'F ENG S A NAF - BEL',
'F ENG S A NAF - BRE',
'F ENG S A NAF - LON',
'F ENG S A NAF - WAL',
'F ENG S A NAP - BRE',
'F ENG S A NAP - WAL',
'F ENG S A NWY - BEL',
'F ENG S A NWY - BRE',
'F ENG S A NWY - LON',
'F ENG S A NWY - WAL',
'F ENG S A PAR - BRE',
'F ENG S A PAR - PIC',
'F ENG S A PIC',
'F ENG S A PIC - BEL',
'F ENG S A PIC - BRE',
'F ENG S A PIE - BRE',
'F ENG S A PIE - WAL',
'F ENG S A POR - BEL',
'F ENG S A POR - BRE',
'F ENG S A POR - LON',
'F ENG S A POR - WAL',
'F ENG S A ROM - BRE',
'F ENG S A ROM - WAL',
'F ENG S A RUH - BEL',
'F ENG S A SPA - BEL',
'F ENG S A SPA - BRE',
'F ENG S A SPA - LON',
'F ENG S A SPA - WAL',
'F ENG S A STP - BEL',
'F ENG S A STP - BRE',
'F ENG S A STP - LON',
'F ENG S A STP - WAL',
'F ENG S A SWE - BEL',
'F ENG S A SWE - LON',
'F ENG S A TUN - BRE',
'F ENG S A TUN - WAL',
'F ENG S A TUS - BRE',
'F ENG S A TUS - WAL',
'F ENG S A WAL',
'F ENG S A WAL - BEL',
'F ENG S A WAL - BRE',
'F ENG S A WAL - LON',
'F ENG S A YOR - BEL',
'F ENG S A YOR - BRE',
'F ENG S A YOR - LON',
'F ENG S A YOR - WAL',
'F ENG S F BEL',
'F ENG S F BEL - NTH',
'F ENG S F BEL - PIC',
'F ENG S F BRE',
'F ENG S F BRE - MAO',
'F ENG S F BRE - PIC',
'F ENG S F DEN - NTH',
'F ENG S F EDI - NTH',
'F ENG S F GAS - BRE',
'F ENG S F GAS - MAO',
'F ENG S F HEL - NTH',
'F ENG S F HOL - BEL',
'F ENG S F HOL - NTH',
'F ENG S F IRI',
'F ENG S F IRI - MAO',
'F ENG S F IRI - WAL',
'F ENG S F LON',
'F ENG S F LON - NTH',
'F ENG S F LON - WAL',
'F ENG S F LVP - IRI',
'F ENG S F LVP - WAL',
'F ENG S F MAO',
'F ENG S F MAO - BRE',
'F ENG S F MAO - IRI',
'F ENG S F NAF - MAO',
'F ENG S F NAO - IRI',
'F ENG S F NAO - MAO',
'F ENG S F NTH',
'F ENG S F NTH - BEL',
'F ENG S F NTH - LON',
'F ENG S F NWG - NTH',
'F ENG S F NWY - NTH',
'F ENG S F PIC',
'F ENG S F PIC - BEL',
'F ENG S F PIC - BRE',
'F ENG S F POR - MAO',
'F ENG S F SKA - NTH',
'F ENG S F SPA/NC - MAO',
'F ENG S F SPA/SC - MAO',
'F ENG S F WAL',
'F ENG S F WAL - IRI',
'F ENG S F WAL - LON',
'F ENG S F WES - MAO',
'F ENG S F YOR - LON',
'F ENG S F YOR - NTH',
'F FIN - BOT',
'F FIN - STP/SC',
'F FIN - SWE',
'F FIN D',
'F FIN H',
'F FIN R BOT',
'F FIN R STP/SC',
'F FIN R SWE',
'F FIN S A BEL - STP',
'F FIN S A BEL - SWE',
'F FIN S A BER - STP',
'F FIN S A BER - SWE',
'F FIN S A BRE - STP',
'F FIN S A BRE - SWE',
'F FIN S A CLY - STP',
'F FIN S A CLY - SWE',
'F FIN S A DEN - STP',
'F FIN S A DEN - SWE',
'F FIN S A EDI - STP',
'F FIN S A EDI - SWE',
'F FIN S A GAS - STP',
'F FIN S A GAS - SWE',
'F FIN S A HOL - STP',
'F FIN S A HOL - SWE',
'F FIN S A KIE - STP',
'F FIN S A KIE - SWE',
'F FIN S A LON - STP',
'F FIN S A LON - SWE',
'F FIN S A LVN - STP',
'F FIN S A LVN - SWE',
'F FIN S A LVP - STP',
'F FIN S A LVP - SWE',
'F FIN S A MOS - STP',
'F FIN S A NAF - STP',
'F FIN S A NAF - SWE',
'F FIN S A NWY - STP',
'F FIN S A NWY - SWE',
'F FIN S A PIC - STP',
'F FIN S A PIC - SWE',
'F FIN S A POR - STP',
'F FIN S A POR - SWE',
'F FIN S A PRU - STP',
'F FIN S A PRU - SWE',
'F FIN S A SPA - STP',
'F FIN S A SPA - SWE',
'F FIN S A STP',
'F FIN S A STP - SWE',
'F FIN S A SWE',
'F FIN S A SWE - STP',
'F FIN S A WAL - STP',
'F FIN S A WAL - SWE',
'F FIN S A YOR - STP',
'F FIN S A YOR - SWE',
'F FIN S F BAL - BOT',
'F FIN S F BAL - SWE',
'F FIN S F BAR - STP',
'F FIN S F BOT',
'F FIN S F BOT - STP',
'F FIN S F BOT - SWE',
'F FIN S F DEN - SWE',
'F FIN S F LVN - BOT',
'F FIN S F LVN - STP',
'F FIN S F NWY - STP',
'F FIN S F NWY - SWE',
'F FIN S F SKA - SWE',
'F FIN S F STP/NC',
'F FIN S F STP/SC',
'F FIN S F STP/SC - BOT',
'F FIN S F SWE',
'F FIN S F SWE - BOT',
'F GAS - BRE',
'F GAS - MAO',
'F GAS - SPA/NC',
'F GAS D',
'F GAS H',
'F GAS R BRE',
'F GAS R MAO',
'F GAS R SPA/NC',
'F GAS S A ALB - BRE',
'F GAS S A ALB - SPA',
'F GAS S A APU - BRE',
'F GAS S A APU - SPA',
'F GAS S A BEL - BRE',
'F GAS S A BEL - SPA',
'F GAS S A BRE',
'F GAS S A BRE - SPA',
'F GAS S A BUL - SPA',
'F GAS S A CLY - BRE',
'F GAS S A CLY - SPA',
'F GAS S A CON - SPA',
'F GAS S A DEN - BRE',
'F GAS S A DEN - SPA',
'F GAS S A EDI - BRE',
'F GAS S A EDI - SPA',
'F GAS S A GRE - BRE',
'F GAS S A GRE - SPA',
'F GAS S A HOL - BRE',
'F GAS S A HOL - SPA',
'F GAS S A KIE - BRE',
'F GAS S A KIE - SPA',
'F GAS S A LON - BRE',
'F GAS S A LON - SPA',
'F GAS S A LVP - BRE',
'F GAS S A LVP - SPA',
'F GAS S A MAR - BRE',
'F GAS S A MAR - SPA',
'F GAS S A NAF - BRE',
'F GAS S A NAF - SPA',
'F GAS S A NAP - BRE',
'F GAS S A NAP - SPA',
'F GAS S A NWY - BRE',
'F GAS S A NWY - SPA',
'F GAS S A PAR - BRE',
'F GAS S A PIC - BRE',
'F GAS S A PIC - SPA',
'F GAS S A PIE - BRE',
'F GAS S A PIE - SPA',
'F GAS S A POR - BRE',
'F GAS S A POR - SPA',
'F GAS S A ROM - BRE',
'F GAS S A ROM - SPA',
'F GAS S A SMY - SPA',
'F GAS S A SPA',
'F GAS S A SPA - BRE',
'F GAS S A STP - BRE',
'F GAS S A STP - SPA',
'F GAS S A SWE - BRE',
'F GAS S A SWE - SPA',
'F GAS S A SYR - SPA',
'F GAS S A TRI - SPA',
'F GAS S A TUN - BRE',
'F GAS S A TUN - SPA',
'F GAS S A TUS - BRE',
'F GAS S A TUS - SPA',
'F GAS S A VEN - SPA',
'F GAS S A WAL - BRE',
'F GAS S A WAL - SPA',
'F GAS S A YOR - BRE',
'F GAS S A YOR - SPA',
'F GAS S F BRE',
'F GAS S F BRE - MAO',
'F GAS S F ENG - BRE',
'F GAS S F ENG - MAO',
'F GAS S F IRI - MAO',
'F GAS S F LYO - SPA',
'F GAS S F MAO',
'F GAS S F MAO - BRE',
'F GAS S F MAO - SPA',
'F GAS S F MAR - SPA',
'F GAS S F NAF - MAO',
'F GAS S F NAO - MAO',
'F GAS S F PIC - BRE',
'F GAS S F POR - MAO',
'F GAS S F POR - SPA',
'F GAS S F SPA/NC',
'F GAS S F SPA/NC - MAO',
'F GAS S F SPA/SC',
'F GAS S F SPA/SC - MAO',
'F GAS S F WES - MAO',
'F GAS S F WES - SPA',
'F GRE - AEG',
'F GRE - ALB',
'F GRE - BUL/SC',
'F GRE - ION',
'F GRE D',
'F GRE H',
'F GRE R AEG',
'F GRE R ALB',
'F GRE R BUL/SC',
'F GRE R ION',
'F GRE S A ALB',
'F GRE S A ALB - BUL',
'F GRE S A ANK - BUL',
'F GRE S A APU - ALB',
'F GRE S A APU - BUL',
'F GRE S A ARM - BUL',
'F GRE S A BRE - ALB',
'F GRE S A BUL',
'F GRE S A BUL - ALB',
'F GRE S A CON - ALB',
'F GRE S A CON - BUL',
'F GRE S A GAS - ALB',
'F GRE S A MAR - ALB',
'F GRE S A MAR - BUL',
'F GRE S A NAF - ALB',
'F GRE S A NAF - BUL',
'F GRE S A NAP - ALB',
'F GRE S A NAP - BUL',
'F GRE S A PIE - ALB',
'F GRE S A PIE - BUL',
'F GRE S A POR - ALB',
'F GRE S A ROM - ALB',
'F GRE S A ROM - BUL',
'F GRE S A RUM - BUL',
'F GRE S A SER - ALB',
'F GRE S A SER - BUL',
'F GRE S A SEV - BUL',
'F GRE S A SMY - ALB',
'F GRE S A SMY - BUL',
'F GRE S A SPA - ALB',
'F GRE S A SPA - BUL',
'F GRE S A SYR - ALB',
'F GRE S A SYR - BUL',
'F GRE S A TRI - ALB',
'F GRE S A TRI - BUL',
'F GRE S A TUN - ALB',
'F GRE S A TUN - BUL',
'F GRE S A TUS - ALB',
'F GRE S A TUS - BUL',
'F GRE S A VEN - ALB',
'F GRE S A VEN - BUL',
'F GRE S F ADR - ALB',
'F GRE S F ADR - ION',
'F GRE S F AEG',
'F GRE S F AEG - BUL',
'F GRE S F AEG - ION',
'F GRE S F ALB',
'F GRE S F ALB - ION',
'F GRE S F APU - ION',
'F GRE S F BLA - BUL',
'F GRE S F BUL/EC',
'F GRE S F BUL/SC',
'F GRE S F BUL/SC - AEG',
'F GRE S F CON - AEG',
'F GRE S F CON - BUL',
'F GRE S F EAS - AEG',
'F GRE S F EAS - ION',
'F GRE S F ION',
'F GRE S F ION - AEG',
'F GRE S F ION - ALB',
'F GRE S F NAP - ION',
'F GRE S F RUM - BUL',
'F GRE S F SMY - AEG',
'F GRE S F TRI - ALB',
'F GRE S F TUN - ION',
'F GRE S F TYS - ION',
'F HEL - DEN',
'F HEL - HOL',
'F HEL - KIE',
'F HEL - NTH',
'F HEL C A BEL - KIE',
'F HEL C A BRE - KIE',
'F HEL C A CLY - KIE',
'F HEL C A DEN - HOL',
'F HEL C A DEN - KIE',
'F HEL C A EDI - KIE',
'F HEL C A GAS - KIE',
'F HEL C A HOL - DEN',
'F HEL C A HOL - KIE',
'F HEL C A KIE - BEL',
'F HEL C A KIE - BRE',
'F HEL C A KIE - CLY',
'F HEL C A KIE - DEN',
'F HEL C A KIE - EDI',
'F HEL C A KIE - GAS',
'F HEL C A KIE - HOL',
'F HEL C A KIE - LON',
'F HEL C A KIE - LVP',
'F HEL C A KIE - NAF',
'F HEL C A KIE - NWY',
'F HEL C A KIE - PIC',
'F HEL C A KIE - POR',
'F HEL C A KIE - SPA',
'F HEL C A KIE - STP',
'F HEL C A KIE - SWE',
'F HEL C A KIE - WAL',
'F HEL C A KIE - YOR',
'F HEL C A LON - KIE',
'F HEL C A LVP - KIE',
'F HEL C A NAF - KIE',
'F HEL C A NWY - KIE',
'F HEL C A PIC - KIE',
'F HEL C A POR - KIE',
'F HEL C A SPA - KIE',
'F HEL C A STP - KIE',
'F HEL C A SWE - KIE',
'F HEL C A WAL - KIE',
'F HEL C A YOR - KIE',
'F HEL D',
'F HEL H',
'F HEL R DEN',
'F HEL R HOL',
'F HEL R KIE',
'F HEL R NTH',
'F HEL S A BEL - DEN',
'F HEL S A BEL - HOL',
'F HEL S A BER - DEN',
'F HEL S A BER - KIE',
'F HEL S A BRE - DEN',
'F HEL S A BRE - HOL',
'F HEL S A CLY - DEN',
'F HEL S A CLY - HOL',
'F HEL S A DEN',
'F HEL S A DEN - HOL',
'F HEL S A DEN - KIE',
'F HEL S A EDI - DEN',
'F HEL S A EDI - HOL',
'F HEL S A FIN - DEN',
'F HEL S A FIN - KIE',
'F HEL S A GAS - DEN',
'F HEL S A GAS - HOL',
'F HEL S A HOL',
'F HEL S A HOL - DEN',
'F HEL S A HOL - KIE',
'F HEL S A KIE',
'F HEL S A KIE - DEN',
'F HEL S A KIE - HOL',
'F HEL S A LON - DEN',
'F HEL S A LON - HOL',
'F HEL S A LVN - DEN',
'F HEL S A LVN - KIE',
'F HEL S A LVP - DEN',
'F HEL S A LVP - HOL',
'F HEL S A MUN - KIE',
'F HEL S A NAF - DEN',
'F HEL S A NAF - HOL',
'F HEL S A NWY - DEN',
'F HEL S A NWY - HOL',
'F HEL S A PIC - DEN',
'F HEL S A PIC - HOL',
'F HEL S A POR - DEN',
'F HEL S A POR - HOL',
'F HEL S A PRU - DEN',
'F HEL S A PRU - KIE',
'F HEL S A RUH - HOL',
'F HEL S A RUH - KIE',
'F HEL S A SPA - DEN',
'F HEL S A SPA - HOL',
'F HEL S A STP - DEN',
'F HEL S A STP - HOL',
'F HEL S A STP - KIE',
'F HEL S A SWE - DEN',
'F HEL S A SWE - HOL',
'F HEL S A SWE - KIE',
'F HEL S A TUN - DEN',
'F HEL S A TUN - HOL',
'F HEL S A WAL - DEN',
'F HEL S A WAL - HOL',
'F HEL S A YOR - DEN',
'F HEL S A YOR - HOL',
'F HEL S F BAL - DEN',
'F HEL S F BAL - KIE',
'F HEL S F BEL - HOL',
'F HEL S F BEL - NTH',
'F HEL S F BER - KIE',
'F HEL S F DEN',
'F HEL S F DEN - KIE',
'F HEL S F DEN - NTH',
'F HEL S F EDI - NTH',
'F HEL S F ENG - NTH',
'F HEL S F HOL',
'F HEL S F HOL - KIE',
'F HEL S F HOL - NTH',
'F HEL S F KIE',
'F HEL S F KIE - DEN',
'F HEL S F KIE - HOL',
'F HEL S F LON - NTH',
'F HEL S F NTH',
'F HEL S F NTH - DEN',
'F HEL S F NTH - HOL',
'F HEL S F NWG - NTH',
'F HEL S F NWY - NTH',
'F HEL S F SKA - DEN',
'F HEL S F SKA - NTH',
'F HEL S F SWE - DEN',
'F HEL S F YOR - NTH',
'F HOL - BEL',
'F HOL - HEL',
'F HOL - KIE',
'F HOL - NTH',
'F HOL D',
'F HOL H',
'F HOL R BEL',
'F HOL R HEL',
'F HOL R KIE',
'F HOL R NTH',
'F HOL S A BEL',
'F HOL S A BEL - KIE',
'F HOL S A BER - KIE',
'F HOL S A BRE - BEL',
'F HOL S A BRE - KIE',
'F HOL S A BUR - BEL',
'F HOL S A CLY - BEL',
'F HOL S A CLY - KIE',
'F HOL S A DEN - BEL',
'F HOL S A DEN - KIE',
'F HOL S A EDI - BEL',
'F HOL S A EDI - KIE',
'F HOL S A FIN - KIE',
'F HOL S A GAS - BEL',
'F HOL S A GAS - KIE',
'F HOL S A KIE',
'F HOL S A KIE - BEL',
'F HOL S A LON - BEL',
'F HOL S A LON - KIE',
'F HOL S A LVN - KIE',
'F HOL S A LVP - BEL',
'F HOL S A LVP - KIE',
'F HOL S A MAR - BEL',
'F HOL S A MUN - KIE',
'F HOL S A NAF - BEL',
'F HOL S A NAF - KIE',
'F HOL S A NAP - BEL',
'F HOL S A NWY - BEL',
'F HOL S A NWY - KIE',
'F HOL S A PIC - BEL',
'F HOL S A PIC - KIE',
'F HOL S A PIE - BEL',
'F HOL S A POR - BEL',
'F HOL S A POR - KIE',
'F HOL S A PRU - KIE',
'F HOL S A ROM - BEL',
'F HOL S A RUH - BEL',
'F HOL S A RUH - KIE',
'F HOL S A SPA - BEL',
'F HOL S A SPA - KIE',
'F HOL S A STP - BEL',
'F HOL S A STP - KIE',
'F HOL S A SWE - BEL',
'F HOL S A SWE - KIE',
'F HOL S A TUN - BEL',
'F HOL S A TUS - BEL',
'F HOL S A WAL - BEL',
'F HOL S A WAL - KIE',
'F HOL S A YOR - BEL',
'F HOL S A YOR - KIE',
'F HOL S F BAL - KIE',
'F HOL S F BEL',
'F HOL S F BEL - NTH',
'F HOL S F BER - KIE',
'F HOL S F DEN - HEL',
'F HOL S F DEN - KIE',
'F HOL S F DEN - NTH',
'F HOL S F EDI - NTH',
'F HOL S F ENG - BEL',
'F HOL S F ENG - NTH',
'F HOL S F HEL',
'F HOL S F HEL - KIE',
'F HOL S F HEL - NTH',
'F HOL S F KIE',
'F HOL S F KIE - HEL',
'F HOL S F LON - NTH',
'F HOL S F NTH',
'F HOL S F NTH - BEL',
'F HOL S F NTH - HEL',
'F HOL S F NWG - NTH',
'F HOL S F NWY - NTH',
'F HOL S F PIC - BEL',
'F HOL S F SKA - NTH',
'F HOL S F YOR - NTH',
'F ION - ADR',
'F ION - AEG',
'F ION - ALB',
'F ION - APU',
'F ION - EAS',
'F ION - GRE',
'F ION - NAP',
'F ION - TUN',
'F ION - TYS',
'F ION C A ALB - APU',
'F ION C A ALB - BRE',
'F ION C A ALB - BUL',
'F ION C A ALB - CON',
'F ION C A ALB - GAS',
'F ION C A ALB - GRE',
'F ION C A ALB - MAR',
'F ION C A ALB - NAF',
'F ION C A ALB - NAP',
'F ION C A ALB - PIE',
'F ION C A ALB - POR',
'F ION C A ALB - ROM',
'F ION C A ALB - SMY',
'F ION C A ALB - SPA',
'F ION C A ALB - SYR',
'F ION C A ALB - TUN',
'F ION C A ALB - TUS',
'F ION C A APU - ALB',
'F ION C A APU - BRE',
'F ION C A APU - BUL',
'F ION C A APU - CON',
'F ION C A APU - GAS',
'F ION C A APU - GRE',
'F ION C A APU - MAR',
'F ION C A APU - NAF',
'F ION C A APU - NAP',
'F ION C A APU - PIE',
'F ION C A APU - POR',
'F ION C A APU - ROM',
'F ION C A APU - SMY',
'F ION C A APU - SPA',
'F ION C A APU - SYR',
'F ION C A APU - TUN',
'F ION C A APU - TUS',
'F ION C A BRE - ALB',
'F ION C A BRE - APU',
'F ION C A BRE - GRE',
'F ION C A BUL - ALB',
'F ION C A BUL - APU',
'F ION C A BUL - MAR',
'F ION C A BUL - NAF',
'F ION C A BUL - NAP',
'F ION C A BUL - PIE',
'F ION C A BUL - ROM',
'F ION C A BUL - SPA',
'F ION C A BUL - TRI',
'F ION C A BUL - TUN',
'F ION C A BUL - TUS',
'F ION C A BUL - VEN',
'F ION C A CON - ALB',
'F ION C A CON - APU',
'F ION C A CON - MAR',
'F ION C A CON - NAF',
'F ION C A CON - NAP',
'F ION C A CON - PIE',
'F ION C A CON - ROM',
'F ION C A CON - SPA',
'F ION C A CON - TRI',
'F ION C A CON - TUN',
'F ION C A CON - TUS',
'F ION C A CON - VEN',
'F ION C A GAS - ALB',
'F ION C A GAS - APU',
'F ION C A GAS - GRE',
'F ION C A GRE - ALB',
'F ION C A GRE - APU',
'F ION C A GRE - BRE',
'F ION C A GRE - GAS',
'F ION C A GRE - MAR',
'F ION C A GRE - NAF',
'F ION C A GRE - NAP',
'F ION C A GRE - PIE',
'F ION C A GRE - POR',
'F ION C A GRE - ROM',
'F ION C A GRE - SMY',
'F ION C A GRE - SPA',
'F ION C A GRE - SYR',
'F ION C A GRE - TRI',
'F ION C A GRE - TUN',
'F ION C A GRE - TUS',
'F ION C A GRE - VEN',
'F ION C A MAR - ALB',
'F ION C A MAR - APU',
'F ION C A MAR - BUL',
'F ION C A MAR - CON',
'F ION C A MAR - GRE',
'F ION C A MAR - SMY',
'F ION C A MAR - SYR',
'F ION C A MAR - TRI',
'F ION C A MAR - VEN',
'F ION C A NAF - ALB',
'F ION C A NAF - APU',
'F ION C A NAF - BUL',
'F ION C A NAF - CON',
'F ION C A NAF - GRE',
'F ION C A NAF - SMY',
'F ION C A NAF - SYR',
'F ION C A NAF - TRI',
'F ION C A NAF - VEN',
'F ION C A NAP - ALB',
'F ION C A NAP - APU',
'F ION C A NAP - BUL',
'F ION C A NAP - CON',
'F ION C A NAP - GRE',
'F ION C A NAP - SMY',
'F ION C A NAP - SYR',
'F ION C A NAP - TRI',
'F ION C A NAP - TUN',
'F ION C A NAP - VEN',
'F ION C A PIE - ALB',
'F ION C A PIE - APU',
'F ION C A PIE - BUL',
'F ION C A PIE - CON',
'F ION C A PIE - GRE',
'F ION C A PIE - SMY',
'F ION C A PIE - SYR',
'F ION C A PIE - TRI',
'F ION C A PIE - VEN',
'F ION C A POR - ALB',
'F ION C A POR - APU',
'F ION C A POR - GRE',
'F ION C A ROM - ALB',
'F ION C A ROM - APU',
'F ION C A ROM - BUL',
'F ION C A ROM - CON',
'F ION C A ROM - GRE',
'F ION C A ROM - SMY',
'F ION C A ROM - SYR',
'F ION C A ROM - TRI',
'F ION C A ROM - VEN',
'F ION C A SMY - ALB',
'F ION C A SMY - APU',
'F ION C A SMY - GRE',
'F ION C A SMY - MAR',
'F ION C A SMY - NAF',
'F ION C A SMY - NAP',
'F ION C A SMY - PIE',
'F ION C A SMY - ROM',
'F ION C A SMY - SPA',
'F ION C A SMY - TRI',
'F ION C A SMY - TUN',
'F ION C A SMY - TUS',
'F ION C A SMY - VEN',
'F ION C A SPA - ALB',
'F ION C A SPA - APU',
'F ION C A SPA - BUL',
'F ION C A SPA - CON',
'F ION C A SPA - GRE',
'F ION C A SPA - SMY',
'F ION C A SPA - SYR',
'F ION C A SPA - TRI',
'F ION C A SPA - VEN',
'F ION C A SYR - ALB',
'F ION C A SYR - APU',
'F ION C A SYR - GRE',
'F ION C A SYR - MAR',
'F ION C A SYR - NAF',
'F ION C A SYR - NAP',
'F ION C A SYR - PIE',
'F ION C A SYR - ROM',
'F ION C A SYR - SPA',
'F ION C A SYR - TRI',
'F ION C A SYR - TUN',
'F ION C A SYR - TUS',
'F ION C A SYR - VEN',
'F ION C A TRI - BUL',
'F ION C A TRI - CON',
'F ION C A TRI - GRE',
'F ION C A TRI - MAR',
'F ION C A TRI - NAF',
'F ION C A TRI - NAP',
'F ION C A TRI - PIE',
'F ION C A TRI - ROM',
'F ION C A TRI - SMY',
'F ION C A TRI - SPA',
'F ION C A TRI - SYR',
'F ION C A TRI - TUN',
'F ION C A TRI - TUS',
'F ION C A TUN - ALB',
'F ION C A TUN - APU',
'F ION C A TUN - BUL',
'F ION C A TUN - CON',
'F ION C A TUN - GRE',
'F ION C A TUN - NAP',
'F ION C A TUN - SMY',
'F ION C A TUN - SYR',
'F ION C A TUN - TRI',
'F ION C A TUN - VEN',
'F ION C A TUS - ALB',
'F ION C A TUS - APU',
'F ION C A TUS - BUL',
'F ION C A TUS - CON',
'F ION C A TUS - GRE',
'F ION C A TUS - SMY',
'F ION C A TUS - SYR',
'F ION C A TUS - TRI',
'F ION C A TUS - VEN',
'F ION C A VEN - BUL',
'F ION C A VEN - CON',
'F ION C A VEN - GRE',
'F ION C A VEN - MAR',
'F ION C A VEN - NAF',
'F ION C A VEN - NAP',
'F ION C A VEN - PIE',
'F ION C A VEN - ROM',
'F ION C A VEN - SMY',
'F ION C A VEN - SPA',
'F ION C A VEN - SYR',
'F ION C A VEN - TUN',
'F ION C A VEN - TUS',
'F ION D',
'F ION H',
'F ION R ADR',
'F ION R AEG',
'F ION R ALB',
'F ION R APU',
'F ION R EAS',
'F ION R GRE',
'F ION R NAP',
'F ION R TUN',
'F ION R TYS',
'F ION S A ALB',
'F ION S A ALB - APU',
'F ION S A ALB - GRE',
'F ION S A APU',
'F ION S A APU - ALB',
'F ION S A APU - NAP',
'F ION S A BEL - NAP',
'F ION S A BEL - TUN',
'F ION S A BRE - NAP',
'F ION S A BRE - TUN',
'F ION S A BUL - GRE',
'F ION S A CLY - NAP',
'F ION S A CLY - TUN',
'F ION S A CON - GRE',
'F ION S A DEN - TUN',
'F ION S A EDI - TUN',
'F ION S A GAS - NAP',
'F ION S A GAS - TUN',
'F ION S A GRE',
'F ION S A GRE - ALB',
'F ION S A HOL - TUN',
'F ION S A LON - NAP',
'F ION S A LON - TUN',
'F ION S A LVP - NAP',
'F ION S A LVP - TUN',
'F ION S A MAR - NAP',
'F ION S A MAR - TUN',
'F ION S A NAF - NAP',
'F ION S A NAF - TUN',
'F ION S A NAP',
'F ION S A NAP - APU',
'F ION S A NAP - TUN',
'F ION S A NWY - TUN',
'F ION S A PIC - NAP',
'F ION S A PIC - TUN',
'F ION S A PIE - NAP',
'F ION S A PIE - TUN',
'F ION S A POR - NAP',
'F ION S A POR - TUN',
'F ION S A ROM - APU',
'F ION S A ROM - NAP',
'F ION S A ROM - TUN',
'F ION S A SER - ALB',
'F ION S A SER - GRE',
'F ION S A SMY - GRE',
'F ION S A SPA - NAP',
'F ION S A SPA - TUN',
'F ION S A SYR - GRE',
'F ION S A TRI - ALB',
'F ION S A TRI - APU',
'F ION S A TUN',
'F ION S A TUN - NAP',
'F ION S A TUS - NAP',
'F ION S A TUS - TUN',
'F ION S A VEN - ALB',
'F ION S A VEN - APU',
'F ION S A WAL - NAP',
'F ION S A WAL - TUN',
'F ION S A YOR - TUN',
'F ION S F ADR',
'F ION S F ADR - ALB',
'F ION S F ADR - APU',
'F ION S F AEG',
'F ION S F AEG - EAS',
'F ION S F AEG - GRE',
'F ION S F ALB',
'F ION S F ALB - ADR',
'F ION S F ALB - GRE',
'F ION S F APU',
'F ION S F APU - ADR',
'F ION S F APU - NAP',
'F ION S F BUL/SC - AEG',
'F ION S F BUL/SC - GRE',
'F ION S F CON - AEG',
'F ION S F EAS',
'F ION S F EAS - AEG',
'F ION S F GRE',
'F ION S F GRE - AEG',
'F ION S F GRE - ALB',
'F ION S F LYO - TYS',
'F ION S F NAF - TUN',
'F ION S F NAP',
'F ION S F NAP - APU',
'F ION S F NAP - TYS',
'F ION S F ROM - NAP',
'F ION S F ROM - TYS',
'F ION S F SMY - AEG',
'F ION S F SMY - EAS',
'F ION S F SYR - EAS',
'F ION S F TRI - ADR',
'F ION S F TRI - ALB',
'F ION S F TUN',
'F ION S F TUN - TYS',
'F ION S F TUS - TYS',
'F ION S F TYS',
'F ION S F TYS - NAP',
'F ION S F TYS - TUN',
'F ION S F VEN - ADR',
'F ION S F VEN - APU',
'F ION S F WES - TUN',
'F ION S F WES - TYS',
'F IRI - ENG',
'F IRI - LVP',
'F IRI - MAO',
'F IRI - NAO',
'F IRI - WAL',
'F IRI C A BEL - CLY',
'F IRI C A BEL - EDI',
'F IRI C A BEL - LVP',
'F IRI C A BEL - NWY',
'F IRI C A BEL - WAL',
'F IRI C A BRE - CLY',
'F IRI C A BRE - EDI',
'F IRI C A BRE - LVP',
'F IRI C A BRE - NWY',
'F IRI C A BRE - WAL',
'F IRI C A CLY - BEL',
'F IRI C A CLY - BRE',
'F IRI C A CLY - DEN',
'F IRI C A CLY - EDI',
'F IRI C A CLY - HOL',
'F IRI C A CLY - LON',
'F IRI C A CLY - LVP',
'F IRI C A CLY - NWY',
'F IRI C A CLY - PIC',
'F IRI C A CLY - WAL',
'F IRI C A CLY - YOR',
'F IRI C A DEN - CLY',
'F IRI C A DEN - LVP',
'F IRI C A DEN - WAL',
'F IRI C A EDI - BEL',
'F IRI C A EDI - BRE',
'F IRI C A EDI - CLY',
'F IRI C A EDI - LON',
'F IRI C A EDI - LVP',
'F IRI C A EDI - PIC',
'F IRI C A EDI - WAL',
'F IRI C A GAS - LVP',
'F IRI C A GAS - WAL',
'F IRI C A HOL - CLY',
'F IRI C A HOL - LVP',
'F IRI C A HOL - WAL',
'F IRI C A KIE - LVP',
'F IRI C A LON - CLY',
'F IRI C A LON - EDI',
'F IRI C A LON - LVP',
'F IRI C A LON - NWY',
'F IRI C A LON - WAL',
'F IRI C A LVP - BEL',
'F IRI C A LVP - BRE',
'F IRI C A LVP - CLY',
'F IRI C A LVP - DEN',
'F IRI C A LVP - EDI',
'F IRI C A LVP - GAS',
'F IRI C A LVP - HOL',
'F IRI C A LVP - KIE',
'F IRI C A LVP - LON',
'F IRI C A LVP - MAR',
'F IRI C A LVP - NAF',
'F IRI C A LVP - NAP',
'F IRI C A LVP - NWY',
'F IRI C A LVP - PIC',
'F IRI C A LVP - PIE',
'F IRI C A LVP - POR',
'F IRI C A LVP - ROM',
'F IRI C A LVP - SPA',
'F IRI C A LVP - SWE',
'F IRI C A LVP - TUN',
'F IRI C A LVP - TUS',
'F IRI C A LVP - WAL',
'F IRI C A LVP - YOR',
'F IRI C A MAR - LVP',
'F IRI C A MAR - WAL',
'F IRI C A NAF - LVP',
'F IRI C A NAF - WAL',
'F IRI C A NAP - LVP',
'F IRI C A NAP - WAL',
'F IRI C A NWY - BEL',
'F IRI C A NWY - BRE',
'F IRI C A NWY - CLY',
'F IRI C A NWY - LON',
'F IRI C A NWY - LVP',
'F IRI C A NWY - PIC',
'F IRI C A NWY - WAL',
'F IRI C A PIC - CLY',
'F IRI C A PIC - EDI',
'F IRI C A PIC - LVP',
'F IRI C A PIC - NWY',
'F IRI C A PIE - LVP',
'F IRI C A PIE - WAL',
'F IRI C A POR - LVP',
'F IRI C A POR - WAL',
'F IRI C A ROM - LVP',
'F IRI C A ROM - WAL',
'F IRI C A SPA - LVP',
'F IRI C A SPA - WAL',
'F IRI C A STP - WAL',
'F IRI C A SWE - LVP',
'F IRI C A TUN - LVP',
'F IRI C A TUN - WAL',
'F IRI C A TUS - LVP',
'F IRI C A TUS - WAL',
'F IRI C A WAL - BEL',
'F IRI C A WAL - BRE',
'F IRI C A WAL - CLY',
'F IRI C A WAL - DEN',
'F IRI C A WAL - EDI',
'F IRI C A WAL - GAS',
'F IRI C A WAL - HOL',
'F IRI C A WAL - LON',
'F IRI C A WAL - LVP',
'F IRI C A WAL - MAR',
'F IRI C A WAL - NAF',
'F IRI C A WAL - NAP',
'F IRI C A WAL - NWY',
'F IRI C A WAL - PIE',
'F IRI C A WAL - POR',
'F IRI C A WAL - ROM',
'F IRI C A WAL - SPA',
'F IRI C A WAL - STP',
'F IRI C A WAL - TUN',
'F IRI C A WAL - TUS',
'F IRI C A WAL - YOR',
'F IRI C A YOR - CLY',
'F IRI C A YOR - LVP',
'F IRI C A YOR - WAL',
'F IRI D',
'F IRI H',
'F IRI R ENG',
'F IRI R LVP',
'F IRI R MAO',
'F IRI R NAO',
'F IRI R WAL',
'F IRI S A BEL - LVP',
'F IRI S A BEL - WAL',
'F IRI S A BRE - LVP',
'F IRI S A BRE - WAL',
'F IRI S A CLY - LVP',
'F IRI S A CLY - WAL',
'F IRI S A DEN - LVP',
'F IRI S A DEN - WAL',
'F IRI S A EDI - LVP',
'F IRI S A EDI - WAL',
'F IRI S A GAS - LVP',
'F IRI S A GAS - WAL',
'F IRI S A HOL - LVP',
'F IRI S A HOL - WAL',
'F IRI S A KIE - LVP',
'F IRI S A KIE - WAL',
'F IRI S A LON - LVP',
'F IRI S A LON - WAL',
'F IRI S A LVP',
'F IRI S A LVP - WAL',
'F IRI S A MAR - LVP',
'F IRI S A MAR - WAL',
'F IRI S A NAF - LVP',
'F IRI S A NAF - WAL',
'F IRI S A NAP - LVP',
'F IRI S A NAP - WAL',
'F IRI S A NWY - LVP',
'F IRI S A NWY - WAL',
'F IRI S A PIC - LVP',
'F IRI S A PIC - WAL',
'F IRI S A PIE - LVP',
'F IRI S A PIE - WAL',
'F IRI S A POR - LVP',
'F IRI S A POR - WAL',
'F IRI S A ROM - LVP',
'F IRI S A ROM - WAL',
'F IRI S A SPA - LVP',
'F IRI S A SPA - WAL',
'F IRI S A STP - LVP',
'F IRI S A STP - WAL',
'F IRI S A SWE - LVP',
'F IRI S A SWE - WAL',
'F IRI S A TUN - LVP',
'F IRI S A TUN - WAL',
'F IRI S A TUS - LVP',
'F IRI S A TUS - WAL',
'F IRI S A WAL',
'F IRI S A WAL - LVP',
'F IRI S A YOR - LVP',
'F IRI S A YOR - WAL',
'F IRI S F BEL - ENG',
'F IRI S F BRE - ENG',
'F IRI S F BRE - MAO',
'F IRI S F CLY - LVP',
'F IRI S F CLY - NAO',
'F IRI S F ENG',
'F IRI S F ENG - MAO',
'F IRI S F ENG - WAL',
'F IRI S F GAS - MAO',
'F IRI S F LON - ENG',
'F IRI S F LON - WAL',
'F IRI S F LVP',
'F IRI S F LVP - NAO',
'F IRI S F LVP - WAL',
'F IRI S F MAO',
'F IRI S F MAO - ENG',
'F IRI S F MAO - NAO',
'F IRI S F NAF - MAO',
'F IRI S F NAO',
'F IRI S F NAO - LVP',
'F IRI S F NAO - MAO',
'F IRI S F NTH - ENG',
'F IRI S F NWG - NAO',
'F IRI S F PIC - ENG',
'F IRI S F POR - MAO',
'F IRI S F SPA/NC - MAO',
'F IRI S F SPA/SC - MAO',
'F IRI S F WAL',
'F IRI S F WAL - ENG',
'F IRI S F WAL - LVP',
'F IRI S F WES - MAO',
'F KIE - BAL',
'F KIE - BER',
'F KIE - DEN',
'F KIE - HEL',
'F KIE - HOL',
'F KIE B',
'F KIE D',
'F KIE H',
'F KIE R BAL',
'F KIE R BER',
'F KIE R DEN',
'F KIE R HEL',
'F KIE R HOL',
'F KIE S A BEL - DEN',
'F KIE S A BEL - HOL',
'F KIE S A BER',
'F KIE S A BER - DEN',
'F KIE S A BRE - DEN',
'F KIE S A BRE - HOL',
'F KIE S A CLY - DEN',
'F KIE S A CLY - HOL',
'F KIE S A DEN',
'F KIE S A DEN - BER',
'F KIE S A DEN - HOL',
'F KIE S A EDI - DEN',
'F KIE S A EDI - HOL',
'F KIE S A FIN - BER',
'F KIE S A FIN - DEN',
'F KIE S A GAS - DEN',
'F KIE S A GAS - HOL',
'F KIE S A HOL',
'F KIE S A HOL - DEN',
'F KIE S A LON - DEN',
'F KIE S A LON - HOL',
'F KIE S A LVN - BER',
'F KIE S A LVN - DEN',
'F KIE S A LVP - DEN',
'F KIE S A LVP - HOL',
'F KIE S A MUN - BER',
'F KIE S A NAF - DEN',
'F KIE S A NAF - HOL',
'F KIE S A NWY - DEN',
'F KIE S A NWY - HOL',
'F KIE S A PIC - DEN',
'F KIE S A PIC - HOL',
'F KIE S A POR - DEN',
'F KIE S A POR - HOL',
'F KIE S A PRU - BER',
'F KIE S A PRU - DEN',
'F KIE S A RUH - HOL',
'F KIE S A SIL - BER',
'F KIE S A SPA - DEN',
'F KIE S A SPA - HOL',
'F KIE S A STP - BER',
'F KIE S A STP - DEN',
'F KIE S A STP - HOL',
'F KIE S A SWE - BER',
'F KIE S A SWE - DEN',
'F KIE S A SWE - HOL',
'F KIE S A TUN - DEN',
'F KIE S A TUN - HOL',
'F KIE S A WAL - DEN',
'F KIE S A WAL - HOL',
'F KIE S A YOR - DEN',
'F KIE S A YOR - HOL',
'F KIE S F BAL',
'F KIE S F BAL - BER',
'F KIE S F BAL - DEN',
'F KIE S F BEL - HOL',
'F KIE S F BER',
'F KIE S F BER - BAL',
'F KIE S F BOT - BAL',
'F KIE S F DEN',
'F KIE S F DEN - BAL',
'F KIE S F DEN - HEL',
'F KIE S F HEL',
'F KIE S F HEL - DEN',
'F KIE S F HEL - HOL',
'F KIE S F HOL',
'F KIE S F HOL - HEL',
'F KIE S F LVN - BAL',
'F KIE S F NTH - DEN',
'F KIE S F NTH - HEL',
'F KIE S F NTH - HOL',
'F KIE S F PRU - BAL',
'F KIE S F PRU - BER',
'F KIE S F SKA - DEN',
'F KIE S F SWE - BAL',
'F KIE S F SWE - DEN',
'F LON - ENG',
'F LON - NTH',
'F LON - WAL',
'F LON - YOR',
'F LON B',
'F LON D',
'F LON H',
'F LON R ENG',
'F LON R NTH',
'F LON R WAL',
'F LON R YOR',
'F LON S A BEL - WAL',
'F LON S A BEL - YOR',
'F LON S A BRE - WAL',
'F LON S A BRE - YOR',
'F LON S A CLY - WAL',
'F LON S A CLY - YOR',
'F LON S A DEN - WAL',
'F LON S A DEN - YOR',
'F LON S A EDI - WAL',
'F LON S A EDI - YOR',
'F LON S A GAS - WAL',
'F LON S A GAS - YOR',
'F LON S A HOL - WAL',
'F LON S A HOL - YOR',
'F LON S A KIE - WAL',
'F LON S A KIE - YOR',
'F LON S A LVP - WAL',
'F LON S A LVP - YOR',
'F LON S A MAR - WAL',
'F LON S A NAF - WAL',
'F LON S A NAF - YOR',
'F LON S A NAP - WAL',
'F LON S A NWY - WAL',
'F LON S A NWY - YOR',
'F LON S A PIC - WAL',
'F LON S A PIC - YOR',
'F LON S A PIE - WAL',
'F LON S A POR - WAL',
'F LON S A POR - YOR',
'F LON S A ROM - WAL',
'F LON S A SPA - WAL',
'F LON S A SPA - YOR',
'F LON S A STP - WAL',
'F LON S A STP - YOR',
'F LON S A SWE - WAL',
'F LON S A SWE - YOR',
'F LON S A TUN - WAL',
'F LON S A TUN - YOR',
'F LON S A TUS - WAL',
'F LON S A WAL',
'F LON S A WAL - YOR',
'F LON S A YOR',
'F LON S A YOR - WAL',
'F LON S F BEL - ENG',
'F LON S F BEL - NTH',
'F LON S F BRE - ENG',
'F LON S F DEN - NTH',
'F LON S F EDI - NTH',
'F LON S F EDI - YOR',
'F LON S F ENG',
'F LON S F ENG - NTH',
'F LON S F ENG - WAL',
'F LON S F HEL - NTH',
'F LON S F HOL - NTH',
'F LON S F IRI - ENG',
'F LON S F IRI - WAL',
'F LON S F LVP - WAL',
'F LON S F MAO - ENG',
'F LON S F NTH',
'F LON S F NTH - ENG',
'F LON S F NTH - YOR',
'F LON S F NWG - NTH',
'F LON S F NWY - NTH',
'F LON S F PIC - ENG',
'F LON S F SKA - NTH',
'F LON S F WAL',
'F LON S F WAL - ENG',
'F LON S F YOR',
'F LON S F YOR - NTH',
'F LVN - BAL',
'F LVN - BOT',
'F LVN - PRU',
'F LVN - STP/SC',
'F LVN D',
'F LVN H',
'F LVN R BAL',
'F LVN R BOT',
'F LVN R PRU',
'F LVN R STP/SC',
'F LVN S A BEL - STP',
'F LVN S A BER - PRU',
'F LVN S A BER - STP',
'F LVN S A BRE - STP',
'F LVN S A CLY - STP',
'F LVN S A DEN - PRU',
'F LVN S A DEN - STP',
'F LVN S A EDI - STP',
'F LVN S A FIN - PRU',
'F LVN S A FIN - STP',
'F LVN S A GAS - STP',
'F LVN S A HOL - STP',
'F LVN S A KIE - PRU',
'F LVN S A KIE - STP',
'F LVN S A LON - STP',
'F LVN S A LVP - STP',
'F LVN S A MOS - STP',
'F LVN S A NAF - STP',
'F LVN S A NWY - STP',
'F LVN S A PIC - STP',
'F LVN S A POR - STP',
'F LVN S A PRU',
'F LVN S A PRU - STP',
'F LVN S A SIL - PRU',
'F LVN S A SPA - STP',
'F LVN S A STP',
'F LVN S A STP - PRU',
'F LVN S A SWE - PRU',
'F LVN S A SWE - STP',
'F LVN S A WAL - STP',
'F LVN S A WAR - PRU',
'F LVN S A YOR - STP',
'F LVN S F BAL',
'F LVN S F BAL - BOT',
'F LVN S F BAL - PRU',
'F LVN S F BAR - STP',
'F LVN S F BER - BAL',
'F LVN S F BER - PRU',
'F LVN S F BOT',
'F LVN S F BOT - BAL',
'F LVN S F BOT - STP',
'F LVN S F DEN - BAL',
'F LVN S F FIN - BOT',
'F LVN S F FIN - STP',
'F LVN S F KIE - BAL',
'F LVN S F NWY - STP',
'F LVN S F PRU',
'F LVN S F PRU - BAL',
'F LVN S F STP/NC',
'F LVN S F STP/SC',
'F LVN S F STP/SC - BOT',
'F LVN S F SWE - BAL',
'F LVN S F SWE - BOT',
'F LVP - CLY',
'F LVP - IRI',
'F LVP - NAO',
'F LVP - WAL',
'F LVP B',
'F LVP D',
'F LVP H',
'F LVP R CLY',
'F LVP R IRI',
'F LVP R NAO',
'F LVP R WAL',
'F LVP S A BEL - CLY',
'F LVP S A BEL - WAL',
'F LVP S A BRE - CLY',
'F LVP S A BRE - WAL',
'F LVP S A CLY',
'F LVP S A CLY - WAL',
'F LVP S A DEN - CLY',
'F LVP S A DEN - WAL',
'F LVP S A EDI - CLY',
'F LVP S A EDI - WAL',
'F LVP S A GAS - CLY',
'F LVP S A GAS - WAL',
'F LVP S A HOL - CLY',
'F LVP S A HOL - WAL',
'F LVP S A KIE - CLY',
'F LVP S A KIE - WAL',
'F LVP S A LON - CLY',
'F LVP S A LON - WAL',
'F LVP S A MAR - CLY',
'F LVP S A MAR - WAL',
'F LVP S A NAF - CLY',
'F LVP S A NAF - WAL',
'F LVP S A NAP - CLY',
'F LVP S A NAP - WAL',
'F LVP S A NWY - CLY',
'F LVP S A NWY - WAL',
'F LVP S A PIC - CLY',
'F LVP S A PIC - WAL',
'F LVP S A PIE - CLY',
'F LVP S A PIE - WAL',
'F LVP S A POR - CLY',
'F LVP S A POR - WAL',
'F LVP S A ROM - CLY',
'F LVP S A ROM - WAL',
'F LVP S A SPA - CLY',
'F LVP S A SPA - WAL',
'F LVP S A STP - CLY',
'F LVP S A STP - WAL',
'F LVP S A SWE - CLY',
'F LVP S A SWE - WAL',
'F LVP S A TUN - CLY',
'F LVP S A TUN - WAL',
'F LVP S A TUS - CLY',
'F LVP S A TUS - WAL',
'F LVP S A WAL',
'F LVP S A WAL - CLY',
'F LVP S A YOR - CLY',
'F LVP S A YOR - WAL',
'F LVP S F CLY',
'F LVP S F CLY - NAO',
'F LVP S F EDI - CLY',
'F LVP S F ENG - IRI',
'F LVP S F ENG - WAL',
'F LVP S F IRI',
'F LVP S F IRI - NAO',
'F LVP S F IRI - WAL',
'F LVP S F LON - WAL',
'F LVP S F MAO - IRI',
'F LVP S F MAO - NAO',
'F LVP S F NAO',
'F LVP S F NAO - CLY',
'F LVP S F NAO - IRI',
'F LVP S F NWG - CLY',
'F LVP S F NWG - NAO',
'F LVP S F WAL',
'F LVP S F WAL - IRI',
'F LYO - MAR',
'F LYO - PIE',
'F LYO - SPA/SC',
'F LYO - TUS',
'F LYO - TYS',
'F LYO - WES',
'F LYO C A ALB - MAR',
'F LYO C A ALB - PIE',
'F LYO C A ALB - SPA',
'F LYO C A APU - MAR',
'F LYO C A APU - PIE',
'F LYO C A APU - SPA',
'F LYO C A BEL - MAR',
'F LYO C A BEL - PIE',
'F LYO C A BEL - TUS',
'F LYO C A BRE - MAR',
'F LYO C A BRE - PIE',
'F LYO C A BRE - TUS',
'F LYO C A BUL - MAR',
'F LYO C A BUL - PIE',
'F LYO C A BUL - SPA',
'F LYO C A CLY - MAR',
'F LYO C A CLY - PIE',
'F LYO C A CLY - TUS',
'F LYO C A CON - MAR',
'F LYO C A CON - PIE',
'F LYO C A CON - SPA',
'F LYO C A GAS - MAR',
'F LYO C A GAS - PIE',
'F LYO C A GAS - TUS',
'F LYO C A GRE - MAR',
'F LYO C A GRE - PIE',
'F LYO C A GRE - SPA',
'F LYO C A LON - MAR',
'F LYO C A LON - PIE',
'F LYO C A LON - TUS',
'F LYO C A LVP - MAR',
'F LYO C A LVP - PIE',
'F LYO C A LVP - TUS',
'F LYO C A MAR - ALB',
'F LYO C A MAR - APU',
'F LYO C A MAR - BEL',
'F LYO C A MAR - BRE',
'F LYO C A MAR - BUL',
'F LYO C A MAR - CLY',
'F LYO C A MAR - CON',
'F LYO C A MAR - GAS',
'F LYO C A MAR - GRE',
'F LYO C A MAR - LON',
'F LYO C A MAR - LVP',
'F LYO C A MAR - NAF',
'F LYO C A MAR - NAP',
'F LYO C A MAR - PIC',
'F LYO C A MAR - PIE',
'F LYO C A MAR - POR',
'F LYO C A MAR - ROM',
'F LYO C A MAR - SMY',
'F LYO C A MAR - SPA',
'F LYO C A MAR - SYR',
'F LYO C A MAR - TRI',
'F LYO C A MAR - TUN',
'F LYO C A MAR - TUS',
'F LYO C A MAR - VEN',
'F LYO C A MAR - WAL',
'F LYO C A NAF - MAR',
'F LYO C A NAF - PIE',
'F LYO C A NAF - TUS',
'F LYO C A NAP - MAR',
'F LYO C A NAP - PIE',
'F LYO C A NAP - SPA',
'F LYO C A PIC - MAR',
'F LYO C A PIC - PIE',
'F LYO C A PIC - TUS',
'F LYO C A PIE - ALB',
'F LYO C A PIE - APU',
'F LYO C A PIE - BEL',
'F LYO C A PIE - BRE',
'F LYO C A PIE - BUL',
'F LYO C A PIE - CLY',
'F LYO C A PIE - CON',
'F LYO C A PIE - GAS',
'F LYO C A PIE - GRE',
'F LYO C A PIE - LON',
'F LYO C A PIE - LVP',
'F LYO C A PIE - MAR',
'F LYO C A PIE - NAF',
'F LYO C A PIE - NAP',
'F LYO C A PIE - PIC',
'F LYO C A PIE - POR',
'F LYO C A PIE - ROM',
'F LYO C A PIE - SMY',
'F LYO C A PIE - SPA',
'F LYO C A PIE - SYR',
'F LYO C A PIE - TRI',
'F LYO C A PIE - TUN',
'F LYO C A PIE - TUS',
'F LYO C A PIE - VEN',
'F LYO C A PIE - WAL',
'F LYO C A POR - MAR',
'F LYO C A POR - PIE',
'F LYO C A POR - TUS',
'F LYO C A ROM - MAR',
'F LYO C A ROM - PIE',
'F LYO C A ROM - SPA',
'F LYO C A SMY - MAR',
'F LYO C A SMY - PIE',
'F LYO C A SMY - SPA',
'F LYO C A SPA - ALB',
'F LYO C A SPA - APU',
'F LYO C A SPA - BUL',
'F LYO C A SPA - CON',
'F LYO C A SPA - GRE',
'F LYO C A SPA - MAR',
'F LYO C A SPA - NAP',
'F LYO C A SPA - PIE',
'F LYO C A SPA - ROM',
'F LYO C A SPA - SMY',
'F LYO C A SPA - SYR',
'F LYO C A SPA - TRI',
'F LYO C A SPA - TUN',
'F LYO C A SPA - TUS',
'F LYO C A SPA - VEN',
'F LYO C A SYR - MAR',
'F LYO C A SYR - PIE',
'F LYO C A SYR - SPA',
'F LYO C A TRI - MAR',
'F LYO C A TRI - PIE',
'F LYO C A TRI - SPA',
'F LYO C A TUN - MAR',
'F LYO C A TUN - PIE',
'F LYO C A TUN - SPA',
'F LYO C A TUN - TUS',
'F LYO C A TUS - BEL',
'F LYO C A TUS - BRE',
'F LYO C A TUS - CLY',
'F LYO C A TUS - GAS',
'F LYO C A TUS - LON',
'F LYO C A TUS - LVP',
'F LYO C A TUS - MAR',
'F LYO C A TUS - NAF',
'F LYO C A TUS - PIC',
'F LYO C A TUS - PIE',
'F LYO C A TUS - POR',
'F LYO C A TUS - SPA',
'F LYO C A TUS - TUN',
'F LYO C A TUS - WAL',
'F LYO C A VEN - MAR',
'F LYO C A VEN - PIE',
'F LYO C A VEN - SPA',
'F LYO C A WAL - MAR',
'F LYO C A WAL - PIE',
'F LYO C A WAL - TUS',
'F LYO D',
'F LYO H',
'F LYO R MAR',
'F LYO R PIE',
'F LYO R SPA/SC',
'F LYO R TUS',
'F LYO R TYS',
'F LYO R WES',
'F LYO S A ALB - SPA',
'F LYO S A ALB - TUS',
'F LYO S A APU - SPA',
'F LYO S A APU - TUS',
'F LYO S A BEL - SPA',
'F LYO S A BEL - TUS',
'F LYO S A BRE - SPA',
'F LYO S A BRE - TUS',
'F LYO S A BUL - SPA',
'F LYO S A BUL - TUS',
'F LYO S A BUR - MAR',
'F LYO S A CLY - SPA',
'F LYO S A CLY - TUS',
'F LYO S A CON - SPA',
'F LYO S A CON - TUS',
'F LYO S A DEN - SPA',
'F LYO S A EDI - SPA',
'F LYO S A GAS - MAR',
'F LYO S A GAS - SPA',
'F LYO S A GAS - TUS',
'F LYO S A GRE - SPA',
'F LYO S A GRE - TUS',
'F LYO S A HOL - SPA',
'F LYO S A KIE - SPA',
'F LYO S A LON - SPA',
'F LYO S A LON - TUS',
'F LYO S A LVP - SPA',
'F LYO S A LVP - TUS',
'F LYO S A MAR',
'F LYO S A MAR - PIE',
'F LYO S A MAR - SPA',
'F LYO S A NAF - SPA',
'F LYO S A NAF - TUS',
'F LYO S A NAP - SPA',
'F LYO S A NAP - TUS',
'F LYO S A NWY - SPA',
'F LYO S A PIC - SPA',
'F LYO S A PIC - TUS',
'F LYO S A PIE',
'F LYO S A PIE - MAR',
'F LYO S A PIE - TUS',
'F LYO S A POR - SPA',
'F LYO S A POR - TUS',
'F LYO S A ROM - SPA',
'F LYO S A ROM - TUS',
'F LYO S A SMY - SPA',
'F LYO S A SMY - TUS',
'F LYO S A SPA',
'F LYO S A SPA - MAR',
'F LYO S A SPA - TUS',
'F LYO S A STP - SPA',
'F LYO S A SWE - SPA',
'F LYO S A SYR - SPA',
'F LYO S A SYR - TUS',
'F LYO S A TRI - SPA',
'F LYO S A TRI - TUS',
'F LYO S A TUN - SPA',
'F LYO S A TUN - TUS',
'F LYO S A TUS',
'F LYO S A TUS - PIE',
'F LYO S A TUS - SPA',
'F LYO S A TYR - PIE',
'F LYO S A VEN - PIE',
'F LYO S A VEN - SPA',
'F LYO S A VEN - TUS',
'F LYO S A WAL - SPA',
'F LYO S A WAL - TUS',
'F LYO S A YOR - SPA',
'F LYO S F GAS - SPA',
'F LYO S F ION - TYS',
'F LYO S F MAO - SPA',
'F LYO S F MAO - WES',
'F LYO S F MAR',
'F LYO S F MAR - PIE',
'F LYO S F MAR - SPA',
'F LYO S F NAF - WES',
'F LYO S F NAP - TYS',
'F LYO S F PIE',
'F LYO S F PIE - MAR',
'F LYO S F PIE - TUS',
'F LYO S F POR - SPA',
'F LYO S F ROM - TUS',
'F LYO S F ROM - TYS',
'F LYO S F SPA/NC',
'F LYO S F SPA/SC',
'F LYO S F SPA/SC - MAR',
'F LYO S F SPA/SC - WES',
'F LYO S F TUN - TYS',
'F LYO S F TUN - WES',
'F LYO S F TUS',
'F LYO S F TUS - PIE',
'F LYO S F TUS - TYS',
'F LYO S F TYS',
'F LYO S F TYS - TUS',
'F LYO S F TYS - WES',
'F LYO S F WES',
'F LYO S F WES - SPA',
'F LYO S F WES - TYS',
'F MAO - BRE',
'F MAO - ENG',
'F MAO - GAS',
'F MAO - IRI',
'F MAO - NAF',
'F MAO - NAO',
'F MAO - POR',
'F MAO - SPA/NC',
'F MAO - SPA/SC',
'F MAO - WES',
'F MAO C A ALB - BRE',
'F MAO C A ALB - GAS',
'F MAO C A ALB - POR',
'F MAO C A APU - BRE',
'F MAO C A APU - GAS',
'F MAO C A APU - POR',
'F MAO C A BEL - BRE',
'F MAO C A BEL - CLY',
'F MAO C A BEL - EDI',
'F MAO C A BEL - GAS',
'F MAO C A BEL - LVP',
'F MAO C A BEL - MAR',
'F MAO C A BEL - NAF',
'F MAO C A BEL - NAP',
'F MAO C A BEL - NWY',
'F MAO C A BEL - PIE',
'F MAO C A BEL - POR',
'F MAO C A BEL - ROM',
'F MAO C A BEL - SPA',
'F MAO C A BEL - TUN',
'F MAO C A BEL - TUS',
'F MAO C A BRE - ALB',
'F MAO C A BRE - APU',
'F MAO C A BRE - BEL',
'F MAO C A BRE - CLY',
'F MAO C A BRE - DEN',
'F MAO C A BRE - EDI',
'F MAO C A BRE - GAS',
'F MAO C A BRE - GRE',
'F MAO C A BRE - HOL',
'F MAO C A BRE - LON',
'F MAO C A BRE - LVP',
'F MAO C A BRE - MAR',
'F MAO C A BRE - NAF',
'F MAO C A BRE - NAP',
'F MAO C A BRE - NWY',
'F MAO C A BRE - PIE',
'F MAO C A BRE - POR',
'F MAO C A BRE - ROM',
'F MAO C A BRE - SPA',
'F MAO C A BRE - STP',
'F MAO C A BRE - TUN',
'F MAO C A BRE - TUS',
'F MAO C A BRE - WAL',
'F MAO C A BRE - YOR',
'F MAO C A CLY - BEL',
'F MAO C A CLY - BRE',
'F MAO C A CLY - DEN',
'F MAO C A CLY - EDI',
'F MAO C A CLY - GAS',
'F MAO C A CLY - HOL',
'F MAO C A CLY - LON',
'F MAO C A CLY - MAR',
'F MAO C A CLY - NAF',
'F MAO C A CLY - NAP',
'F MAO C A CLY - NWY',
'F MAO C A CLY - PIC',
'F MAO C A CLY - PIE',
'F MAO C A CLY - POR',
'F MAO C A CLY - ROM',
'F MAO C A CLY - SPA',
'F MAO C A CLY - TUN',
'F MAO C A CLY - TUS',
'F MAO C A CLY - WAL',
'F MAO C A CLY - YOR',
'F MAO C A DEN - BRE',
'F MAO C A DEN - CLY',
'F MAO C A DEN - GAS',
'F MAO C A DEN - LVP',
'F MAO C A DEN - NAF',
'F MAO C A DEN - POR',
'F MAO C A DEN - SPA',
'F MAO C A DEN - TUN',
'F MAO C A EDI - BEL',
'F MAO C A EDI - BRE',
'F MAO C A EDI - CLY',
'F MAO C A EDI - GAS',
'F MAO C A EDI - LON',
'F MAO C A EDI - LVP',
'F MAO C A EDI - NAF',
'F MAO C A EDI - PIC',
'F MAO C A EDI - POR',
'F MAO C A EDI - SPA',
'F MAO C A EDI - TUN',
'F MAO C A EDI - WAL',
'F MAO C A GAS - ALB',
'F MAO C A GAS - APU',
'F MAO C A GAS - BEL',
'F MAO C A GAS - BRE',
'F MAO C A GAS - CLY',
'F MAO C A GAS - DEN',
'F MAO C A GAS - EDI',
'F MAO C A GAS - GRE',
'F MAO C A GAS - HOL',
'F MAO C A GAS - KIE',
'F MAO C A GAS - LON',
'F MAO C A GAS - LVP',
'F MAO C A GAS - MAR',
'F MAO C A GAS - NAF',
'F MAO C A GAS - NAP',
'F MAO C A GAS - NWY',
'F MAO C A GAS - PIC',
'F MAO C A GAS - PIE',
'F MAO C A GAS - POR',
'F MAO C A GAS - ROM',
'F MAO C A GAS - SPA',
'F MAO C A GAS - STP',
'F MAO C A GAS - SWE',
'F MAO C A GAS - TUN',
'F MAO C A GAS - TUS',
'F MAO C A GAS - WAL',
'F MAO C A GAS - YOR',
'F MAO C A GRE - BRE',
'F MAO C A GRE - GAS',
'F MAO C A GRE - POR',
'F MAO C A HOL - BRE',
'F MAO C A HOL - CLY',
'F MAO C A HOL - GAS',
'F MAO C A HOL - LVP',
'F MAO C A HOL - NAF',
'F MAO C A HOL - POR',
'F MAO C A HOL - SPA',
'F MAO C A HOL - TUN',
'F MAO C A KIE - GAS',
'F MAO C A KIE - NAF',
'F MAO C A KIE - POR',
'F MAO C A KIE - SPA',
'F MAO C A LON - BRE',
'F MAO C A LON - CLY',
'F MAO C A LON - EDI',
'F MAO C A LON - GAS',
'F MAO C A LON - LVP',
'F MAO C A LON - MAR',
'F MAO C A LON - NAF',
'F MAO C A LON - NAP',
'F MAO C A LON - NWY',
'F MAO C A LON - PIE',
'F MAO C A LON - POR',
'F MAO C A LON - ROM',
'F MAO C A LON - SPA',
'F MAO C A LON - TUN',
'F MAO C A LON - TUS',
'F MAO C A LVP - BEL',
'F MAO C A LVP - BRE',
'F MAO C A LVP - DEN',
'F MAO C A LVP - EDI',
'F MAO C A LVP - GAS',
'F MAO C A LVP - HOL',
'F MAO C A LVP - LON',
'F MAO C A LVP - MAR',
'F MAO C A LVP - NAF',
'F MAO C A LVP - NAP',
'F MAO C A LVP - NWY',
'F MAO C A LVP - PIC',
'F MAO C A LVP - PIE',
'F MAO C A LVP - POR',
'F MAO C A LVP - ROM',
'F MAO C A LVP - SPA',
'F MAO C A LVP - TUN',
'F MAO C A LVP - TUS',
'F MAO C A LVP - WAL',
'F MAO C A LVP - YOR',
'F MAO C A MAR - BEL',
'F MAO C A MAR - BRE',
'F MAO C A MAR - CLY',
'F MAO C A MAR - GAS',
'F MAO C A MAR - LON',
'F MAO C A MAR - LVP',
'F MAO C A MAR - PIC',
'F MAO C A MAR - POR',
'F MAO C A MAR - WAL',
'F MAO C A NAF - BEL',
'F MAO C A NAF - BRE',
'F MAO C A NAF - CLY',
'F MAO C A NAF - DEN',
'F MAO C A NAF - EDI',
'F MAO C A NAF - GAS',
'F MAO C A NAF - HOL',
'F MAO C A NAF - KIE',
'F MAO C A NAF - LON',
'F MAO C A NAF - LVP',
'F MAO C A NAF - NWY',
'F MAO C A NAF - PIC',
'F MAO C A NAF - POR',
'F MAO C A NAF - SPA',
'F MAO C A NAF - STP',
'F MAO C A NAF - SWE',
'F MAO C A NAF - WAL',
'F MAO C A NAF - YOR',
'F MAO C A NAP - BEL',
'F MAO C A NAP - BRE',
'F MAO C A NAP - CLY',
'F MAO C A NAP - GAS',
'F MAO C A NAP - LON',
'F MAO C A NAP - LVP',
'F MAO C A NAP - PIC',
'F MAO C A NAP - POR',
'F MAO C A NAP - WAL',
'F MAO C A NWY - BEL',
'F MAO C A NWY - BRE',
'F MAO C A NWY - CLY',
'F MAO C A NWY - GAS',
'F MAO C A NWY - LON',
'F MAO C A NWY - LVP',
'F MAO C A NWY - NAF',
'F MAO C A NWY - PIC',
'F MAO C A NWY - POR',
'F MAO C A NWY - SPA',
'F MAO C A NWY - TUN',
'F MAO C A NWY - WAL',
'F MAO C A PIC - CLY',
'F MAO C A PIC - EDI',
'F MAO C A PIC - GAS',
'F MAO C A PIC - LVP',
'F MAO C A PIC - MAR',
'F MAO C A PIC - NAF',
'F MAO C A PIC - NAP',
'F MAO C A PIC - NWY',
'F MAO C A PIC - PIE',
'F MAO C A PIC - POR',
'F MAO C A PIC - ROM',
'F MAO C A PIC - SPA',
'F MAO C A PIC - TUN',
'F MAO C A PIC - TUS',
'F MAO C A PIE - BEL',
'F MAO C A PIE - BRE',
'F MAO C A PIE - CLY',
'F MAO C A PIE - GAS',
'F MAO C A PIE - LON',
'F MAO C A PIE - LVP',
'F MAO C A PIE - PIC',
'F MAO C A PIE - POR',
'F MAO C A PIE - WAL',
'F MAO C A POR - ALB',
'F MAO C A POR - APU',
'F MAO C A POR - BEL',
'F MAO C A POR - BRE',
'F MAO C A POR - CLY',
'F MAO C A POR - DEN',
'F MAO C A POR - EDI',
'F MAO C A POR - GAS',
'F MAO C A POR - GRE',
'F MAO C A POR - HOL',
'F MAO C A POR - KIE',
'F MAO C A POR - LON',
'F MAO C A POR - LVP',
'F MAO C A POR - MAR',
'F MAO C A POR - NAF',
'F MAO C A POR - NAP',
'F MAO C A POR - NWY',
'F MAO C A POR - PIC',
'F MAO C A POR - PIE',
'F MAO C A POR - ROM',
'F MAO C A POR - SPA',
'F MAO C A POR - STP',
'F MAO C A POR - SWE',
'F MAO C A POR - TUN',
'F MAO C A POR - TUS',
'F MAO C A POR - WAL',
'F MAO C A POR - YOR',
'F MAO C A ROM - BEL',
'F MAO C A ROM - BRE',
'F MAO C A ROM - CLY',
'F MAO C A ROM - GAS',
'F MAO C A ROM - LON',
'F MAO C A ROM - LVP',
'F MAO C A ROM - PIC',
'F MAO C A ROM - POR',
'F MAO C A ROM - WAL',
'F MAO C A SPA - BEL',
'F MAO C A SPA - BRE',
'F MAO C A SPA - CLY',
'F MAO C A SPA - DEN',
'F MAO C A SPA - EDI',
'F MAO C A SPA - GAS',
'F MAO C A SPA - HOL',
'F MAO C A SPA - KIE',
'F MAO C A SPA - LON',
'F MAO C A SPA - LVP',
'F MAO C A SPA - NAF',
'F MAO C A SPA - NWY',
'F MAO C A SPA - PIC',
'F MAO C A SPA - POR',
'F MAO C A SPA - STP',
'F MAO C A SPA - SWE',
'F MAO C A SPA - WAL',
'F MAO C A SPA - YOR',
'F MAO C A STP - BRE',
'F MAO C A STP - GAS',
'F MAO C A STP - NAF',
'F MAO C A STP - POR',
'F MAO C A STP - SPA',
'F MAO C A SWE - GAS',
'F MAO C A SWE - NAF',
'F MAO C A SWE - POR',
'F MAO C A SWE - SPA',
'F MAO C A TUN - BEL',
'F MAO C A TUN - BRE',
'F MAO C A TUN - CLY',
'F MAO C A TUN - DEN',
'F MAO C A TUN - EDI',
'F MAO C A TUN - GAS',
'F MAO C A TUN - HOL',
'F MAO C A TUN - LON',
'F MAO C A TUN - LVP',
'F MAO C A TUN - NWY',
'F MAO C A TUN - PIC',
'F MAO C A TUN - POR',
'F MAO C A TUN - WAL',
'F MAO C A TUN - YOR',
'F MAO C A TUS - BEL',
'F MAO C A TUS - BRE',
'F MAO C A TUS - CLY',
'F MAO C A TUS - GAS',
'F MAO C A TUS - LON',
'F MAO C A TUS - LVP',
'F MAO C A TUS - PIC',
'F MAO C A TUS - POR',
'F MAO C A TUS - WAL',
'F MAO C A WAL - BRE',
'F MAO C A WAL - CLY',
'F MAO C A WAL - EDI',
'F MAO C A WAL - GAS',
'F MAO C A WAL - LVP',
'F MAO C A WAL - MAR',
'F MAO C A WAL - NAF',
'F MAO C A WAL - NAP',
'F MAO C A WAL - NWY',
'F MAO C A WAL - PIE',
'F MAO C A WAL - POR',
'F MAO C A WAL - ROM',
'F MAO C A WAL - SPA',
'F MAO C A WAL - TUN',
'F MAO C A WAL - TUS',
'F MAO C A YOR - BRE',
'F MAO C A YOR - CLY',
'F MAO C A YOR - GAS',
'F MAO C A YOR - LVP',
'F MAO C A YOR - NAF',
'F MAO C A YOR - POR',
'F MAO C A YOR - SPA',
'F MAO C A YOR - TUN',
'F MAO D',
'F MAO H',
'F MAO R BRE',
'F MAO R ENG',
'F MAO R GAS',
'F MAO R IRI',
'F MAO R NAF',
'F MAO R NAO',
'F MAO R POR',
'F MAO R SPA/NC',
'F MAO R SPA/SC',
'F MAO R WES',
'F MAO S A ALB - NAF',
'F MAO S A ALB - SPA',
'F MAO S A APU - NAF',
'F MAO S A APU - SPA',
'F MAO S A BEL - BRE',
'F MAO S A BRE',
'F MAO S A BRE - GAS',
'F MAO S A BUL - NAF',
'F MAO S A BUL - SPA',
'F MAO S A BUR - GAS',
'F MAO S A CLY - BRE',
'F MAO S A CON - NAF',
'F MAO S A CON - SPA',
'F MAO S A DEN - BRE',
'F MAO S A EDI - BRE',
'F MAO S A GAS',
'F MAO S A GAS - BRE',
'F MAO S A GAS - SPA',
'F MAO S A GRE - NAF',
'F MAO S A GRE - SPA',
'F MAO S A HOL - BRE',
'F MAO S A KIE - BRE',
'F MAO S A LON - BRE',
'F MAO S A LVP - BRE',
'F MAO S A MAR - GAS',
'F MAO S A MAR - NAF',
'F MAO S A MAR - SPA',
'F MAO S A NAF',
'F MAO S A NAF - SPA',
'F MAO S A NAP - NAF',
'F MAO S A NAP - SPA',
'F MAO S A NWY - BRE',
'F MAO S A PAR - BRE',
'F MAO S A PAR - GAS',
'F MAO S A PIC - BRE',
'F MAO S A PIE - NAF',
'F MAO S A PIE - SPA',
'F MAO S A POR',
'F MAO S A POR - SPA',
'F MAO S A ROM - NAF',
'F MAO S A ROM - SPA',
'F MAO S A SMY - NAF',
'F MAO S A SMY - SPA',
'F MAO S A SPA',
'F MAO S A SPA - GAS',
'F MAO S A SPA - NAF',
'F MAO S A SPA - POR',
'F MAO S A STP - BRE',
'F MAO S A SWE - BRE',
'F MAO S A SYR - NAF',
'F MAO S A SYR - SPA',
'F MAO S A TRI - NAF',
'F MAO S A TRI - SPA',
'F MAO S A TUN - NAF',
'F MAO S A TUN - SPA',
'F MAO S A TUS - NAF',
'F MAO S A TUS - SPA',
'F MAO S A VEN - NAF',
'F MAO S A VEN - SPA',
'F MAO S A WAL - BRE',
'F MAO S A YOR - BRE',
'F MAO S F BEL - ENG',
'F MAO S F BRE',
'F MAO S F BRE - ENG',
'F MAO S F BRE - GAS',
'F MAO S F CLY - NAO',
'F MAO S F ENG',
'F MAO S F ENG - BRE',
'F MAO S F ENG - IRI',
'F MAO S F GAS',
'F MAO S F GAS - BRE',
'F MAO S F GAS - SPA',
'F MAO S F IRI',
'F MAO S F IRI - ENG',
'F MAO S F IRI - NAO',
'F MAO S F LON - ENG',
'F MAO S F LVP - IRI',
'F MAO S F LVP - NAO',
'F MAO S F LYO - SPA',
'F MAO S F LYO - WES',
'F MAO S F MAR - SPA',
'F MAO S F NAF',
'F MAO S F NAF - WES',
'F MAO S F NAO',
'F MAO S F NAO - IRI',
'F MAO S F NTH - ENG',
'F MAO S F NWG - NAO',
'F MAO S F PIC - BRE',
'F MAO S F PIC - ENG',
'F MAO S F POR',
'F MAO S F POR - SPA',
'F MAO S F SPA/NC',
'F MAO S F SPA/NC - GAS',
'F MAO S F SPA/NC - POR',
'F MAO S F SPA/SC',
'F MAO S F SPA/SC - POR',
'F MAO S F SPA/SC - WES',
'F MAO S F TUN - NAF',
'F MAO S F TUN - WES',
'F MAO S F TYS - WES',
'F MAO S F WAL - ENG',
'F MAO S F WAL - IRI',
'F MAO S F WES',
'F MAO S F WES - NAF',
'F MAO S F WES - SPA',
'F MAR - LYO',
'F MAR - PIE',
'F MAR - SPA/SC',
'F MAR B',
'F MAR D',
'F MAR H',
'F MAR R LYO',
'F MAR R PIE',
'F MAR R SPA/SC',
'F MAR S A ALB - PIE',
'F MAR S A ALB - SPA',
'F MAR S A APU - PIE',
'F MAR S A APU - SPA',
'F MAR S A BEL - PIE',
'F MAR S A BEL - SPA',
'F MAR S A BRE - PIE',
'F MAR S A BRE - SPA',
'F MAR S A BUL - PIE',
'F MAR S A BUL - SPA',
'F MAR S A CLY - PIE',
'F MAR S A CLY - SPA',
'F MAR S A CON - PIE',
'F MAR S A CON - SPA',
'F MAR S A DEN - SPA',
'F MAR S A EDI - SPA',
'F MAR S A GAS - PIE',
'F MAR S A GAS - SPA',
'F MAR S A GRE - PIE',
'F MAR S A GRE - SPA',
'F MAR S A HOL - SPA',
'F MAR S A KIE - SPA',
'F MAR S A LON - PIE',
'F MAR S A LON - SPA',
'F MAR S A LVP - PIE',
'F MAR S A LVP - SPA',
'F MAR S A NAF - PIE',
'F MAR S A NAF - SPA',
'F MAR S A NAP - PIE',
'F MAR S A NAP - SPA',
'F MAR S A NWY - SPA',
'F MAR S A PIC - PIE',
'F MAR S A PIC - SPA',
'F MAR S A PIE',
'F MAR S A PIE - SPA',
'F MAR S A POR - PIE',
'F MAR S A POR - SPA',
'F MAR S A ROM - PIE',
'F MAR S A ROM - SPA',
'F MAR S A SMY - PIE',
'F MAR S A SMY - SPA',
'F MAR S A SPA',
'F MAR S A SPA - PIE',
'F MAR S A STP - SPA',
'F MAR S A SWE - SPA',
'F MAR S A SYR - PIE',
'F MAR S A SYR - SPA',
'F MAR S A TRI - PIE',
'F MAR S A TRI - SPA',
'F MAR S A TUN - PIE',
'F MAR S A TUN - SPA',
'F MAR S A TUS - PIE',
'F MAR S A TUS - SPA',
'F MAR S A TYR - PIE',
'F MAR S A VEN - PIE',
'F MAR S A VEN - SPA',
'F MAR S A WAL - PIE',
'F MAR S A WAL - SPA',
'F MAR S A YOR - SPA',
'F MAR S F GAS - SPA',
'F MAR S F LYO',
'F MAR S F LYO - PIE',
'F MAR S F LYO - SPA',
'F MAR S F MAO - SPA',
'F MAR S F PIE',
'F MAR S F PIE - LYO',
'F MAR S F POR - SPA',
'F MAR S F SPA/NC',
'F MAR S F SPA/SC',
'F MAR S F SPA/SC - LYO',
'F MAR S F TUS - LYO',
'F MAR S F TUS - PIE',
'F MAR S F TYS - LYO',
'F MAR S F WES - LYO',
'F MAR S F WES - SPA',
'F NAF - MAO',
'F NAF - TUN',
'F NAF - WES',
'F NAF D',
'F NAF H',
'F NAF R MAO',
'F NAF R TUN',
'F NAF R WES',
'F NAF S A ALB - TUN',
'F NAF S A APU - TUN',
'F NAF S A BEL - TUN',
'F NAF S A BRE - TUN',
'F NAF S A BUL - TUN',
'F NAF S A CLY - TUN',
'F NAF S A CON - TUN',
'F NAF S A DEN - TUN',
'F NAF S A EDI - TUN',
'F NAF S A GAS - TUN',
'F NAF S A GRE - TUN',
'F NAF S A HOL - TUN',
'F NAF S A LON - TUN',
'F NAF S A LVP - TUN',
'F NAF S A MAR - TUN',
'F NAF S A NAP - TUN',
'F NAF S A NWY - TUN',
'F NAF S A PIC - TUN',
'F NAF S A PIE - TUN',
'F NAF S A POR - TUN',
'F NAF S A ROM - TUN',
'F NAF S A SMY - TUN',
'F NAF S A SPA - TUN',
'F NAF S A SYR - TUN',
'F NAF S A TRI - TUN',
'F NAF S A TUN',
'F NAF S A TUS - TUN',
'F NAF S A VEN - TUN',
'F NAF S A WAL - TUN',
'F NAF S A YOR - TUN',
'F NAF S F BRE - MAO',
'F NAF S F ENG - MAO',
'F NAF S F GAS - MAO',
'F NAF S F ION - TUN',
'F NAF S F IRI - MAO',
'F NAF S F LYO - WES',
'F NAF S F MAO',
'F NAF S F MAO - WES',
'F NAF S F NAO - MAO',
'F NAF S F POR - MAO',
'F NAF S F SPA/NC - MAO',
'F NAF S F SPA/SC - MAO',
'F NAF S F SPA/SC - WES',
'F NAF S F TUN',
'F NAF S F TUN - WES',
'F NAF S F TYS - TUN',
'F NAF S F TYS - WES',
'F NAF S F WES',
'F NAF S F WES - MAO',
'F NAF S F WES - TUN',
'F NAO - CLY',
'F NAO - IRI',
'F NAO - LVP',
'F NAO - MAO',
'F NAO - NWG',
'F NAO C A BEL - BRE',
'F NAO C A BEL - CLY',
'F NAO C A BEL - EDI',
'F NAO C A BEL - GAS',
'F NAO C A BEL - LVP',
'F NAO C A BEL - NAF',
'F NAO C A BEL - NWY',
'F NAO C A BEL - POR',
'F NAO C A BEL - SPA',
'F NAO C A BEL - WAL',
'F NAO C A BRE - BEL',
'F NAO C A BRE - CLY',
'F NAO C A BRE - DEN',
'F NAO C A BRE - EDI',
'F NAO C A BRE - HOL',
'F NAO C A BRE - LON',
'F NAO C A BRE - LVP',
'F NAO C A BRE - NWY',
'F NAO C A BRE - STP',
'F NAO C A BRE - YOR',
'F NAO C A CLY - BEL',
'F NAO C A CLY - BRE',
'F NAO C A CLY - DEN',
'F NAO C A CLY - EDI',
'F NAO C A CLY - GAS',
'F NAO C A CLY - HOL',
'F NAO C A CLY - LON',
'F NAO C A CLY - LVP',
'F NAO C A CLY - MAR',
'F NAO C A CLY - NAF',
'F NAO C A CLY - NAP',
'F NAO C A CLY - NWY',
'F NAO C A CLY - PIC',
'F NAO C A CLY - PIE',
'F NAO C A CLY - POR',
'F NAO C A CLY - ROM',
'F NAO C A CLY - SPA',
'F NAO C A CLY - TUN',
'F NAO C A CLY - TUS',
'F NAO C A CLY - WAL',
'F NAO C A CLY - YOR',
'F NAO C A DEN - BRE',
'F NAO C A DEN - CLY',
'F NAO C A DEN - GAS',
'F NAO C A DEN - LVP',
'F NAO C A DEN - NAF',
'F NAO C A DEN - POR',
'F NAO C A DEN - SPA',
'F NAO C A DEN - WAL',
'F NAO C A EDI - BEL',
'F NAO C A EDI - BRE',
'F NAO C A EDI - CLY',
'F NAO C A EDI - GAS',
'F NAO C A EDI - LON',
'F NAO C A EDI - LVP',
'F NAO C A EDI - NAF',
'F NAO C A EDI - PIC',
'F NAO C A EDI - POR',
'F NAO C A EDI - SPA',
'F NAO C A EDI - TUN',
'F NAO C A EDI - WAL',
'F NAO C A GAS - BEL',
'F NAO C A GAS - CLY',
'F NAO C A GAS - DEN',
'F NAO C A GAS - EDI',
'F NAO C A GAS - HOL',
'F NAO C A GAS - LON',
'F NAO C A GAS - LVP',
'F NAO C A GAS - NWY',
'F NAO C A GAS - STP',
'F NAO C A GAS - YOR',
'F NAO C A HOL - BRE',
'F NAO C A HOL - CLY',
'F NAO C A HOL - GAS',
'F NAO C A HOL - LVP',
'F NAO C A HOL - NAF',
'F NAO C A HOL - POR',
'F NAO C A HOL - SPA',
'F NAO C A HOL - WAL',
'F NAO C A KIE - LVP',
'F NAO C A LON - BRE',
'F NAO C A LON - CLY',
'F NAO C A LON - EDI',
'F NAO C A LON - GAS',
'F NAO C A LON - LVP',
'F NAO C A LON - NAF',
'F NAO C A LON - NWY',
'F NAO C A LON - POR',
'F NAO C A LON - SPA',
'F NAO C A LON - WAL',
'F NAO C A LVP - BEL',
'F NAO C A LVP - BRE',
'F NAO C A LVP - CLY',
'F NAO C A LVP - DEN',
'F NAO C A LVP - EDI',
'F NAO C A LVP - GAS',
'F NAO C A LVP - HOL',
'F NAO C A LVP - KIE',
'F NAO C A LVP - LON',
'F NAO C A LVP - MAR',
'F NAO C A LVP - NAF',
'F NAO C A LVP - NAP',
'F NAO C A LVP - NWY',
'F NAO C A LVP - PIC',
'F NAO C A LVP - PIE',
'F NAO C A LVP - POR',
'F NAO C A LVP - ROM',
'F NAO C A LVP - SPA',
'F NAO C A LVP - STP',
'F NAO C A LVP - SWE',
'F NAO C A LVP - TUN',
'F NAO C A LVP - TUS',
'F NAO C A LVP - WAL',
'F NAO C A LVP - YOR',
'F NAO C A MAR - CLY',
'F NAO C A MAR - LVP',
'F NAO C A NAF - BEL',
'F NAO C A NAF - CLY',
'F NAO C A NAF - DEN',
'F NAO C A NAF - EDI',
'F NAO C A NAF - HOL',
'F NAO C A NAF - LON',
'F NAO C A NAF - LVP',
'F NAO C A NAF - NWY',
'F NAO C A NAF - STP',
'F NAO C A NAF - YOR',
'F NAO C A NAP - CLY',
'F NAO C A NAP - LVP',
'F NAO C A NWY - BEL',
'F NAO C A NWY - BRE',
'F NAO C A NWY - CLY',
'F NAO C A NWY - GAS',
'F NAO C A NWY - LON',
'F NAO C A NWY - LVP',
'F NAO C A NWY - NAF',
'F NAO C A NWY - PIC',
'F NAO C A NWY - POR',
'F NAO C A NWY - SPA',
'F NAO C A NWY - TUN',
'F NAO C A NWY - WAL',
'F NAO C A PIC - CLY',
'F NAO C A PIC - EDI',
'F NAO C A PIC - LVP',
'F NAO C A PIC - NWY',
'F NAO C A PIE - CLY',
'F NAO C A PIE - LVP',
'F NAO C A POR - BEL',
'F NAO C A POR - CLY',
'F NAO C A POR - DEN',
'F NAO C A POR - EDI',
'F NAO C A POR - HOL',
'F NAO C A POR - LON',
'F NAO C A POR - LVP',
'F NAO C A POR - NWY',
'F NAO C A POR - STP',
'F NAO C A POR - YOR',
'F NAO C A ROM - CLY',
'F NAO C A ROM - LVP',
'F NAO C A SPA - BEL',
'F NAO C A SPA - CLY',
'F NAO C A SPA - DEN',
'F NAO C A SPA - EDI',
'F NAO C A SPA - HOL',
'F NAO C A SPA - LON',
'F NAO C A SPA - LVP',
'F NAO C A SPA - NWY',
'F NAO C A SPA - STP',
'F NAO C A SPA - YOR',
'F NAO C A STP - BRE',
'F NAO C A STP - GAS',
'F NAO C A STP - LVP',
'F NAO C A STP - NAF',
'F NAO C A STP - POR',
'F NAO C A STP - SPA',
'F NAO C A STP - WAL',
'F NAO C A SWE - LVP',
'F NAO C A TUN - CLY',
'F NAO C A TUN - EDI',
'F NAO C A TUN - LVP',
'F NAO C A TUN - NWY',
'F NAO C A TUS - CLY',
'F NAO C A TUS - LVP',
'F NAO C A WAL - BEL',
'F NAO C A WAL - CLY',
'F NAO C A WAL - DEN',
'F NAO C A WAL - EDI',
'F NAO C A WAL - HOL',
'F NAO C A WAL - LON',
'F NAO C A WAL - LVP',
'F NAO C A WAL - NWY',
'F NAO C A WAL - STP',
'F NAO C A WAL - YOR',
'F NAO C A YOR - BRE',
'F NAO C A YOR - CLY',
'F NAO C A YOR - GAS',
'F NAO C A YOR - LVP',
'F NAO C A YOR - NAF',
'F NAO C A YOR - POR',
'F NAO C A YOR - SPA',
'F NAO C A YOR - WAL',
'F NAO D',
'F NAO H',
'F NAO R CLY',
'F NAO R IRI',
'F NAO R LVP',
'F NAO R MAO',
'F NAO R NWG',
'F NAO S A BEL - CLY',
'F NAO S A BEL - LVP',
'F NAO S A BRE - CLY',
'F NAO S A BRE - LVP',
'F NAO S A CLY',
'F NAO S A CLY - LVP',
'F NAO S A DEN - CLY',
'F NAO S A DEN - LVP',
'F NAO S A EDI - CLY',
'F NAO S A EDI - LVP',
'F NAO S A GAS - CLY',
'F NAO S A GAS - LVP',
'F NAO S A HOL - CLY',
'F NAO S A HOL - LVP',
'F NAO S A KIE - CLY',
'F NAO S A KIE - LVP',
'F NAO S A LON - CLY',
'F NAO S A LON - LVP',
'F NAO S A LVP',
'F NAO S A LVP - CLY',
'F NAO S A MAR - LVP',
'F NAO S A NAF - CLY',
'F NAO S A NAF - LVP',
'F NAO S A NAP - LVP',
'F NAO S A NWY - CLY',
'F NAO S A NWY - LVP',
'F NAO S A PIC - CLY',
'F NAO S A PIC - LVP',
'F NAO S A PIE - LVP',
'F NAO S A POR - CLY',
'F NAO S A POR - LVP',
'F NAO S A ROM - LVP',
'F NAO S A SPA - CLY',
'F NAO S A SPA - LVP',
'F NAO S A STP - CLY',
'F NAO S A SWE - CLY',
'F NAO S A SWE - LVP',
'F NAO S A TUN - LVP',
'F NAO S A TUS - LVP',
'F NAO S A WAL - CLY',
'F NAO S A WAL - LVP',
'F NAO S A YOR - CLY',
'F NAO S A YOR - LVP',
'F NAO S F BAR - NWG',
'F NAO S F BRE - MAO',
'F NAO S F CLY',
'F NAO S F CLY - LVP',
'F NAO S F CLY - NWG',
'F NAO S F EDI - CLY',
'F NAO S F EDI - NWG',
'F NAO S F ENG - IRI',
'F NAO S F ENG - MAO',
'F NAO S F GAS - MAO',
'F NAO S F IRI',
'F NAO S F IRI - LVP',
'F NAO S F IRI - MAO',
'F NAO S F LVP',
'F NAO S F LVP - CLY',
'F NAO S F LVP - IRI',
'F NAO S F MAO',
'F NAO S F MAO - IRI',
'F NAO S F NAF - MAO',
'F NAO S F NTH - NWG',
'F NAO S F NWG',
'F NAO S F NWG - CLY',
'F NAO S F NWY - NWG',
'F NAO S F POR - MAO',
'F NAO S F SPA/NC - MAO',
'F NAO S F SPA/SC - MAO',
'F NAO S F WAL - IRI',
'F NAO S F WAL - LVP',
'F NAO S F WES - MAO',
'F NAP - APU',
'F NAP - ION',
'F NAP - ROM',
'F NAP - TYS',
'F NAP B',
'F NAP D',
'F NAP H',
'F NAP R APU',
'F NAP R ION',
'F NAP R ROM',
'F NAP R TYS',
'F NAP S A ALB - APU',
'F NAP S A ALB - ROM',
'F NAP S A APU',
'F NAP S A APU - ROM',
'F NAP S A BEL - ROM',
'F NAP S A BRE - APU',
'F NAP S A BRE - ROM',
'F NAP S A BUL - APU',
'F NAP S A BUL - ROM',
'F NAP S A CLY - ROM',
'F NAP S A CON - APU',
'F NAP S A CON - ROM',
'F NAP S A GAS - APU',
'F NAP S A GAS - ROM',
'F NAP S A GRE - APU',
'F NAP S A GRE - ROM',
'F NAP S A LON - ROM',
'F NAP S A LVP - ROM',
'F NAP S A MAR - APU',
'F NAP S A MAR - ROM',
'F NAP S A NAF - APU',
'F NAP S A NAF - ROM',
'F NAP S A PIC - ROM',
'F NAP S A PIE - APU',
'F NAP S A PIE - ROM',
'F NAP S A POR - APU',
'F NAP S A POR - ROM',
'F NAP S A ROM',
'F NAP S A ROM - APU',
'F NAP S A SMY - APU',
'F NAP S A SMY - ROM',
'F NAP S A SPA - APU',
'F NAP S A SPA - ROM',
'F NAP S A SYR - APU',
'F NAP S A SYR - ROM',
'F NAP S A TRI - APU',
'F NAP S A TRI - ROM',
'F NAP S A TUN - APU',
'F NAP S A TUN - ROM',
'F NAP S A TUS - APU',
'F NAP S A TUS - ROM',
'F NAP S A VEN - APU',
'F NAP S A VEN - ROM',
'F NAP S A WAL - ROM',
'F NAP S F ADR - APU',
'F NAP S F ADR - ION',
'F NAP S F AEG - ION',
'F NAP S F ALB - ION',
'F NAP S F APU',
'F NAP S F APU - ION',
'F NAP S F EAS - ION',
'F NAP S F GRE - ION',
'F NAP S F ION',
'F NAP S F ION - APU',
'F NAP S F ION - TYS',
'F NAP S F LYO - TYS',
'F NAP S F ROM',
'F NAP S F ROM - TYS',
'F NAP S F TUN - ION',
'F NAP S F TUN - TYS',
'F NAP S F TUS - ROM',
'F NAP S F TUS - TYS',
'F NAP S F TYS',
'F NAP S F TYS - ION',
'F NAP S F TYS - ROM',
'F NAP S F VEN - APU',
'F NAP S F WES - TYS',
'F NTH - BEL',
'F NTH - DEN',
'F NTH - EDI',
'F NTH - ENG',
'F NTH - HEL',
'F NTH - HOL',
'F NTH - LON',
'F NTH - NWG',
'F NTH - NWY',
'F NTH - SKA',
'F NTH - YOR',
'F NTH C A BEL - BRE',
'F NTH C A BEL - CLY',
'F NTH C A BEL - DEN',
'F NTH C A BEL - EDI',
'F NTH C A BEL - GAS',
'F NTH C A BEL - HOL',
'F NTH C A BEL - KIE',
'F NTH C A BEL - LON',
'F NTH C A BEL - LVP',
'F NTH C A BEL - NAF',
'F NTH C A BEL - NWY',
'F NTH C A BEL - POR',
'F NTH C A BEL - SPA',
'F NTH C A BEL - STP',
'F NTH C A BEL - SWE',
'F NTH C A BEL - WAL',
'F NTH C A BEL - YOR',
'F NTH C A BRE - BEL',
'F NTH C A BRE - CLY',
'F NTH C A BRE - DEN',
'F NTH C A BRE - EDI',
'F NTH C A BRE - HOL',
'F NTH C A BRE - KIE',
'F NTH C A BRE - LON',
'F NTH C A BRE - LVP',
'F NTH C A BRE - NWY',
'F NTH C A BRE - STP',
'F NTH C A BRE - SWE',
'F NTH C A BRE - YOR',
'F NTH C A CLY - BEL',
'F NTH C A CLY - BRE',
'F NTH C A CLY - DEN',
'F NTH C A CLY - EDI',
'F NTH C A CLY - GAS',
'F NTH C A CLY - HOL',
'F NTH C A CLY - KIE',
'F NTH C A CLY - LON',
'F NTH C A CLY - LVP',
'F NTH C A CLY - NAF',
'F NTH C A CLY - NWY',
'F NTH C A CLY - PIC',
'F NTH C A CLY - POR',
'F NTH C A CLY - SPA',
'F NTH C A CLY - SWE',
'F NTH C A CLY - WAL',
'F NTH C A CLY - YOR',
'F NTH C A DEN - BEL',
'F NTH C A DEN - BRE',
'F NTH C A DEN - CLY',
'F NTH C A DEN - EDI',
'F NTH C A DEN - GAS',
'F NTH C A DEN - HOL',
'F NTH C A DEN - LON',
'F NTH C A DEN - LVP',
'F NTH C A DEN - NAF',
'F NTH C A DEN - NWY',
'F NTH C A DEN - PIC',
'F NTH C A DEN - POR',
'F NTH C A DEN - SPA',
'F NTH C A DEN - STP',
'F NTH C A DEN - TUN',
'F NTH C A DEN - WAL',
'F NTH C A DEN - YOR',
'F NTH C A EDI - BEL',
'F NTH C A EDI - BRE',
'F NTH C A EDI - CLY',
'F NTH C A EDI - DEN',
'F NTH C A EDI - GAS',
'F NTH C A EDI - HOL',
'F NTH C A EDI - KIE',
'F NTH C A EDI - LON',
'F NTH C A EDI - LVP',
'F NTH C A EDI - NAF',
'F NTH C A EDI - NWY',
'F NTH C A EDI - PIC',
'F NTH C A EDI - POR',
'F NTH C A EDI - SPA',
'F NTH C A EDI - SWE',
'F NTH C A EDI - TUN',
'F NTH C A EDI - WAL',
'F NTH C A EDI - YOR',
'F NTH C A GAS - BEL',
'F NTH C A GAS - CLY',
'F NTH C A GAS - DEN',
'F NTH C A GAS - EDI',
'F NTH C A GAS - HOL',
'F NTH C A GAS - KIE',
'F NTH C A GAS - LON',
'F NTH C A GAS - NWY',
'F NTH C A GAS - SWE',
'F NTH C A GAS - YOR',
'F NTH C A HOL - BEL',
'F NTH C A HOL - BRE',
'F NTH C A HOL - CLY',
'F NTH C A HOL - DEN',
'F NTH C A HOL - EDI',
'F NTH C A HOL - GAS',
'F NTH C A HOL - LON',
'F NTH C A HOL - LVP',
'F NTH C A HOL - NAF',
'F NTH C A HOL - NWY',
'F NTH C A HOL - PIC',
'F NTH C A HOL - POR',
'F NTH C A HOL - SPA',
'F NTH C A HOL - STP',
'F NTH C A HOL - SWE',
'F NTH C A HOL - TUN',
'F NTH C A HOL - WAL',
'F NTH C A HOL - YOR',
'F NTH C A KIE - BEL',
'F NTH C A KIE - BRE',
'F NTH C A KIE - CLY',
'F NTH C A KIE - EDI',
'F NTH C A KIE - GAS',
'F NTH C A KIE - LON',
'F NTH C A KIE - LVP',
'F NTH C A KIE - NAF',
'F NTH C A KIE - NWY',
'F NTH C A KIE - PIC',
'F NTH C A KIE - POR',
'F NTH C A KIE - SPA',
'F NTH C A KIE - STP',
'F NTH C A KIE - SWE',
'F NTH C A KIE - WAL',
'F NTH C A KIE - YOR',
'F NTH C A LON - BEL',
'F NTH C A LON - BRE',
'F NTH C A LON - CLY',
'F NTH C A LON - DEN',
'F NTH C A LON - EDI',
'F NTH C A LON - GAS',
'F NTH C A LON - HOL',
'F NTH C A LON - KIE',
'F NTH C A LON - LVP',
'F NTH C A LON - NAF',
'F NTH C A LON - NWY',
'F NTH C A LON - POR',
'F NTH C A LON - SPA',
'F NTH C A LON - STP',
'F NTH C A LON - SWE',
'F NTH C A LON - WAL',
'F NTH C A LON - YOR',
'F NTH C A LVP - BEL',
'F NTH C A LVP - BRE',
'F NTH C A LVP - CLY',
'F NTH C A LVP - DEN',
'F NTH C A LVP - EDI',
'F NTH C A LVP - HOL',
'F NTH C A LVP - KIE',
'F NTH C A LVP - LON',
'F NTH C A LVP - NWY',
'F NTH C A LVP - PIC',
'F NTH C A LVP - SWE',
'F NTH C A LVP - WAL',
'F NTH C A LVP - YOR',
'F NTH C A NAF - BEL',
'F NTH C A NAF - CLY',
'F NTH C A NAF - DEN',
'F NTH C A NAF - EDI',
'F NTH C A NAF - HOL',
'F NTH C A NAF - KIE',
'F NTH C A NAF - LON',
'F NTH C A NAF - NWY',
'F NTH C A NAF - SWE',
'F NTH C A NAF - YOR',
'F NTH C A NWY - BEL',
'F NTH C A NWY - BRE',
'F NTH C A NWY - CLY',
'F NTH C A NWY - DEN',
'F NTH C A NWY - EDI',
'F NTH C A NWY - GAS',
'F NTH C A NWY - HOL',
'F NTH C A NWY - KIE',
'F NTH C A NWY - LON',
'F NTH C A NWY - LVP',
'F NTH C A NWY - NAF',
'F NTH C A NWY - PIC',
'F NTH C A NWY - POR',
'F NTH C A NWY - SPA',
'F NTH C A NWY - TUN',
'F NTH C A NWY - WAL',
'F NTH C A NWY - YOR',
'F NTH C A PIC - CLY',
'F NTH C A PIC - DEN',
'F NTH C A PIC - EDI',
'F NTH C A PIC - HOL',
'F NTH C A PIC - KIE',
'F NTH C A PIC - LVP',
'F NTH C A PIC - NWY',
'F NTH C A PIC - STP',
'F NTH C A PIC - SWE',
'F NTH C A PIC - YOR',
'F NTH C A POR - BEL',
'F NTH C A POR - CLY',
'F NTH C A POR - DEN',
'F NTH C A POR - EDI',
'F NTH C A POR - HOL',
'F NTH C A POR - KIE',
'F NTH C A POR - LON',
'F NTH C A POR - NWY',
'F NTH C A POR - SWE',
'F NTH C A POR - YOR',
'F NTH C A SPA - BEL',
'F NTH C A SPA - CLY',
'F NTH C A SPA - DEN',
'F NTH C A SPA - EDI',
'F NTH C A SPA - HOL',
'F NTH C A SPA - KIE',
'F NTH C A SPA - LON',
'F NTH C A SPA - NWY',
'F NTH C A SPA - SWE',
'F NTH C A SPA - YOR',
'F NTH C A STP - BEL',
'F NTH C A STP - BRE',
'F NTH C A STP - DEN',
'F NTH C A STP - HOL',
'F NTH C A STP - KIE',
'F NTH C A STP - LON',
'F NTH C A STP - PIC',
'F NTH C A STP - SWE',
'F NTH C A STP - WAL',
'F NTH C A STP - YOR',
'F NTH C A SWE - BEL',
'F NTH C A SWE - BRE',
'F NTH C A SWE - CLY',
'F NTH C A SWE - EDI',
'F NTH C A SWE - GAS',
'F NTH C A SWE - HOL',
'F NTH C A SWE - KIE',
'F NTH C A SWE - LON',
'F NTH C A SWE - LVP',
'F NTH C A SWE - NAF',
'F NTH C A SWE - PIC',
'F NTH C A SWE - POR',
'F NTH C A SWE - SPA',
'F NTH C A SWE - STP',
'F NTH C A SWE - WAL',
'F NTH C A SWE - YOR',
'F NTH C A TUN - DEN',
'F NTH C A TUN - EDI',
'F NTH C A TUN - HOL',
'F NTH C A TUN - NWY',
'F NTH C A TUN - YOR',
'F NTH C A WAL - BEL',
'F NTH C A WAL - CLY',
'F NTH C A WAL - DEN',
'F NTH C A WAL - EDI',
'F NTH C A WAL - HOL',
'F NTH C A WAL - KIE',
'F NTH C A WAL - LON',
'F NTH C A WAL - LVP',
'F NTH C A WAL - NWY',
'F NTH C A WAL - STP',
'F NTH C A WAL - SWE',
'F NTH C A WAL - YOR',
'F NTH C A YOR - BEL',
'F NTH C A YOR - BRE',
'F NTH C A YOR - CLY',
'F NTH C A YOR - DEN',
'F NTH C A YOR - EDI',
'F NTH C A YOR - GAS',
'F NTH C A YOR - HOL',
'F NTH C A YOR - KIE',
'F NTH C A YOR - LON',
'F NTH C A YOR - LVP',
'F NTH C A YOR - NAF',
'F NTH C A YOR - NWY',
'F NTH C A YOR - PIC',
'F NTH C A YOR - POR',
'F NTH C A YOR - SPA',
'F NTH C A YOR - STP',
'F NTH C A YOR - SWE',
'F NTH C A YOR - TUN',
'F NTH C A YOR - WAL',
'F NTH D',
'F NTH H',
'F NTH R BEL',
'F NTH R DEN',
'F NTH R EDI',
'F NTH R ENG',
'F NTH R HEL',
'F NTH R HOL',
'F NTH R LON',
'F NTH R NWG',
'F NTH R NWY',
'F NTH R SKA',
'F NTH R YOR',
'F NTH S A BEL',
'F NTH S A BEL - EDI',
'F NTH S A BEL - HOL',
'F NTH S A BEL - LON',
'F NTH S A BEL - NWY',
'F NTH S A BER - DEN',
'F NTH S A BRE - BEL',
'F NTH S A BRE - EDI',
'F NTH S A BRE - LON',
'F NTH S A BRE - NWY',
'F NTH S A BUR - BEL',
'F NTH S A CLY - BEL',
'F NTH S A CLY - EDI',
'F NTH S A CLY - LON',
'F NTH S A CLY - NWY',
'F NTH S A DEN',
'F NTH S A DEN - HOL',
'F NTH S A DEN - NWY',
'F NTH S A EDI',
'F NTH S A EDI - BEL',
'F NTH S A EDI - LON',
'F NTH S A EDI - NWY',
'F NTH S A EDI - YOR',
'F NTH S A FIN - DEN',
'F NTH S A FIN - NWY',
'F NTH S A GAS - BEL',
'F NTH S A GAS - EDI',
'F NTH S A GAS - LON',
'F NTH S A GAS - NWY',
'F NTH S A HOL',
'F NTH S A HOL - BEL',
'F NTH S A HOL - DEN',
'F NTH S A KIE - DEN',
'F NTH S A KIE - HOL',
'F NTH S A LON',
'F NTH S A LON - BEL',
'F NTH S A LON - EDI',
'F NTH S A LON - NWY',
'F NTH S A LON - YOR',
'F NTH S A LVN - DEN',
'F NTH S A LVP - BEL',
'F NTH S A LVP - EDI',
'F NTH S A LVP - LON',
'F NTH S A LVP - NWY',
'F NTH S A LVP - YOR',
'F NTH S A MAR - BEL',
'F NTH S A MAR - LON',
'F NTH S A NAF - BEL',
'F NTH S A NAF - EDI',
'F NTH S A NAF - LON',
'F NTH S A NAF - NWY',
'F NTH S A NAP - BEL',
'F NTH S A NAP - LON',
'F NTH S A NWY',
'F NTH S A NWY - BEL',
'F NTH S A NWY - DEN',
'F NTH S A NWY - EDI',
'F NTH S A NWY - LON',
'F NTH S A PIC - BEL',
'F NTH S A PIC - EDI',
'F NTH S A PIC - LON',
'F NTH S A PIC - NWY',
'F NTH S A PIE - BEL',
'F NTH S A PIE - LON',
'F NTH S A POR - BEL',
'F NTH S A POR - EDI',
'F NTH S A POR - LON',
'F NTH S A POR - NWY',
'F NTH S A PRU - DEN',
'F NTH S A ROM - BEL',
'F NTH S A ROM - LON',
'F NTH S A RUH - BEL',
'F NTH S A RUH - HOL',
'F NTH S A SPA - BEL',
'F NTH S A SPA - EDI',
'F NTH S A SPA - LON',
'F NTH S A SPA - NWY',
'F NTH S A STP - DEN',
'F NTH S A STP - EDI',
'F NTH S A STP - NWY',
'F NTH S A SWE - DEN',
'F NTH S A SWE - NWY',
'F NTH S A TUN - BEL',
'F NTH S A TUN - EDI',
'F NTH S A TUN - LON',
'F NTH S A TUN - NWY',
'F NTH S A TUS - BEL',
'F NTH S A TUS - LON',
'F NTH S A WAL - BEL',
'F NTH S A WAL - EDI',
'F NTH S A WAL - LON',
'F NTH S A WAL - NWY',
'F NTH S A WAL - YOR',
'F NTH S A YOR',
'F NTH S A YOR - EDI',
'F NTH S A YOR - LON',
'F NTH S F BAL - DEN',
'F NTH S F BAR - NWG',
'F NTH S F BAR - NWY',
'F NTH S F BEL',
'F NTH S F BEL - ENG',
'F NTH S F BEL - HOL',
'F NTH S F BRE - ENG',
'F NTH S F CLY - EDI',
'F NTH S F CLY - NWG',
'F NTH S F DEN',
'F NTH S F DEN - HEL',
'F NTH S F DEN - SKA',
'F NTH S F EDI',
'F NTH S F EDI - NWG',
'F NTH S F EDI - YOR',
'F NTH S F ENG',
'F NTH S F ENG - BEL',
'F NTH S F ENG - LON',
'F NTH S F HEL',
'F NTH S F HEL - DEN',
'F NTH S F HEL - HOL',
'F NTH S F HOL',
'F NTH S F HOL - BEL',
'F NTH S F HOL - HEL',
'F NTH S F IRI - ENG',
'F NTH S F KIE - DEN',
'F NTH S F KIE - HEL',
'F NTH S F KIE - HOL',
'F NTH S F LON',
'F NTH S F LON - ENG',
'F NTH S F LON - YOR',
'F NTH S F MAO - ENG',
'F NTH S F NAO - NWG',
'F NTH S F NWG',
'F NTH S F NWG - EDI',
'F NTH S F NWG - NWY',
'F NTH S F NWY',
'F NTH S F NWY - NWG',
'F NTH S F NWY - SKA',
'F NTH S F PIC - BEL',
'F NTH S F PIC - ENG',
'F NTH S F SKA',
'F NTH S F SKA - DEN',
'F NTH S F SKA - NWY',
'F NTH S F STP/NC - NWY',
'F NTH S F SWE - DEN',
'F NTH S F SWE - NWY',
'F NTH S F SWE - SKA',
'F NTH S F WAL - ENG',
'F NTH S F WAL - LON',
'F NTH S F YOR',
'F NTH S F YOR - EDI',
'F NTH S F YOR - LON',
'F NWG - BAR',
'F NWG - CLY',
'F NWG - EDI',
'F NWG - NAO',
'F NWG - NTH',
'F NWG - NWY',
'F NWG C A BEL - BRE',
'F NWG C A BEL - CLY',
'F NWG C A BEL - EDI',
'F NWG C A BEL - GAS',
'F NWG C A BEL - LVP',
'F NWG C A BEL - NAF',
'F NWG C A BEL - NWY',
'F NWG C A BEL - POR',
'F NWG C A BEL - SPA',
'F NWG C A BEL - STP',
'F NWG C A BEL - WAL',
'F NWG C A BRE - BEL',
'F NWG C A BRE - CLY',
'F NWG C A BRE - DEN',
'F NWG C A BRE - EDI',
'F NWG C A BRE - HOL',
'F NWG C A BRE - LON',
'F NWG C A BRE - LVP',
'F NWG C A BRE - NWY',
'F NWG C A BRE - STP',
'F NWG C A BRE - YOR',
'F NWG C A CLY - BEL',
'F NWG C A CLY - BRE',
'F NWG C A CLY - DEN',
'F NWG C A CLY - EDI',
'F NWG C A CLY - GAS',
'F NWG C A CLY - HOL',
'F NWG C A CLY - KIE',
'F NWG C A CLY - LON',
'F NWG C A CLY - LVP',
'F NWG C A CLY - NAF',
'F NWG C A CLY - NWY',
'F NWG C A CLY - PIC',
'F NWG C A CLY - POR',
'F NWG C A CLY - SPA',
'F NWG C A CLY - STP',
'F NWG C A CLY - SWE',
'F NWG C A CLY - WAL',
'F NWG C A CLY - YOR',
'F NWG C A DEN - BRE',
'F NWG C A DEN - CLY',
'F NWG C A DEN - GAS',
'F NWG C A DEN - LVP',
'F NWG C A DEN - NAF',
'F NWG C A DEN - POR',
'F NWG C A DEN - SPA',
'F NWG C A DEN - STP',
'F NWG C A DEN - WAL',
'F NWG C A EDI - BEL',
'F NWG C A EDI - BRE',
'F NWG C A EDI - CLY',
'F NWG C A EDI - GAS',
'F NWG C A EDI - LON',
'F NWG C A EDI - LVP',
'F NWG C A EDI - NAF',
'F NWG C A EDI - NWY',
'F NWG C A EDI - PIC',
'F NWG C A EDI - POR',
'F NWG C A EDI - SPA',
'F NWG C A EDI - STP',
'F NWG C A EDI - TUN',
'F NWG C A EDI - WAL',
'F NWG C A GAS - BEL',
'F NWG C A GAS - CLY',
'F NWG C A GAS - DEN',
'F NWG C A GAS - EDI',
'F NWG C A GAS - HOL',
'F NWG C A GAS - LON',
'F NWG C A GAS - NWY',
'F NWG C A GAS - STP',
'F NWG C A GAS - YOR',
'F NWG C A HOL - BRE',
'F NWG C A HOL - CLY',
'F NWG C A HOL - GAS',
'F NWG C A HOL - LVP',
'F NWG C A HOL - NAF',
'F NWG C A HOL - POR',
'F NWG C A HOL - SPA',
'F NWG C A HOL - STP',
'F NWG C A HOL - WAL',
'F NWG C A KIE - CLY',
'F NWG C A KIE - LVP',
'F NWG C A KIE - STP',
'F NWG C A LON - BRE',
'F NWG C A LON - CLY',
'F NWG C A LON - EDI',
'F NWG C A LON - GAS',
'F NWG C A LON - LVP',
'F NWG C A LON - NAF',
'F NWG C A LON - NWY',
'F NWG C A LON - POR',
'F NWG C A LON - SPA',
'F NWG C A LON - STP',
'F NWG C A LON - WAL',
'F NWG C A LVP - BEL',
'F NWG C A LVP - BRE',
'F NWG C A LVP - CLY',
'F NWG C A LVP - DEN',
'F NWG C A LVP - EDI',
'F NWG C A LVP - HOL',
'F NWG C A LVP - KIE',
'F NWG C A LVP - LON',
'F NWG C A LVP - NWY',
'F NWG C A LVP - PIC',
'F NWG C A LVP - STP',
'F NWG C A LVP - SWE',
'F NWG C A LVP - WAL',
'F NWG C A LVP - YOR',
'F NWG C A NAF - BEL',
'F NWG C A NAF - CLY',
'F NWG C A NAF - DEN',
'F NWG C A NAF - EDI',
'F NWG C A NAF - HOL',
'F NWG C A NAF - LON',
'F NWG C A NAF - NWY',
'F NWG C A NAF - STP',
'F NWG C A NAF - YOR',
'F NWG C A NWY - BEL',
'F NWG C A NWY - BRE',
'F NWG C A NWY - CLY',
'F NWG C A NWY - EDI',
'F NWG C A NWY - GAS',
'F NWG C A NWY - LON',
'F NWG C A NWY - LVP',
'F NWG C A NWY - NAF',
'F NWG C A NWY - PIC',
'F NWG C A NWY - POR',
'F NWG C A NWY - SPA',
'F NWG C A NWY - TUN',
'F NWG C A NWY - WAL',
'F NWG C A PIC - CLY',
'F NWG C A PIC - EDI',
'F NWG C A PIC - LVP',
'F NWG C A PIC - NWY',
'F NWG C A PIC - STP',
'F NWG C A POR - BEL',
'F NWG C A POR - CLY',
'F NWG C A POR - DEN',
'F NWG C A POR - EDI',
'F NWG C A POR - HOL',
'F NWG C A POR - LON',
'F NWG C A POR - NWY',
'F NWG C A POR - STP',
'F NWG C A POR - YOR',
'F NWG C A SPA - BEL',
'F NWG C A SPA - CLY',
'F NWG C A SPA - DEN',
'F NWG C A SPA - EDI',
'F NWG C A SPA - HOL',
'F NWG C A SPA - LON',
'F NWG C A SPA - NWY',
'F NWG C A SPA - STP',
'F NWG C A SPA - YOR',
'F NWG C A STP - BEL',
'F NWG C A STP - BRE',
'F NWG C A STP - CLY',
'F NWG C A STP - DEN',
'F NWG C A STP - EDI',
'F NWG C A STP - GAS',
'F NWG C A STP - HOL',
'F NWG C A STP - KIE',
'F NWG C A STP - LON',
'F NWG C A STP - LVP',
'F NWG C A STP - NAF',
'F NWG C A STP - PIC',
'F NWG C A STP - POR',
'F NWG C A STP - SPA',
'F NWG C A STP - SWE',
'F NWG C A STP - WAL',
'F NWG C A STP - YOR',
'F NWG C A SWE - CLY',
'F NWG C A SWE - LVP',
'F NWG C A SWE - STP',
'F NWG C A TUN - EDI',
'F NWG C A TUN - NWY',
'F NWG C A WAL - BEL',
'F NWG C A WAL - CLY',
'F NWG C A WAL - DEN',
'F NWG C A WAL - EDI',
'F NWG C A WAL - HOL',
'F NWG C A WAL - LON',
'F NWG C A WAL - LVP',
'F NWG C A WAL - NWY',
'F NWG C A WAL - STP',
'F NWG C A WAL - YOR',
'F NWG C A YOR - BRE',
'F NWG C A YOR - CLY',
'F NWG C A YOR - GAS',
'F NWG C A YOR - LVP',
'F NWG C A YOR - NAF',
'F NWG C A YOR - POR',
'F NWG C A YOR - SPA',
'F NWG C A YOR - STP',
'F NWG C A YOR - WAL',
'F NWG D',
'F NWG H',
'F NWG R BAR',
'F NWG R CLY',
'F NWG R EDI',
'F NWG R NAO',
'F NWG R NTH',
'F NWG R NWY',
'F NWG S A BEL - CLY',
'F NWG S A BEL - EDI',
'F NWG S A BEL - NWY',
'F NWG S A BRE - CLY',
'F NWG S A BRE - EDI',
'F NWG S A BRE - NWY',
'F NWG S A CLY',
'F NWG S A CLY - EDI',
'F NWG S A CLY - NWY',
'F NWG S A DEN - CLY',
'F NWG S A DEN - EDI',
'F NWG S A DEN - NWY',
'F NWG S A EDI',
'F NWG S A EDI - CLY',
'F NWG S A EDI - NWY',
'F NWG S A FIN - NWY',
'F NWG S A GAS - CLY',
'F NWG S A GAS - EDI',
'F NWG S A GAS - NWY',
'F NWG S A HOL - CLY',
'F NWG S A HOL - EDI',
'F NWG S A HOL - NWY',
'F NWG S A KIE - EDI',
'F NWG S A KIE - NWY',
'F NWG S A LON - CLY',
'F NWG S A LON - EDI',
'F NWG S A LON - NWY',
'F NWG S A LVP - CLY',
'F NWG S A LVP - EDI',
'F NWG S A LVP - NWY',
'F NWG S A MAR - CLY',
'F NWG S A NAF - CLY',
'F NWG S A NAF - EDI',
'F NWG S A NAF - NWY',
'F NWG S A NAP - CLY',
'F NWG S A NWY',
'F NWG S A NWY - CLY',
'F NWG S A NWY - EDI',
'F NWG S A PIC - CLY',
'F NWG S A PIC - EDI',
'F NWG S A PIC - NWY',
'F NWG S A PIE - CLY',
'F NWG S A POR - CLY',
'F NWG S A POR - EDI',
'F NWG S A POR - NWY',
'F NWG S A ROM - CLY',
'F NWG S A SPA - CLY',
'F NWG S A SPA - EDI',
'F NWG S A SPA - NWY',
'F NWG S A STP - NWY',
'F NWG S A SWE - EDI',
'F NWG S A SWE - NWY',
'F NWG S A TUN - CLY',
'F NWG S A TUN - EDI',
'F NWG S A TUN - NWY',
'F NWG S A TUS - CLY',
'F NWG S A WAL - CLY',
'F NWG S A WAL - EDI',
'F NWG S A WAL - NWY',
'F NWG S A YOR - CLY',
'F NWG S A YOR - EDI',
'F NWG S A YOR - NWY',
'F NWG S F BAR',
'F NWG S F BAR - NWY',
'F NWG S F BEL - NTH',
'F NWG S F CLY',
'F NWG S F CLY - EDI',
'F NWG S F CLY - NAO',
'F NWG S F DEN - NTH',
'F NWG S F EDI',
'F NWG S F EDI - CLY',
'F NWG S F EDI - NTH',
'F NWG S F ENG - NTH',
'F NWG S F HEL - NTH',
'F NWG S F HOL - NTH',
'F NWG S F IRI - NAO',
'F NWG S F LON - NTH',
'F NWG S F LVP - CLY',
'F NWG S F LVP - NAO',
'F NWG S F MAO - NAO',
'F NWG S F NAO',
'F NWG S F NAO - CLY',
'F NWG S F NTH',
'F NWG S F NTH - EDI',
'F NWG S F NTH - NWY',
'F NWG S F NWY',
'F NWG S F NWY - BAR',
'F NWG S F NWY - NTH',
'F NWG S F SKA - NTH',
'F NWG S F SKA - NWY',
'F NWG S F STP/NC - BAR',
'F NWG S F STP/NC - NWY',
'F NWG S F SWE - NWY',
'F NWG S F YOR - EDI',
'F NWG S F YOR - NTH',
'F NWY - BAR',
'F NWY - NTH',
'F NWY - NWG',
'F NWY - SKA',
'F NWY - STP/NC',
'F NWY - SWE',
'F NWY D',
'F NWY H',
'F NWY R BAR',
'F NWY R NTH',
'F NWY R NWG',
'F NWY R SKA',
'F NWY R STP/NC',
'F NWY R SWE',
'F NWY S A BEL - STP',
'F NWY S A BEL - SWE',
'F NWY S A BER - STP',
'F NWY S A BER - SWE',
'F NWY S A BRE - STP',
'F NWY S A BRE - SWE',
'F NWY S A CLY - STP',
'F NWY S A CLY - SWE',
'F NWY S A DEN - STP',
'F NWY S A DEN - SWE',
'F NWY S A EDI - STP',
'F NWY S A EDI - SWE',
'F NWY S A FIN - STP',
'F NWY S A FIN - SWE',
'F NWY S A GAS - STP',
'F NWY S A GAS - SWE',
'F NWY S A HOL - STP',
'F NWY S A HOL - SWE',
'F NWY S A KIE - STP',
'F NWY S A KIE - SWE',
'F NWY S A LON - STP',
'F NWY S A LON - SWE',
'F NWY S A LVN - STP',
'F NWY S A LVN - SWE',
'F NWY S A LVP - STP',
'F NWY S A LVP - SWE',
'F NWY S A MOS - STP',
'F NWY S A NAF - STP',
'F NWY S A NAF - SWE',
'F NWY S A PIC - STP',
'F NWY S A PIC - SWE',
'F NWY S A POR - STP',
'F NWY S A POR - SWE',
'F NWY S A PRU - STP',
'F NWY S A PRU - SWE',
'F NWY S A SPA - STP',
'F NWY S A SPA - SWE',
'F NWY S A STP',
'F NWY S A STP - SWE',
'F NWY S A SWE',
'F NWY S A SWE - STP',
'F NWY S A WAL - STP',
'F NWY S A WAL - SWE',
'F NWY S A YOR - STP',
'F NWY S A YOR - SWE',
'F NWY S F BAL - SWE',
'F NWY S F BAR',
'F NWY S F BAR - NWG',
'F NWY S F BAR - STP',
'F NWY S F BEL - NTH',
'F NWY S F BOT - STP',
'F NWY S F BOT - SWE',
'F NWY S F CLY - NWG',
'F NWY S F DEN - NTH',
'F NWY S F DEN - SKA',
'F NWY S F DEN - SWE',
'F NWY S F EDI - NTH',
'F NWY S F EDI - NWG',
'F NWY S F ENG - NTH',
'F NWY S F FIN - STP',
'F NWY S F FIN - SWE',
'F NWY S F HEL - NTH',
'F NWY S F HOL - NTH',
'F NWY S F LON - NTH',
'F NWY S F LVN - STP',
'F NWY S F NAO - NWG',
'F NWY S F NTH',
'F NWY S F NTH - NWG',
'F NWY S F NTH - SKA',
'F NWY S F NWG',
'F NWY S F NWG - BAR',
'F NWY S F NWG - NTH',
'F NWY S F SKA',
'F NWY S F SKA - NTH',
'F NWY S F SKA - SWE',
'F NWY S F STP/NC',
'F NWY S F STP/NC - BAR',
'F NWY S F STP/SC',
'F NWY S F SWE',
'F NWY S F SWE - SKA',
'F NWY S F YOR - NTH',
'F PIC - BEL',
'F PIC - BRE',
'F PIC - ENG',
'F PIC D',
'F PIC H',
'F PIC R BEL',
'F PIC R BRE',
'F PIC R ENG',
'F PIC S A ALB - BRE',
'F PIC S A APU - BRE',
'F PIC S A BEL',
'F PIC S A BEL - BRE',
'F PIC S A BRE',
'F PIC S A BRE - BEL',
'F PIC S A BUR - BEL',
'F PIC S A CLY - BEL',
'F PIC S A CLY - BRE',
'F PIC S A DEN - BEL',
'F PIC S A DEN - BRE',
'F PIC S A EDI - BEL',
'F PIC S A EDI - BRE',
'F PIC S A GAS - BEL',
'F PIC S A GAS - BRE',
'F PIC S A GRE - BRE',
'F PIC S A HOL - BEL',
'F PIC S A HOL - BRE',
'F PIC S A KIE - BEL',
'F PIC S A KIE - BRE',
'F PIC S A LON - BEL',
'F PIC S A LON - BRE',
'F PIC S A LVP - BEL',
'F PIC S A LVP - BRE',
'F PIC S A MAR - BEL',
'F PIC S A MAR - BRE',
'F PIC S A NAF - BEL',
'F PIC S A NAF - BRE',
'F PIC S A NAP - BEL',
'F PIC S A NAP - BRE',
'F PIC S A NWY - BEL',
'F PIC S A NWY - BRE',
'F PIC S A PAR - BRE',
'F PIC S A PIE - BEL',
'F PIC S A PIE - BRE',
'F PIC S A POR - BEL',
'F PIC S A POR - BRE',
'F PIC S A ROM - BEL',
'F PIC S A ROM - BRE',
'F PIC S A RUH - BEL',
'F PIC S A SPA - BEL',
'F PIC S A SPA - BRE',
'F PIC S A STP - BEL',
'F PIC S A STP - BRE',
'F PIC S A SWE - BEL',
'F PIC S A SWE - BRE',
'F PIC S A TUN - BEL',
'F PIC S A TUN - BRE',
'F PIC S A TUS - BEL',
'F PIC S A TUS - BRE',
'F PIC S A WAL - BEL',
'F PIC S A WAL - BRE',
'F PIC S A YOR - BEL',
'F PIC S A YOR - BRE',
'F PIC S F BEL',
'F PIC S F BEL - ENG',
'F PIC S F BRE',
'F PIC S F BRE - ENG',
'F PIC S F ENG',
'F PIC S F ENG - BEL',
'F PIC S F ENG - BRE',
'F PIC S F GAS - BRE',
'F PIC S F HOL - BEL',
'F PIC S F IRI - ENG',
'F PIC S F LON - ENG',
'F PIC S F MAO - BRE',
'F PIC S F MAO - ENG',
'F PIC S F NTH - BEL',
'F PIC S F NTH - ENG',
'F PIC S F WAL - ENG',
'F PIE - LYO',
'F PIE - MAR',
'F PIE - TUS',
'F PIE D',
'F PIE H',
'F PIE R LYO',
'F PIE R MAR',
'F PIE R TUS',
'F PIE S A ALB - MAR',
'F PIE S A ALB - TUS',
'F PIE S A APU - MAR',
'F PIE S A APU - TUS',
'F PIE S A BEL - MAR',
'F PIE S A BEL - TUS',
'F PIE S A BRE - MAR',
'F PIE S A BRE - TUS',
'F PIE S A BUL - MAR',
'F PIE S A BUL - TUS',
'F PIE S A BUR - MAR',
'F PIE S A CLY - MAR',
'F PIE S A CLY - TUS',
'F PIE S A CON - MAR',
'F PIE S A CON - TUS',
'F PIE S A GAS - MAR',
'F PIE S A GAS - TUS',
'F PIE S A GRE - MAR',
'F PIE S A GRE - TUS',
'F PIE S A LON - MAR',
'F PIE S A LON - TUS',
'F PIE S A LVP - MAR',
'F PIE S A LVP - TUS',
'F PIE S A MAR',
'F PIE S A MAR - TUS',
'F PIE S A NAF - MAR',
'F PIE S A NAF - TUS',
'F PIE S A NAP - MAR',
'F PIE S A NAP - TUS',
'F PIE S A PIC - MAR',
'F PIE S A PIC - TUS',
'F PIE S A POR - MAR',
'F PIE S A POR - TUS',
'F PIE S A ROM - MAR',
'F PIE S A ROM - TUS',
'F PIE S A SMY - MAR',
'F PIE S A SMY - TUS',
'F PIE S A SPA - MAR',
'F PIE S A SPA - TUS',
'F PIE S A SYR - MAR',
'F PIE S A SYR - TUS',
'F PIE S A TRI - MAR',
'F PIE S A TRI - TUS',
'F PIE S A TUN - MAR',
'F PIE S A TUN - TUS',
'F PIE S A TUS',
'F PIE S A TUS - MAR',
'F PIE S A VEN - MAR',
'F PIE S A VEN - TUS',
'F PIE S A WAL - MAR',
'F PIE S A WAL - TUS',
'F PIE S F LYO',
'F PIE S F LYO - MAR',
'F PIE S F LYO - TUS',
'F PIE S F MAR',
'F PIE S F MAR - LYO',
'F PIE S F ROM - TUS',
'F PIE S F SPA/SC - LYO',
'F PIE S F SPA/SC - MAR',
'F PIE S F TUS',
'F PIE S F TUS - LYO',
'F PIE S F TYS - LYO',
'F PIE S F TYS - TUS',
'F PIE S F WES - LYO',
'F POR - MAO',
'F POR - SPA/NC',
'F POR - SPA/SC',
'F POR D',
'F POR H',
'F POR R MAO',
'F POR R SPA/NC',
'F POR R SPA/SC',
'F POR S A ALB - SPA',
'F POR S A APU - SPA',
'F POR S A BEL - SPA',
'F POR S A BRE - SPA',
'F POR S A BUL - SPA',
'F POR S A CLY - SPA',
'F POR S A CON - SPA',
'F POR S A DEN - SPA',
'F POR S A EDI - SPA',
'F POR S A GAS - SPA',
'F POR S A GRE - SPA',
'F POR S A HOL - SPA',
'F POR S A KIE - SPA',
'F POR S A LON - SPA',
'F POR S A LVP - SPA',
'F POR S A MAR - SPA',
'F POR S A NAF - SPA',
'F POR S A NAP - SPA',
'F POR S A NWY - SPA',
'F POR S A PIC - SPA',
'F POR S A PIE - SPA',
'F POR S A ROM - SPA',
'F POR S A SMY - SPA',
'F POR S A SPA',
'F POR S A STP - SPA',
'F POR S A SWE - SPA',
'F POR S A SYR - SPA',
'F POR S A TRI - SPA',
'F POR S A TUN - SPA',
'F POR S A TUS - SPA',
'F POR S A VEN - SPA',
'F POR S A WAL - SPA',
'F POR S A YOR - SPA',
'F POR S F BRE - MAO',
'F POR S F ENG - MAO',
'F POR S F GAS - MAO',
'F POR S F GAS - SPA',
'F POR S F IRI - MAO',
'F POR S F LYO - SPA',
'F POR S F MAO',
'F POR S F MAO - SPA',
'F POR S F MAR - SPA',
'F POR S F NAF - MAO',
'F POR S F NAO - MAO',
'F POR S F SPA/NC',
'F POR S F SPA/NC - MAO',
'F POR S F SPA/SC',
'F POR S F SPA/SC - MAO',
'F POR S F WES - MAO',
'F POR S F WES - SPA',
'F PRU - BAL',
'F PRU - BER',
'F PRU - LVN',
'F PRU D',
'F PRU H',
'F PRU R BAL',
'F PRU R BER',
'F PRU R LVN',
'F PRU S A BER',
'F PRU S A BER - LVN',
'F PRU S A DEN - BER',
'F PRU S A DEN - LVN',
'F PRU S A FIN - BER',
'F PRU S A FIN - LVN',
'F PRU S A KIE - BER',
'F PRU S A KIE - LVN',
'F PRU S A LVN',
'F PRU S A LVN - BER',
'F PRU S A MOS - LVN',
'F PRU S A MUN - BER',
'F PRU S A SIL - BER',
'F PRU S A STP - BER',
'F PRU S A STP - LVN',
'F PRU S A SWE - BER',
'F PRU S A SWE - LVN',
'F PRU S A WAR - LVN',
'F PRU S F BAL',
'F PRU S F BAL - BER',
'F PRU S F BAL - LVN',
'F PRU S F BER',
'F PRU S F BER - BAL',
'F PRU S F BOT - BAL',
'F PRU S F BOT - LVN',
'F PRU S F DEN - BAL',
'F PRU S F KIE - BAL',
'F PRU S F KIE - BER',
'F PRU S F LVN',
'F PRU S F LVN - BAL',
'F PRU S F STP/SC - LVN',
'F PRU S F SWE - BAL',
'F ROM - NAP',
'F ROM - TUS',
'F ROM - TYS',
'F ROM B',
'F ROM D',
'F ROM H',
'F ROM R NAP',
'F ROM R TUS',
'F ROM R TYS',
'F ROM S A ALB - NAP',
'F ROM S A ALB - TUS',
'F ROM S A APU - NAP',
'F ROM S A APU - TUS',
'F ROM S A BEL - NAP',
'F ROM S A BEL - TUS',
'F ROM S A BRE - NAP',
'F ROM S A BRE - TUS',
'F ROM S A BUL - NAP',
'F ROM S A BUL - TUS',
'F ROM S A CLY - NAP',
'F ROM S A CLY - TUS',
'F ROM S A CON - NAP',
'F ROM S A CON - TUS',
'F ROM S A GAS - NAP',
'F ROM S A GAS - TUS',
'F ROM S A GRE - NAP',
'F ROM S A GRE - TUS',
'F ROM S A LON - NAP',
'F ROM S A LON - TUS',
'F ROM S A LVP - NAP',
'F ROM S A LVP - TUS',
'F ROM S A MAR - NAP',
'F ROM S A MAR - TUS',
'F ROM S A NAF - NAP',
'F ROM S A NAF - TUS',
'F ROM S A NAP',
'F ROM S A NAP - TUS',
'F ROM S A PIC - NAP',
'F ROM S A PIC - TUS',
'F ROM S A PIE - NAP',
'F ROM S A PIE - TUS',
'F ROM S A POR - NAP',
'F ROM S A POR - TUS',
'F ROM S A SMY - NAP',
'F ROM S A SMY - TUS',
'F ROM S A SPA - NAP',
'F ROM S A SPA - TUS',
'F ROM S A SYR - NAP',
'F ROM S A SYR - TUS',
'F ROM S A TRI - NAP',
'F ROM S A TRI - TUS',
'F ROM S A TUN - NAP',
'F ROM S A TUN - TUS',
'F ROM S A TUS',
'F ROM S A TUS - NAP',
'F ROM S A VEN - NAP',
'F ROM S A VEN - TUS',
'F ROM S A WAL - NAP',
'F ROM S A WAL - TUS',
'F ROM S F APU - NAP',
'F ROM S F ION - NAP',
'F ROM S F ION - TYS',
'F ROM S F LYO - TUS',
'F ROM S F LYO - TYS',
'F ROM S F NAP',
'F ROM S F NAP - TYS',
'F ROM S F PIE - TUS',
'F ROM S F TUN - TYS',
'F ROM S F TUS',
'F ROM S F TUS - TYS',
'F ROM S F TYS',
'F ROM S F TYS - NAP',
'F ROM S F TYS - TUS',
'F ROM S F WES - TYS',
'F RUM - BLA',
'F RUM - BUL/EC',
'F RUM - SEV',
'F RUM D',
'F RUM H',
'F RUM R BLA',
'F RUM R BUL/EC',
'F RUM R SEV',
'F RUM S A ALB - BUL',
'F RUM S A ANK - BUL',
'F RUM S A ANK - SEV',
'F RUM S A APU - BUL',
'F RUM S A ARM - BUL',
'F RUM S A ARM - SEV',
'F RUM S A BUL',
'F RUM S A BUL - SEV',
'F RUM S A CON - BUL',
'F RUM S A CON - SEV',
'F RUM S A GRE - BUL',
'F RUM S A MAR - BUL',
'F RUM S A MOS - SEV',
'F RUM S A NAF - BUL',
'F RUM S A NAP - BUL',
'F RUM S A PIE - BUL',
'F RUM S A ROM - BUL',
'F RUM S A SER - BUL',
'F RUM S A SEV',
'F RUM S A SEV - BUL',
'F RUM S A SMY - BUL',
'F RUM S A SPA - BUL',
'F RUM S A SYR - BUL',
'F RUM S A TRI - BUL',
'F RUM S A TUN - BUL',
'F RUM S A TUS - BUL',
'F RUM S A UKR - SEV',
'F RUM S A VEN - BUL',
'F RUM S F AEG - BUL',
'F RUM S F ANK - BLA',
'F RUM S F ARM - BLA',
'F RUM S F ARM - SEV',
'F RUM S F BLA',
'F RUM S F BLA - BUL',
'F RUM S F BLA - SEV',
'F RUM S F BUL/EC',
'F RUM S F BUL/EC - BLA',
'F RUM S F BUL/SC',
'F RUM S F CON - BLA',
'F RUM S F CON - BUL',
'F RUM S F GRE - BUL',
'F RUM S F SEV',
'F RUM S F SEV - BLA',
'F SEV - ARM',
'F SEV - BLA',
'F SEV - RUM',
'F SEV B',
'F SEV D',
'F SEV H',
'F SEV R ARM',
'F SEV R BLA',
'F SEV R RUM',
'F SEV S A ANK - ARM',
'F SEV S A ANK - RUM',
'F SEV S A ARM',
'F SEV S A ARM - RUM',
'F SEV S A BUD - RUM',
'F SEV S A BUL - ARM',
'F SEV S A BUL - RUM',
'F SEV S A CON - ARM',
'F SEV S A CON - RUM',
'F SEV S A GAL - RUM',
'F SEV S A RUM',
'F SEV S A RUM - ARM',
'F SEV S A SER - RUM',
'F SEV S A SMY - ARM',
'F SEV S A SYR - ARM',
'F SEV S A UKR - RUM',
'F SEV S F ANK - ARM',
'F SEV S F ANK - BLA',
'F SEV S F ARM',
'F SEV S F ARM - BLA',
'F SEV S F BLA',
'F SEV S F BLA - ARM',
'F SEV S F BLA - RUM',
'F SEV S F BUL/EC - BLA',
'F SEV S F BUL/EC - RUM',
'F SEV S F CON - BLA',
'F SEV S F RUM',
'F SEV S F RUM - BLA',
'F SKA - DEN',
'F SKA - NTH',
'F SKA - NWY',
'F SKA - SWE',
'F SKA C A BEL - SWE',
'F SKA C A BRE - SWE',
'F SKA C A CLY - SWE',
'F SKA C A DEN - NWY',
'F SKA C A DEN - SWE',
'F SKA C A EDI - SWE',
'F SKA C A GAS - SWE',
'F SKA C A HOL - SWE',
'F SKA C A KIE - SWE',
'F SKA C A LON - SWE',
'F SKA C A LVP - SWE',
'F SKA C A NAF - SWE',
'F SKA C A NWY - DEN',
'F SKA C A NWY - SWE',
'F SKA C A PIC - SWE',
'F SKA C A POR - SWE',
'F SKA C A SPA - SWE',
'F SKA C A STP - SWE',
'F SKA C A SWE - BEL',
'F SKA C A SWE - BRE',
'F SKA C A SWE - CLY',
'F SKA C A SWE - DEN',
'F SKA C A SWE - EDI',
'F SKA C A SWE - GAS',
'F SKA C A SWE - HOL',
'F SKA C A SWE - KIE',
'F SKA C A SWE - LON',
'F SKA C A SWE - LVP',
'F SKA C A SWE - NAF',
'F SKA C A SWE - NWY',
'F SKA C A SWE - PIC',
'F SKA C A SWE - POR',
'F SKA C A SWE - SPA',
'F SKA C A SWE - STP',
'F SKA C A SWE - WAL',
'F SKA C A SWE - YOR',
'F SKA C A WAL - SWE',
'F SKA C A YOR - SWE',
'F SKA D',
'F SKA H',
'F SKA R DEN',
'F SKA R NTH',
'F SKA R NWY',
'F SKA R SWE',
'F SKA S A BEL - DEN',
'F SKA S A BEL - NWY',
'F SKA S A BER - DEN',
'F SKA S A BER - SWE',
'F SKA S A BRE - DEN',
'F SKA S A BRE - NWY',
'F SKA S A CLY - DEN',
'F SKA S A CLY - NWY',
'F SKA S A DEN',
'F SKA S A DEN - NWY',
'F SKA S A DEN - SWE',
'F SKA S A EDI - DEN',
'F SKA S A EDI - NWY',
'F SKA S A FIN - DEN',
'F SKA S A FIN - NWY',
'F SKA S A FIN - SWE',
'F SKA S A GAS - DEN',
'F SKA S A GAS - NWY',
'F SKA S A HOL - DEN',
'F SKA S A HOL - NWY',
'F SKA S A KIE - DEN',
'F SKA S A KIE - NWY',
'F SKA S A KIE - SWE',
'F SKA S A LON - DEN',
'F SKA S A LON - NWY',
'F SKA S A LVN - DEN',
'F SKA S A LVN - SWE',
'F SKA S A LVP - DEN',
'F SKA S A LVP - NWY',
'F SKA S A NAF - DEN',
'F SKA S A NAF - NWY',
'F SKA S A NWY',
'F SKA S A NWY - DEN',
'F SKA S A NWY - SWE',
'F SKA S A PIC - DEN',
'F SKA S A PIC - NWY',
'F SKA S A POR - DEN',
'F SKA S A POR - NWY',
'F SKA S A PRU - DEN',
'F SKA S A PRU - SWE',
'F SKA S A SPA - DEN',
'F SKA S A SPA - NWY',
'F SKA S A STP - DEN',
'F SKA S A STP - NWY',
'F SKA S A STP - SWE',
'F SKA S A SWE',
'F SKA S A SWE - DEN',
'F SKA S A SWE - NWY',
'F SKA S A TUN - DEN',
'F SKA S A TUN - NWY',
'F SKA S A WAL - DEN',
'F SKA S A WAL - NWY',
'F SKA S A YOR - DEN',
'F SKA S A YOR - NWY',
'F SKA S F BAL - DEN',
'F SKA S F BAL - SWE',
'F SKA S F BAR - NWY',
'F SKA S F BEL - NTH',
'F SKA S F BOT - SWE',
'F SKA S F DEN',
'F SKA S F DEN - NTH',
'F SKA S F DEN - SWE',
'F SKA S F EDI - NTH',
'F SKA S F ENG - NTH',
'F SKA S F FIN - SWE',
'F SKA S F HEL - DEN',
'F SKA S F HEL - NTH',
'F SKA S F HOL - NTH',
'F SKA S F KIE - DEN',
'F SKA S F LON - NTH',
'F SKA S F NTH',
'F SKA S F NTH - DEN',
'F SKA S F NTH - NWY',
'F SKA S F NWG - NTH',
'F SKA S F NWG - NWY',
'F SKA S F NWY',
'F SKA S F NWY - NTH',
'F SKA S F NWY - SWE',
'F SKA S F STP/NC - NWY',
'F SKA S F SWE',
'F SKA S F SWE - DEN',
'F SKA S F SWE - NWY',
'F SKA S F YOR - NTH',
'F SMY - AEG',
'F SMY - CON',
'F SMY - EAS',
'F SMY - SYR',
'F SMY B',
'F SMY D',
'F SMY H',
'F SMY R AEG',
'F SMY R CON',
'F SMY R EAS',
'F SMY R SYR',
'F SMY S A ALB - CON',
'F SMY S A ALB - SYR',
'F SMY S A ANK - CON',
'F SMY S A APU - CON',
'F SMY S A APU - SYR',
'F SMY S A ARM - CON',
'F SMY S A ARM - SYR',
'F SMY S A BUL - CON',
'F SMY S A BUL - SYR',
'F SMY S A CON',
'F SMY S A CON - SYR',
'F SMY S A GRE - CON',
'F SMY S A GRE - SYR',
'F SMY S A MAR - CON',
'F SMY S A MAR - SYR',
'F SMY S A NAF - CON',
'F SMY S A NAF - SYR',
'F SMY S A NAP - CON',
'F SMY S A NAP - SYR',
'F SMY S A PIE - CON',
'F SMY S A PIE - SYR',
'F SMY S A ROM - CON',
'F SMY S A ROM - SYR',
'F SMY S A RUM - CON',
'F SMY S A SEV - CON',
'F SMY S A SPA - CON',
'F SMY S A SPA - SYR',
'F SMY S A SYR',
'F SMY S A SYR - CON',
'F SMY S A TRI - CON',
'F SMY S A TRI - SYR',
'F SMY S A TUN - CON',
'F SMY S A TUN - SYR',
'F SMY S A TUS - CON',
'F SMY S A TUS - SYR',
'F SMY S A VEN - CON',
'F SMY S A VEN - SYR',
'F SMY S F AEG',
'F SMY S F AEG - CON',
'F SMY S F AEG - EAS',
'F SMY S F ANK - CON',
'F SMY S F BLA - CON',
'F SMY S F BUL/EC - CON',
'F SMY S F BUL/SC - AEG',
'F SMY S F BUL/SC - CON',
'F SMY S F CON',
'F SMY S F CON - AEG',
'F SMY S F EAS',
'F SMY S F EAS - AEG',
'F SMY S F EAS - SYR',
'F SMY S F GRE - AEG',
'F SMY S F ION - AEG',
'F SMY S F ION - EAS',
'F SMY S F SYR',
'F SMY S F SYR - EAS',
'F SPA/NC - GAS',
'F SPA/NC - MAO',
'F SPA/NC - POR',
'F SPA/NC D',
'F SPA/NC H',
'F SPA/NC R GAS',
'F SPA/NC R MAO',
'F SPA/NC R POR',
'F SPA/NC S A ALB - GAS',
'F SPA/NC S A ALB - POR',
'F SPA/NC S A APU - GAS',
'F SPA/NC S A APU - POR',
'F SPA/NC S A BEL - GAS',
'F SPA/NC S A BEL - POR',
'F SPA/NC S A BRE - GAS',
'F SPA/NC S A BRE - POR',
'F SPA/NC S A BUR - GAS',
'F SPA/NC S A CLY - GAS',
'F SPA/NC S A CLY - POR',
'F SPA/NC S A DEN - GAS',
'F SPA/NC S A DEN - POR',
'F SPA/NC S A EDI - GAS',
'F SPA/NC S A EDI - POR',
'F SPA/NC S A GAS',
'F SPA/NC S A GAS - POR',
'F SPA/NC S A GRE - GAS',
'F SPA/NC S A GRE - POR',
'F SPA/NC S A HOL - GAS',
'F SPA/NC S A HOL - POR',
'F SPA/NC S A KIE - GAS',
'F SPA/NC S A KIE - POR',
'F SPA/NC S A LON - GAS',
'F SPA/NC S A LON - POR',
'F SPA/NC S A LVP - GAS',
'F SPA/NC S A LVP - POR',
'F SPA/NC S A MAR - GAS',
'F SPA/NC S A MAR - POR',
'F SPA/NC S A NAF - GAS',
'F SPA/NC S A NAF - POR',
'F SPA/NC S A NAP - GAS',
'F SPA/NC S A NAP - POR',
'F SPA/NC S A NWY - GAS',
'F SPA/NC S A NWY - POR',
'F SPA/NC S A PAR - GAS',
'F SPA/NC S A PIC - GAS',
'F SPA/NC S A PIC - POR',
'F SPA/NC S A PIE - GAS',
'F SPA/NC S A PIE - POR',
'F SPA/NC S A POR',
'F SPA/NC S A POR - GAS',
'F SPA/NC S A ROM - GAS',
'F SPA/NC S A ROM - POR',
'F SPA/NC S A STP - GAS',
'F SPA/NC S A STP - POR',
'F SPA/NC S A SWE - GAS',
'F SPA/NC S A SWE - POR',
'F SPA/NC S A TUN - GAS',
'F SPA/NC S A TUN - POR',
'F SPA/NC S A TUS - GAS',
'F SPA/NC S A TUS - POR',
'F SPA/NC S A WAL - GAS',
'F SPA/NC S A WAL - POR',
'F SPA/NC S A YOR - GAS',
'F SPA/NC S A YOR - POR',
'F SPA/NC S F BRE - GAS',
'F SPA/NC S F BRE - MAO',
'F SPA/NC S F ENG - MAO',
'F SPA/NC S F GAS',
'F SPA/NC S F GAS - MAO',
'F SPA/NC S F IRI - MAO',
'F SPA/NC S F MAO',
'F SPA/NC S F MAO - GAS',
'F SPA/NC S F MAO - POR',
'F SPA/NC S F NAF - MAO',
'F SPA/NC S F NAO - MAO',
'F SPA/NC S F POR',
'F SPA/NC S F POR - MAO',
'F SPA/NC S F WES - MAO',
'F SPA/SC - LYO',
'F SPA/SC - MAO',
'F SPA/SC - MAR',
'F SPA/SC - POR',
'F SPA/SC - WES',
'F SPA/SC D',
'F SPA/SC H',
'F SPA/SC R LYO',
'F SPA/SC R MAO',
'F SPA/SC R MAR',
'F SPA/SC R POR',
'F SPA/SC R WES',
'F SPA/SC S A ALB - MAR',
'F SPA/SC S A ALB - POR',
'F SPA/SC S A APU - MAR',
'F SPA/SC S A APU - POR',
'F SPA/SC S A BEL - MAR',
'F SPA/SC S A BEL - POR',
'F SPA/SC S A BRE - MAR',
'F SPA/SC S A BRE - POR',
'F SPA/SC S A BUL - MAR',
'F SPA/SC S A BUR - MAR',
'F SPA/SC S A CLY - MAR',
'F SPA/SC S A CLY - POR',
'F SPA/SC S A CON - MAR',
'F SPA/SC S A DEN - POR',
'F SPA/SC S A EDI - POR',
'F SPA/SC S A GAS - MAR',
'F SPA/SC S A GAS - POR',
'F SPA/SC S A GRE - MAR',
'F SPA/SC S A GRE - POR',
'F SPA/SC S A HOL - POR',
'F SPA/SC S A KIE - POR',
'F SPA/SC S A LON - MAR',
'F SPA/SC S A LON - POR',
'F SPA/SC S A LVP - MAR',
'F SPA/SC S A LVP - POR',
'F SPA/SC S A MAR',
'F SPA/SC S A MAR - POR',
'F SPA/SC S A NAF - MAR',
'F SPA/SC S A NAF - POR',
'F SPA/SC S A NAP - MAR',
'F SPA/SC S A NAP - POR',
'F SPA/SC S A NWY - POR',
'F SPA/SC S A PIC - MAR',
'F SPA/SC S A PIC - POR',
'F SPA/SC S A PIE - MAR',
'F SPA/SC S A PIE - POR',
'F SPA/SC S A POR',
'F SPA/SC S A POR - MAR',
'F SPA/SC S A ROM - MAR',
'F SPA/SC S A ROM - POR',
'F SPA/SC S A SMY - MAR',
'F SPA/SC S A STP - POR',
'F SPA/SC S A SWE - POR',
'F SPA/SC S A SYR - MAR',
'F SPA/SC S A TRI - MAR',
'F SPA/SC S A TUN - MAR',
'F SPA/SC S A TUN - POR',
'F SPA/SC S A TUS - MAR',
'F SPA/SC S A TUS - POR',
'F SPA/SC S A VEN - MAR',
'F SPA/SC S A WAL - MAR',
'F SPA/SC S A WAL - POR',
'F SPA/SC S A YOR - POR',
'F SPA/SC S F BRE - MAO',
'F SPA/SC S F ENG - MAO',
'F SPA/SC S F GAS - MAO',
'F SPA/SC S F IRI - MAO',
'F SPA/SC S F LYO',
'F SPA/SC S F LYO - MAR',
'F SPA/SC S F LYO - WES',
'F SPA/SC S F MAO',
'F SPA/SC S F MAO - POR',
'F SPA/SC S F MAO - WES',
'F SPA/SC S F MAR',
'F SPA/SC S F MAR - LYO',
'F SPA/SC S F NAF - MAO',
'F SPA/SC S F NAF - WES',
'F SPA/SC S F NAO - MAO',
'F SPA/SC S F PIE - LYO',
'F SPA/SC S F PIE - MAR',
'F SPA/SC S F POR',
'F SPA/SC S F POR - MAO',
'F SPA/SC S F TUN - WES',
'F SPA/SC S F TUS - LYO',
'F SPA/SC S F TYS - LYO',
'F SPA/SC S F TYS - WES',
'F SPA/SC S F WES',
'F SPA/SC S F WES - LYO',
'F SPA/SC S F WES - MAO',
'F STP/NC - BAR',
'F STP/NC - NWY',
'F STP/NC B',
'F STP/NC D',
'F STP/NC H',
'F STP/NC R BAR',
'F STP/NC R NWY',
'F STP/NC S A BEL - NWY',
'F STP/NC S A BRE - NWY',
'F STP/NC S A CLY - NWY',
'F STP/NC S A DEN - NWY',
'F STP/NC S A EDI - NWY',
'F STP/NC S A FIN - NWY',
'F STP/NC S A GAS - NWY',
'F STP/NC S A HOL - NWY',
'F STP/NC S A KIE - NWY',
'F STP/NC S A LON - NWY',
'F STP/NC S A LVP - NWY',
'F STP/NC S A NAF - NWY',
'F STP/NC S A NWY',
'F STP/NC S A PIC - NWY',
'F STP/NC S A POR - NWY',
'F STP/NC S A SPA - NWY',
'F STP/NC S A SWE - NWY',
'F STP/NC S A TUN - NWY',
'F STP/NC S A WAL - NWY',
'F STP/NC S A YOR - NWY',
'F STP/NC S F BAR',
'F STP/NC S F BAR - NWY',
'F STP/NC S F NTH - NWY',
'F STP/NC S F NWG - BAR',
'F STP/NC S F NWG - NWY',
'F STP/NC S F NWY',
'F STP/NC S F NWY - BAR',
'F STP/NC S F SKA - NWY',
'F STP/NC S F SWE - NWY',
'F STP/SC - BOT',
'F STP/SC - FIN',
'F STP/SC - LVN',
'F STP/SC B',
'F STP/SC D',
'F STP/SC H',
'F STP/SC R BOT',
'F STP/SC R FIN',
'F STP/SC R LVN',
'F STP/SC S A BER - FIN',
'F STP/SC S A BER - LVN',
'F STP/SC S A DEN - FIN',
'F STP/SC S A DEN - LVN',
'F STP/SC S A FIN',
'F STP/SC S A FIN - LVN',
'F STP/SC S A KIE - FIN',
'F STP/SC S A KIE - LVN',
'F STP/SC S A LVN',
'F STP/SC S A LVN - FIN',
'F STP/SC S A MOS - LVN',
'F STP/SC S A NWY - FIN',
'F STP/SC S A PRU - FIN',
'F STP/SC S A PRU - LVN',
'F STP/SC S A SWE - FIN',
'F STP/SC S A SWE - LVN',
'F STP/SC S A WAR - LVN',
'F STP/SC S F BAL - BOT',
'F STP/SC S F BAL - LVN',
'F STP/SC S F BOT',
'F STP/SC S F BOT - FIN',
'F STP/SC S F BOT - LVN',
'F STP/SC S F FIN',
'F STP/SC S F FIN - BOT',
'F STP/SC S F LVN',
'F STP/SC S F LVN - BOT',
'F STP/SC S F PRU - LVN',
'F STP/SC S F SWE - BOT',
'F STP/SC S F SWE - FIN',
'F SWE - BAL',
'F SWE - BOT',
'F SWE - DEN',
'F SWE - FIN',
'F SWE - NWY',
'F SWE - SKA',
'F SWE D',
'F SWE H',
'F SWE R BAL',
'F SWE R BOT',
'F SWE R DEN',
'F SWE R FIN',
'F SWE R NWY',
'F SWE R SKA',
'F SWE S A BEL - DEN',
'F SWE S A BEL - NWY',
'F SWE S A BER - DEN',
'F SWE S A BER - FIN',
'F SWE S A BRE - DEN',
'F SWE S A BRE - NWY',
'F SWE S A CLY - DEN',
'F SWE S A CLY - NWY',
'F SWE S A DEN',
'F SWE S A DEN - FIN',
'F SWE S A DEN - NWY',
'F SWE S A EDI - DEN',
'F SWE S A EDI - NWY',
'F SWE S A FIN',
'F SWE S A FIN - DEN',
'F SWE S A FIN - NWY',
'F SWE S A GAS - DEN',
'F SWE S A GAS - NWY',
'F SWE S A HOL - DEN',
'F SWE S A HOL - NWY',
'F SWE S A KIE - DEN',
'F SWE S A KIE - FIN',
'F SWE S A KIE - NWY',
'F SWE S A LON - DEN',
'F SWE S A LON - NWY',
'F SWE S A LVN - DEN',
'F SWE S A LVN - FIN',
'F SWE S A LVP - DEN',
'F SWE S A LVP - NWY',
'F SWE S A NAF - DEN',
'F SWE S A NAF - NWY',
'F SWE S A NWY',
'F SWE S A NWY - DEN',
'F SWE S A NWY - FIN',
'F SWE S A PIC - DEN',
'F SWE S A PIC - NWY',
'F SWE S A POR - DEN',
'F SWE S A POR - NWY',
'F SWE S A PRU - DEN',
'F SWE S A PRU - FIN',
'F SWE S A SPA - DEN',
'F SWE S A SPA - NWY',
'F SWE S A STP - DEN',
'F SWE S A STP - FIN',
'F SWE S A STP - NWY',
'F SWE S A TUN - DEN',
'F SWE S A TUN - NWY',
'F SWE S A WAL - DEN',
'F SWE S A WAL - NWY',
'F SWE S A YOR - DEN',
'F SWE S A YOR - NWY',
'F SWE S F BAL',
'F SWE S F BAL - BOT',
'F SWE S F BAL - DEN',
'F SWE S F BAR - NWY',
'F SWE S F BER - BAL',
'F SWE S F BOT',
'F SWE S F BOT - BAL',
'F SWE S F BOT - FIN',
'F SWE S F DEN',
'F SWE S F DEN - BAL',
'F SWE S F DEN - SKA',
'F SWE S F FIN',
'F SWE S F FIN - BOT',
'F SWE S F HEL - DEN',
'F SWE S F KIE - BAL',
'F SWE S F KIE - DEN',
'F SWE S F LVN - BAL',
'F SWE S F LVN - BOT',
'F SWE S F NTH - DEN',
'F SWE S F NTH - NWY',
'F SWE S F NTH - SKA',
'F SWE S F NWG - NWY',
'F SWE S F NWY',
'F SWE S F NWY - SKA',
'F SWE S F PRU - BAL',
'F SWE S F SKA',
'F SWE S F SKA - DEN',
'F SWE S F SKA - NWY',
'F SWE S F STP/NC - NWY',
'F SWE S F STP/SC - BOT',
'F SWE S F STP/SC - FIN',
'F SYR - EAS',
'F SYR - SMY',
'F SYR D',
'F SYR H',
'F SYR R EAS',
'F SYR R SMY',
'F SYR S A ALB - SMY',
'F SYR S A ANK - SMY',
'F SYR S A APU - SMY',
'F SYR S A ARM - SMY',
'F SYR S A BUL - SMY',
'F SYR S A CON - SMY',
'F SYR S A GRE - SMY',
'F SYR S A MAR - SMY',
'F SYR S A NAF - SMY',
'F SYR S A NAP - SMY',
'F SYR S A PIE - SMY',
'F SYR S A ROM - SMY',
'F SYR S A SMY',
'F SYR S A SPA - SMY',
'F SYR S A TRI - SMY',
'F SYR S A TUN - SMY',
'F SYR S A TUS - SMY',
'F SYR S A VEN - SMY',
'F SYR S F AEG - EAS',
'F SYR S F AEG - SMY',
'F SYR S F CON - SMY',
'F SYR S F EAS',
'F SYR S F EAS - SMY',
'F SYR S F ION - EAS',
'F SYR S F SMY',
'F SYR S F SMY - EAS',
'F TRI - ADR',
'F TRI - ALB',
'F TRI - VEN',
'F TRI B',
'F TRI D',
'F TRI H',
'F TRI R ADR',
'F TRI R ALB',
'F TRI R VEN',
'F TRI S A ALB',
'F TRI S A ALB - VEN',
'F TRI S A APU - ALB',
'F TRI S A APU - VEN',
'F TRI S A BRE - ALB',
'F TRI S A BUL - ALB',
'F TRI S A BUL - VEN',
'F TRI S A CON - ALB',
'F TRI S A CON - VEN',
'F TRI S A GAS - ALB',
'F TRI S A GRE - ALB',
'F TRI S A GRE - VEN',
'F TRI S A MAR - ALB',
'F TRI S A MAR - VEN',
'F TRI S A NAF - ALB',
'F TRI S A NAF - VEN',
'F TRI S A NAP - ALB',
'F TRI S A NAP - VEN',
'F TRI S A PIE - ALB',
'F TRI S A PIE - VEN',
'F TRI S A POR - ALB',
'F TRI S A ROM - ALB',
'F TRI S A ROM - VEN',
'F TRI S A SER - ALB',
'F TRI S A SMY - ALB',
'F TRI S A SMY - VEN',
'F TRI S A SPA - ALB',
'F TRI S A SPA - VEN',
'F TRI S A SYR - ALB',
'F TRI S A SYR - VEN',
'F TRI S A TUN - ALB',
'F TRI S A TUN - VEN',
'F TRI S A TUS - ALB',
'F TRI S A TUS - VEN',
'F TRI S A TYR - VEN',
'F TRI S A VEN',
'F TRI S A VEN - ALB',
'F TRI S F ADR',
'F TRI S F ADR - ALB',
'F TRI S F ADR - VEN',
'F TRI S F ALB',
'F TRI S F ALB - ADR',
'F TRI S F APU - ADR',
'F TRI S F APU - VEN',
'F TRI S F GRE - ALB',
'F TRI S F ION - ADR',
'F TRI S F ION - ALB',
'F TRI S F VEN',
'F TRI S F VEN - ADR',
'F TUN - ION',
'F TUN - NAF',
'F TUN - TYS',
'F TUN - WES',
'F TUN D',
'F TUN H',
'F TUN R ION',
'F TUN R NAF',
'F TUN R TYS',
'F TUN R WES',
'F TUN S A ALB - NAF',
'F TUN S A APU - NAF',
'F TUN S A BEL - NAF',
'F TUN S A BRE - NAF',
'F TUN S A BUL - NAF',
'F TUN S A CLY - NAF',
'F TUN S A CON - NAF',
'F TUN S A DEN - NAF',
'F TUN S A EDI - NAF',
'F TUN S A GAS - NAF',
'F TUN S A GRE - NAF',
'F TUN S A HOL - NAF',
'F TUN S A KIE - NAF',
'F TUN S A LON - NAF',
'F TUN S A LVP - NAF',
'F TUN S A MAR - NAF',
'F TUN S A NAF',
'F TUN S A NAP - NAF',
'F TUN S A NWY - NAF',
'F TUN S A PIC - NAF',
'F TUN S A PIE - NAF',
'F TUN S A POR - NAF',
'F TUN S A ROM - NAF',
'F TUN S A SMY - NAF',
'F TUN S A SPA - NAF',
'F TUN S A STP - NAF',
'F TUN S A SWE - NAF',
'F TUN S A SYR - NAF',
'F TUN S A TRI - NAF',
'F TUN S A TUS - NAF',
'F TUN S A VEN - NAF',
'F TUN S A WAL - NAF',
'F TUN S A YOR - NAF',
'F TUN S F ADR - ION',
'F TUN S F AEG - ION',
'F TUN S F ALB - ION',
'F TUN S F APU - ION',
'F TUN S F EAS - ION',
'F TUN S F GRE - ION',
'F TUN S F ION',
'F TUN S F ION - TYS',
'F TUN S F LYO - TYS',
'F TUN S F LYO - WES',
'F TUN S F MAO - NAF',
'F TUN S F MAO - WES',
'F TUN S F NAF',
'F TUN S F NAF - WES',
'F TUN S F NAP - ION',
'F TUN S F NAP - TYS',
'F TUN S F ROM - TYS',
'F TUN S F SPA/SC - WES',
'F TUN S F TUS - TYS',
'F TUN S F TYS',
'F TUN S F TYS - ION',
'F TUN S F TYS - WES',
'F TUN S F WES',
'F TUN S F WES - NAF',
'F TUN S F WES - TYS',
'F TUS - LYO',
'F TUS - PIE',
'F TUS - ROM',
'F TUS - TYS',
'F TUS D',
'F TUS H',
'F TUS R LYO',
'F TUS R PIE',
'F TUS R ROM',
'F TUS R TYS',
'F TUS S A ALB - PIE',
'F TUS S A ALB - ROM',
'F TUS S A APU - PIE',
'F TUS S A APU - ROM',
'F TUS S A BEL - PIE',
'F TUS S A BEL - ROM',
'F TUS S A BRE - PIE',
'F TUS S A BRE - ROM',
'F TUS S A BUL - PIE',
'F TUS S A BUL - ROM',
'F TUS S A CLY - PIE',
'F TUS S A CLY - ROM',
'F TUS S A CON - PIE',
'F TUS S A CON - ROM',
'F TUS S A GAS - PIE',
'F TUS S A GAS - ROM',
'F TUS S A GRE - PIE',
'F TUS S A GRE - ROM',
'F TUS S A LON - PIE',
'F TUS S A LON - ROM',
'F TUS S A LVP - PIE',
'F TUS S A LVP - ROM',
'F TUS S A MAR - PIE',
'F TUS S A MAR - ROM',
'F TUS S A NAF - PIE',
'F TUS S A NAF - ROM',
'F TUS S A NAP - PIE',
'F TUS S A NAP - ROM',
'F TUS S A PIC - PIE',
'F TUS S A PIC - ROM',
'F TUS S A PIE',
'F TUS S A PIE - ROM',
'F TUS S A POR - PIE',
'F TUS S A POR - ROM',
'F TUS S A ROM',
'F TUS S A ROM - PIE',
'F TUS S A SMY - PIE',
'F TUS S A SMY - ROM',
'F TUS S A SPA - PIE',
'F TUS S A SPA - ROM',
'F TUS S A SYR - PIE',
'F TUS S A SYR - ROM',
'F TUS S A TRI - PIE',
'F TUS S A TRI - ROM',
'F TUS S A TUN - PIE',
'F TUS S A TUN - ROM',
'F TUS S A TYR - PIE',
'F TUS S A VEN - PIE',
'F TUS S A VEN - ROM',
'F TUS S A WAL - PIE',
'F TUS S A WAL - ROM',
'F TUS S F ION - TYS',
'F TUS S F LYO',
'F TUS S F LYO - PIE',
'F TUS S F LYO - TYS',
'F TUS S F MAR - LYO',
'F TUS S F MAR - PIE',
'F TUS S F NAP - ROM',
'F TUS S F NAP - TYS',
'F TUS S F PIE',
'F TUS S F PIE - LYO',
'F TUS S F ROM',
'F TUS S F ROM - TYS',
'F TUS S F SPA/SC - LYO',
'F TUS S F TUN - TYS',
'F TUS S F TYS',
'F TUS S F TYS - LYO',
'F TUS S F TYS - ROM',
'F TUS S F WES - LYO',
'F TUS S F WES - TYS',
'F TYS - ION',
'F TYS - LYO',
'F TYS - NAP',
'F TYS - ROM',
'F TYS - TUN',
'F TYS - TUS',
'F TYS - WES',
'F TYS C A ALB - BRE',
'F TYS C A ALB - GAS',
'F TYS C A ALB - MAR',
'F TYS C A ALB - NAF',
'F TYS C A ALB - PIE',
'F TYS C A ALB - POR',
'F TYS C A ALB - ROM',
'F TYS C A ALB - SPA',
'F TYS C A ALB - TUS',
'F TYS C A APU - BRE',
'F TYS C A APU - GAS',
'F TYS C A APU - MAR',
'F TYS C A APU - NAF',
'F TYS C A APU - PIE',
'F TYS C A APU - POR',
'F TYS C A APU - ROM',
'F TYS C A APU - SPA',
'F TYS C A APU - TUS',
'F TYS C A BEL - NAP',
'F TYS C A BEL - ROM',
'F TYS C A BEL - TUS',
'F TYS C A BRE - ALB',
'F TYS C A BRE - APU',
'F TYS C A BRE - GRE',
'F TYS C A BRE - NAP',
'F TYS C A BRE - ROM',
'F TYS C A BRE - TUS',
'F TYS C A BUL - MAR',
'F TYS C A BUL - NAF',
'F TYS C A BUL - PIE',
'F TYS C A BUL - ROM',
'F TYS C A BUL - SPA',
'F TYS C A BUL - TUS',
'F TYS C A CLY - NAP',
'F TYS C A CLY - ROM',
'F TYS C A CLY - TUS',
'F TYS C A CON - MAR',
'F TYS C A CON - NAF',
'F TYS C A CON - PIE',
'F TYS C A CON - ROM',
'F TYS C A CON - SPA',
'F TYS C A CON - TUS',
'F TYS C A GAS - ALB',
'F TYS C A GAS - APU',
'F TYS C A GAS - GRE',
'F TYS C A GAS - NAP',
'F TYS C A GAS - ROM',
'F TYS C A GAS - TUS',
'F TYS C A GRE - BRE',
'F TYS C A GRE - GAS',
'F TYS C A GRE - MAR',
'F TYS C A GRE - NAF',
'F TYS C A GRE - PIE',
'F TYS C A GRE - POR',
'F TYS C A GRE - ROM',
'F TYS C A GRE - SPA',
'F TYS C A GRE - TUS',
'F TYS C A LON - NAP',
'F TYS C A LON - ROM',
'F TYS C A LON - TUS',
'F TYS C A LVP - NAP',
'F TYS C A LVP - ROM',
'F TYS C A LVP - TUS',
'F TYS C A MAR - ALB',
'F TYS C A MAR - APU',
'F TYS C A MAR - BUL',
'F TYS C A MAR - CON',
'F TYS C A MAR - GRE',
'F TYS C A MAR - NAP',
'F TYS C A MAR - ROM',
'F TYS C A MAR - SMY',
'F TYS C A MAR - SYR',
'F TYS C A MAR - TRI',
'F TYS C A MAR - TUN',
'F TYS C A MAR - VEN',
'F TYS C A NAF - ALB',
'F TYS C A NAF - APU',
'F TYS C A NAF - BUL',
'F TYS C A NAF - CON',
'F TYS C A NAF - GRE',
'F TYS C A NAF - NAP',
'F TYS C A NAF - ROM',
'F TYS C A NAF - SMY',
'F TYS C A NAF - SYR',
'F TYS C A NAF - TRI',
'F TYS C A NAF - TUS',
'F TYS C A NAF - VEN',
'F TYS C A NAP - BEL',
'F TYS C A NAP - BRE',
'F TYS C A NAP - CLY',
'F TYS C A NAP - GAS',
'F TYS C A NAP - LON',
'F TYS C A NAP - LVP',
'F TYS C A NAP - MAR',
'F TYS C A NAP - NAF',
'F TYS C A NAP - PIC',
'F TYS C A NAP - PIE',
'F TYS C A NAP - POR',
'F TYS C A NAP - ROM',
'F TYS C A NAP - SPA',
'F TYS C A NAP - TUN',
'F TYS C A NAP - TUS',
'F TYS C A NAP - WAL',
'F TYS C A PIC - NAP',
'F TYS C A PIC - ROM',
'F TYS C A PIC - TUS',
'F TYS C A PIE - ALB',
'F TYS C A PIE - APU',
'F TYS C A PIE - BUL',
'F TYS C A PIE - CON',
'F TYS C A PIE - GRE',
'F TYS C A PIE - NAP',
'F TYS C A PIE - ROM',
'F TYS C A PIE - SMY',
'F TYS C A PIE - SYR',
'F TYS C A PIE - TRI',
'F TYS C A PIE - TUN',
'F TYS C A PIE - VEN',
'F TYS C A POR - ALB',
'F TYS C A POR - APU',
'F TYS C A POR - GRE',
'F TYS C A POR - NAP',
'F TYS C A POR - ROM',
'F TYS C A POR - TUS',
'F TYS C A ROM - ALB',
'F TYS C A ROM - APU',
'F TYS C A ROM - BEL',
'F TYS C A ROM - BRE',
'F TYS C A ROM - BUL',
'F TYS C A ROM - CLY',
'F TYS C A ROM - CON',
'F TYS C A ROM - GAS',
'F TYS C A ROM - GRE',
'F TYS C A ROM - LON',
'F TYS C A ROM - LVP',
'F TYS C A ROM - MAR',
'F TYS C A ROM - NAF',
'F TYS C A ROM - NAP',
'F TYS C A ROM - PIC',
'F TYS C A ROM - PIE',
'F TYS C A ROM - POR',
'F TYS C A ROM - SMY',
'F TYS C A ROM - SPA',
'F TYS C A ROM - SYR',
'F TYS C A ROM - TRI',
'F TYS C A ROM - TUN',
'F TYS C A ROM - TUS',
'F TYS C A ROM - VEN',
'F TYS C A ROM - WAL',
'F TYS C A SMY - MAR',
'F TYS C A SMY - NAF',
'F TYS C A SMY - PIE',
'F TYS C A SMY - ROM',
'F TYS C A SMY - SPA',
'F TYS C A SMY - TUS',
'F TYS C A SPA - ALB',
'F TYS C A SPA - APU',
'F TYS C A SPA - BUL',
'F TYS C A SPA - CON',
'F TYS C A SPA - GRE',
'F TYS C A SPA - NAP',
'F TYS C A SPA - ROM',
'F TYS C A SPA - SMY',
'F TYS C A SPA - SYR',
'F TYS C A SPA - TRI',
'F TYS C A SPA - TUN',
'F TYS C A SPA - TUS',
'F TYS C A SPA - VEN',
'F TYS C A SYR - MAR',
'F TYS C A SYR - NAF',
'F TYS C A SYR - PIE',
'F TYS C A SYR - ROM',
'F TYS C A SYR - SPA',
'F TYS C A SYR - TUS',
'F TYS C A TRI - MAR',
'F TYS C A TRI - NAF',
'F TYS C A TRI - PIE',
'F TYS C A TRI - ROM',
'F TYS C A TRI - SPA',
'F TYS C A TRI - TUS',
'F TYS C A TUN - MAR',
'F TYS C A TUN - NAP',
'F TYS C A TUN - PIE',
'F TYS C A TUN - ROM',
'F TYS C A TUN - SPA',
'F TYS C A TUN - TUS',
'F TYS C A TUS - ALB',
'F TYS C A TUS - APU',
'F TYS C A TUS - BEL',
'F TYS C A TUS - BRE',
'F TYS C A TUS - BUL',
'F TYS C A TUS - CLY',
'F TYS C A TUS - CON',
'F TYS C A TUS - GAS',
'F TYS C A TUS - GRE',
'F TYS C A TUS - LON',
'F TYS C A TUS - LVP',
'F TYS C A TUS - NAF',
'F TYS C A TUS - NAP',
'F TYS C A TUS - PIC',
'F TYS C A TUS - POR',
'F TYS C A TUS - ROM',
'F TYS C A TUS - SMY',
'F TYS C A TUS - SPA',
'F TYS C A TUS - SYR',
'F TYS C A TUS - TRI',
'F TYS C A TUS - TUN',
'F TYS C A TUS - VEN',
'F TYS C A TUS - WAL',
'F TYS C A VEN - MAR',
'F TYS C A VEN - NAF',
'F TYS C A VEN - PIE',
'F TYS C A VEN - ROM',
'F TYS C A VEN - SPA',
'F TYS C A VEN - TUS',
'F TYS C A WAL - NAP',
'F TYS C A WAL - ROM',
'F TYS C A WAL - TUS',
'F TYS D',
'F TYS H',
'F TYS R ION',
'F TYS R LYO',
'F TYS R NAP',
'F TYS R ROM',
'F TYS R TUN',
'F TYS R TUS',
'F TYS R WES',
'F TYS S A ALB - NAP',
'F TYS S A ALB - TUN',
'F TYS S A APU - NAP',
'F TYS S A APU - ROM',
'F TYS S A APU - TUN',
'F TYS S A BEL - TUN',
'F TYS S A BEL - TUS',
'F TYS S A BRE - TUN',
'F TYS S A BRE - TUS',
'F TYS S A BUL - NAP',
'F TYS S A BUL - TUN',
'F TYS S A CLY - TUN',
'F TYS S A CLY - TUS',
'F TYS S A CON - NAP',
'F TYS S A CON - TUN',
'F TYS S A DEN - TUN',
'F TYS S A EDI - TUN',
'F TYS S A GAS - TUN',
'F TYS S A GAS - TUS',
'F TYS S A GRE - NAP',
'F TYS S A GRE - TUN',
'F TYS S A HOL - TUN',
'F TYS S A LON - TUN',
'F TYS S A LON - TUS',
'F TYS S A LVP - TUN',
'F TYS S A LVP - TUS',
'F TYS S A MAR - TUN',
'F TYS S A MAR - TUS',
'F TYS S A NAF - TUN',
'F TYS S A NAF - TUS',
'F TYS S A NAP',
'F TYS S A NAP - ROM',
'F TYS S A NAP - TUN',
'F TYS S A NWY - TUN',
'F TYS S A PIC - TUN',
'F TYS S A PIC - TUS',
'F TYS S A PIE - TUN',
'F TYS S A PIE - TUS',
'F TYS S A POR - TUN',
'F TYS S A POR - TUS',
'F TYS S A ROM',
'F TYS S A ROM - NAP',
'F TYS S A ROM - TUS',
'F TYS S A SMY - NAP',
'F TYS S A SMY - TUN',
'F TYS S A SPA - TUN',
'F TYS S A SPA - TUS',
'F TYS S A SYR - NAP',
'F TYS S A SYR - TUN',
'F TYS S A TRI - NAP',
'F TYS S A TRI - TUN',
'F TYS S A TUN',
'F TYS S A TUN - NAP',
'F TYS S A TUN - TUS',
'F TYS S A TUS',
'F TYS S A TUS - ROM',
'F TYS S A TUS - TUN',
'F TYS S A VEN - NAP',
'F TYS S A VEN - ROM',
'F TYS S A VEN - TUN',
'F TYS S A VEN - TUS',
'F TYS S A WAL - TUN',
'F TYS S A WAL - TUS',
'F TYS S A YOR - TUN',
'F TYS S F ADR - ION',
'F TYS S F AEG - ION',
'F TYS S F ALB - ION',
'F TYS S F APU - ION',
'F TYS S F APU - NAP',
'F TYS S F EAS - ION',
'F TYS S F GRE - ION',
'F TYS S F ION',
'F TYS S F ION - NAP',
'F TYS S F ION - TUN',
'F TYS S F LYO',
'F TYS S F LYO - TUS',
'F TYS S F LYO - WES',
'F TYS S F MAO - WES',
'F TYS S F MAR - LYO',
'F TYS S F NAF - TUN',
'F TYS S F NAF - WES',
'F TYS S F NAP',
'F TYS S F NAP - ION',
'F TYS S F NAP - ROM',
'F TYS S F PIE - LYO',
'F TYS S F PIE - TUS',
'F TYS S F ROM',
'F TYS S F ROM - NAP',
'F TYS S F ROM - TUS',
'F TYS S F SPA/SC - LYO',
'F TYS S F SPA/SC - WES',
'F TYS S F TUN',
'F TYS S F TUN - ION',
'F TYS S F TUN - WES',
'F TYS S F TUS',
'F TYS S F TUS - LYO',
'F TYS S F TUS - ROM',
'F TYS S F WES',
'F TYS S F WES - LYO',
'F TYS S F WES - TUN',
'F VEN - ADR',
'F VEN - APU',
'F VEN - TRI',
'F VEN B',
'F VEN D',
'F VEN H',
'F VEN R ADR',
'F VEN R APU',
'F VEN R TRI',
'F VEN S A ALB - APU',
'F VEN S A ALB - TRI',
'F VEN S A APU',
'F VEN S A APU - TRI',
'F VEN S A BRE - APU',
'F VEN S A BUD - TRI',
'F VEN S A BUL - APU',
'F VEN S A BUL - TRI',
'F VEN S A CON - APU',
'F VEN S A CON - TRI',
'F VEN S A GAS - APU',
'F VEN S A GRE - APU',
'F VEN S A GRE - TRI',
'F VEN S A MAR - APU',
'F VEN S A MAR - TRI',
'F VEN S A NAF - APU',
'F VEN S A NAF - TRI',
'F VEN S A NAP - APU',
'F VEN S A NAP - TRI',
'F VEN S A PIE - APU',
'F VEN S A PIE - TRI',
'F VEN S A POR - APU',
'F VEN S A ROM - APU',
'F VEN S A ROM - TRI',
'F VEN S A SER - TRI',
'F VEN S A SMY - APU',
'F VEN S A SMY - TRI',
'F VEN S A SPA - APU',
'F VEN S A SPA - TRI',
'F VEN S A SYR - APU',
'F VEN S A SYR - TRI',
'F VEN S A TRI',
'F VEN S A TRI - APU',
'F VEN S A TUN - APU',
'F VEN S A TUN - TRI',
'F VEN S A TUS - APU',
'F VEN S A TUS - TRI',
'F VEN S A TYR - TRI',
'F VEN S A VIE - TRI',
'F VEN S F ADR',
'F VEN S F ADR - APU',
'F VEN S F ADR - TRI',
'F VEN S F ALB - ADR',
'F VEN S F ALB - TRI',
'F VEN S F APU',
'F VEN S F APU - ADR',
'F VEN S F ION - ADR',
'F VEN S F ION - APU',
'F VEN S F NAP - APU',
'F VEN S F TRI',
'F VEN S F TRI - ADR',
'F WAL - ENG',
'F WAL - IRI',
'F WAL - LON',
'F WAL - LVP',
'F WAL D',
'F WAL H',
'F WAL R ENG',
'F WAL R IRI',
'F WAL R LON',
'F WAL R LVP',
'F WAL S A BEL - LON',
'F WAL S A BEL - LVP',
'F WAL S A BRE - LON',
'F WAL S A BRE - LVP',
'F WAL S A CLY - LON',
'F WAL S A CLY - LVP',
'F WAL S A DEN - LON',
'F WAL S A DEN - LVP',
'F WAL S A EDI - LON',
'F WAL S A EDI - LVP',
'F WAL S A GAS - LON',
'F WAL S A GAS - LVP',
'F WAL S A HOL - LON',
'F WAL S A HOL - LVP',
'F WAL S A KIE - LON',
'F WAL S A KIE - LVP',
'F WAL S A LON',
'F WAL S A LON - LVP',
'F WAL S A LVP',
'F WAL S A LVP - LON',
'F WAL S A MAR - LON',
'F WAL S A MAR - LVP',
'F WAL S A NAF - LON',
'F WAL S A NAF - LVP',
'F WAL S A NAP - LON',
'F WAL S A NAP - LVP',
'F WAL S A NWY - LON',
'F WAL S A NWY - LVP',
'F WAL S A PIC - LON',
'F WAL S A PIC - LVP',
'F WAL S A PIE - LON',
'F WAL S A PIE - LVP',
'F WAL S A POR - LON',
'F WAL S A POR - LVP',
'F WAL S A ROM - LON',
'F WAL S A ROM - LVP',
'F WAL S A SPA - LON',
'F WAL S A SPA - LVP',
'F WAL S A STP - LON',
'F WAL S A STP - LVP',
'F WAL S A SWE - LON',
'F WAL S A SWE - LVP',
'F WAL S A TUN - LON',
'F WAL S A TUN - LVP',
'F WAL S A TUS - LON',
'F WAL S A TUS - LVP',
'F WAL S A YOR - LON',
'F WAL S A YOR - LVP',
'F WAL S F BEL - ENG',
'F WAL S F BRE - ENG',
'F WAL S F CLY - LVP',
'F WAL S F ENG',
'F WAL S F ENG - IRI',
'F WAL S F ENG - LON',
'F WAL S F IRI',
'F WAL S F IRI - ENG',
'F WAL S F IRI - LVP',
'F WAL S F LON',
'F WAL S F LON - ENG',
'F WAL S F LVP',
'F WAL S F LVP - IRI',
'F WAL S F MAO - ENG',
'F WAL S F MAO - IRI',
'F WAL S F NAO - IRI',
'F WAL S F NAO - LVP',
'F WAL S F NTH - ENG',
'F WAL S F NTH - LON',
'F WAL S F PIC - ENG',
'F WAL S F YOR - LON',
'F WES - LYO',
'F WES - MAO',
'F WES - NAF',
'F WES - SPA/SC',
'F WES - TUN',
'F WES - TYS',
'F WES C A ALB - BRE',
'F WES C A ALB - GAS',
'F WES C A ALB - NAF',
'F WES C A ALB - POR',
'F WES C A ALB - SPA',
'F WES C A APU - BRE',
'F WES C A APU - GAS',
'F WES C A APU - NAF',
'F WES C A APU - POR',
'F WES C A APU - SPA',
'F WES C A BEL - MAR',
'F WES C A BEL - NAP',
'F WES C A BEL - PIE',
'F WES C A BEL - ROM',
'F WES C A BEL - TUN',
'F WES C A BEL - TUS',
'F WES C A BRE - ALB',
'F WES C A BRE - APU',
'F WES C A BRE - GRE',
'F WES C A BRE - MAR',
'F WES C A BRE - NAP',
'F WES C A BRE - PIE',
'F WES C A BRE - ROM',
'F WES C A BRE - TUN',
'F WES C A BRE - TUS',
'F WES C A BUL - NAF',
'F WES C A BUL - SPA',
'F WES C A CLY - MAR',
'F WES C A CLY - NAP',
'F WES C A CLY - PIE',
'F WES C A CLY - ROM',
'F WES C A CLY - TUN',
'F WES C A CLY - TUS',
'F WES C A CON - NAF',
'F WES C A CON - SPA',
'F WES C A DEN - TUN',
'F WES C A EDI - TUN',
'F WES C A GAS - ALB',
'F WES C A GAS - APU',
'F WES C A GAS - GRE',
'F WES C A GAS - MAR',
'F WES C A GAS - NAP',
'F WES C A GAS - PIE',
'F WES C A GAS - ROM',
'F WES C A GAS - TUN',
'F WES C A GAS - TUS',
'F WES C A GRE - BRE',
'F WES C A GRE - GAS',
'F WES C A GRE - NAF',
'F WES C A GRE - POR',
'F WES C A GRE - SPA',
'F WES C A HOL - TUN',
'F WES C A LON - MAR',
'F WES C A LON - NAP',
'F WES C A LON - PIE',
'F WES C A LON - ROM',
'F WES C A LON - TUN',
'F WES C A LON - TUS',
'F WES C A LVP - MAR',
'F WES C A LVP - NAP',
'F WES C A LVP - PIE',
'F WES C A LVP - ROM',
'F WES C A LVP - TUN',
'F WES C A LVP - TUS',
'F WES C A MAR - BEL',
'F WES C A MAR - BRE',
'F WES C A MAR - CLY',
'F WES C A MAR - GAS',
'F WES C A MAR - LON',
'F WES C A MAR - LVP',
'F WES C A MAR - NAF',
'F WES C A MAR - PIC',
'F WES C A MAR - POR',
'F WES C A MAR - TUN',
'F WES C A MAR - WAL',
'F WES C A NAF - ALB',
'F WES C A NAF - APU',
'F WES C A NAF - BUL',
'F WES C A NAF - CON',
'F WES C A NAF - GRE',
'F WES C A NAF - MAR',
'F WES C A NAF - NAP',
'F WES C A NAF - PIE',
'F WES C A NAF - ROM',
'F WES C A NAF - SMY',
'F WES C A NAF - SPA',
'F WES C A NAF - SYR',
'F WES C A NAF - TRI',
'F WES C A NAF - TUN',
'F WES C A NAF - TUS',
'F WES C A NAF - VEN',
'F WES C A NAP - BEL',
'F WES C A NAP - BRE',
'F WES C A NAP - CLY',
'F WES C A NAP - GAS',
'F WES C A NAP - LON',
'F WES C A NAP - LVP',
'F WES C A NAP - NAF',
'F WES C A NAP - PIC',
'F WES C A NAP - POR',
'F WES C A NAP - SPA',
'F WES C A NAP - WAL',
'F WES C A NWY - TUN',
'F WES C A PIC - MAR',
'F WES C A PIC - NAP',
'F WES C A PIC - PIE',
'F WES C A PIC - ROM',
'F WES C A PIC - TUN',
'F WES C A PIC - TUS',
'F WES C A PIE - BEL',
'F WES C A PIE - BRE',
'F WES C A PIE - CLY',
'F WES C A PIE - GAS',
'F WES C A PIE - LON',
'F WES C A PIE - LVP',
'F WES C A PIE - NAF',
'F WES C A PIE - PIC',
'F WES C A PIE - POR',
'F WES C A PIE - TUN',
'F WES C A PIE - WAL',
'F WES C A POR - ALB',
'F WES C A POR - APU',
'F WES C A POR - GRE',
'F WES C A POR - MAR',
'F WES C A POR - NAP',
'F WES C A POR - PIE',
'F WES C A POR - ROM',
'F WES C A POR - TUN',
'F WES C A POR - TUS',
'F WES C A ROM - BEL',
'F WES C A ROM - BRE',
'F WES C A ROM - CLY',
'F WES C A ROM - GAS',
'F WES C A ROM - LON',
'F WES C A ROM - LVP',
'F WES C A ROM - NAF',
'F WES C A ROM - PIC',
'F WES C A ROM - POR',
'F WES C A ROM - SPA',
'F WES C A ROM - WAL',
'F WES C A SMY - NAF',
'F WES C A SMY - SPA',
'F WES C A SPA - ALB',
'F WES C A SPA - APU',
'F WES C A SPA - BUL',
'F WES C A SPA - CON',
'F WES C A SPA - GRE',
'F WES C A SPA - NAF',
'F WES C A SPA - NAP',
'F WES C A SPA - ROM',
'F WES C A SPA - SMY',
'F WES C A SPA - SYR',
'F WES C A SPA - TRI',
'F WES C A SPA - TUN',
'F WES C A SPA - TUS',
'F WES C A SPA - VEN',
'F WES C A SYR - NAF',
'F WES C A SYR - SPA',
'F WES C A TRI - NAF',
'F WES C A TRI - SPA',
'F WES C A TUN - BEL',
'F WES C A TUN - BRE',
'F WES C A TUN - CLY',
'F WES C A TUN - DEN',
'F WES C A TUN - EDI',
'F WES C A TUN - GAS',
'F WES C A TUN - HOL',
'F WES C A TUN - LON',
'F WES C A TUN - LVP',
'F WES C A TUN - MAR',
'F WES C A TUN - NAF',
'F WES C A TUN - NWY',
'F WES C A TUN - PIC',
'F WES C A TUN - PIE',
'F WES C A TUN - POR',
'F WES C A TUN - SPA',
'F WES C A TUN - TUS',
'F WES C A TUN - WAL',
'F WES C A TUN - YOR',
'F WES C A TUS - BEL',
'F WES C A TUS - BRE',
'F WES C A TUS - CLY',
'F WES C A TUS - GAS',
'F WES C A TUS - LON',
'F WES C A TUS - LVP',
'F WES C A TUS - NAF',
'F WES C A TUS - PIC',
'F WES C A TUS - POR',
'F WES C A TUS - SPA',
'F WES C A TUS - TUN',
'F WES C A TUS - WAL',
'F WES C A VEN - NAF',
'F WES C A VEN - SPA',
'F WES C A WAL - MAR',
'F WES C A WAL - NAP',
'F WES C A WAL - PIE',
'F WES C A WAL - ROM',
'F WES C A WAL - TUN',
'F WES C A WAL - TUS',
'F WES C A YOR - TUN',
'F WES D',
'F WES H',
'F WES R LYO',
'F WES R MAO',
'F WES R NAF',
'F WES R SPA/SC',
'F WES R TUN',
'F WES R TYS',
'F WES S A ALB - SPA',
'F WES S A ALB - TUN',
'F WES S A APU - SPA',
'F WES S A APU - TUN',
'F WES S A BEL - NAF',
'F WES S A BEL - SPA',
'F WES S A BRE - NAF',
'F WES S A BRE - SPA',
'F WES S A BUL - SPA',
'F WES S A BUL - TUN',
'F WES S A CLY - NAF',
'F WES S A CLY - SPA',
'F WES S A CON - SPA',
'F WES S A CON - TUN',
'F WES S A DEN - NAF',
'F WES S A DEN - SPA',
'F WES S A EDI - NAF',
'F WES S A EDI - SPA',
'F WES S A GAS - NAF',
'F WES S A GAS - SPA',
'F WES S A GRE - SPA',
'F WES S A GRE - TUN',
'F WES S A HOL - NAF',
'F WES S A HOL - SPA',
'F WES S A KIE - NAF',
'F WES S A KIE - SPA',
'F WES S A LON - NAF',
'F WES S A LON - SPA',
'F WES S A LVP - NAF',
'F WES S A LVP - SPA',
'F WES S A MAR - SPA',
'F WES S A MAR - TUN',
'F WES S A NAF',
'F WES S A NAF - SPA',
'F WES S A NAF - TUN',
'F WES S A NAP - SPA',
'F WES S A NAP - TUN',
'F WES S A NWY - NAF',
'F WES S A NWY - SPA',
'F WES S A PIC - NAF',
'F WES S A PIC - SPA',
'F WES S A PIE - SPA',
'F WES S A PIE - TUN',
'F WES S A POR - NAF',
'F WES S A POR - SPA',
'F WES S A ROM - SPA',
'F WES S A ROM - TUN',
'F WES S A SMY - SPA',
'F WES S A SMY - TUN',
'F WES S A SPA',
'F WES S A SPA - NAF',
'F WES S A SPA - TUN',
'F WES S A STP - NAF',
'F WES S A STP - SPA',
'F WES S A SWE - NAF',
'F WES S A SWE - SPA',
'F WES S A SYR - SPA',
'F WES S A SYR - TUN',
'F WES S A TRI - SPA',
'F WES S A TRI - TUN',
'F WES S A TUN',
'F WES S A TUN - NAF',
'F WES S A TUN - SPA',
'F WES S A TUS - SPA',
'F WES S A TUS - TUN',
'F WES S A VEN - SPA',
'F WES S A VEN - TUN',
'F WES S A WAL - NAF',
'F WES S A WAL - SPA',
'F WES S A YOR - NAF',
'F WES S A YOR - SPA',
'F WES S F BRE - MAO',
'F WES S F ENG - MAO',
'F WES S F GAS - MAO',
'F WES S F GAS - SPA',
'F WES S F ION - TUN',
'F WES S F ION - TYS',
'F WES S F IRI - MAO',
'F WES S F LYO',
'F WES S F LYO - SPA',
'F WES S F LYO - TYS',
'F WES S F MAO',
'F WES S F MAO - NAF',
'F WES S F MAO - SPA',
'F WES S F MAR - LYO',
'F WES S F MAR - SPA',
'F WES S F NAF',
'F WES S F NAF - MAO',
'F WES S F NAF - TUN',
'F WES S F NAO - MAO',
'F WES S F NAP - TYS',
'F WES S F PIE - LYO',
'F WES S F POR - MAO',
'F WES S F POR - SPA',
'F WES S F ROM - TYS',
'F WES S F SPA/NC',
'F WES S F SPA/NC - MAO',
'F WES S F SPA/SC',
'F WES S F SPA/SC - LYO',
'F WES S F SPA/SC - MAO',
'F WES S F TUN',
'F WES S F TUN - NAF',
'F WES S F TUN - TYS',
'F WES S F TUS - LYO',
'F WES S F TUS - TYS',
'F WES S F TYS',
'F WES S F TYS - LYO',
'F WES S F TYS - TUN',
'F YOR - EDI',
'F YOR - LON',
'F YOR - NTH',
'F YOR D',
'F YOR H',
'F YOR R EDI',
'F YOR R LON',
'F YOR R NTH',
'F YOR S A BEL - EDI',
'F YOR S A BEL - LON',
'F YOR S A BRE - EDI',
'F YOR S A BRE - LON',
'F YOR S A CLY - EDI',
'F YOR S A CLY - LON',
'F YOR S A DEN - EDI',
'F YOR S A DEN - LON',
'F YOR S A EDI',
'F YOR S A EDI - LON',
'F YOR S A GAS - EDI',
'F YOR S A GAS - LON',
'F YOR S A HOL - EDI',
'F YOR S A HOL - LON',
'F YOR S A KIE - EDI',
'F YOR S A KIE - LON',
'F YOR S A LON',
'F YOR S A LON - EDI',
'F YOR S A LVP - EDI',
'F YOR S A LVP - LON',
'F YOR S A MAR - LON',
'F YOR S A NAF - EDI',
'F YOR S A NAF - LON',
'F YOR S A NAP - LON',
'F YOR S A NWY - EDI',
'F YOR S A NWY - LON',
'F YOR S A PIC - EDI',
'F YOR S A PIC - LON',
'F YOR S A PIE - LON',
'F YOR S A POR - EDI',
'F YOR S A POR - LON',
'F YOR S A ROM - LON',
'F YOR S A SPA - EDI',
'F YOR S A SPA - LON',
'F YOR S A STP - EDI',
'F YOR S A STP - LON',
'F YOR S A SWE - EDI',
'F YOR S A SWE - LON',
'F YOR S A TUN - EDI',
'F YOR S A TUN - LON',
'F YOR S A TUS - LON',
'F YOR S A WAL - EDI',
'F YOR S A WAL - LON',
'F YOR S F BEL - NTH',
'F YOR S F CLY - EDI',
'F YOR S F DEN - NTH',
'F YOR S F EDI',
'F YOR S F EDI - NTH',
'F YOR S F ENG - LON',
'F YOR S F ENG - NTH',
'F YOR S F HEL - NTH',
'F YOR S F HOL - NTH',
'F YOR S F LON',
'F YOR S F LON - NTH',
'F YOR S F NTH',
'F YOR S F NTH - EDI',
'F YOR S F NTH - LON',
'F YOR S F NWG - EDI',
'F YOR S F NWG - NTH',
'F YOR S F NWY - NTH',
'F YOR S F SKA - NTH',
'F YOR S F WAL - LON'
)
|
diplomacy-main
|
environment/action_list.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Utilities for parsing actions and observations produced by the environment."""
from typing import Optional, Union
import numpy as np
from diplomacy.environment import action_utils
from diplomacy.environment import observation_utils as utils
from diplomacy.environment import province_order
tag_to_id = province_order.province_name_to_id()
_province_id_to_tag = {v: k for k, v in tag_to_id.items()}
def area_string(area_tuple: utils.ProvinceWithFlag) -> str:
return _province_id_to_tag[area_tuple[0]]
def area_string_with_coast_if_fleet(
area_tuple: utils.ProvinceWithFlag,
unit_type: Optional[utils.UnitType]):
"""String representation indicating coasts when fleet in bicoastal."""
province_id, coast_num = area_tuple
if (province_id < utils.SINGLE_COASTED_PROVINCES or
unit_type == utils.UnitType.ARMY):
return area_string(area_tuple)
elif unit_type == utils.UnitType.FLEET:
# Fleet in a bicoastal province
province_tag = _province_id_to_tag[province_id]
return province_tag + ('NC' if coast_num == 0 else 'SC')
elif unit_type is None:
# Unit type unknown to caller
province_tag = _province_id_to_tag[province_id]
return province_tag + ('maybe_NC' if coast_num == 0 else 'SC')
else:
raise ValueError('Invalid unit type')
def action_string(
action: Union[action_utils.Action, action_utils.ActionNoIndex],
board: Optional[np.ndarray],
) -> str:
"""Returns a human readable action string.
Args:
action: The action to write down
board: (optional) board, as part of the observation. This is used to know
whether units are fleets or not, for coast annotations
Returns:
Action in an abbreviated human notation.
"""
order, p1, p2, p3 = action_utils.action_breakdown(action)
unit_string = area_string(p1)
if board is None:
unit_type = None
else:
unit_type = utils.unit_type(p1[0], board)
if order == action_utils.HOLD:
return f'{unit_string} H'
elif order == action_utils.CONVOY:
return f'{unit_string} C {area_string(p3)} - {area_string(p2)}'
elif order == action_utils.CONVOY_TO:
return f'{unit_string} - {area_string(p2)} VC'
elif order == action_utils.MOVE_TO:
return f'{unit_string} - {area_string_with_coast_if_fleet(p2, unit_type)}'
elif order == action_utils.SUPPORT_HOLD:
return f'{unit_string} SH {area_string(p2)}'
elif order == action_utils.SUPPORT_MOVE_TO:
return f'{unit_string} S {area_string(p3)} - {area_string(p2)}'
elif order == action_utils.RETREAT_TO:
return f'{unit_string} - {area_string_with_coast_if_fleet(p2, unit_type)}'
elif order == action_utils.DISBAND:
return f'{unit_string} D'
elif order == action_utils.BUILD_ARMY:
return 'B A ' + area_string(p1)
elif order == action_utils.BUILD_FLEET:
return 'B F ' + area_string_with_coast_if_fleet(p1, utils.UnitType.FLEET)
elif order == action_utils.REMOVE:
return 'R ' + area_string(p1)
elif order == action_utils.WAIVE:
return 'W'
else:
raise ValueError('Unrecognised order %s ' % order)
|
diplomacy-main
|
environment/human_readable_actions.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Functions for observation transformation and base classes for their users."""
import collections
import enum
from typing import Any, Dict, NamedTuple, Optional, Sequence, Tuple
from dm_env import specs
import jax.numpy as jnp
import numpy as np
import tree
from diplomacy.environment import action_utils
from diplomacy.environment import observation_utils as utils
from diplomacy.environment import province_order
from diplomacy.environment import tree_utils
class ObservationTransformState(NamedTuple):
# Board state at the last moves phase.
previous_board_state: np.ndarray
# Most recent board state.
last_action_board_state: np.ndarray
# Actions taken since the last moves phase.
actions_since_previous_moves_phase: np.ndarray
# Records if last phase was a moves phase.
last_phase_was_moves: bool
def update_state(
observation: utils.Observation,
prev_state: Optional[ObservationTransformState]
) -> ObservationTransformState:
"""Returns an updated state for alliance features."""
if prev_state is None:
last_phase_was_moves = False
last_board_state = None
previous_board_state = np.zeros(shape=utils.OBSERVATION_BOARD_SHAPE)
actions_since_previous_moves_phase = np.full((utils.NUM_AREAS, 3),
-1,
dtype=np.int32)
else:
(previous_board_state, last_board_state, actions_since_previous_moves_phase,
last_phase_was_moves) = prev_state
actions_since_previous_moves_phase = actions_since_previous_moves_phase.copy()
if last_phase_was_moves:
actions_since_previous_moves_phase[:] = -1
last_phase_was_moves = False
actions_since_previous_moves_phase[:] = np.roll(
actions_since_previous_moves_phase, axis=1, shift=-1)
actions_since_previous_moves_phase[:, -1] = -1
for action in observation.last_actions:
order_type, (province_id, coast), _, _ = action_utils.action_breakdown(
action)
if order_type == action_utils.WAIVE:
continue
elif order_type == action_utils.BUILD_ARMY:
area = utils.area_from_province_id_and_area_index(province_id, 0)
elif order_type == action_utils.BUILD_FLEET:
if utils.obs_index_start_and_num_areas(province_id)[1] == 3:
area = utils.area_from_province_id_and_area_index(
province_id, coast + 1)
else:
area = utils.area_from_province_id_and_area_index(province_id, 0)
else:
area = utils.area_id_for_unit_in_province_id(province_id,
last_board_state)
assert actions_since_previous_moves_phase[area, -1] == -1
actions_since_previous_moves_phase[area, -1] = action >> 48
if observation.season.is_moves():
previous_board_state = observation.board
# On the next season, update the alliance features.
last_phase_was_moves = True
return ObservationTransformState(previous_board_state,
observation.board,
actions_since_previous_moves_phase,
last_phase_was_moves)
class TopologicalIndexing(enum.Enum):
NONE = 0
MILA = 1
MILA_TOPOLOGICAL_ORDER = [
'YOR', 'EDI', 'LON', 'LVP', 'NTH', 'WAL', 'CLY', 'NWG', 'ECH', 'IRI', 'NAO',
'BEL', 'DEN', 'HEL', 'HOL', 'NWY', 'SKA', 'BAR', 'BRE', 'MAO', 'PIC', 'BUR',
'RUH', 'BAL', 'KIE', 'SWE', 'FIN', 'STP', 'STP/NC', 'GAS', 'PAR', 'NAF',
'POR', 'SPA', 'SPA/NC', 'SPA/SC', 'WES', 'MAR', 'MUN', 'BER', 'GOB', 'LVN',
'PRU', 'STP/SC', 'MOS', 'TUN', 'GOL', 'TYS', 'PIE', 'BOH', 'SIL', 'TYR',
'WAR', 'SEV', 'UKR', 'ION', 'TUS', 'NAP', 'ROM', 'VEN', 'GAL', 'VIE', 'TRI',
'ARM', 'BLA', 'RUM', 'ADR', 'AEG', 'ALB', 'APU', 'EAS', 'GRE', 'BUD', 'SER',
'ANK', 'SMY', 'SYR', 'BUL', 'BUL/EC', 'CON', 'BUL/SC']
mila_topological_index = province_order.topological_index(
province_order.get_mdf_content(province_order.MapMDF.BICOASTAL_MAP),
MILA_TOPOLOGICAL_ORDER)
class GeneralObservationTransformer:
"""A general observation transformer class.
Additional fields should default to False to avoid changing existing
configs. Additional arguments to the obs transform functions that support
optional fields must be keyword-only arguments.
"""
def __init__(
self,
*,
rng_key: Optional[jnp.ndarray],
board_state: bool = True,
last_moves_phase_board_state: bool = True,
actions_since_last_moves_phase: bool = True,
season: bool = True,
build_numbers: bool = True,
topological_indexing: TopologicalIndexing = TopologicalIndexing.NONE,
areas: bool = True,
last_action: bool = True,
legal_actions_mask: bool = True,
temperature: bool = True,
) -> None:
"""Constructor which configures the fields the transformer will return.
Each argument represents whether a particular field should be included in
the observation, except for topological indexing.
Args:
rng_key: A Jax random number generator key, for use if an observation
transformation is ever stochastic.
board_state: Flag for whether to include the current board state,
an array containing current unit positions, dislodged units, supply
centre ownership, and where units may be removed or built.
last_moves_phase_board_state: Flag for whether to include the board state
at the start of the last moves phase. If actions_since_last_moves is
True, this board state is necessary to give context to the actions.
actions_since_last_moves_phase: Flag for whether to include the actions
since the last moves phase. These are given by area, with 3 channels
(for moves, retreats and builds phases). If there was no action in the
area, then the field is a 0.
season: Flag for whether to include the current season in the observation.
There are five seasons, as listed in observation_utils.Season.
build_numbers: Flag for whether to include the number of builds/disbands
each player has. Always 0 except in a builds phase.
topological_indexing: When choosing unit actions in sequence, the order
they are chosen is determined by the order step_observations sort the
areas by. This config determines that ordering. NONE orders them
according to the area index in the observation, MILA uses the same
ordering as in Pacquette et al.
areas: Flag for whether to include a vector of length NUM_AREAS, which is
True in the area that the next unit-action will be chosen for.
last_action: Flag for whether to include the action chosen in the previous
unit-action selection in the input. This is used e.g. by teacher
forcing. When sampling from a network, it can use the sample it drew in
the previous step of the policy head.
legal_actions_mask: Flag for whether to include a mask of which actions
are legal. It will be based on the consecutive action indexes, and have
length constants.MAX_ACTION_INDEX.
temperature: Flag for whether to include a sampling temperature in the
neural network input.
"""
self._rng_key = rng_key
self.board_state = board_state
self.last_moves_phase_board_state = last_moves_phase_board_state
self.actions_since_last_moves_phase = actions_since_last_moves_phase
self.season = season
self.build_numbers = build_numbers
self.areas = areas
self.last_action = last_action
self.legal_actions_mask = legal_actions_mask
self.temperature = temperature
self._topological_indexing = topological_indexing
def initial_observation_spec(
self,
num_players: int
) -> Dict[str, specs.Array]:
"""Returns a spec for the output of initial_observation_transform."""
spec = collections.OrderedDict()
if self.board_state:
spec['board_state'] = specs.Array(
(utils.NUM_AREAS, utils.PROVINCE_VECTOR_LENGTH), dtype=np.float32)
if self.last_moves_phase_board_state:
spec['last_moves_phase_board_state'] = specs.Array(
(utils.NUM_AREAS, utils.PROVINCE_VECTOR_LENGTH), dtype=np.float32)
if self.actions_since_last_moves_phase:
spec['actions_since_last_moves_phase'] = specs.Array(
(utils.NUM_AREAS, 3), dtype=np.int32)
if self.season:
spec['season'] = specs.Array((), dtype=np.int32)
if self.build_numbers:
spec['build_numbers'] = specs.Array((num_players,), dtype=np.int32)
return spec
def initial_observation_transform(
self,
observation: utils.Observation,
prev_state: Optional[ObservationTransformState]
) -> Tuple[Dict[str, jnp.ndarray], ObservationTransformState]:
"""Constructs initial Network observations and state.
See initial_observation_spec for array sizes, and the README for details on
how to construct each field.
Please implement your observation_test to check that these are constructed
properly.
Args:
observation: Parsed observation from environment
prev_state: previous ObservationTransformState
Returns:
initial observations and inital state.
"""
next_state = update_state(observation, prev_state)
initial_observation = collections.OrderedDict()
if self.board_state:
initial_observation['board_state'] = np.array(observation.board,
dtype=np.float32)
if self.last_moves_phase_board_state:
initial_observation['last_moves_phase_board_state'] = np.array(
prev_state.previous_board_state if prev_state else
observation.board, dtype=np.float32)
if self.actions_since_last_moves_phase:
initial_observation['actions_since_last_moves_phase'] = np.cast[np.int32](
next_state.actions_since_previous_moves_phase)
if self.season:
initial_observation['season'] = np.cast[np.int32](
observation.season.value)
if self.build_numbers:
initial_observation['build_numbers'] = np.array(
observation.build_numbers, dtype=np.int32)
return initial_observation, next_state
def step_observation_spec(
self
) -> Dict[str, specs.Array]:
"""Returns a spec for the output of step_observation_transform."""
spec = collections.OrderedDict()
if self.areas:
spec['areas'] = specs.Array(shape=(utils.NUM_AREAS,), dtype=bool)
if self.last_action:
spec['last_action'] = specs.Array(shape=(), dtype=np.int32)
if self.legal_actions_mask:
spec['legal_actions_mask'] = specs.Array(
shape=(action_utils.MAX_ACTION_INDEX,), dtype=np.uint8)
if self.temperature:
spec['temperature'] = specs.Array(shape=(1,), dtype=np.float32)
return spec
def step_observation_transform(
self,
transformed_initial_observation: Dict[str, jnp.ndarray],
legal_actions: Sequence[jnp.ndarray],
slot: int,
last_action: int,
area: int,
step_count: int,
previous_area: Optional[int],
temperature: float
) -> Dict[str, jnp.ndarray]:
"""Converts raw step obs. from the diplomacy env. to network inputs.
See step_observation_spec for array sizes, and the README for details on
how to construct each field.
Please implement your observation_test to check that these are constructed
properly.
Args:
transformed_initial_observation: Initial observation made with same config
legal_actions: legal actions for all players this turn
slot: the slot/player_id we are creating the obs for
last_action: the player's last action (used for teacher forcing)
area: the area to create an action for
step_count: how many unit actions have been created so far
previous_area: the area for the previous unit action
temperature: the sampling temperature for unit actions
Returns:
The step observation.
"""
del previous_area # Unused
# Areas to sum over.
areas = np.zeros(shape=(utils.NUM_AREAS,), dtype=bool)
if area == utils.INVALID_AREA_FLAG:
raise NotImplementedError('network requires area ordering to be '
'specified')
if area == utils.BUILD_PHASE_AREA_FLAG:
build_numbers = transformed_initial_observation['build_numbers']
board = transformed_initial_observation['board_state']
legal_actions_list = legal_actions[slot]
if build_numbers[slot] > 0:
player_areas = utils.build_areas(slot, board)
else:
player_areas = utils.removable_areas(slot, board)
areas[player_areas] = True
else:
province, _ = utils.province_id_and_area_index(area)
legal_actions_list = action_utils.actions_for_province(
legal_actions[slot], province)
areas[area] = True
if not legal_actions_list:
raise ValueError('No legal actions found for area {}'.format(area))
legal_actions_mask = np.full(action_utils.MAX_ACTION_INDEX, False)
legal_actions_mask[action_utils.action_index(
np.array(legal_actions_list))] = True
step_obs = collections.OrderedDict()
if self.areas:
step_obs['areas'] = areas
if self.last_action:
step_obs['last_action'] = np.array(
action_utils.shrink_actions(last_action if step_count else -1),
dtype=np.int32)
if self.legal_actions_mask:
step_obs['legal_actions_mask'] = legal_actions_mask
if self.temperature:
step_obs['temperature'] = np.array([temperature], dtype=np.float32)
return step_obs
def observation_spec(
self,
num_players: int
) -> Tuple[Dict[str, specs.Array], Dict[str, specs.Array], specs.Array]:
"""Returns a spec for the output of observation_transform."""
return (
self.initial_observation_spec(num_players), # Initial
tree.map_structure(
lambda x: x.replace( # pylint: disable=g-long-lambda
shape=(num_players, action_utils.MAX_ORDERS) + x.shape),
self.step_observation_spec()), # Step Observations
specs.Array((num_players,), dtype=np.int32)) # Sequence Lengths
def zero_observation(self, num_players):
return tree.map_structure(lambda spec: spec.generate_value(),
self.observation_spec(num_players))
def observation_transform(
self,
*,
observation: utils.Observation,
legal_actions: Sequence[np.ndarray],
slots_list: Sequence[int],
prev_state: Any,
temperature: float,
area_lists: Optional[Sequence[Sequence[int]]] = None,
forced_actions: Optional[Sequence[Sequence[int]]] = None,
) -> Tuple[Tuple[Dict[str, jnp.ndarray],
Dict[str, jnp.ndarray], Sequence[int]],
ObservationTransformState]:
"""Transform the observation into the format required by Network policies.
Args:
observation: Observation from environment
legal_actions: legal actions for all players this turn
slots_list: the slots/player_ids we are creating obs for
prev_state: previous ObservationTransformState
temperature: the sampling temperature for unit actions
area_lists: Order to process areas in. None for a default ordering.
forced_actions: actions from teacher forcing. None when sampling.
Returns:
(initial_observation, stacked_step_observations,
step_observation_sequence_lengths), next_obs_transform_state
"""
if area_lists is None:
area_lists = []
for player in slots_list:
topo_index = self._topological_index()
area_lists.append(
utils.order_relevant_areas(observation, player, topo_index))
initial_observation, next_state = self.initial_observation_transform(
observation, prev_state)
num_players = len(legal_actions)
sequence_lengths = np.zeros(shape=(num_players,), dtype=np.int32)
zero_step_obs = tree.map_structure(
specs.Array.generate_value,
self.step_observation_spec()
)
step_observations = [[zero_step_obs] * action_utils.MAX_ORDERS
for _ in range(num_players)]
if len(slots_list) != len(area_lists):
raise ValueError('area_lists and slots_list different lengths')
for player, area_list in zip(
slots_list, area_lists):
sequence_lengths[player] = len(area_list)
previous_area = utils.INVALID_AREA_FLAG # No last action on 1st iteration
for i, area in enumerate(area_list):
last_action = 0
if forced_actions is not None and i > 0:
# Find the right last action, in case the forced actions are not in
# the order this network produces actions.
if area in (utils.INVALID_AREA_FLAG, utils.BUILD_PHASE_AREA_FLAG):
last_action = forced_actions[player][i - 1]
else:
# Find the action with the right area.
last_action = action_utils.find_action_with_area(
forced_actions[player], previous_area)
step_observations[player][i] = self.step_observation_transform(
initial_observation, legal_actions, player, last_action, area, i,
previous_area, temperature)
previous_area = area
stacked_step_obs_per_player = []
for player in range(num_players):
stacked_step_obs_per_player.append(
tree_utils.tree_stack(step_observations[player]))
stacked_step_obs = tree_utils.tree_stack(stacked_step_obs_per_player)
return (initial_observation, stacked_step_obs, sequence_lengths), next_state
def _topological_index(self):
"""Returns the order in which to produce orders from different areas.
If None, the order in the observation will be used.
Returns:
A list of areas
Raises:
RuntimeError: on hitting unexpected branch
"""
if self._topological_indexing == TopologicalIndexing.NONE:
return None
elif self._topological_indexing == TopologicalIndexing.MILA:
return mila_topological_index
else:
raise RuntimeError('Unexpected Branch')
|
diplomacy-main
|
environment/observation_transformation.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""DiplomacyState protocol."""
from typing import Sequence
import numpy as np
import typing_extensions
from diplomacy.environment import observation_utils as utils
class DiplomacyState(typing_extensions.Protocol):
"""Diplomacy State protocol."""
def is_terminal(self) -> bool:
"""Whether the game has ended."""
pass
def observation(self) -> utils.Observation:
"""Returns the current observation."""
pass
def legal_actions(self) -> Sequence[Sequence[int]]:
"""A list of lists of legal unit actions.
There are 7 sub-lists, one for each power, sorted alphabetically (Austria,
England, France, Germany, Italy, Russia, Turkey).
The sub-list has every unit action possible in the given position, for all
of that power's units.
"""
pass
def returns(self) -> np.ndarray:
"""The returns of the game. All 0s if the game is in progress."""
pass
def step(self, actions_per_player: Sequence[Sequence[int]]) -> None:
"""Steps the environment forward a full phase of Diplomacy.
Args:
actions_per_player: A list of lists of unit-actions. There are 7
sub-lists, one per power, sorted alphabetically (Austria, England,
France, Germany, Italy, Russia, Turkey), each sublist is all of the
corresponding player's unit-actions for that phase.
"""
pass
|
diplomacy-main
|
environment/diplomacy_state.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Utilities for parsing actions and observations produced by the environment."""
import collections
import enum
from typing import Optional, Sequence, Tuple
import numpy as np
# Indices of bits representing global state.
NUM_POWERS = 7
# Max number of units that might need an order in total, across all players.
MAX_ACTIONS = 34
# Bits representing interesting things in per-province state vectors
OBSERVATION_UNIT_ARMY = 0
OBSERVATION_UNIT_FLEET = 1
OBSERVATION_UNIT_ABSENT = 2
OBSERVATION_UNIT_POWER_START = 3
OBSERVATION_BUILDABLE = 11
OBSERVATION_REMOVABLE = 12
OBSERVATION_DISLODGED_ARMY = 13
OBSERVATION_DISLODGED_FLEET = 14
OBSERVATION_DISLODGED_START = 16
OBSERVATION_SC_POWER_START = 27
PROVINCE_VECTOR_LENGTH = 35
# Areas information. The observation has NUM_AREAS area vectors:
# - First, a vector for each of the SINGLE_COASTED_PROVINCES provinces.
# - Then, three vectors for each of the BICOASTAL_PROVINCES. The first one is
# the land area, and the other two are the coasts.
SINGLE_COASTED_PROVINCES = 72
BICOASTAL_PROVINCES = 3
NUM_AREAS = SINGLE_COASTED_PROVINCES + 3 * BICOASTAL_PROVINCES
NUM_PROVINCES = SINGLE_COASTED_PROVINCES + BICOASTAL_PROVINCES
NUM_SUPPLY_CENTERS = 34
OBSERVATION_BOARD_SHAPE = [NUM_AREAS, PROVINCE_VECTOR_LENGTH]
# Agents may want a list of areas that they can take actions in. This
# doesn't make sense in the builds phase, so we use the value -2 to indicate
# that, and will use lists like [BUILD_PHASE_AREA]*num_builds as 'area lists'
BUILD_PHASE_AREA_FLAG = -2
INVALID_AREA_FLAG = -1
# Main areas_ids of bicoastal provinces
BICOASTAL_PROVINCES_MAIN_AREAS = [72, 75, 78]
ProvinceID = int # in [0, 1, ...74]
AreaID = int # in [0, 1, ...80]
# AreaIndex is 0 for the "land" area of bicoastal provinces and for any province
# that has either 0 or 1 coasts. AreaIndex is 1 for the first coast and 2 for
# the second coast of bicoastal provinces.
AreaIndex = int # in [0, 1, 2]
# CoastFlag is 0 for the first and 1 for the second coast of bicoastal
# provinces. CoastFlag is 0 for all provinces that have 0 or 1 coast.
CoastFlag = int # in [0, 1]
ProvinceWithFlag = Tuple[ProvinceID, CoastFlag]
class Season(enum.Enum):
"""Diplomacy season."""
SPRING_MOVES = 0
SPRING_RETREATS = 1
AUTUMN_MOVES = 2
AUTUMN_RETREATS = 3
BUILDS = 4
def is_moves(self):
return self == Season.SPRING_MOVES or self == Season.AUTUMN_MOVES
def is_retreats(self):
return self == Season.SPRING_RETREATS or self == Season.AUTUMN_RETREATS
def is_builds(self):
return self == Season.BUILDS
NUM_SEASONS = len(Season)
class UnitType(enum.Enum):
ARMY = 0
FLEET = 1
Observation = collections.namedtuple(
'Observation', ['season', 'board', 'build_numbers', 'last_actions'])
class ProvinceType(enum.Enum):
LAND = 0
SEA = 1
COASTAL = 2
BICOASTAL = 3
def province_type_from_id(province_id: ProvinceID) -> ProvinceType:
"""Returns the ProvinceType for the province."""
if province_id < 14:
return ProvinceType.LAND
elif province_id < 33:
return ProvinceType.SEA
elif province_id < 72:
return ProvinceType.COASTAL
elif province_id < 75:
return ProvinceType.BICOASTAL
else:
raise ValueError('Invalid ProvinceID (too large)')
def province_id_and_area_index(area: AreaID) -> Tuple[ProvinceID, AreaIndex]:
"""Returns the province_id and the area index within the province.
Args:
area: the ID of the area in the observation vector, an integer from 0 to 80
Returns:
province_id: This is between 0 and
SINGLE_COASTED_PROVINCES + BICOASTAL_PROVINCES - 1, and corresponds to the
representation of this area used in orders.
area_index: this is 0 for the main area of a province, and 1 or 2 for a
coast in a bicoastal province.
"""
if area < SINGLE_COASTED_PROVINCES:
return area, 0
province_id = (
SINGLE_COASTED_PROVINCES + (area - SINGLE_COASTED_PROVINCES) // 3)
area_index = (area - SINGLE_COASTED_PROVINCES) % 3
return province_id, area_index
_prov_and_area_id_to_area = {province_id_and_area_index(area): area
for area in range(NUM_AREAS)}
def area_from_province_id_and_area_index(province_id: ProvinceID,
area_index: AreaIndex) -> AreaID:
"""The inverse of province_id_and_area_index.
Args:
province_id: This is between 0 and
SINGLE_COASTED_PROVINCES + BICOASTAL_PROVINCES - 1, and corresponds to the
representation of this area used in orders.
area_index: this is 0 for the main area of a province, and 1 or 2 for a
coast in a bicoastal province.
Returns:
area: the id of the area in the observation vector
Raises:
KeyError: If the province_id and area_index are invalid
"""
return _prov_and_area_id_to_area[(province_id, area_index)]
def area_index_for_fleet(
province_tuple: ProvinceWithFlag) -> AreaIndex:
if province_type_from_id(province_tuple[0]) == ProvinceType.BICOASTAL:
return province_tuple[1] + 1
else:
return 0
def obs_index_start_and_num_areas(
province_id: ProvinceID) -> Tuple[AreaID, int]:
"""Returns the area_id of the province's main area, and the number of areas.
Args:
province_id: the id of the province.
"""
if province_id < SINGLE_COASTED_PROVINCES:
return province_id, 1
area_start = (
SINGLE_COASTED_PROVINCES + (province_id - SINGLE_COASTED_PROVINCES) * 3)
return area_start, 3
def moves_phase_areas(country_index: int, board_state: np.ndarray,
retreats: bool) -> Sequence[AreaID]:
"""Returns the areas with country_index's units active for this phase."""
offset = (OBSERVATION_DISLODGED_START if retreats else
OBSERVATION_UNIT_POWER_START)
our_areas = np.where(board_state[:, country_index + offset])[0]
filtered_areas = []
provinces = set()
for area in our_areas:
province_id, area_index = province_id_and_area_index(area)
if retreats:
u_type = dislodged_unit_type(province_id, board_state)
else:
u_type = unit_type(province_id, board_state)
# This area is valid, unless the unit is a fleet, this is the first area of
# its province, and the province is bicoastal.
if (u_type == UnitType.FLEET and
area_index == 0 and
obs_index_start_and_num_areas(province_id)[1] > 1):
continue
filtered_areas.append(area)
if province_id in provinces:
raise ValueError('Duplicate province in move phase areas')
provinces.add(province_id)
return sorted(list(filtered_areas))
def order_relevant_areas(observation: Observation, player: int,
topological_index=None) -> Sequence[AreaID]:
"""Areas with moves sorted according to topological_index."""
season = observation.season
if season.is_moves():
areas = moves_phase_areas(player, observation.board, False)
elif season.is_retreats():
areas = moves_phase_areas(player, observation.board, True)
else:
areas = [BUILD_PHASE_AREA_FLAG] * abs(
observation.build_numbers[player])
return areas
provinces_to_areas = dict()
for area in areas:
province, _ = province_id_and_area_index(area)
if (province not in provinces_to_areas or
area > provinces_to_areas[province]): # This selects coasts over land
provinces_to_areas[province] = area
areas_without_repeats = list(provinces_to_areas.values())
if topological_index:
areas_without_repeats.sort(key=topological_index.index)
return areas_without_repeats
def unit_type(province_id: ProvinceID,
board_state: np.ndarray) -> Optional[UnitType]:
"""Returns the unit type in the province."""
main_area, _ = obs_index_start_and_num_areas(province_id)
return unit_type_from_area(main_area, board_state)
def unit_type_from_area(area_id: AreaID,
board_state: np.ndarray) -> Optional[UnitType]:
if board_state[area_id, OBSERVATION_UNIT_ARMY] > 0:
return UnitType(UnitType.ARMY)
elif board_state[area_id, OBSERVATION_UNIT_FLEET] > 0:
return UnitType(UnitType.FLEET)
return None
def dislodged_unit_type(province_id: ProvinceID,
board_state: np.ndarray) -> Optional[UnitType]:
"""Returns the type of any dislodged unit in the province."""
main_area, _ = obs_index_start_and_num_areas(province_id)
return dislodged_unit_type_from_area(main_area, board_state)
def dislodged_unit_type_from_area(
area_id: AreaID, board_state: np.ndarray) -> Optional[UnitType]:
"""Returns the type of any dislodged unit in the province."""
if board_state[area_id, OBSERVATION_DISLODGED_ARMY] > 0:
return UnitType(UnitType.ARMY)
elif board_state[area_id, OBSERVATION_DISLODGED_FLEET] > 0:
return UnitType(UnitType.FLEET)
return None
def unit_power(province_id: ProvinceID,
board_state: np.ndarray) -> Optional[int]:
"""Returns which power controls the unit province (None if no unit there)."""
main_area, _ = obs_index_start_and_num_areas(province_id)
return unit_power_from_area(main_area, board_state)
def unit_power_from_area(area_id: AreaID,
board_state: np.ndarray) -> Optional[int]:
if unit_type_from_area(area_id, board_state) is None:
return None
for power_id in range(NUM_POWERS):
if board_state[area_id, OBSERVATION_UNIT_POWER_START + power_id]:
return power_id
raise ValueError('Expected a unit there, but none of the powers indicated')
def dislodged_unit_power(province_id: ProvinceID,
board_state: np.ndarray) -> Optional[int]:
"""Returns which power controls the unit province (None if no unit there)."""
main_area, _ = obs_index_start_and_num_areas(province_id)
return dislodged_unit_power_from_area(main_area, board_state)
def dislodged_unit_power_from_area(area_id: AreaID,
board_state: np.ndarray) -> Optional[int]:
if unit_type_from_area(area_id, board_state) is None:
return None
for power_id in range(NUM_POWERS):
if board_state[area_id, OBSERVATION_DISLODGED_START + power_id]:
return power_id
raise ValueError('Expected a unit there, but none of the powers indicated')
def build_areas(country_index: int,
board_state: np.ndarray) -> Sequence[AreaID]:
"""Returns all areas where it is legal for a power to build.
Args:
country_index: The power to get provinces for.
board_state: Board from observation.
"""
return np.where(
np.logical_and(
board_state[:, country_index + OBSERVATION_SC_POWER_START] > 0,
board_state[:, OBSERVATION_BUILDABLE] > 0))[0]
def build_provinces(country_index: int,
board_state: np.ndarray) -> Sequence[ProvinceID]:
"""Returns all provinces where it is legal for a power to build.
This returns province IDs, not area numbers.
Args:
country_index: The power to get provinces for.
board_state: Board from observation.
"""
buildable_provinces = []
for a in build_areas(country_index, board_state):
province_id, area_index = province_id_and_area_index(a)
if area_index != 0:
# We get only the main province.
continue
buildable_provinces.append(province_id)
return buildable_provinces
def sc_provinces(country_index: int,
board_state: np.ndarray) -> Sequence[ProvinceID]:
"""Returns all supply centres the power owns.
This returns province IDs, not area IDs.
Args:
country_index: The power to get provinces for.
board_state: Board from observation.
"""
sc_areas = np.where(
board_state[:, country_index + OBSERVATION_SC_POWER_START] > 0)[0]
provinces = []
for a in sc_areas:
province_id, area_index = province_id_and_area_index(a)
if area_index != 0:
# We get only the main province.
continue
provinces.append(province_id)
return provinces
def removable_areas(country_index: int,
board_state: np.ndarray) -> Sequence[AreaID]:
"""Get all areas where it is legal for a power to remove."""
return np.where(
np.logical_and(
board_state[:, country_index + OBSERVATION_UNIT_POWER_START] > 0,
board_state[:, OBSERVATION_REMOVABLE] > 0))[0]
def removable_provinces(country_index: int,
board_state: np.ndarray) -> Sequence[ProvinceID]:
"""Get all provinces where it is legal for a power to remove."""
remove_provinces = []
for a in removable_areas(country_index, board_state):
province_id, area_index = province_id_and_area_index(a)
if area_index != 0:
# We get only the main province.
continue
remove_provinces.append(province_id)
return remove_provinces
def area_id_for_unit_in_province_id(province_id: ProvinceID,
board_state: np.ndarray) -> AreaID:
"""AreaID from [0..80] of the unit in board_state."""
if unit_type(province_id, board_state) is None:
raise ValueError('No unit in province {}'.format(province_id))
if (obs_index_start_and_num_areas(province_id)[1] == 3 and
unit_type(province_id, board_state) == UnitType.FLEET):
first_coast = area_from_province_id_and_area_index(province_id, 1)
if unit_type_from_area(first_coast, board_state) is not None:
return area_from_province_id_and_area_index(province_id, 1)
else:
return area_from_province_id_and_area_index(province_id, 2)
else:
return area_from_province_id_and_area_index(province_id, 0)
|
diplomacy-main
|
environment/observation_utils.py
|
# Copyright 2021 DeepMind Technologies Limited.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Utilities for converting to the action format used by Pacquette et al."""
import collections
from typing import List, Set, Union
import immutabledict
from diplomacy.environment import action_list
from diplomacy.environment import action_utils
from diplomacy.environment import observation_utils as utils
from diplomacy.environment import province_order
_tag_to_area_id = immutabledict.immutabledict(
province_order.province_name_to_id(province_order.MapMDF.BICOASTAL_MAP))
_area_id_to_tag = immutabledict.immutabledict(
{v: k for k, v in _tag_to_area_id.items()})
_fleet_adjacency = immutabledict.immutabledict(
{a: tuple(b) for a, b in province_order.fleet_adjacency_map().items()})
# Some province names are different for MILA action strings:
_DM_TO_MILA_TAG_MAP = immutabledict.immutabledict(
dict(ECH='ENG', GOB='BOT', GOL='LYO'))
def mila_area_string(unit_type: utils.UnitType,
province_tuple: utils.ProvinceWithFlag) -> str:
"""Gives the string MILA actions use to represent the area.
If the Unit type is fleet and the province is bicoastal, then the coast flag
will be used to determine which coast, and the returned string will be e.g.
STP/NC or STP/SC. If the main area is wanted, use UnitType.ARMY.
Args:
unit_type: What type of unit is in the province, used to determine coast
province_tuple: the province and coast flag describing the area
Returns:
The string used in the MILA action format to describe the area.
"""
province_id = province_tuple[0]
if unit_type == unit_type.FLEET:
area_index = utils.area_index_for_fleet(province_tuple)
else:
area_index = 0
area_id = utils.area_from_province_id_and_area_index(province_id, area_index)
province_tag = _area_id_to_tag[area_id]
return _DM_TO_MILA_TAG_MAP.get(province_tag, province_tag)
def mila_unit_string(unit_type: utils.UnitType,
province_tuple: utils.ProvinceWithFlag) -> str:
return ['A %s', 'F %s'][unit_type.value] % mila_area_string(
unit_type, province_tuple)
def possible_unit_types(
province_tuple: utils.ProvinceWithFlag) -> Set[utils.UnitType]:
"""The unit types can occupy this province."""
if province_tuple[1] > 0:
# Must be fleet in Bicoastal province
return {utils.UnitType.FLEET}
province_type = utils.province_type_from_id(province_tuple[0])
if province_type == utils.ProvinceType.LAND:
return {utils.UnitType.ARMY}
elif province_type == utils.ProvinceType.SEA:
return {utils.UnitType.FLEET}
else:
return {utils.UnitType.ARMY, utils.UnitType.FLEET}
def possible_unit_types_movement(
start_province_tuple: utils.ProvinceWithFlag,
dest_province_tuple: utils.ProvinceWithFlag) -> Set[utils.UnitType]:
"""Returns what unit types can move from the start to the destination.
Args:
start_province_tuple: the province the unit starts in.
dest_province_tuple: the province the unit moves to.
Returns:
Set of unit types that could make this move.
"""
possible_types = set()
if utils.UnitType.ARMY in possible_unit_types(
start_province_tuple) & possible_unit_types(dest_province_tuple):
possible_types.add(utils.UnitType.ARMY)
# Check if a fleet can actually make the journey.
start_area_id = utils.area_from_province_id_and_area_index(
start_province_tuple[0], utils.area_index_for_fleet(start_province_tuple))
dest_area_id = utils.area_from_province_id_and_area_index(
dest_province_tuple[0], utils.area_index_for_fleet(dest_province_tuple))
if dest_area_id in _fleet_adjacency[start_area_id]:
possible_types.add(utils.UnitType.FLEET)
return possible_types
def possible_unit_types_support(
start_province_tuple: utils.ProvinceWithFlag,
dest_province_tuple: utils.ProvinceWithFlag) -> Set[utils.UnitType]:
"""Returns what unit types can support the destination from the start area.
Args:
start_province_tuple: the province the unit starts in.
dest_province_tuple: the province the support is offered to.
Returns:
Set of unit types that could make this support.
"""
possible_types = set()
if utils.UnitType.ARMY in possible_unit_types(
start_province_tuple) & possible_unit_types((dest_province_tuple[0], 0)):
possible_types.add(utils.UnitType.ARMY)
# Check if a fleet can actually reach the province (on either coast if
# bicoastal).
start_area_id = utils.area_from_province_id_and_area_index(
start_province_tuple[0], utils.area_index_for_fleet(start_province_tuple))
for area_index in [1, 2] if utils.province_type_from_id(
dest_province_tuple[0]) == utils.ProvinceType.BICOASTAL else [0]:
dest_area_id = utils.area_from_province_id_and_area_index(
dest_province_tuple[0], area_index)
if dest_area_id in _fleet_adjacency[start_area_id]:
possible_types.add(utils.UnitType.FLEET)
return possible_types
def action_to_mila_actions(
action: Union[action_utils.Action,
action_utils.ActionNoIndex],) -> List[str]:
"""Returns all Mila action strings an action can correspond to.
Note that MILA's action list did not include all convoy related actions, as
it omitted those which were either irrelevant, or corresponded to very long
convoys. We did not apply this filtering, and if such an action is provided,
then the function, actions will be returned in the same format as MILA
actions, but that do not appear in the action_list.MILA_ACTIONS_LIST
Args:
action: The action to write down
Returns:
Action in the MILA notation.
"""
order, p1, p2, p3 = action_utils.action_breakdown(action)
mila_action_strings = set()
# DeepMind action space does not specify the coast of the unit acting or being
# supported, unless the action is build. In order to correctly construct all
# possible actions, we will add the maybe missing area_flag=1 versions of
# actions when the province is bicoastal.
# Because the bicoastal provinces are far apart, only one of p1, p2 or p3 can
# be a bicoastal province, so we only ever need to change a single province
# flag.
possible_orders_incl_flags = [(order, p1, p2, p3)]
if order not in {action_utils.BUILD_ARMY, action_utils.BUILD_FLEET}:
if utils.province_type_from_id(p1[0]) == utils.ProvinceType.BICOASTAL:
possible_orders_incl_flags.append((order, (p1[0], 1), p2, p3))
if order == action_utils.SUPPORT_HOLD:
if utils.province_type_from_id(p2[0]) == utils.ProvinceType.BICOASTAL:
possible_orders_incl_flags.append((order, p1, (p2[0], 1), p3))
if order == action_utils.SUPPORT_MOVE_TO:
if utils.province_type_from_id(p3[0]) == utils.ProvinceType.BICOASTAL:
possible_orders_incl_flags.append((order, p1, p2, (p3[0], 1)))
for order, p1, p2, p3 in possible_orders_incl_flags:
if order == action_utils.HOLD:
for unit_type in possible_unit_types(p1):
unit_string = mila_unit_string(unit_type, p1)
mila_action_strings.add(f'{unit_string} H')
elif order == action_utils.CONVOY:
mila_action_strings.add(
f'{mila_unit_string(utils.UnitType.FLEET, p1)} C '
f'{mila_unit_string(utils.UnitType.ARMY, p3)} - '
f'{mila_area_string(utils.UnitType.ARMY, p2)}')
elif order == action_utils.CONVOY_TO:
mila_action_strings.add(
f'{mila_unit_string(utils.UnitType.ARMY, p1)} - '
f'{mila_area_string(utils.UnitType.ARMY, p2)} VIA')
elif order == action_utils.MOVE_TO:
for unit_type in possible_unit_types_movement(p1, p2):
mila_action_strings.add(
f'{mila_unit_string(unit_type, p1)} - '
f'{mila_area_string(unit_type, p2)}'
)
elif order == action_utils.SUPPORT_HOLD:
for acting_unit_type in possible_unit_types_support(p1, p2):
for supported_unit_type in possible_unit_types(p2):
mila_action_strings.add(
f'{mila_unit_string(acting_unit_type, p1)} S '
f'{mila_unit_string(supported_unit_type, p2)}'
)
elif order == action_utils.SUPPORT_MOVE_TO:
for acting_unit_type in possible_unit_types_support(p1, p2):
# The area flag is not specified in the destination of a support, so we
# should test if p3 -> p2 is possible for any area of p2, not just the
# area index given by the action
for supported_unit_type in possible_unit_types_support(p3, p2):
# Don't specify destination coast in a support move
mila_action_strings.add(
f'{mila_unit_string(acting_unit_type, p1)} S '
f'{mila_unit_string(supported_unit_type, p3)} - '
f'{mila_area_string(utils.UnitType.ARMY, p2)}'
)
elif order == action_utils.RETREAT_TO:
for unit_type in possible_unit_types_movement(p1, p2):
mila_action_strings.add(
f'{mila_unit_string(unit_type, p1)} R '
f'{mila_area_string(unit_type, p2)}'
)
elif order == action_utils.DISBAND:
for unit_type in possible_unit_types(p1):
mila_action_strings.add(f'{mila_unit_string(unit_type, p1)} D')
elif order == action_utils.BUILD_ARMY:
mila_action_strings.add(
f'{mila_unit_string(utils.UnitType.ARMY, p1)} B')
elif order == action_utils.BUILD_FLEET:
mila_action_strings.add(
f'{mila_unit_string(utils.UnitType.FLEET, p1)} B')
elif order == action_utils.REMOVE:
for unit_type in possible_unit_types(p1):
mila_action_strings.add(f'{mila_unit_string(unit_type, p1)} D')
elif order == action_utils.WAIVE:
mila_action_strings.add('WAIVE')
else:
raise ValueError('Unrecognised order %s ' % order)
return list(mila_action_strings)
# Build Inverse Mapping
_mila_action_to_deepmind_actions = collections.defaultdict(set)
for _action in action_list.POSSIBLE_ACTIONS:
_mila_action_list = action_to_mila_actions(_action)
for _mila_action in _mila_action_list:
_mila_action_to_deepmind_actions[_mila_action].add(_action)
_mila_action_to_deepmind_actions = immutabledict.immutabledict(
{k: frozenset(v) for k, v in _mila_action_to_deepmind_actions.items()})
def mila_action_to_possible_actions(
mila_action: str) -> List[action_utils.Action]:
"""Converts a MILA action string to all deepmind actions it could refer to."""
if mila_action not in _mila_action_to_deepmind_actions:
raise ValueError('Unrecognised MILA action %s' % mila_action)
else:
return list(_mila_action_to_deepmind_actions[mila_action])
def mila_action_to_action(mila_action: str,
season: utils.Season) -> action_utils.Action:
"""Converts mila action and its phase to the deepmind action."""
mila_actions = mila_action_to_possible_actions(mila_action)
if len(mila_actions) == 1:
return mila_actions[0]
else:
order, _, _, _ = action_utils.action_breakdown(mila_actions[0])
if order == action_utils.REMOVE:
if season.is_retreats():
return mila_actions[1]
else:
return mila_actions[0]
elif order == action_utils.DISBAND:
if season.is_retreats():
return mila_actions[0]
else:
return mila_actions[1]
else:
assert False, 'Unexpected: only Disband/Remove ambiguous in MILA actions.'
|
diplomacy-main
|
environment/mila_actions.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Utilities for parsing actions and observations produced by the environment."""
from typing import Sequence, Tuple, Union
import numpy as np
from diplomacy.environment import action_list
from diplomacy.environment import observation_utils as utils
# Actions are represented using 64 bit integers. In particular bits 0-31 contain
# the action order, represented using the following format:
# ORDER|ORDERED PROVINCE|TARGET PROVINCE|THIRD PROVINCE, (each of these takes up
# to 8 bits). Bits 32-47 are always 0. Bits 48-63 are used to record the index
# of each action into POSSIBLE_ACTIONS (see action_list.py).
# A detailed explanation of this format is provided in the README file.
# Order is in bits 0 to 7.
ACTION_ORDER_START = 0
ACTION_ORDER_BITS = 8
ACTION_PROVINCE_BITS = 7
# Ordered unit's province is in bits 9 to 15.
ACTION_ORDERED_PROVINCE_START = 9
# Ordered unit's province coast is in bit 8.
ACTION_ORDERED_PROVINCE_COAST = 8
# Target (for support hold, support move, move, convoy) is in bits 17 to 23
ACTION_TARGET_PROVINCE_START = 17
# Target coast is in bit 16.
ACTION_TARGET_PROVINCE_COAST = 16
# Third province (for support move, convoys) is in bits 25 to 31
# For a support move PAR S MAR-BUR, BUR is the target and MAR is the third.
# For a convoy ENG C LON-BRE, BRE is the target and LON is the third.
ACTION_THIRD_PROVINCE_START = 25
# Third province coast is in bit 24.
ACTION_THIRD_PROVINCE_COAST = 24
# Bits 0-31 contain the order representation. Bits 32-47 are always 0,
# bits 48-63 contain the action index into POSSIBLE_ACTIONS.
ACTION_INDEX_START = 48
# Order Type Codes
CONVOY_TO = 1
CONVOY = 2
HOLD = 3
MOVE_TO = 4
SUPPORT_HOLD = 5
SUPPORT_MOVE_TO = 6
DISBAND = 8
RETREAT_TO = 9
BUILD_ARMY = 10
BUILD_FLEET = 11
REMOVE = 12
WAIVE = 13
# Useful Constants.
# Actions in action_list.py
POSSIBLE_ACTIONS = action_list.POSSIBLE_ACTIONS
# Number of possible actions in action_list.py.
MAX_ACTION_INDEX = len(POSSIBLE_ACTIONS)
# Maximum number of orders for a single player.
MAX_ORDERS = 17
# The maximum number of legal actions for a single unit. This is approximate,
# but the board configurations required to produce it are extremely contrived.
MAX_UNIT_LEGAL_ACTIONS = 700
# The maximum number of legal actions for a single order. This is a conservative
# bound, given MAX_UNIT_LEGAL_ACTIONS.
MAX_LEGAL_ACTIONS = MAX_UNIT_LEGAL_ACTIONS * MAX_ORDERS
# Typing:
Order = int # One of the Order Type Codes above
Action = int # One of action_list.POSSIBLE_ACTIONS
ActionNoIndex = int # A 32 bit version of the action, without the index.
def bits_between(number: int, start: int, end: int):
"""Returns bits between positions start and end from number."""
return number % (1 << end) // (1 << start)
def actions_for_province(legal_actions: Sequence[Action],
province: utils.ProvinceID) -> Sequence[Action]:
"""Returns all actions in legal_actions with main unit in province."""
actions = []
for action in legal_actions:
action_province = ordered_province(action)
if action and action_province == province:
actions.append(action)
return actions
def construct_action(
order: Order,
ordering_province: utils.ProvinceWithFlag,
target_province: utils.ProvinceWithFlag,
third_province: utils.ProvinceWithFlag) -> ActionNoIndex:
"""Construct the action for this order, without the action index."""
order_rep = 0
order_rep |= order << ACTION_ORDER_START
if ordering_province is not None:
order_rep |= ordering_province[0] << ACTION_ORDERED_PROVINCE_START
if order == BUILD_FLEET:
order_rep |= ordering_province[1] << ACTION_ORDERED_PROVINCE_COAST
if target_province is not None:
order_rep |= target_province[0] << ACTION_TARGET_PROVINCE_START
if order == MOVE_TO or order == RETREAT_TO:
# For moves and retreats, we need to specify the coast.
order_rep |= target_province[1] << ACTION_TARGET_PROVINCE_COAST
if third_province is not None:
order_rep |= third_province[0] << ACTION_THIRD_PROVINCE_START
return order_rep
def action_breakdown(action: Union[Action, ActionNoIndex]) -> Tuple[
int, utils.ProvinceWithFlag,
utils.ProvinceWithFlag, utils.ProvinceWithFlag]:
"""Break down an action into its component parts.
WARNING: The coast indicator bits returned by this function are not area_ids
as returned by province_id and area.
Args:
action: 32bit or 64bit integer action
Returns:
- order: an integer between 1 and 13
- p1: province_id a coast indicator bit
- p2: province_id a coast indicator bit
- p3: province_id a coast indicator bit
"""
order = bits_between(action, ACTION_ORDER_START,
ACTION_ORDER_START+ACTION_ORDER_BITS)
p1 = (bits_between(action, ACTION_ORDERED_PROVINCE_START,
ACTION_ORDERED_PROVINCE_START+ACTION_PROVINCE_BITS),
bits_between(action,
ACTION_ORDERED_PROVINCE_COAST,
ACTION_ORDERED_PROVINCE_COAST+1)
)
p2 = (bits_between(action,
ACTION_TARGET_PROVINCE_START,
ACTION_TARGET_PROVINCE_START+ACTION_PROVINCE_BITS),
bits_between(action,
ACTION_TARGET_PROVINCE_COAST,
ACTION_TARGET_PROVINCE_COAST+1)
)
p3 = (bits_between(action,
ACTION_THIRD_PROVINCE_START,
ACTION_THIRD_PROVINCE_START+ACTION_PROVINCE_BITS),
bits_between(action,
ACTION_THIRD_PROVINCE_COAST,
ACTION_THIRD_PROVINCE_COAST+1)
)
return order, p1, p2, p3
def action_index(action: Union[Action, np.ndarray]) -> Union[int, np.ndarray]:
"""Returns the actions index among all possible unit actions."""
return action >> ACTION_INDEX_START
def is_waive(action: Union[Action, ActionNoIndex]) -> bool:
order = bits_between(action, ACTION_ORDER_START,
ACTION_ORDER_START+ACTION_ORDER_BITS)
return order == WAIVE
def ordered_province(action: Union[Action, ActionNoIndex, np.ndarray]
) -> Union[utils.ProvinceID, np.ndarray]:
return bits_between(action, ACTION_ORDERED_PROVINCE_START,
ACTION_ORDERED_PROVINCE_START+ACTION_PROVINCE_BITS)
def shrink_actions(
actions: Union[Action, Sequence[Action], np.ndarray]
) -> np.ndarray:
"""Retains the top and bottom byte pairs of actions.
The "shrunk" action retains the top and bottom byte pairs containing contain
the index, the order, and the ordered unit's area.
Args:
actions: action(s) in the format descrived at the top of this file.
Returns:
shrunk actions.
"""
actions = np.asarray(actions)
if actions.size == 0:
return actions.astype(np.int32)
return np.cast[np.int32](((actions >> 32) & ~0xffff) + (actions & 0xffff))
def find_action_with_area(actions: Sequence[Union[Action, ActionNoIndex]],
area: utils.AreaID) -> int:
"""The first action in the list for a unit in this area. 0 if None exists."""
province = utils.province_id_and_area_index(area)[0]
for a in actions:
if ordered_province(a) == province:
return a
return 0
|
diplomacy-main
|
environment/action_utils.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Utility functions for tree-related operations."""
import numpy as np
import tree
def _tree_apply_over_list(list_of_trees, fn):
"""Equivalent to fn, but works on list-of-trees.
Transforms a list-of-trees to a tree-of-lists, then applies `fn`
to each of the inner lists.
It is assumed that all trees have the same structure. Elements of the tree may
be None, in which case they are ignored, i.e. they do not form part of the
stack. This is useful when stacking agent states where parts of the state tree
have been filtered.
Args:
list_of_trees: A Python list of trees.
fn: the function applied on the list of leaves.
Returns:
A tree-of-arrays, where the arrays are formed by `fn`ing a list.
"""
# The implementation below needs at least one element to infer the tree
# structure. Check for empty inputs.
if ((isinstance(list_of_trees, np.ndarray) and list_of_trees.size == 0) or
(not isinstance(list_of_trees, np.ndarray) and not list_of_trees)):
raise ValueError(
"Expected `list_of_trees` to have at least one element but it is empty "
"(or None).")
list_of_flat_trees = [tree.flatten(n) for n in list_of_trees]
flat_tree_of_stacks = []
for position in range(len(list_of_flat_trees[0])):
new_list = [flat_tree[position] for flat_tree in list_of_flat_trees]
new_list = [x for x in new_list if x is not None]
flat_tree_of_stacks.append(fn(new_list))
return tree.unflatten_as(
structure=list_of_trees[0], flat_sequence=flat_tree_of_stacks)
def tree_stack(list_of_trees, axis=0):
"""Equivalent to np.stack, but works on list-of-trees.
Transforms a list-of-trees to a tree-of-lists, then applies `np.stack`
to each of the inner lists.
It is assumed that all trees have the same structure. Elements of the tree may
be None, in which case they are ignored, i.e. they do not form part of the
stack. This is useful when stacking agent states where parts of the state tree
have been filtered.
Args:
list_of_trees: A Python list of trees.
axis: Optional, the `axis` argument for `np.stack`.
Returns:
A tree-of-arrays, where the arrays are formed by `np.stack`ing a list.
"""
return _tree_apply_over_list(list_of_trees, lambda l: np.stack(l, axis=axis))
def tree_expand_dims(tree_of_arrays, axis=0):
"""Expand dimension along axis across `tree_of_arrays`."""
return tree.map_structure(lambda arr: np.expand_dims(arr, axis),
tree_of_arrays)
|
diplomacy-main
|
environment/tree_utils.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Contains basic facts about a Diplomacy map defined in MDF format.
We need two map descriptions in MDF format, a "standard map" that only considers
provinces as defined in Diplomacy, and a bi-coastal map that considers each
coast separately, including those that are belong to the same Diplomacy province
(e.g. Spain north and south coasts).
"""
import enum
from typing import Dict, Sequence
import numpy as np
from diplomacy.environment import observation_utils as utils
class MapMDF(enum.Enum):
STANDARD_MAP = 0
BICOASTAL_MAP = 1
def get_mdf_content(map_mdf: MapMDF = MapMDF.STANDARD_MAP) -> str:
if map_mdf == MapMDF.STANDARD_MAP:
return _STANDARD_MAP_MDF_CONTENT
elif map_mdf == MapMDF.BICOASTAL_MAP:
return _BICOASTAL_MAP_MDF_CONTENT
raise ValueError(f'Unknown map_mdf: {map_mdf}')
def _province_tag(l: str) -> str:
words = str(l).split(' ')
for w in words:
if w not in ['(', ')']:
return w
raise ValueError('No province found for line {}'.format(l))
def province_name_to_id(
map_mdf: MapMDF = MapMDF.STANDARD_MAP
) -> Dict[str, utils.ProvinceID]:
"""Gets dictionary of province name to order in observation."""
return _tag_to_id(get_mdf_content(map_mdf))
def province_id_to_home_sc_power() -> Dict[utils.ProvinceID, int]:
"""Which power is this a home sc for?"""
content = get_mdf_content(MapMDF.STANDARD_MAP)
home_sc_line = content.splitlines()[2]
tag_to_id = _tag_to_id(get_mdf_content(MapMDF.STANDARD_MAP))
# Assume powers are ordered correctly
id_to_power = {}
power = -1
words = str(home_sc_line).split(' ')
for w in words:
if w in ['(', ')']:
pass
elif w in tag_to_id: # Is a province
id_to_power[tag_to_id[w]] = power
else: # Must be a power tag
power += 1
return id_to_power
def _tag_to_id(mdf_content: str) -> Dict[str, int]:
tag_to_id = dict()
tags_found = 0
lines = mdf_content.splitlines()
for l in lines[4:-1]:
tag_to_id[_province_tag(l)] = tags_found # pylint: disable=protected-access
tags_found += 1
return tag_to_id
def build_adjacency(mdf_content: str) -> np.ndarray:
"""Builds adjacency matrix from MDF content.
Args:
mdf_content: content of an mdf map file.
Returns:
a num_provinces-by-num_provinces adjacency matrix. Provinces are adjacent if
there is a path for either an army or a fleet to move between them.
Note that a provinces with multiple coasts (e.g. Spain in the STANDARD_MAP)
are considered adjacent to all provinces that are reachable from any of its
coasts.
"""
tag_to_id = _tag_to_id(mdf_content)
num_provinces = np.max(list(tag_to_id.values())) + 1
adjacency = np.zeros((num_provinces, num_provinces), dtype=np.float32)
lines = mdf_content.splitlines()
for edge_string in lines[4:-1]:
provinces = [w for w in edge_string.split(' ') if w not in ('(', ')', '')]
sender_province = provinces[0]
if len(sender_province) > 3:
land_province = sender_province[:3]
adjacency[tag_to_id[sender_province], tag_to_id[land_province]] = 1.0
adjacency[tag_to_id[land_province], tag_to_id[sender_province]] = 1.0
for receiver_province in provinces[1:]:
if receiver_province in ('AMY', 'FLT'):
continue
adjacency[tag_to_id[sender_province],
tag_to_id[receiver_province]] = 1.0
return adjacency
def topological_index(
mdf_content: str,
topological_order: Sequence[str]
) -> Sequence[utils.ProvinceID]:
tag_to_id = _tag_to_id(mdf_content)
return [tag_to_id[province] for province in topological_order]
def fleet_adjacency_map() -> Dict[utils.AreaID, Sequence[utils.AreaID]]:
"""Builds a mapping for valid fleet movements between areas."""
mdf_content = get_mdf_content(MapMDF.BICOASTAL_MAP)
tag_to_area_id = _tag_to_id(mdf_content)
lines = mdf_content.splitlines()
fleet_adjacency = {}
for edge_string in lines[4:-1]:
provinces = [w for w in edge_string.split(' ') if w not in ('(', ')', '')]
start_province = tag_to_area_id[provinces[0]]
fleet_adjacency[start_province] = []
flt_tag_found = False
for province in provinces[1:]:
if flt_tag_found:
fleet_adjacency[start_province].append(tag_to_area_id[province])
elif province == 'FLT':
flt_tag_found = True
return fleet_adjacency
_STANDARD_MAP_MDF_CONTENT = """MDF
( AUS ENG FRA GER ITA RUS TUR )
( ( ( AUS VIE BUD TRI ) ( ENG LON EDI LVP ) ( FRA PAR MAR BRE ) ( GER BER MUN KIE ) ( ITA ROM VEN NAP ) ( RUS MOS SEV WAR STP ) ( TUR ANK CON SMY ) ( UNO SER BEL DEN GRE HOL NWY POR RUM SWE TUN BUL SPA ) )
( BOH BUR GAL RUH SIL TYR UKR ADR AEG BAL BAR BLA EAS ECH GOB GOL HEL ION IRI MAO NAO NTH NWG SKA TYS WES ALB APU ARM CLY FIN GAS LVN NAF PIC PIE PRU SYR TUS WAL YOR ) )
( ( BOH ( AMY GAL SIL TYR MUN VIE ) ) ) )
( BUR ( AMY RUH MUN PAR GAS PIC BEL MAR ) ) ) )
( GAL ( AMY BOH SIL UKR BUD VIE WAR RUM ) ) ) )
( RUH ( AMY BUR MUN BEL HOL KIE ) ) ) )
( SIL ( AMY BOH GAL MUN WAR PRU BER ) ) ) )
( TYR ( AMY BOH MUN VIE PIE TRI VEN ) ) ) )
( UKR ( AMY GAL MOS WAR RUM SEV ) ) ) )
( BUD ( AMY GAL SER VIE RUM TRI ) ) ) )
( MOS ( AMY UKR WAR LVN SEV STP ) ) ) )
( MUN ( AMY BOH BUR RUH SIL TYR BER KIE ) ) ) )
( PAR ( AMY BUR GAS PIC BRE ) ) ) )
( SER ( AMY BUD ALB GRE RUM TRI BUL ) ) ) )
( VIE ( AMY BOH GAL TYR BUD TRI ) ) ) )
( WAR ( AMY GAL SIL UKR MOS LVN PRU ) ) ) )
( ADR ( FLT ION ALB APU TRI VEN ) ) ) )
( AEG ( FLT EAS ION CON GRE SMY BUL ) ) ) )
( BAL ( FLT GOB LVN PRU BER DEN KIE SWE ) ) ) )
( BAR ( FLT NWG NWY STP ) ) ) )
( BLA ( FLT ARM ANK CON RUM SEV BUL ) ) ) )
( EAS ( FLT AEG ION SYR SMY ) ) ) )
( ECH ( FLT IRI MAO NTH PIC WAL BEL BRE LON ) ) ) )
( GOB ( FLT BAL FIN LVN SWE STP ) ) ) )
( GOL ( FLT TYS WES PIE TUS MAR SPA ) ) ) )
( HEL ( FLT NTH DEN HOL KIE ) ) ) )
( ION ( FLT ADR AEG EAS TYS ALB APU GRE NAP TUN ) ) ) )
( IRI ( FLT ECH MAO NAO WAL LVP ) ) ) )
( MAO ( FLT ECH IRI NAO WES GAS NAF BRE POR SPA SPA ) ) ) )
( NAO ( FLT IRI MAO NWG CLY LVP ) ) ) )
( NTH ( FLT ECH HEL NWG SKA YOR BEL DEN EDI HOL LON NWY ) ) ) )
( NWG ( FLT BAR NAO NTH CLY EDI NWY ) ) ) )
( SKA ( FLT NTH DEN NWY SWE ) ) ) )
( TYS ( FLT GOL ION WES TUS NAP ROM TUN ) ) ) )
( WES ( FLT GOL MAO TYS NAF TUN SPA ) ) ) )
( ALB ( AMY SER GRE TRI ) ( FLT ADR ION GRE TRI ) ) )
( APU ( AMY NAP ROM VEN ) ( FLT ADR ION NAP VEN ) ) )
( ARM ( AMY SYR ANK SEV SMY ) ( FLT BLA ANK SEV ) ) )
( CLY ( AMY EDI LVP ) ( FLT NAO NWG EDI LVP ) ) )
( FIN ( AMY NWY SWE STP ) ( FLT GOB SWE STP ) ) )
( GAS ( AMY BUR PAR BRE MAR SPA ) ( FLT MAO BRE SPA ) ) )
( LVN ( AMY MOS WAR PRU STP ) ( FLT BAL GOB PRU STP ) ) )
( NAF ( AMY TUN ) ( FLT MAO WES TUN ) ) )
( PIC ( AMY BUR PAR BEL BRE ) ( FLT ECH BEL BRE ) ) )
( PIE ( AMY TYR TUS MAR VEN ) ( FLT GOL TUS MAR ) ) )
( PRU ( AMY SIL WAR LVN BER ) ( FLT BAL LVN BER ) ) )
( SYR ( AMY ARM SMY ) ( FLT EAS SMY ) ) )
( TUS ( AMY PIE ROM VEN ) ( FLT GOL TYS PIE ROM ) ) )
( WAL ( AMY YOR LON LVP ) ( FLT ECH IRI LON LVP ) ) )
( YOR ( AMY WAL EDI LON LVP ) ( FLT NTH EDI LON ) ) )
( ANK ( AMY ARM CON SMY ) ( FLT BLA ARM CON ) ) )
( BEL ( AMY BUR RUH PIC HOL ) ( FLT ECH NTH PIC HOL ) ) )
( BER ( AMY SIL MUN PRU KIE ) ( FLT BAL PRU KIE ) ) )
( BRE ( AMY PAR GAS PIC ) ( FLT ECH MAO GAS PIC ) ) )
( CON ( AMY ANK SMY BUL ) ( FLT AEG BLA ANK SMY BUL BUL ) ) )
( DEN ( AMY KIE SWE ) ( FLT BAL HEL NTH SKA KIE SWE ) ) )
( EDI ( AMY CLY YOR LVP ) ( FLT NTH NWG CLY YOR ) ) )
( GRE ( AMY SER ALB BUL ) ( FLT AEG ION ALB BUL ) ) )
( HOL ( AMY RUH BEL KIE ) ( FLT HEL NTH BEL KIE ) ) )
( KIE ( AMY RUH MUN BER DEN HOL ) ( FLT BAL HEL BER DEN HOL ) ) )
( LON ( AMY WAL YOR ) ( FLT ECH NTH WAL YOR ) ) )
( LVP ( AMY CLY WAL YOR EDI ) ( FLT IRI NAO CLY WAL ) ) )
( MAR ( AMY BUR GAS PIE SPA ) ( FLT GOL PIE SPA ) ) )
( NAP ( AMY APU ROM ) ( FLT ION TYS APU ROM ) ) )
( NWY ( AMY FIN SWE STP ) ( FLT BAR NTH NWG SKA SWE STP ) ) )
( POR ( AMY SPA ) ( FLT MAO SPA SPA ) ) )
( ROM ( AMY APU TUS NAP VEN ) ( FLT TYS TUS NAP ) ) )
( RUM ( AMY GAL UKR BUD SER SEV BUL ) ( FLT BLA SEV BUL ) ) )
( SEV ( AMY UKR MOS ARM RUM ) ( FLT BLA ARM RUM ) ) )
( SMY ( AMY ARM SYR ANK CON ) ( FLT AEG EAS SYR CON ) ) )
( SWE ( AMY FIN DEN NWY ) ( FLT BAL GOB SKA FIN DEN NWY ) ) )
( TRI ( AMY TYR BUD SER VIE ALB VEN ) ( FLT ADR ALB VEN ) ) )
( TUN ( AMY NAF ) ( FLT ION TYS WES NAF ) ) )
( VEN ( AMY TYR APU PIE TUS ROM TRI ) ( FLT ADR APU TRI ) ) )
( BUL ( AMY SER CON GRE RUM ) ( FLT BLA CON RUM ) ( FLT AEG CON GRE ) )
( SPA ( AMY GAS MAR POR ) ( FLT MAO GAS POR ) ( FLT GOL MAO WES MAR POR ) )
( STP ( AMY MOS FIN LVN NWY ) ( FLT BAR NWY ) ( FLT GOB FIN LVN ) )
)
"""
_BICOASTAL_MAP_MDF_CONTENT = """MDF
( AUS ENG FRA GER ITA RUS TUR )
( ( ( AUS VIE BUD TRI ) ( ENG LON EDI LVP ) ( FRA PAR MAR BRE ) ( GER BER MUN KIE ) ( ITA ROM VEN NAP ) ( RUS MOS SEV WAR STP ) ( TUR ANK CON SMY ) ( UNO SER BEL DEN GRE HOL NWY POR RUM SWE TUN BUL SPA ) )
( BOH BUR GAL RUH SIL TYR UKR ADR AEG BAL BAR BLA EAS ECH GOB GOL HEL ION IRI MAO NAO NTH NWG SKA TYS WES ALB APU ARM CLY FIN GAS LVN NAF PIC PIE PRU SYR TUS WAL YOR ) )
( ( BOH ( AMY GAL SIL TYR MUN VIE ) ) ) )
( BUR ( AMY RUH MUN PAR GAS PIC BEL MAR ) ) ) )
( GAL ( AMY BOH SIL UKR BUD VIE WAR RUM ) ) ) )
( RUH ( AMY BUR MUN BEL HOL KIE ) ) ) )
( SIL ( AMY BOH GAL MUN WAR PRU BER ) ) ) )
( TYR ( AMY BOH MUN VIE PIE TRI VEN ) ) ) )
( UKR ( AMY GAL MOS WAR RUM SEV ) ) ) )
( BUD ( AMY GAL SER VIE RUM TRI ) ) ) )
( MOS ( AMY UKR WAR LVN SEV STP ) ) ) )
( MUN ( AMY BOH BUR RUH SIL TYR BER KIE ) ) ) )
( PAR ( AMY BUR GAS PIC BRE ) ) ) )
( SER ( AMY BUD ALB GRE RUM TRI BUL ) ) ) )
( VIE ( AMY BOH GAL TYR BUD TRI ) ) ) )
( WAR ( AMY GAL SIL UKR MOS LVN PRU ) ) ) )
( ADR ( FLT ION ALB APU TRI VEN ) ) ) )
( AEG ( FLT EAS ION CON GRE SMY BUL/SC ) ) ) )
( BAL ( FLT GOB LVN PRU BER DEN KIE SWE ) ) ) )
( BAR ( FLT NWG NWY STP/NC ) ) ) )
( BLA ( FLT ARM ANK CON RUM SEV BUL/EC ) ) ) )
( EAS ( FLT AEG ION SYR SMY ) ) ) )
( ECH ( FLT IRI MAO NTH PIC WAL BEL BRE LON ) ) ) )
( GOB ( FLT BAL FIN LVN SWE STP/SC ) ) ) )
( GOL ( FLT TYS WES PIE TUS MAR SPA/SC ) ) ) )
( HEL ( FLT NTH DEN HOL KIE ) ) ) )
( ION ( FLT ADR AEG EAS TYS ALB APU GRE NAP TUN ) ) ) )
( IRI ( FLT ECH MAO NAO WAL LVP ) ) ) )
( MAO ( FLT ECH IRI NAO WES GAS NAF BRE POR SPA/NC SPA/SC ) ) ) )
( NAO ( FLT IRI MAO NWG CLY LVP ) ) ) )
( NTH ( FLT ECH HEL NWG SKA YOR BEL DEN EDI HOL LON NWY ) ) ) )
( NWG ( FLT BAR NAO NTH CLY EDI NWY ) ) ) )
( SKA ( FLT NTH DEN NWY SWE ) ) ) )
( TYS ( FLT GOL ION WES TUS NAP ROM TUN ) ) ) )
( WES ( FLT GOL MAO TYS NAF TUN SPA/SC ) ) ) )
( ALB ( AMY SER GRE TRI ) ( FLT ADR ION GRE TRI ) ) )
( APU ( AMY NAP ROM VEN ) ( FLT ADR ION NAP VEN ) ) )
( ARM ( AMY SYR ANK SEV SMY ) ( FLT BLA ANK SEV ) ) )
( CLY ( AMY EDI LVP ) ( FLT NAO NWG EDI LVP ) ) )
( FIN ( AMY NWY SWE STP ) ( FLT GOB SWE STP/SC ) ) )
( GAS ( AMY BUR PAR BRE MAR SPA ) ( FLT MAO BRE SPA/NC ) ) )
( LVN ( AMY MOS WAR PRU STP ) ( FLT BAL GOB PRU STP/SC ) ) )
( NAF ( AMY TUN ) ( FLT MAO WES TUN ) ) )
( PIC ( AMY BUR PAR BEL BRE ) ( FLT ECH BEL BRE ) ) )
( PIE ( AMY TYR TUS MAR VEN ) ( FLT GOL TUS MAR ) ) )
( PRU ( AMY SIL WAR LVN BER ) ( FLT BAL LVN BER ) ) )
( SYR ( AMY ARM SMY ) ( FLT EAS SMY ) ) )
( TUS ( AMY PIE ROM VEN ) ( FLT GOL TYS PIE ROM ) ) )
( WAL ( AMY YOR LON LVP ) ( FLT ECH IRI LON LVP ) ) )
( YOR ( AMY WAL EDI LON LVP ) ( FLT NTH EDI LON ) ) )
( ANK ( AMY ARM CON SMY ) ( FLT BLA ARM CON ) ) )
( BEL ( AMY BUR RUH PIC HOL ) ( FLT ECH NTH PIC HOL ) ) )
( BER ( AMY SIL MUN PRU KIE ) ( FLT BAL PRU KIE ) ) )
( BRE ( AMY PAR GAS PIC ) ( FLT ECH MAO GAS PIC ) ) )
( CON ( AMY ANK SMY BUL ) ( FLT AEG BLA ANK SMY BUL/SC BUL/EC ) ) )
( DEN ( AMY KIE SWE ) ( FLT BAL HEL NTH SKA KIE SWE ) ) )
( EDI ( AMY CLY YOR LVP ) ( FLT NTH NWG CLY YOR ) ) )
( GRE ( AMY SER ALB BUL ) ( FLT AEG ION ALB BUL/SC ) ) )
( HOL ( AMY RUH BEL KIE ) ( FLT HEL NTH BEL KIE ) ) )
( KIE ( AMY RUH MUN BER DEN HOL ) ( FLT BAL HEL BER DEN HOL ) ) )
( LON ( AMY WAL YOR ) ( FLT ECH NTH WAL YOR ) ) )
( LVP ( AMY CLY WAL YOR EDI ) ( FLT IRI NAO CLY WAL ) ) )
( MAR ( AMY BUR GAS PIE SPA ) ( FLT GOL PIE SPA/SC ) ) )
( NAP ( AMY APU ROM ) ( FLT ION TYS APU ROM ) ) )
( NWY ( AMY FIN SWE STP ) ( FLT BAR NTH NWG SKA SWE STP/NC ) ) )
( POR ( AMY SPA ) ( FLT MAO SPA/NC SPA/SC ) ) )
( ROM ( AMY APU TUS NAP VEN ) ( FLT TYS TUS NAP ) ) )
( RUM ( AMY GAL UKR BUD SER SEV BUL ) ( FLT BLA SEV BUL/EC ) ) )
( SEV ( AMY UKR MOS ARM RUM ) ( FLT BLA ARM RUM ) ) )
( SMY ( AMY ARM SYR ANK CON ) ( FLT AEG EAS SYR CON ) ) )
( SWE ( AMY FIN DEN NWY ) ( FLT BAL GOB SKA FIN DEN NWY ) ) )
( TRI ( AMY TYR BUD SER VIE ALB VEN ) ( FLT ADR ALB VEN ) ) )
( TUN ( AMY NAF ) ( FLT ION TYS WES NAF ) ) )
( VEN ( AMY TYR APU PIE TUS ROM TRI ) ( FLT ADR APU TRI ) ) )
( BUL ( AMY SER CON GRE RUM ) )
( BUL/EC ( FLT BLA CON RUM ) )
( BUL/SC ( FLT AEG CON GRE ) )
( SPA ( AMY GAS MAR POR ) )
( SPA/NC ( FLT MAO GAS POR ) )
( SPA/SC ( FLT GOL MAO WES MAR POR ) )
( STP ( AMY MOS FIN LVN NWY ) )
( STP/NC ( FLT BAR NWY ) )
( STP/SC ( FLT GOB FIN LVN ) )
)
"""
|
diplomacy-main
|
environment/province_order.py
|
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Play games of Diplomacy."""
from typing import Any, Dict, List, Optional, Sequence
from absl import logging
import numpy as np
from diplomacy.environment import action_utils
from diplomacy.environment import observation_utils as utils
from diplomacy.network import network_policy
class DiplomacyTrajectory:
"""Stores data from a Diplomacy game."""
def __init__(self):
self.observations: List[utils.Observation] = []
self.legal_actions: List[np.ndarray] = []
self.actions: List[np.ndarray] = []
self.step_outputs: List[Dict[str, Any]] = []
self.returns: Optional[np.ndarray] = None
def append_step(self,
observation: utils.Observation,
legal_actions: np.ndarray,
actions: np.ndarray,
step_outputs: Dict[str, Any]):
self.observations.append(observation)
self.legal_actions.append(legal_actions)
self.actions.append(actions)
self.step_outputs.append(step_outputs)
def terminate(self, returns):
self.returns = returns
def _draw_returns(
points_per_supply_centre: bool,
board: np.ndarray,
num_players: int
) -> np.ndarray:
"""Computes returns (number of supply centers) when the game end in a draw."""
if points_per_supply_centre:
returns = [len(utils.sc_provinces(i, board)) for i in range(num_players)]
else:
returns = [
1 if utils.sc_provinces(i, board) else 0 for i in range(num_players)]
return np.array(returns, dtype=np.float32) / sum(returns)
def run_game(
state,
policies: Sequence[network_policy.Policy],
slots_to_policies: Sequence[int],
max_length: Optional[int] = None,
min_years_forced_draw=1000,
forced_draw_probability=0.0,
points_per_supply_centre=False,
draw_if_slot_loses=None,
) -> DiplomacyTrajectory:
"""Run a game of diplomacy.
Args:
state: A DiplomacyState in Spring 1901 (see diplomacy_state.py).
policies: sequence of policies which are acting.
slots_to_policies: sequence of length num_players mapping slots of the
games to the index of the corresponding policy in policies.
max_length: terminate games after this many full diplomacy turns.
min_years_forced_draw: minimum years to consider force a draw.
forced_draw_probability: probability of a draw each year after the first
min_years_forced_draw
points_per_supply_centre: whether to assign points per supply centre in a
draw (rather than 0/1 for win/loss).
draw_if_slot_loses: if this slot is eliminated, the game is ended in a draw.
Returns:
Trajectory of the game, as a DiplomacyTrajectory.
"""
num_players = 7
if len(slots_to_policies) != num_players:
raise ValueError(
f"Length of slot to policy mapping {len(slots_to_policies)}"
f", but {num_players} players in game.")
policies_to_slots_lists = [[] for i in range(len(policies))]
for slot in range(num_players):
policy_index = slots_to_policies[slot]
if policy_index >= len(policies) or policy_index < 0:
raise ValueError(f"Policy index {policy_index} out of range")
policies_to_slots_lists[policy_index].append(slot)
for policy in policies:
policy.reset()
if max_length is None:
max_length = np.inf
year = 0
turn_num = 0
traj = DiplomacyTrajectory()
returns = None
while not state.is_terminal() and turn_num < max_length:
logging.info("In turn %d year %d ", turn_num, year)
observation = state.observation()
# New Game Year Checks
if observation.season == utils.Season.SPRING_MOVES:
year += 1
if (draw_if_slot_loses is not None and
not utils.sc_provinces(draw_if_slot_loses, observation.board)):
returns = _draw_returns(points_per_supply_centre, observation.board,
num_players)
logging.info("Forcing a draw due to elimination - returns %s",
returns)
break
if (year > min_years_forced_draw and
np.random.uniform() < forced_draw_probability):
returns = _draw_returns(points_per_supply_centre, observation.board,
num_players)
logging.info("Forcing a draw at year %s - returns %s", year, returns)
break
legal_actions = state.legal_actions()
padded_legal_actions = np.zeros(
(num_players, action_utils.MAX_LEGAL_ACTIONS), np.int64)
for i in range(num_players):
padded_legal_actions[i, :len(legal_actions[i])] = legal_actions[i]
actions_lists = [[] for _ in range(num_players)]
policies_step_outputs = {}
for policy, slots_list in zip(policies, policies_to_slots_lists):
(policy_actions_lists,
policies_step_outputs[str(policy)]) = policy.actions(
slots_list, observation, legal_actions)
if len(policy_actions_lists) != len(slots_list):
raise ValueError(f"Policy {policy} returned {len(policy_actions_lists)}"
f" actions lists for {len(slots_list)} players")
for actions, slot in zip(policy_actions_lists, slots_list):
actions_lists[slot] = actions
# Save our actions lists.
padded_actions = np.full(
(num_players, action_utils.MAX_ORDERS), -1, np.int64)
for i, actions_list in enumerate(actions_lists):
if actions_list is not None:
padded_actions[i, :len(actions_list)] = actions_list
state.step(actions_lists)
turn_num += 1
traj.append_step(observation,
padded_legal_actions,
padded_actions,
policies_step_outputs)
if returns is None:
returns = state.returns()
traj.terminate(returns)
return traj
|
diplomacy-main
|
environment/game_runner.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""pycolab PyPI package setup."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
try:
import setuptools
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
import setuptools
# Warn user about how curses is required to play games yourself.
try:
import curses
except ImportError:
import warnings
warnings.warn(
'The human_ui module and all of the example games (when run as '
'standalone programs) require the curses library. Without curses, you '
'can still use pycolab as a library, but you won\'t be able to play '
'pycolab games on the console.')
setuptools.setup(
name='pycolab',
version='1.2',
description='An engine for small games for reinforcement learning agents.',
long_description=(
'A highly-customisable all-Python gridworld game engine with some '
'batteries included. Make your own gridworld games to demonstrate '
'reinforcement learning problems and test your agents!'),
url='https://github.com/deepmind/pycolab/',
author='The pycolab authors',
author_email='[email protected]',
license='Apache 2.0',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Environment :: Console :: Curses',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Games/Entertainment :: Arcade',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Testing',
],
keywords=(
'ai '
'ascii art '
'game engine '
'gridworld '
'reinforcement learning '
'retro retrogaming'),
install_requires=[
'numpy>=1.9',
'six',
],
extras_require={
'ndimage': ['scipy>=0.13.3'],
},
packages=setuptools.find_packages(),
zip_safe=True,
entry_points={
'console_scripts': [
'aperture = pycolab.examples.aperture:main',
'apprehend = pycolab.examples.apprehend:main',
('extraterrestrial_marauders = '
'pycolab.examples.extraterrestrial_marauders:main'),
'fluvial_natation = pycolab.examples.fluvial_natation:main',
'hello_world = pycolab.examples.hello_world:main',
'scrolly_maze = pycolab.examples.scrolly_maze:main',
'shockwave = pycolab.examples.shockwave:main [ndimage]',
'warehouse_manager = pycolab.examples.warehouse_manager:main',
'chain_walk = pycolab.examples.classics.chain_walk:main',
'cliff_walk = pycolab.examples.classics.cliff_walk:main',
'four_rooms = pycolab.examples.classics.four_rooms:main',
],
},
test_suite='nose.collector',
tests_require=['nose'],
)
|
pycolab-master
|
setup.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Frontends for humans who want to play pycolab games."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import copy
import curses
import datetime
import textwrap
from pycolab import cropping
from pycolab.protocols import logging as plab_logging
import six
class CursesUi(object):
"""A terminal-based UI for pycolab games."""
def __init__(self,
keys_to_actions, delay=None,
repainter=None, colour_fg=None, colour_bg=None,
croppers=None):
"""Construct and configure a `CursesUi` for pycolab games.
A `CursesUi` object can be used over and over again to play any number of
games implemented by using pycolab---however, the configuration options used
to build the object will probably only be suitable for some.
`CursesUi` provides colour support, but only in terminals that support true
colour text colour attributes, and only when there is sufficient space in
the terminal's colourmap, as well as a sufficient number of free "colour
pairs", to accommodate all the characters given custom colours in
`colour_fg` and `colour_bg`. Your terminal may be compatible out of the box;
it may be compatible but only after setting the `$TERM` environment
variable; or it may simply not work. Some specific guidance:
To use this: do this:
------------ --------
iTerm2 nothing (should work out of the box)
MacOS Terminal switch to iTerm2 (it doesn't really work)
GNOME Terminal set $TERM to xterm-256color
Modern xterm set $TERM to xterm-256color
tmux, screen follow guidance at [1]
ASR-33 buy a box of crayons
Like any self-respecting game interface, `CursesUi` features a game console,
which can be revealed and hidden via the Page Up and Page Down keys
respectively. Log strings accumulated in the `Plot` object via its `log`
method are shown in the console.
[1]: https://sanctum.geek.nz/arabesque/256-colour-terminals/
Args:
keys_to_actions: a dict mapping characters or key codes to whatever
action symbols your pycolab games understand. For example, if your
game uses the integer 5 to mean "shoot laser", you could map ' ' to 5
so that the player can shoot the laser by tapping the space bar. "Key
codes" are the numerical ASCII (and other) codes that the Python
`curses` library uses to mark keypresses besides letters, numbers, and
punctuation; codes like `curses.KEY_LEFT` may be especially useful.
For more on these, visit the [`curses` manual](
https://docs.python.org/2/library/curses.html#constants). Any
character or key code received from the user but absent from this dict
will be ignored. See also the note about `-1` in the documentation for
the `delay` argument.
delay: whether to timeout when retrieving a keypress from the user, and
if so, for how long. If None, `CursesUi` will wait indefinitely for
the user to press a key between game iterations; if positive,
`CursesUi` will wait that many milliseconds. If the waiting operation
times out, `CursesUi` will look up the keycode `-1` in the
`keys_to_actions` dict and pass the corresponding action on to the
game. So, if you use this delay option, make certain that you have an
action mapped to the keycode `-1` in `keys_to_actions`; otherwise, the
timeouts will be ignored, and `CursesUi` will behave as if `delay`
were None.
repainter: an optional `ObservationCharacterRepainter` that changes the
characters used by the observation returned from the game engine,
presumably to a character set that makes the observations match your
preferred look for the game.
colour_fg: an optional mapping from single ASCII character strings to
3-tuples (or length 3 lists) encoding an RGB colour. These colours are
used (in compatible terminals only) as the foreground colour when
printing those characters. If unspecified for a particular character,
or if None, some boring default colour is used instead. *NOTE: RGB
component values range in `[0,999]`, not `[0,255]` as you may have
expected.*
colour_bg: exactly like `colour_fg`, but for charcter background colours.
If unspecified, the same colours specified by `colour_fg` (or its
defaults) are used instead (so characters basically become tall
rectangular pixels).
croppers: None, or a list of `cropping.ObservationCropper` instances
and/or None values. If a list of `ObservationCropper`s, each cropper
in the list will make its own crop of the observation, and the cropped
observations will all be shown side-by-side. A None value in the list
means observations returned by the pycolab game supplied to the `play`
method should be shown directly instead of cropped. A single None
value for this argument is a shorthand for `[None]`.
Raises:
TypeError: if any key in the `keys_to_actions` dict is neither a numerical
keycode nor a length-1 ASCII string.
"""
# This slot holds a reference to the game currently being played, or None
# if no game is being played at the moment.
self._game = None
# What time did the game start? Or None if there is no game being played.
self._start_time = None
# What is our total so far? Or None if there is no game being played.
self._total_return = None
# For displaying messages logged by game entities in a game console.
self._log_messages = []
# The curses `getch` routine returns numeric keycodes, but users can specify
# keyboard input as strings as well, so we convert strings to keycodes.
try:
self._keycodes_to_actions = {
ord(key) if isinstance(key, str) else key: action
for key, action in six.iteritems(keys_to_actions)}
except TypeError:
raise TypeError('keys in the keys_to_actions argument must either be '
'numerical keycodes or single ASCII character strings.')
# We'd like to see whether the user is using any reserved keys here in the
# constructor, but we have to wait until curses is actually running to do
# that. So, the reserved key check happens in _init_curses_and_play.
# Save colour mappings and other parameters from the user. Note injection
# of defaults and the conversion of character keys to ASCII codepoints.
self._delay = delay
self._repainter = repainter
self._colour_fg = (
{ord(char): colour for char, colour in six.iteritems(colour_fg)}
if colour_fg is not None else {})
self._colour_bg = (
{ord(char): colour for char, colour in six.iteritems(colour_bg)}
if colour_bg is not None else self._colour_fg)
# This slot will hold a mapping from characters to the curses colour pair
# we'll use when we're displaying that character. None for now, since we
# can't set it up until curses is running.
self._colour_pair = None
# If the user specified no croppers or any None croppers, replace them with
# pass-through croppers that don't do any cropping.
if croppers is None:
self._croppers = [cropping.ObservationCropper()]
else:
self._croppers = croppers
try:
self._croppers = tuple(cropping.ObservationCropper() if c is None else c
for c in self._croppers)
except TypeError:
raise TypeError('The croppers argument to the CursesUi constructor must '
'be a sequence or None, not a "bare" object.')
def play(self, game):
"""Play a pycolab game.
Calling this method initialises curses and starts an interaction loop. The
loop continues until the game terminates or an error occurs.
This method will exit cleanly if an exception is raised within the game;
that is, you shouldn't have to reset your terminal.
Args:
game: a pycolab game. Ths game must not have had its `its_showtime` method
called yet.
Raises:
RuntimeError: if this method is called while a game is already underway.
"""
if self._game is not None:
raise RuntimeError('CursesUi is not at all thread safe')
self._game = game
self._start_time = datetime.datetime.now()
# Inform the croppers which game we're playing.
for cropper in self._croppers:
cropper.set_engine(self._game)
# After turning on curses, set it up and play the game.
curses.wrapper(self._init_curses_and_play)
# The game has concluded. Print the final statistics.
duration = datetime.datetime.now() - self._start_time
print('Game over! Final score is {}, earned over {}.'.format(
self._total_return, _format_timedelta(duration)))
# Clean up in preparation for the next game.
self._game = None
self._start_time = None
self._total_return = None
def _init_curses_and_play(self, screen):
"""Set up an already-running curses; do interaction loop.
This method is intended to be passed as an argument to `curses.wrapper`,
so its only argument is the main, full-screen curses window.
Args:
screen: the main, full-screen curses window.
Raises:
ValueError: if any key in the `keys_to_actions` dict supplied to the
constructor has already been reserved for use by `CursesUi`.
"""
# See whether the user is using any reserved keys. This check ought to be in
# the constructor, but it can't run until curses is actually initialised, so
# it's here instead.
for key, action in six.iteritems(self._keycodes_to_actions):
if key in (curses.KEY_PPAGE, curses.KEY_NPAGE):
raise ValueError(
'the keys_to_actions argument to the CursesUi constructor binds '
'action {} to the {} key, which is reserved for CursesUi. Please '
'choose a different key for this action.'.format(
repr(action), repr(curses.keyname(key))))
# If the terminal supports colour, program the colours into curses as
# "colour pairs". Update our dict mapping characters to colour pairs.
self._init_colour()
curses.curs_set(0) # We don't need to see the cursor.
if self._delay is None:
screen.timeout(-1) # Blocking reads
else:
screen.timeout(self._delay) # Nonblocking (if 0) or timing-out reads
# Create the curses window for the log display
rows, cols = screen.getmaxyx()
console = curses.newwin(rows // 2, cols, rows - (rows // 2), 0)
# By default, the log display window is hidden
paint_console = False
def crop_and_repaint(observation):
# Helper for game display: applies all croppers to the observation, then
# repaints the cropped subwindows. Since the same repainter is used for
# all subwindows, and since repainters "own" what they return and are
# allowed to overwrite it, we copy repainted observations when we have
# multiple subwindows.
observations = [cropper.crop(observation) for cropper in self._croppers]
if self._repainter:
if len(observations) == 1:
return [self._repainter(observations[0])]
else:
return [copy.deepcopy(self._repainter(obs)) for obs in observations]
else:
return observations
# Kick off the game---get first observation, crop and repaint as needed,
# initialise our total return, and display the first frame.
observation, reward, _ = self._game.its_showtime()
observations = crop_and_repaint(observation)
self._total_return = reward
self._display(
screen, observations, self._total_return, elapsed=datetime.timedelta())
# Oh boy, play the game!
while not self._game.game_over:
# Wait (or not, depending) for user input, and convert it to an action.
# Unrecognised keycodes cause the game display to repaint (updating the
# elapsed time clock and potentially showing/hiding/updating the log
# message display) but don't trigger a call to the game engine's play()
# method. Note that the timeout "keycode" -1 is treated the same as any
# other keycode here.
keycode = screen.getch()
if keycode == curses.KEY_PPAGE: # Page Up? Show the game console.
paint_console = True
elif keycode == curses.KEY_NPAGE: # Page Down? Hide the game console.
paint_console = False
elif keycode in self._keycodes_to_actions:
# Convert the keycode to a game action and send that to the engine.
# Receive a new observation, reward, discount; crop and repaint; update
# total return.
action = self._keycodes_to_actions[keycode]
observation, reward, _ = self._game.play(action)
observations = crop_and_repaint(observation)
if self._total_return is None:
self._total_return = reward
elif reward is not None:
self._total_return += reward
# Update the game display, regardless of whether we've called the game's
# play() method.
elapsed = datetime.datetime.now() - self._start_time
self._display(screen, observations, self._total_return, elapsed)
# Update game console message buffer with new messages from the game.
self._update_game_console(
plab_logging.consume(self._game.the_plot), console, paint_console)
# Show the screen to the user.
curses.doupdate()
def _display(self, screen, observations, score, elapsed):
"""Redraw the game board onto the screen, with elapsed time and score.
Args:
screen: the main, full-screen curses window.
observations: a list of `rendering.Observation` objects containing
subwindows of the current game board.
score: the total return earned by the player, up until now.
elapsed: a `datetime.timedelta` with the total time the player has spent
playing this game.
"""
screen.erase() # Clear the screen
# Display the game clock and the current score.
screen.addstr(0, 2, _format_timedelta(elapsed), curses.color_pair(0))
screen.addstr(0, 20, 'Score: {}'.format(score), curses.color_pair(0))
# Display cropped observations side-by-side.
leftmost_column = 0
for observation in observations:
# Display game board rows one-by-one.
for row, board_line in enumerate(observation.board, start=1):
screen.move(row, leftmost_column) # Move to start of this board row.
# Display game board characters one-by-one. We iterate over them as
# integer ASCII codepoints for easiest compatibility with python2/3.
for codepoint in six.iterbytes(board_line.tostring()):
screen.addch(
codepoint, curses.color_pair(self._colour_pair[codepoint]))
# Advance the leftmost column for the next observation.
leftmost_column += observation.board.shape[1] + 3
# Redraw the game screen (but in the curses memory buffer only).
screen.noutrefresh()
def _update_game_console(self, new_log_messages, console, paint_console):
"""Update game console text buffer; draw console to the screen if enabled.
Args:
new_log_messages: a list of strings containing new log messages to place
in the game console's message buffer.
console: curses window for the game console.
paint_console: if True, the console will be displayed at the next screen
refresh; if not, it won't.
"""
# First we have to format the new messages to fit within our game console.
rows, cols = console.getmaxyx()
# Split all log messages on newline characters.
split_log_messages = []
for message in new_log_messages:
split_log_messages.extend(message.splitlines())
# It's a little weird to wrap console log messages with a text wrapper
# designed for English text, but that beats writing tab expansion myself.
wrapper = textwrap.TextWrapper(
width=cols, drop_whitespace=False, break_on_hyphens=False)
for message in split_log_messages:
self._log_messages.extend(wrapper.wrap(message))
# There's only room on the screen for the last rows-1 console messages.
del self._log_messages[:(1-rows)]
# Draw the console if the console is visible.
if paint_console:
console.border(' ', ' ', curses.ACS_HLINE, ' ',
curses.ACS_ULCORNER, curses.ACS_URCORNER, ' ', ' ')
console.addstr(0, 4, '{ Console }', curses.A_BOLD)
console.addstr(1, 0, '\n'.join(self._log_messages))
console.noutrefresh()
def _init_colour(self):
"""Allocate curses colours and "colour pairs" for user-specified colours.
Curses manages colour in the following way: first, entries within a
finite palette of colours (usually 255) are assigned a particular RGB value;
next, foreground and background pairs of these colours are defined in a
second palette of colour pairs (also finite; perhaps around 32767 entries).
This function takes the `colour_fg` and `colour_bg` dicts supplied to the
constructor and attempts to allocate enough colours and colour pairs to
handle all of the colour combinations that they specify.
If this method determines that the terminal isn't capable of accepting a
custom colour palette, or if there turn out not to be enough colours or
colour pairs to accommodate the user-supplied colour dicts, this method will
simply allow the default foreground and background colour to be used.
"""
# The default colour for all characters without colours listed is boring
# white on black, or "system default", or somesuch.
self._colour_pair = collections.defaultdict(lambda: 0)
# And if the terminal doesn't support true color, that's all you get.
if not curses.can_change_color(): return
# Collect all unique foreground and background colours. If this terminal
# doesn't have enough colours for all of the colours the user has supplied,
# plus the two default colours, plus the largest colour id (which we seem
# not to be able to assign, at least not with xterm-256color) stick with
# boring old white on black.
colours = set(six.itervalues(self._colour_fg)).union(
six.itervalues(self._colour_bg))
if (curses.COLORS - 2) < len(colours): return
# Get all unique characters that have a foreground and/or background colour.
# If this terminal doesn't have enough colour pairs for all characters plus
# the default colour pair, stick with boring old white on black.
characters = set(self._colour_fg).union(self._colour_bg)
if (curses.COLOR_PAIRS - 1) < len(characters): return
# Get the identifiers for both colours in the default colour pair.
cpair_0_fg_id, cpair_0_bg_id = curses.pair_content(0)
# With all this, make a mapping from colours to the IDs we'll use for them.
ids = (set(range(curses.COLORS - 1)) - # The largest ID is not assignable?
{cpair_0_fg_id, cpair_0_bg_id}) # We don't want to change these.
ids = list(reversed(sorted(ids))) # We use colour IDs from large to small.
ids = ids[:len(colours)] # But only those colour IDs we actually need.
colour_ids = dict(zip(colours, ids))
# Program these colours into curses.
for colour, cid in six.iteritems(colour_ids):
curses.init_color(cid, *colour)
# Now add the default colours to the colour-to-ID map.
cpair_0_fg = curses.color_content(cpair_0_fg_id)
cpair_0_bg = curses.color_content(cpair_0_bg_id)
colour_ids[cpair_0_fg] = cpair_0_fg_id
colour_ids[cpair_0_bg] = cpair_0_bg_id
# The color pair IDs we'll use for all characters count up from 1; note that
# the "default" colour pair of 0 is already defined, since _colour_pair is a
# defaultdict.
self._colour_pair.update(
{character: pid for pid, character in enumerate(characters, start=1)})
# Program these color pairs into curses, and that's all there is to do.
for character, pid in six.iteritems(self._colour_pair):
# Get foreground and background colours for this character. Note how in
# the absence of a specified background colour, the same colour as the
# foreground is used.
cpair_fg = self._colour_fg.get(character, cpair_0_fg_id)
cpair_bg = self._colour_bg.get(character, cpair_fg)
# Get colour IDs for those colours and initialise a colour pair.
cpair_fg_id = colour_ids[cpair_fg]
cpair_bg_id = colour_ids[cpair_bg]
curses.init_pair(pid, cpair_fg_id, cpair_bg_id)
def _format_timedelta(timedelta):
"""Convert timedelta to string, lopping off microseconds."""
# This approach probably looks awful to all you time nerds, but it will work
# in all the locales we use in-house.
return str(timedelta).split('.')[0]
|
pycolab-master
|
pycolab/human_ui.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Base classes for all of the "stuff" that makes up the world.
A pycolab board is organised like a theatre stage, so for some useful
background, refer first to the [wikipedia article on theatrical scenery](
https://en.wikipedia.org/wiki/Theatrical_scenery#Types_of_scenery).
Seriously! It's short.
Now, welcome back. In pycolab, these things get to paint on the board:
* Backdrop: This is the background scenery, and there is only ever one Backdrop
per game. A Backdrop paints onto the board first, and it can paint
arbitrary characters (from a predefined set) at any location.
* Sprite: Sprites are "actors": they paint a single, fixed character onto the
board. Their API is very much in keeping with being a little moving dot:
mainly, all sprites have a row/column board location.
* Drape: A Drape is a binary mask which causes portions of the board to be
painted with a single, fixed character.
As mentioned, a Backdrop paints first. Sprites and Drapes come next, using an
ordering you specify. (You can change this ordering in the game: maybe your
Sprite walks in front of a Drape.)
All Backdrops, Sprites, and Drapes that you implement *must* be deep-copyable.
Besides capturing the objects and scenery of the game, Backdrops, Sprites, and
Drapes also hold the game's logic, which is usually distributed among these
things in an object-oriented fashion. In each game iteration, a game's Backdrop
and all of its Sprites and Drapes are consulted by the game engine for updates
to the game's internal state, and to their own appearance and internal state
as well. Once everyone has been consulted, the engine renders the game board
and applies any requested state changes. See `Engine` documentation for details.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
import collections
import six
class Backdrop(object):
"""Background scenery for a pycolab game board.
A `Backdrop` paints the "background scenery" for a pycolab game: it fills an
array with arbitrary characters (from its predefined `Palette`) which get
painted onto the board before any `Sprite` or `Drape` is added there.
"""
def __init__(self, curtain, palette):
"""Construct a `Backdrop`.
Whatever arguments your `Backdrop` subclass takes, its first two should be
the same `curtain` and `palette` arguments taken here.
Unless you really know what you're doing, your `Backdrop` subclass should
be certain to call this `__init__` method before doing anything else in its
own constructor. Here's example code to copy and paste:
super(MyCoolBackdrop, self).__init__(curtain, palette)
Args:
curtain: A 2-D numpy array with dtype `uint8`, which will be "owned" by
this `Backdrop` and made accessible at `self.curtain`. Values in this
array will be painted onto the game board first at each gameplay
iteration. Subclasses of `Backdrop` will update the backdrop by
changing the data inside `self.curtain`. May already have items in
it before it gets received by `__init__` (for example, it may have
been populated from an ASCII-art diagram).
palette: A handy mapping from characters to the corresponding `uint8`
values that you should use to update `self.curtain`. Characters that
are legal Python names can be accessed using property notation, (e.g.
`self.palette.M`); for others, you'll need to do dict-style lookups
(e.g. `self.palette['~']`). (A few characters have special property
names -- for example, `self.palette.space` is sugar for
`self.palette[' ']`. See `Palette` docs for details.) This mapping
will be "owned" by this `Backdrop` and made accessible at
`self.palette`, but you may wish to abbreviate it in your methods
(`p = self.palette`). Finally, note that if a character appears not
to exist as a property or dict entry in the palette, it's not legal
for you to use. (No peeking at an ASCII chart to get around this!)
"""
# Direct access is highly discouraged. Use the properties instead.
self._c_u_r_t_a_i_n = curtain
self._p_a_l_e_t_t_e = palette
def update(self, actions, board, layers, things, the_plot):
"""Update this `Backdrop`'s curtain in response to the rest of the world.
This method is called once per game iteration and can perform arbitrary
updates to the values inside `self.curtain` (using legal palette characters,
of course). Upon completion, and after all other "things" have had a chance
to update as well, `self.curtain` will be the first layer painted onto the
next iteration of the board.
This method _promises_ not to alter any of its arguments except `the_plot`.
Saving non-temporary local references to any of the arguments is probably
also a bad idea.
Args:
actions: Actions supplied by the external agent(s) in response to the last
board. Could be a scalar, could be an arbitrarily nested structure
of... stuff, it's entirely up to the game you're making. When the game
begins, however, it is guaranteed to be None; the update that this
Sprite produces then will be combined updates from other Things to
generate the first observation of the game.
board: A 2-D numpy array with dtype `uint8` containing the completely
rendered game board from the last board repaint (which usually means
the last game iteration; see `Engine` docs for details). Recall that
Python's `chr` method can turn `uint8` values into single-character
strings.
layers: A feature-map representation of all game entities (current to
the last board repaint); specifically, a dict mapping all characters
known to the game's `Engine` to `bool_` numpy arrays indicating
where those characters are found (if anywhere---these can be empty).
Note that if the game's `Engine` was constructed with
`occlusion_in_layers=True`, things that are "occluded" on `board` by
overlapping Sprites and Drapes will not be visible in these feature
maps, nor will Sprites and Drapes that are invisible.
things: The complete inventory of Sprites and Drapes in this game, as a
dict keyed by the characters they paint onto the board. These are NOT
guaranteed to be current to the last repaint; they are current to the
last time they were updated, which is dictated by the update ordering
specified in the game's `Engine`. Some may have been updated since
the last repaint (i.e. they get updated before this `Backdrop`),
others not.
the_plot: A global blackboard for marking events that should be shared
between Sprites, Drapes, the Backdrop, and the game's `Engine`.
There's a lot of neat stuff in here; refer to `Plot` docs for details.
"""
# A default backdrop never changes, so there's nothing to update.
pass
@property
def curtain(self):
# Final. Do not override.
return self._c_u_r_t_a_i_n
@property
def palette(self):
# Final. Do not override.
return self._p_a_l_e_t_t_e
@six.add_metaclass(abc.ABCMeta)
class Drape(object):
"""A shape that "drapes" over parts of a pycolab game board.
A `Drape` is a binary mask associated with a particular character. When the
`Drape` is rendered onto the game board, any portion of the board covered by
the mask will be filled with the character.
"""
def __init__(self, curtain, character):
"""Construct a `Drape`.
Whatever arguments your `Drape` subclass takes, its first two should be the
same `curtain` and `character` arguments taken here.
Unless you really know what you're doing, your `Drape` subclass should be
certain to call this `__init__` method before doing anything else in its own
constructor. Here's example code to copy and paste:
super(MyCoolDrape, self).__init__(curtain, character)
A `Drape` object that does not wish to be visible after construction should
have its constructor assign `self._visible = False` after calling its
superclass constructor.
Args:
curtain: A 2-D numpy array with dtype `bool_`, which will be "owned" by
this `Drape` and made accessible at `self.curtain`. Values in this
array will be used as a mask for painting `character` onto the
game board, at whatever time is dictated by this game's `Engine`'s
z-ordering. Subclasses of `Drape` will update the mask by changing
the data inside `self.curtain`.
character: The character that this `Drape` paints onto the board.
Subclasses will not paint this character directly; it's here for
the object's reference when examining the arguments to `update`.
"""
# Direct access is highly discouraged. Use the properties instead.
self._c_u_r_t_a_i_n = curtain
self._c_h_a_r_a_c_t_e_r = character
@abc.abstractmethod
def update(self, actions, board, layers, backdrop, things, the_plot):
"""Update this `Drape`'s curtain in response to the rest of the world.
This method is called once per game iteration and can perform arbitrary
updates to the values inside `self.curtain` (using bool values, of course).
Upon completion, and after the backdrop and all other "things" have had a
chance to update as well, `self.curtain` will be used as a mask for painting
`self.character` on the game board, at whatever time is dictated by this
game's `Engine`'s z-ordering.
This method _promises_ not to alter any of its arguments except `the_plot`.
Saving non-temporary local references to any of the arguments is probably
also a bad idea.
Args:
actions: Actions supplied by the external agent(s) in response to the last
board. Could be a scalar, could be an arbitrarily nested structure
of... stuff, it's entirely up to the game you're making. When the game
begins, however, it is guaranteed to be None; the update that this
Sprite produces then will be combined updates from other Things to
generate the first observation of the game.
board: A 2-D numpy array with dtype `uint8` containing the completely
rendered game board from the last board repaint (which usually means
the last game iteration; see `Engine` docs for details). Recall that
Python's `chr` method can turn `uint8` values into single-character
strings.
layers: A feature-map representation of all game entities (current to
the last board repaint); specifically, a dict mapping all characters
known to the game's `Engine` to `bool_` numpy arrays indicating where
those characters are found (if anywhere---these can be empty). Note
that if the game's `Engine` was constructed with
`occlusion_in_layers=True`, things that are "occluded" on `board` by
overlapping Sprites and Drapes will not be visible in these feature
maps, nor will Sprites and Drapes that are invisible.
backdrop: The `Backdrop` for this game. This is NOT guaranteed to be
current to the last repaint; it is current to the last time it was
updated, which is dictated by the update ordering specified in this
game's `Engine`. It may or may not have been updated since the last
repaint.
things: The complete inventory of Sprites and Drapes in this game, as a
dict keyed by the characters they paint onto the board. These are NOT
guaranteed to be current to the last repaint; they are current to the
last time they were updated, which is dictated by the update ordering
specified in the game's `Engine`. Some may have been updated since
the last repaint (i.e. they get updated before this `Drape`), others
not. (Note that `things[self.character] == self`.)
the_plot: A global blackboard for marking events that should be shared
between Sprites, Drapes, the Backdrop, and the game's `Engine`.
There's a lot of neat stuff in here; refer to `Plot` docs for details.
"""
pass
@property
def character(self):
# Final. Do not override.
return self._c_h_a_r_a_c_t_e_r
@property
def curtain(self):
# Final. Do not override.
return self._c_u_r_t_a_i_n
@six.add_metaclass(abc.ABCMeta)
class Sprite(object):
"""A single-cell organism that moves around a pycolab game board.
A `Sprite` is a row-column location associated with a particular character
(in all senses of the word). When the `Sprite` is rendered onto the game
board, the character will be placed in its row-column location.
"""
class Position(collections.namedtuple('Position', ['row', 'col'])):
"""Position container for `Sprite`s.
Member properties are `row` and `col`, respectively the row and column
location of the `Sprite` on the board.
"""
__slots__ = ()
def __init__(self, corner, position, character):
"""Construct a `Sprite`.
Whatever arguments your `Sprite` subclass takes, its first three should be
the same `corner`, `position`, and `character` arguments taken here.
Unless you really know what you're doing, your `Sprite` subclass should be
certain to call this `__init__` method before doing anything else in its own
constructor. Here's example code to copy and paste:
super(MyCoolSprite, self).__init__(corner, position, character)
A `Sprite` object that does not wish to be visible after construction should
have its constructor assign `self._visible = False` after calling its
superclass constructor.
Args:
corner: A `self.Position` instance whose `row` member is the height of the
game board and whose `col` member is the width of the game board.
These values should always be larger than the `row` and `col` position
of this sprite respectively.
position: A `self.Position` instance encoding the initial position of
this sprite.
character: The character that this `Sprite` paints onto the board.
Subclasses will not paint this character directly; it's here for
the object's reference when examining the arguments to `update`.
"""
# The corner member is not to be accessed directly.
self._c_o_r_n_e_r = corner
# The character member is not to be accessed directly.
self._c_h_a_r_a_c_t_e_r = character
# The position member is fine for internal access, but external callers
# must use the property. Note that the use of a namedtuple means that
# positions are always passed (and updated) by value.
self._position = position
# By default, we have a simple flag that determines whether this Sprite is
# visible. It's fine for subclasses to access and mutate this flag directly,
# or to override the self.visible property function altogether.
self._visible = True
@abc.abstractmethod
def update(self, actions, board, layers, backdrop, things, the_plot):
"""Update this `Sprite`'s position in response to the rest of the world.
This method is called once per game iteration and can replace the value of
`self.position` (though the new position ought to fall within `board`).
Upon completion, and after the backdrop and all other "things" have had a
chance to update as well, a single `self.character` will be painted on the
game board at `self.position`, at whatever time is dictated by this game's
`Engine`'s z-ordering.
This method _promises_ not to alter any of its arguments except `the_plot`.
Saving non-temporary local references to any of the arguments is probably
also a bad idea.
Args:
actions: Actions supplied by the external agent(s) in response to the last
board. Could be a scalar, could be an arbitrarily nested structure
of... stuff, it's entirely up to the game you're making. When the game
begins, however, it is guaranteed to be None; the update that this
Sprite produces then will be combined updates from other Things to
generate the first observation of the game.
board: A 2-D numpy array with dtype `uint8` containing the completely
rendered game board from the last board repaint (which usually means
the last game iteration; see `Engine` docs for details). Recall that
Python's `chr` method can turn `uint8` values into single-character
strings.
layers: A feature-map representation of all game entities (current to
the last board repaint); specifically, a dict mapping all characters
known to the game's `Engine` to `bool_` numpy arrays indicating
where those characters are found (if anywhere---these can be empty).
Note that if the game's `Engine` was constructed with
`occlusion_in_layers=True`, things that are "occluded" on `board` by
overlapping Sprites and Drapes will not be visible in these feature
maps, nor will Sprites and Drapes that are invisible.
backdrop: The `Backdrop` for this game. This is NOT guaranteed to be
current to the last repaint; it is current to the last time it was
updated, which is dictated by the update ordering specified in this
game's `Engine`. It may or may not have been updated since the last
repaint.
things: The complete inventory of Sprites and Drapes in this game, as a
dict keyed by the characters they paint onto the board. These are NOT
guaranteed to be current to the last repaint; they are current to the
last time they were updated, which is dictated by the update ordering
specified in the game's `Engine`. Some may have been updated since
the last repaint (i.e. they get updated before this `Drape`), others
not. (Note that `things[self.character] == self`.)
the_plot: A global blackboard for marking events that should be shared
between Sprites, Drapes, the Backdrop, and the game's `Engine`.
There's a lot of neat stuff in here; refer to `Plot` docs for details.
"""
pass
@property
def character(self):
# Final. Do not override.
return self._c_h_a_r_a_c_t_e_r
@property
def corner(self):
# Final. Do not override.
return self._c_o_r_n_e_r
@property
def position(self):
# Final. Do not override.
return self._position
@property
def visible(self):
return self._visible
|
pycolab-master
|
pycolab/things.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""pycolab game board cropping (and a useful way to scroll)."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import numpy as np
from pycolab import rendering
import six
class ObservationCropper(object):
"""Crop an `Observation` to a subwindow.
This class is a superclass for mechanisms that derive "subwindow"
`Observation`s from the `Observation`s that emerge from the game engine.
Cropping is a straightforward way to achieve things like scrolling,
partially-observable games on finite maps.
Subclasses of `ObservationCropper` must implement the `crop` method and the
`rows` and `cols` properties. The default implementation in this class simply
leaves the observation unmodified, "cropping" the entire window.
The basic usage instructions for `ObservationCropper`s are:
1. Construct `ObservationCropper` instance(s).
2. Prepare a pycolab game engine.
3. Pass the engine to `set_engine()` method of each `ObservationCropper`
instance.
4. Use the engine's `its_showtime()` and `play()` methods as usual, passing
all returned observations to the `crop()` method of each
`ObservationCropper` to obtain cropped observations.
Some pycolab infrastructure, like the `CursesUi`, takes care of some of these
steps automatically.
"""
def __init__(self):
self._set_engine_root_impl(None)
def set_engine(self, engine):
"""Inform the `ObservationCropper` where observations are coming from.
`ObservationCropper` objects may outlive the games they are applied to.
Whether they do or not, they are allowed access to `Engine` objects in
order to determine how and where to crop observations. This method tells
an `ObservationCropper` which game engine creates the observations being
passed to its `crop` method.
Subclasses may include certain kinds of error checking in overrides of this
method; check their own docstrings to see what they care about.
For implementers: in general, all overrides of this method should call this
superclass method, and for best results should change no state (like
performing an internal reset) if the `engine` argument is the same as
`self._engine`.
Args:
engine: the pycolab game engine that will generate the next observation
passed to `crop`, and all following observations until the next time
`set_engine` is called.
"""
self._set_engine_root_impl(engine)
def crop(self, observation):
"""Crop the observation.
Args:
observation: observation to crop, a `rendering.Observation`.
Returns:
a cropped `rendering.Observation`.
"""
return observation
@property
def rows(self):
"""The height of the subwindow."""
return self._engine.rows
@property
def cols(self):
"""The width of the subwindow."""
return self._engine.cols
### Private helpers ###
def _set_engine_root_impl(self, engine):
# This method is the core of what set_engine does, but it's also helpful for
# the constructor, so we keep it outside of set_engine so that __init__ can
# call it without worrying about overrides.
self._engine = engine
# Padding characters known to be OK for the current game engine.
self._valid_pad_chars = set(
[] if self._engine is None else
list(self._engine.things) + list(self._engine.backdrop.palette))
# Pre-allocated observation, for speed.
self._cropped = None
def _do_crop(self, observation,
top_row, left_col, bottom_row_exclusive, right_col_exclusive,
pad_char=None):
"""Helper for `ObservationCropper` subclasses: crop an observation.
`ObservationCropper` may not do any cropping, but its subclasses might. If
so, this helper can do the actual work: given an observation and the bounds
of a rectangle, it computes a view of the observation cropped by that
rectangle. The rectangle may extend beyond the bounds of the observation, in
which case the character in `pad_char` will fill spaces in the overhang.
`pad_char` must be one of the characters associated with the game's
`Sprite`s, `Drape`s, or `Backdrop`.
For speed, the cropped observation is computed by manipulating the
instance variable `self._cropped`; thus, this method is not thread-safe.
One workaround for applications that need thread safety would be to call
`_do_crop` under a lock, then copy its result before releasing the lock.
Args:
observation: `Observation` to crop.
top_row: Top row of the cropping window (inclusive).
left_col: Left column of the cropping window (inclusive).
bottom_row_exclusive: Bottom row of the cropping window (exclusive).
right_col_exclusive: Right column of the cropping window (exclusive).
pad_char: ASCII fill character to use when the cropping window extends
beyond the bounds of `observation`, or None if the cropping window
should always remain in bounds (in which case a `RuntimeError` is
raised if it does not).
Returns:
an observation cropped as described. You must copy this observation if
you need it to last longer than the next call to `_do_crop`.
Raises:
ValueError: `pad_char` is not a character used by `Sprite`s, `Drape`s, or
the `Backdrop` in the current game engine.
RuntimeError: the cropping window extends beyond the bounds of
`observation`, and `pad_char` was None.
"""
crop_rows = bottom_row_exclusive - top_row
crop_cols = right_col_exclusive - left_col
obs_rows, obs_cols = observation.board.shape
### 1. Prepare the observation that recevies the crop. ###
# See whether we need to allocate a new cropped observation. This is a
# superficial check; it doesn't detect rare cases where the types of
# characters in an observation have changed. We have a backup plan for that,
# though; look for the KeyError exception handler below.
if (self._cropped is None or
self._cropped.board.shape != (crop_rows, crop_cols) or
len(self._cropped.layers) != len(observation.layers)):
self._cropped = rendering.Observation(
board=np.zeros((crop_rows, crop_cols), dtype=observation.board.dtype),
layers={c: np.zeros((crop_rows, crop_cols), dtype=bool)
for c in observation.layers})
if self._pad_char is None:
# If there is no padding, verify that the cropping window does not extend
# outside of the observation.
if (top_row < 0 or left_col < 0 or
bottom_row_exclusive > obs_rows or right_col_exclusive > obs_cols):
raise RuntimeError(
'An ObservationCropper attempted to crop a region that extends '
'beyond the observation without specifying a character to fill the '
'void that exists out there.')
else:
# Otherwise, pre-fill the observation with the padding character.
if self._pad_char not in self._valid_pad_chars: raise ValueError(
'An `ObservationCropper` tried to fill empty space with a character '
'that isn\'t used by the current game engine.')
self._cropped.board.fill(ord(self._pad_char))
for char, layer in six.iteritems(self._cropped.layers):
layer.fill(self._pad_char == char)
### 2. Compute the slices of data that we will copy. ###
# Figure out the portion of the observation covered by the cropping window.
from_tr = max(0, top_row)
from_lc = max(0, left_col)
from_bre = max(0, min(obs_rows, bottom_row_exclusive))
from_rce = max(0, min(obs_cols, right_col_exclusive))
from_slice = np.s_[from_tr:from_bre, from_lc:from_rce]
# Figure out where that portion will be placed in the cropped observation.
to_tr = max(0, -top_row)
to_lc = max(0, -left_col)
to_bre = min(crop_rows, max(0, obs_rows - top_row))
to_rce = min(crop_cols, max(0, obs_cols - left_col))
to_slice = np.s_[to_tr:to_bre, to_lc:to_rce]
### 3. Attempt to copy the data into the cropped observation. ###
self._cropped.board[to_slice] = observation.board[from_slice]
# It's here in the copy where we might discover that we need to allocate a
# new cropped observation after all---it happens when a layer we'd like to
# copy turns out not to exist in the observation. We abandon the
# pre-allocated observation and start all over again. Fairly inefficient,
# but it should happen only very rarely.
try:
for char, layer in six.iteritems(self._cropped.layers):
layer[to_slice] = observation.layers[char][from_slice]
except KeyError:
self._cropped = None
return self._do_crop(
observation,
top_row, left_col, bottom_row_exclusive, right_col_exclusive,
pad_char)
return self._cropped
class FixedCropper(ObservationCropper):
"""A cropper that cuts a fixed subwindow from an `Observation`."""
def __init__(self, top_left_corner, rows, cols, pad_char=None):
"""Initialise a `FixedCropper`.
A `FixedCropper` crops out a fixed subwindow of the observation.
Args:
top_left_corner: Cropping window top-left `(row, column)` (inclusive).
rows: Height of the cropping window.
cols: Width of the cropping window.
pad_char: ASCII fill character to use when the cropping window extends
beyond the bounds of `observation`, or None if the cropping window
will always remain in bounds (in which case a `RuntimeError` is
raised if it does not).
"""
super(FixedCropper, self).__init__()
self._top_row, self._left_col = top_left_corner
self._rows = rows
self._cols = cols
self._pad_char = pad_char
self._bottom_row_exclusive = self._top_row + self._rows
self._right_col_exclusive = self._left_col + self._cols
def crop(self, observation):
return self._do_crop(
observation,
self._top_row, self._left_col,
self._bottom_row_exclusive, self._right_col_exclusive,
self._pad_char)
@property
def rows(self):
return self._rows
@property
def cols(self):
return self._cols
class ScrollingCropper(ObservationCropper):
"""A cropper that scrolls to track moving game entities."""
def __init__(self, rows, cols, to_track, pad_char=None,
scroll_margins=(2, 3), initial_offset=None, saccade=True):
"""Initialise a `ScrollingCropper`.
A `ScrollingCropper` does its best to slide fixed-size cropping windows
around the game board in a way that keeps one of several designated
`Sprite`s or `Drape`s in view. The resulting observation appears to
pan around the game board, tracking one of the game's entities.
Args:
rows: number of rows in the scrolling window.
cols: number of columns in the scrolling window.
to_track: a list of ASCII characters indicating, in order, which `Sprite`
or `Drape` to track about the game board. If the `ScrollingCropper`
can't derive a location for `to_track[0]` (e.g. because it's a
`Sprite` that made itself invisible, or a `Drape` with an empty
curtain), then it attempts to find a location for `to_track[1]`, and
so on. (If it can't find a location for any trackable entity, the
`ScrollingCropper` will remain in its current location.) If you think
you'll have lots of game entities that alternate between being visible
and invisible, it may be useful to read the documentation for the last
three arguments.
pad_char: either None to indicate that no part of the scrolling window
should extend beyond the game board, or an ASCII character to fill the
out-of-bounds part of the scrolling window if it does. The character
must be one that is already used by the `Backdrop` or one of the
`Sprite`s or `Drape`s. If None, the need to retain the window on the
board will override any other scrolling constraint.
scroll_margins: a 2-tuple `(r, c)`. `ScrollingCropper` will attempt to
keep tracked `Sprite`s and `Drape`s no fewer than `r` rows
(`c` columns) away from the edge of the scrolling window. If `r` (`c`)
is None, `ScrollingCropper` will try to scroll so that the tracked
entity is in the very centre row (column); in this case, though, the
`rows` (`cols`) argument must be odd. (Finally... if `initial_offset`
would initialise a window so that the tracked entity is outside of the
bounds implied by `scroll margins`, well, you find yourself in a bit
of a flowchart situation:
* If the entity is just one row or column outside of bounds, then
the `ScrollingCropper` will just scroll smoothly so that the
entity is back in bounds.
* Otherwise, if the entity is even further out of bounds:
- If `saccade` is True, the `ScrollingCropper` will "jump" so
that the entity is centred.
- Otherwise, the entity will just have to wander back inside the
bounds for scrolling to begin.)
initial_offset: if None; the `ScrollingCropper` will initialise
scrolling windows so that tracked entities are right in the middle;
otherwise, a 2-tuple `(dr, dc)` that shifts the entity `dr` rows
downward and `dc` columns rightward at the very first frame of the
game. (Do see note about this at `scroll_margins`.)
saccade: if True, then if the current trackable entity is ever outside of
the bounds implied by `scroll_margins`, the scrolling window will
"jump" so that the entity is centred. Note that this could lead to
very jumpy behaviour if entities mentioned in `to_track` frequently
appear and disappear or change size. Also, see note on interactions
with `initial_offset` and `scroll_margins` in the documentation for
`scroll_margins`.
Raises:
ValueError: some input arguments are misconfigured; scroll margins
touch or overlap each other in the middle of the window or a None
scroll margin is specified for an even-sized dimension.
"""
super(ScrollingCropper, self).__init__()
self._rows = rows
self._cols = cols
self._to_track = copy.copy(to_track)
self._pad_char = pad_char
if ((scroll_margins[0] is None and (rows % 2 == 0)) or
(scroll_margins[1] is None and (cols % 2 == 0))):
raise ValueError(
'A ScrollingCropper can\'t perform perfectly-egocentric scrolling '
'with a window that has an even number of rows or columns. Either '
'specify looser scroll margins or use a window with odd dimensions.')
scroll_margins = (
(rows // 2) if scroll_margins[0] is None else scroll_margins[0],
(cols // 2) if scroll_margins[1] is None else scroll_margins[1])
if (2 * scroll_margins[0]) >= rows or (2 * scroll_margins[1]) >= cols:
raise ValueError(
'A ScrollingCropper can\'t use scroll margins which extend to or '
'beyond the very centre of the scrolling window. (Note that if you '
'haven\'t specified scroll margins and your window is very small or '
'thin, the default scroll_margins argument might be too big!)')
self._scroll_margins = scroll_margins
self._initial_offset = (
initial_offset if initial_offset is not None else (0, 0))
self._saccade = saccade
# The location of the top-left corner of the scrolling window is
# uninitialised at first.
self._corner = None
def set_engine(self, engine):
"""Overrides `set_engine` to do checks and an internal reset.
Args:
engine: see `ObservationCropper.set_engine`.
Raises:
ValueError: the engine's board is smaller than the scrolling window, and
no pad character was specified to the constructor.
"""
prior_engine = self._engine # So we can test whether to reset, below.
super(ScrollingCropper, self).set_engine(engine)
# If we're actually switching the engine whose observations we're cropping,
# do an internal reset.
if engine is not prior_engine:
if ((self._engine.rows < self._rows or self._engine.cols < self._cols)
and self._pad_char is None): raise ValueError(
'A ScrollingCropper with a size of {} and no pad character '
'can\'t be used with a pycolab engine that produces smaller '
'observations in any dimension (in this case, {})'.format(
(self._rows, self._cols),
(self._engine.rows, self._engine.cols)))
# Force crop to reinitialise the window.
self._corner = None
def crop(self, observation):
# Identify the location we should track.
centroid = self._centroid_to_track()
# Compute the new location of the scrolling window.
# First, if there is no window yet, place it for the first time.
if self._corner is None:
init_row, init_col = self._initial_offset
self._initialise(centroid, (self._rows // 2 + init_row,
self._cols // 2 + init_col))
# Otherwise, if there's something to track, update the window's location.
elif centroid is not None:
# The trackable thing is visible inside the window (or just outside if
# we have a 0 margin). Smoothly pan if needed to keep it in view.
if self._can_pan_to(centroid):
self._pan_to(centroid)
# The trackable thing is well outside of the window! If we're allowed to
# jump over to where it is, do so, and centre the trackable thing in the
# window if possible.
elif self._saccade:
self._initialise(centroid, (self._rows // 2, self._cols // 2))
# Otherwise do no update at all. Wait for a trackable thing to wander back
# into the window so that we can start tracking it again.
# Crop out the scrolling window.
tlr, tlc = self._corner # pylint: disable=unpacking-non-sequence
return self._do_crop(
observation,
tlr, tlc,
tlr + self._rows, tlc + self._cols,
self._pad_char)
@property
def rows(self):
return self._rows
@property
def cols(self):
return self._cols
### Private helpers ###
def _initialise(self, centroid, offset):
"""Set the top-left corner of the scrolling window for the first time.
Args:
centroid: centroid of an item to track in the scrolling window, offset
from the top-left corner by `offset`. If None, the window will be
placed at the top-left corner of the game board.
offset: a 2-tuple `(r, c)`; if centroid is not None, then the contents
of the scrolling window will be shifted `r` rows downward and `c`
rows rightward.
"""
if centroid is None:
self._corner = (0, 0)
return
# We have a centroid. The top-left corner of the scrolling window is
# displaced from it by the initial scrolling offset.
self._corner = (centroid[0] - offset[0], centroid[1] - offset[1])
# Keep the window inside the observation, if necessary.
if self._pad_char is None: self._rectify()
def _can_pan_to(self, centroid):
"""Determine whether the scrolling window can smoothly pan to `centroid`.
A scrolling window can smoothly pan to `centroid` if `centroid` is either
within the margin-padded region inset within the window, or one row/column
outside of that region. Note that "can pan" doesn't mean "needs to pan";
even a perfectly-centred centroid makes `_can_pan_to` return True. Also,
there are some relaxations of this requirement if the window is butting
up against (and not allowed to extend outside of) the game board.
Args:
centroid: a (row, column) tuple.
Returns:
True iff the scrolling window can smoothly pan to `centroid`.
"""
# pylint: disable=unpacking-non-sequence
crow, ccol = centroid # C as in Centroid.
wrow, wcol = self._corner # W as in Window.
mrow, mcol = self._scroll_margins # M as in Margins.
# pylint: enable=unpacking-non-sequence
# Check whether we can pan vertically. We first test the typical case,
# where the window is not bumping up against the edge of the game board.
can_vert = (mrow - 1) <= (crow - wrow) <= (self._rows - mrow)
# Check whether we can pan horzontally. We test the typical case here, too.
can_horiz = (mcol - 1) <= (ccol - wcol) <= (self._cols - mcol)
# Can't pan normally? Maybe we can work out an excuse having to do with the
# window being up against an edge of the game board.
if self._pad_char is None:
# Can't scroll vertically?
if not can_vert:
if wrow <= 0: # See if we're stuck on the top.
can_vert = crow <= mrow
elif wrow >= (self._engine.rows - self._rows): # Or on the bottom.
can_vert = crow >= (wrow + self._rows - mrow)
# Can't scroll horizontally?
elif not can_horiz: # Don't bother if we can't pan vertically...
if wcol <= 0: # See if we're stuck on the left.
can_horiz = ccol <= mcol
elif wcol >= (self._engine.cols - self._cols): # Or on the right.
can_horiz = ccol >= (wcol + self._cols - mcol)
return can_vert and can_horiz
def _pan_to(self, centroid):
"""Smoothly pan the scrolling window to cover `centroid`.
Shifts the location of the scrolling window the minimum distance required
in order for `centroid` to be inside the margin-padded region inset within
the window.
Args:
centroid: a (row, column) tuple.
"""
# pylint: disable=unpacking-non-sequence
crow, ccol = centroid # C as in Centroid.
wrow, wcol = self._corner # W as in Window.
mrow, mcol = self._scroll_margins # M as in Margins.
# pylint: enable=unpacking-non-sequence
# For panning the scrolling window up or leftward, if necessary.
drow = min(0, crow - wrow - mrow)
dcol = min(0, ccol - wcol - mcol)
# For panning the scrolling window down or rightward, if necessary.
if drow == 0: drow += max(0, crow - wrow - self._rows + mrow + 1)
if dcol == 0: dcol += max(0, ccol - wcol - self._cols + mcol + 1)
# Apply the pan, but keep the window inside the game board if necessary.
self._corner = (wrow + drow, wcol + dcol)
if self._pad_char is None: self._rectify()
def _rectify(self):
"""Force the scrolling window to remain inside the observation."""
# This method assumes that the game board is larger than the window.
tlr, tlc = self._corner # pylint: disable=unpacking-non-sequence
tlr = max(0, tlr) - max(0, tlr + self._rows - self._engine.rows)
tlc = max(0, tlc) - max(0, tlc + self._cols - self._engine.cols)
self._corner = (tlr, tlc)
def _centroid_to_track(self):
"""Obtain the central location of the game entity we should track.
This method tries to derive centroids for game entities in the priority
ordering specified by the `to_track` constructor argument.
Returns:
either a 2-tuple `(row, col)` centroid to track, or None if the method
could find no trackable centroid.
"""
# We search in the priority ordering specified by self._to_track.
for entity in self._to_track:
centroid = self._centroid(entity)
if centroid is not None: return centroid
return None # Can't find a centroid for anything we want to track!
def _centroid(self, entity):
"""Obtain the central location of a `Sprite` or `Drape`.
This method works by inspecting `Sprite`s and `Drape`s within the game
engine and not via analysing observations.
Args:
entity: ASCII character designating the game entity whose centroid we
should attempt to find.
Returns:
either a 2-tuple `(row, col)` centroid for `entity`, or None if the game
entity has no centroid (if a sprite, it's not visible; if a drape, the
drape's entire curtain is False).
Raises:
RuntimeError: `entity` corresponds to no game entity.
"""
# Obtain the item we're trying to track.
try:
sprite_or_drape = self._engine.things[entity]
except KeyError:
raise RuntimeError(
'ScrollingCropper was told to track a nonexistent game entity '
'{!r}.'.format(entity))
# Hope it's a Sprite and try to get its position. An invisible sprite has
# no position at all.
try:
if not sprite_or_drape.visible: return None
return tuple(sprite_or_drape.position)
except AttributeError:
pass
# If here, it's a Drape, not a Sprite. Compute the centroid of its
# curtain and return that. An empty Drape has no centroid.
curtain = sprite_or_drape.curtain
if not curtain.any(): return None
return tuple(int(np.median(dim)) for dim in curtain.nonzero())
|
pycolab-master
|
pycolab/cropping.py
|
# Copyright 2018 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The pycolab "Plot" blackboard.
All details are in the docstring for `Plot`.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from pycolab.protocols import logging as plab_logging
class Plot(dict):
"""The pycolab "plot" object---a blackboard for communication.
By design, a game's `Engine`, its `Backdrop`, and its `Sprite`s and `Drape`s
are not really meant to talk to each other directly; instead, they leave
messages for each other in the game's `Plot` object. With the exception of
messages to the `Engine`, these messages are free-form and persistent; in
fact, let's drop the pretense---a `Plot` is really just a `dict` with some
extra methods and properties, and to talk to each other, these entities should
just modify the dict in the usual ways, adding, removing, and modyfing
whatever entries they like. (Responsibly, of course.)
(Note: in a limited way, the `Backdrop` and `Sprite`s and `Drape`s are allowed
to inspect each other, but these inspections should be limited to small,
read-only interactions via public methods and attributes. This capability is
only really there to simplify things like getting the row/col coordinates of
other sprites. Try not to abuse it!)
(Note 2: Game developers who are designing ways for `Sprite`s, `Drape`s and
the `Backdrop` to communicate with each other via the `Plot` object might find
the `setdefault` method on `dict` to be especially useful. Or not.)
The messages to the Engine have more structure. A `Backdrop`, a `Sprite`, or
a `Drape` can direct the engine to do any of the following:
* Change the z-ordering of the `Sprite`s and `Drape`s.
* Add some quantity to the reward being returned to the player (or player)
in response to their action.
* Terminate the game.
A dedicated method exists within the `Plot` object for all of these actions.
The `Plot` object also has an imporant role for games that participate in
`Story`s: values in the `Plot` persist between games; in fact, they are the
only data guaranteed to do so. Individual games that participate in a `Story`
also use the `Plot` to control what happens next after they terminate.
Lastly, the `Plot` object contains a number of public attributes that the
`Engine` can use to communicate various statistics about the game to the
various other game entities.
"""
class _EngineDirectives(object):
"""A container for instructions for modifying an `Engine`'s internal state.
External code is not meant to manipulate `_EngineDirectives` objects
directly, but `Engine` and `Plot` objects can do it. Properties of this
class include:
* `z_updates`: an indexable of 2-tuples `(c1, c2)`, whose semantics are
"move the `Sprite` or `Drape` that paints with character `c1` in front of
the `Sprite` or `Drape` that paints with character `c2`." If `c2` is
None, the `Sprite` or `Drape` is moved all the way to the back of the
z-order (i.e. behind everything except the `Backdrop`).
* `summed_reward`: None, if there is no reward to be reported to the player
(or players) during a game iteration. Otherwise, this can be any value
appropriate to the game. If there's ever any chance that more than one
entity (`Sprite`, `Drape`, or `Backdrop`) would supply a reward during a
game iteration, the value should probably be of a type that supports the
`+` operator in a relevant way.
* `game_over`: a boolean value which... is True until the game is over.
* `discount`: reinforcement learning discount factor to report to the
player during a game iteration; typically a fixed value until the end of
the game is reached, then 0.
"""
# For fast access
__slots__ = ('z_updates', 'summed_reward', 'game_over', 'discount')
def __init__(self):
"""Construct a no-op `_EngineDirectives`.
Builds an `_EngineDirectives` that indicate that the `Engine` should not
change any state.
"""
self.z_updates = []
self.summed_reward = None
self.game_over = False
self.discount = 1.0
def __init__(self):
"""Construct a new `Plot` object."""
super(Plot, self).__init__()
# The current frame actually starts at -1, but before any of the
# non-`Engine` entities see it, it will have been incremented to 0 for the
# first frame.
self._frame = -1
# Will hold the current update group when the `update` methods of `Sprite`s
# and `Drape`s are called.
self._update_group = None
# For Storys only: holds keys or indices indicating which game preceded
# the current game, which game is the current game, and which game should
# be started next after the current game terminates, respectively. A None
# value for _next_chapter means that the story should terminate after the
# current game ends.
#
# These members are not used if a Story is not underway.
self._prior_chapter = None
self._this_chapter = None
self._next_chapter = None
# Set an initial set of engine directives (at self._engine_directives),
# which basically amount to telling the Engine do nothing.
self._clear_engine_directives()
### Public methods for changing global game state. ###
def change_z_order(self, move_this, in_front_of_that):
"""Tell an `Engine` to change the z-order of some `Sprite`s and/or `Drape`s.
During a game iteration, the `Backdrop` and each `Sprite` or `Drape` has
an opportunity to call this method as often as it wants. Each call indicates
that one `Sprite` or `Drape` should appear in front of another---or in
front of no other if it should be moved all the way to the back of the
z-order, behind everything else except for the `Backdrop`.
These requests are processed at each game iteration after the `Engine` has
consulted the `Backdrop` and all `Sprite`s and `Layer`s for updates, but
before the finished observation to be shown to the player (or players) is
rendered. The requests are processed in the order they are made to the
`Plot` object, so this ordering of requests:
'#' in front of '$'
'$' in front of '%'
could result in a different `Sprite` or `Drape` being foremost from the
reverse ordering.
Args:
move_this: the character corresponding to the `Sprite` or `Drape` to move
in the z-order.
in_front_of_that: the character corresponding to the `Sprite` or `Drape`
that the moving entity should move in front of, or None if the moving
entity should go all the way to the back (just in front of the
`Backdrop`).
Raises:
ValueError: if `move_this` or `in_front_of_that` are not both single ASCII
characters.
"""
self._value_error_if_character_is_bad(move_this)
if in_front_of_that is not None:
self._value_error_if_character_is_bad(in_front_of_that)
# Construct a new set of engine directives with updated z-update directives.
self._engine_directives.z_updates.append((move_this, in_front_of_that))
def terminate_episode(self, discount=0.0):
"""Tell an `Engine` to terminate the current episode.
During a game iteration, any `Backdrop`, `Sprite`, or `Drape` can call this
method. Once the `Engine` has finished consulting these entities for
updates, it will mark the episode as complete, render the final observation,
and return it to the player (or players).
Args:
discount: reinforcement learning discount factor to associate with this
episode termination; must be in the range [0, 1]. Ordinary episode
terminations should use the default value 0.0; rarely, some
environments may use different values to mark interruptions or other
abnormal termination conditions.
Raises:
ValueError: if `discount` is not in the [0,1] range.
"""
if not 0.0 <= discount <= 1.0:
raise ValueError('Discount must be in range [0,1].')
# Construct a new set of engine directives with the death warrant signed.
self._engine_directives.game_over = True
self._engine_directives.discount = discount
def add_reward(self, reward):
"""Add a value to the reward the `Engine` will return to the player(s).
During a game iteration, any `Backdrop`, `Sprite`, or `Drape` can call this
method to add value to the reward that the `Engine` will return to the
player (or players) for having taken the action (or actions) supplied in the
`actions` argument to `Engine`'s `play` method.
This value need not be a number, but can be any kind of value appropriate to
the game. If there's ever any chance that more than one `Sprite`, `Drape`,
or `Backdrop` would supply a reward during a game iteration, the value
should probably be of a type that supports the `+=` operator in a relevant
way, since this method uses addition to accumulate reward. (For custom
classes, this typically means implementing the `__iadd__` method.)
If this method is never called during a game iteration, the `Engine` will
supply None to the player (or players) as the reward.
Args:
reward: reward value to accumulate into the current game iteration's
reward for the player(s). See discussion for details.
"""
if self._engine_directives.summed_reward is None:
self._engine_directives.summed_reward = reward
else:
self._engine_directives.summed_reward += reward
def log(self, message):
"""Log a message for eventual disposal by the game engine user.
Here, "game engine user" means a user interface or an environment interface,
which may eventually display the message to an actual human being in a
useful way (writing it to a file, showing it in a game console, etc.).
**Calling this method doesn't mean that a log message will appear in the
process logs.** It's up to your program to collect your logged messages from
the `Plot` object and dispose of them appropriately.
See `protocols/logging.py` for more details. (This function is sugar for the
`log` function in that module.)
Args:
message: A string message to convey to the game engine user.
"""
plab_logging.log(self, message)
def change_default_discount(self, discount):
"""Change the discount reported by the `Engine` for non-terminal steps.
During a game iteration, the `Backdrop` and each `Sprite` or `Drape` have an
opportunity to call this method (but don't have to). The last one to call
will determine the new reinforcement learning discount factor that will be
supplied to the player at every non-terminal step (until this method is
called again).
Even for the same game, discounts often need to be different for different
agent architectures, so conventional approaches to setting a fixed
non-terminal discount factor include building a discount multiplier into
your agent or using some kind of wrapper that intercepts and changes
discounts before the agent sees them. This method here is mainly reserved
for rare settings where those approaches would not be suitable. Most games
will not need to use it.
Args:
discount: New value of discount in the range [0,1].
Raises:
ValueError: if `discount` is not in the [0,1] range.
"""
if not 0.0 <= discount <= 1.0:
raise ValueError('Default discount must be in range [0,1].')
self._engine_directives.discount = discount
@property
def frame(self):
"""Counts game iterations, with the first iteration starting at 0."""
return self._frame
@property
def update_group(self):
"""The current update group being consulted by the `Engine`."""
return self._update_group
@property
def default_discount(self):
"""The current non-terminal discount factor used by the `Engine`."""
return self._engine_directives.discount
### Public properties for global story state. ###
@property
def prior_chapter(self):
"""Key/index for the prior game in a `Story`, or None for no prior game."""
return self._prior_chapter
@property
def this_chapter(self):
"""Key/index for the current game in a `Story`."""
return self._this_chapter
@property
def next_chapter(self):
"""Key/index for the next game in a `Story`, or None for no next game."""
return self._next_chapter
@next_chapter.setter
def next_chapter(self, next_chapter):
"""Indicate which game should appear next in the current `Story`.
If the current game is running as part of a `Story`, and if that `Story` was
initialised with a dict as the `chapters` constructor argument, this method
allows game entities to indicate which entry in the `chapters` dict holds
the next game that the `Story` should run after the current game terminates.
Or, if called with a `None` argument, this method directs the `Story` to
report termination to the player after the current game terminates. Either
way, the last call to this method before termination is the one that
determines what actually happens.
This method only does something meaningful if a `Story` is actually underway
and if the `Story`'s `chapters` constructor argument was a dict; otherwise
it has no effect whatsoever.
Args:
next_chapter: A key into the dict passed as the `chapters` argument to the
`Story` constructor, or None. No checking is done against `chapters`
to ensure that this argument is a valid key.
"""
self._next_chapter = next_chapter
### Setters and other helpers for Engine ###
@frame.setter
def frame(self, val):
"""Update game iterations. Only `Engine` and tests may use this setter."""
assert val == self._frame + 1 # Frames increase one-by-one.
self._frame = val
@update_group.setter
def update_group(self, group):
"""Set the current update group. Only `Engine` and tests may do this."""
self._update_group = group
def _clear_engine_directives(self):
"""Reset this `Plot`'s set of directives to the `Engine`.
The reset directives essentially tell the `Engine` to make no changes to
its internal state. The `Engine` will typically call this method at the
end of every game iteration, once all of the existing directives have been
consumed.
Only `Engine` and `Plot` methods may call this method.
"""
self._engine_directives = self._EngineDirectives()
def _get_engine_directives(self):
"""Accessor for this `Plot`'s set of directives to the `Engine`.
Only `Engine` and `Plot` methods may call this method.
Returns:
This `Plot`'s set of directions to the `Engine`.
"""
return self._engine_directives
### Setters and other helpers for Story ###
@prior_chapter.setter
def prior_chapter(self, val):
"""Update last chapter. Only `Story` and tests may use this setter."""
self._prior_chapter = val
@this_chapter.setter
def this_chapter(self, val):
"""Update current chapter. Only `Story` and tests may use this setter."""
self._this_chapter = val
### Private helpers for error detection ###
def _value_error_if_character_is_bad(self, character):
try:
ord(character)
except TypeError:
raise ValueError(
'{} was used as an argument in a call to change_z_order, but only '
'single ASCII characters are valid arguments'.format(repr(character)))
|
pycolab-master
|
pycolab/plot.py
|
# coding=utf8
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""pycolab game board rendering for both humans and machines."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import numpy as np
import six
class Observation(collections.namedtuple('Observation', ['board', 'layers'])):
"""A container for pycolab observations.
Natively, the pycolab engine renders observations as one of these objects
(although code in this module and others may help you change them to something
more palatable to you). There are two properties:
* `board`: a 2-D numpy array of type uint8. This is, in a sense, an ASCII-art
diagram, and when a `BaseObservationRenderer` creates an `Observation`, the
values are the actual ASCII character values that are arranged on different
parts of the game board by the `Backdrop` and the `Sprite`s and `Drape`s.
* `layers`: a dict mapping every ASCII character that could possibly appear on
a game board (that is, according to the configuration of the `Engine`) to
binary mask numpy arrays. If the `Engine` was constructed with
`occlusion_in_layers=True`, the mask for a character shows only where that
character appears in `board`; otherwise, the mask shows all locations where
the `Backdrop` or the corresponding `Sprite` or `Drape` place that
character, even if some of those locations are covered by other game
entities that appear later in the Z-order. It is not uncommon for some masks
in `layers` to be empty (i.e. all False).
Here is a quick one-liner for visualising a board (and in python 2.7, you
don't even need the `.decode('ascii')` part):
for row in observation.board: print(row.tostring().decode('ascii'))
Important note 1: the values in this object should be accessed in a
*read-only* manner exclusively.
Important note 2: the `ObservationRenderer` makes no guarantees about whether
the contents of an `Observation` obtained for game iteration `t` will remain
unchanged in any game iteration `t' > t`.
If you want to save old information, or you want to scribble on what's here,
you had better make your own copy.
"""
__slots__ = ()
class BaseObservationRenderer(object):
"""Renderer of "base" pycolab observations.
This class renders the most basic form of pycolab observations, which are
described in some detail in the docstring for `Observation`. Every `Engine`
will create its observations with an instance of this class.
A `BaseObservationRenderer` is a stateful object that might be imagined like
a canvas. Rendering an observation proceeds in the following pattern:
1. Clear the canvas with the `clear()` method.
2. Paint `Backdrop`, `Sprite`, and `Drape` data onto the canvas via the
`paint*` methods, from back to front according to the z-order (`Backdrop`
first, of course).
3. Call the `render()` method to obtain the finished observation.
"""
def __init__(self, rows, cols, characters):
"""Construct a BaseObservationRenderer.
Args:
rows: height of the game board.
cols: width of the game board.
characters: an iterable of ASCII characters that are allowed to appear
on the game board. (A string will work as an argument here.)
"""
self._board = np.zeros((rows, cols), dtype=np.uint8)
self._layers = {
char: np.zeros((rows, cols), dtype=np.bool_) for char in characters}
def clear(self):
"""Reset the "canvas" of this `BaseObservationRenderer`.
After a `clear()`, a call to `render()` would return an `Observation` whose
`board` contains only `np.uint8(0)` values and whose layers contain only
`np.bool_(False)` values.
"""
self._board.fill(0)
def paint_all_of(self, curtain):
"""Copy a pattern onto the "canvas" of this `BaseObservationRenderer`.
Copies all of the characters from `curtain` onto this object's canvas,
overwriting any data underneath. This method is the usual means by which
`Backdrop` data is added to an observation.
Args:
curtain: a 2-D `np.uint8` array whose dimensions are the same as this
`BaseObservationRenderer`'s.
"""
np.copyto(self._board, curtain, casting='no')
def paint_sprite(self, character, position):
"""Draw a character onto the "canvas" of this `BaseObservationRenderer`.
Draws `character` at row, column location `position` of this object's
canvas, overwriting any data underneath. This is the usual means by which
a `Sprite` is added to an observation.
Args:
character: a string of length 1 containing an ASCII character.
position: a length-2 indexable whose values are the row and column where
`character` should be drawn on the canvas.
Raises:
ValueError: `character` is not a valid character for this game, according
to the `Engine`'s configuration.
"""
if character not in self._layers:
raise ValueError('character {} does not seem to be a valid character for '
'this game'.format(str(character)))
self._board[tuple(position)] = ord(character)
def paint_drape(self, character, curtain):
"""Fill a masked area on the "canvas" of this `BaseObservationRenderer`.
Places `character` into all non-False locations in the binary mask
`curtain`, overwriting any data underneath. This is the usual means by which
a `Drape` is added to an observation.
Args:
character: a string of length 1 containing an ASCII character.
curtain: a 2-D `np.bool_` array whose dimensions are the same as this
`BaseObservationRenderer`s.
Raises:
ValueError: `character` is not a valid character for this game, according
to the `Engine`'s configuration.
"""
if character not in self._layers:
raise ValueError('character {} does not seem to be a valid character for '
'this game'.format(str(character)))
self._board[curtain] = ord(character)
def render(self):
"""Derive an `Observation` from this `BaseObservationRenderer`'s "canvas".
Reminders: the values in the returned `Observation` should be accessed in
a *read-only* manner exclusively; furthermore, if any
`BaseObservationRenderer` method is called after `render()`, the contents
of the `Observation` returned in that `render()` call are *undefined*
(i.e. not guaranteed to be anything---they could be blank, random garbage,
whatever).
Returns:
An `Observation` whose data members are derived from the information
presented to this `BaseObservationRenderer` since the last call to its
`clear()` method.
"""
for character, layer in six.iteritems(self._layers):
np.equal(self._board, ord(character), out=layer)
return Observation(board=self._board, layers=self._layers)
@property
def shape(self):
"""The 2-D dimensions of this `BaseObservationRenderer`."""
return self._board.shape
class BaseUnoccludedObservationRenderer(object):
"""Renderer of "base" pycolab observations.
Similar to `BaseObservationRenderer` except that multiple layers can have
a `True` value at any given position. This is different from
`BaseObservationRenderer` where layers with lower z-ordering can get occluded
by higher layers.
"""
def __init__(self, rows, cols, characters):
"""Construct a BaseUnoccludedObservationRenderer.
Args:
rows: height of the game board.
cols: width of the game board.
characters: an iterable of ASCII characters that are allowed to appear
on the game board. (A string will work as an argument here.)
"""
self._board = np.zeros((rows, cols), dtype=np.uint8)
self._layers = {
char: np.zeros((rows, cols), dtype=np.bool_) for char in characters}
def clear(self):
"""Reset the "canvas" of this renderer.
After a `clear()`, a call to `render()` would return an `Observation` whose
`board` contains only `np.uint8(0)` values and whose layers contain only
`np.bool_(False)` values.
"""
self._board.fill(0)
for layer in six.itervalues(self._layers):
layer.fill(False)
def paint_all_of(self, curtain):
"""Copy a pattern onto the "canvas" of this renderer.
Copies all of the characters from `curtain` onto this object's canvas.
This method is the usual means by which `Backdrop` data is added to an
observation.
Args:
curtain: a 2-D `np.uint8` array whose dimensions are the same as this
renderer's.
"""
np.copyto(self._board, curtain, casting='no')
for character, layer in six.iteritems(self._layers):
np.equal(curtain, ord(character), out=layer)
def paint_sprite(self, character, position):
"""Draw a character onto the "canvas" of this renderer.
Draws `character` at row, column location `position` of this object's
canvas. This is the usual means by which a `Sprite` is added to an
observation.
Args:
character: a string of length 1 containing an ASCII character.
position: a length-2 indexable whose values are the row and column where
`character` should be drawn on the canvas.
Raises:
ValueError: `character` is not a valid character for this game, according
to the `Engine`'s configuration.
"""
if character not in self._layers:
raise ValueError('character {} does not seem to be a valid character for '
'this game'.format(str(character)))
position = tuple(position)
self._board[position] = ord(character)
self._layers[character][position] = True
def paint_drape(self, character, curtain):
"""Fill a masked area on the "canvas" of this renderer.
Places `character` into all non-False locations in the binary mask
`curtain`. This is the usual means by which a `Drape` is added to an
observation.
Args:
character: a string of length 1 containing an ASCII character.
curtain: a 2-D `np.bool_` array whose dimensions are the same as this
renderer's.
Raises:
ValueError: `character` is not a valid character for this game, according
to the `Engine`'s configuration.
"""
if character not in self._layers:
raise ValueError('character {} does not seem to be a valid character for '
'this game'.format(str(character)))
self._board[curtain] = ord(character)
np.copyto(self._layers[character], curtain)
def render(self):
"""Derive an `Observation` from this renderer's "canvas".
Reminders: the values in the returned `Observation` should be accessed in
a *read-only* manner exclusively; furthermore, if any renderer method is
called after `render()`, the contents of the `Observation` returned in that
`render()` call are *undefined* (i.e. not guaranteed to be anything---they
could be blank, random garbage, whatever).
Returns:
An `Observation` whose data members are derived from the information
presented to this renderer since the last call to its `clear()` method.
The `board` is a numpy array where characters overlapping is resolved by
picking the one with the highest z-ordering. The `layers` show all
characters, whether or not they have been occluded in the `board`.
"""
return Observation(board=self._board, layers=self._layers)
@property
def shape(self):
"""The 2-D dimensions of this renderer."""
return self._board.shape
class ObservationCharacterRepainter(object):
"""Repaint an `Observation` with a different set of characters.
An `Observation` made by `BaseObservationRenderer` will draw each `Sprite`
and `Drape` with a different character, which itself must be different from
the characters used by the `Backdrop`. This restriction may not be desirable
for all games, so this class allows you to create a new `Observation` that
maps the characters in the original observation to a different character set.
This mapping need not be one-to-one.
"""
def __init__(self, character_mapping):
"""Construct an `ObservationCharacterRepainter`.
Builds a callable that will take `Observation`s and emit new `Observation`s
whose characters are the characters of the original `Observation` mapped
through `character_mapping`.
It's not necessary for `character_mapping` to include entries for all of
the characters that might appear on a game board---those not listed here
will be passed through unchanged.
Args:
character_mapping: A dict mapping characters (as single-character ASCII
strings) that might appear in original `Observation`s passed to
`__call__` to the characters that should be used in `Observation`s
returned by `__call__`. Do not change this dict after supplying it
to this constructor.
"""
# Preserve a local reference to the character mapping.
self._character_mapping = character_mapping
# We will use an ObservationToArray object to perform the repainting, which
# means we will need a mapping where (a) values are numerical ASCII
# codepoints instead of characters, and (b) we supply identity mappings for
# all ASCII characters not in character_mapping.
value_mapping = {chr(x): np.uint8(x) for x in range(128)}
value_mapping.update(
{k: np.uint8(ord(v)) for k, v in six.iteritems(character_mapping)})
# With that, we construct the infrastructure that can repaint the characters
# used in the observation board.
self._board_converter = ObservationToArray(value_mapping)
# This member will hold all of the characters that can appear in the
# Observations output by this repainter, but we will need to see at least
# one Observation to know what they are.
self._output_characters = None
# This member has the same semantics as its `BaseObservationRenderer`
# counterpart, but will be constructed lazily, i.e. as soon as we have an
# Observation to convert.
self._layers = None
def __call__(self, original_observation):
"""Applies character remapping to `original_observation`.
Returns a new `Observation` whose contents are the `original_observation`
after the character remapping passed to the constructor have been applied
to all of its characters.
Note: the values in the returned `Observation` should be accessed in
a *read-only* manner exclusively; furthermore, if this method is called
again, the contents of the `Observation` returned in the first call to
this method are *undefined* (i.e. not guaranteed to be anything---they could
be blank, random garbage, whatever).
Args:
original_observation: an `Observation` from which this method derives a
a new post-character-mapping `Observation.
Returns:
an `Observation` with the character remapping applied, as described.
Raises:
RuntimeError: `original_observation` contains a value that is not in the
character mapping passed to the constructor.
"""
# If necessary, compute the set of characters that appears in our output.
if self._output_characters is None:
self._output_characters = (
set(original_observation.layers) -
set(self._character_mapping)).union(self._character_mapping.values())
# Determine whether we need to (re)allocate the layer storage for this new
# (possibly differently-shaped) observation. If we do, do it.
if ((self._layers is None) or
(next(six.itervalues(self._layers)).shape !=
original_observation.board.shape)):
rows, cols = original_observation.board.shape
self._layers = {char: np.zeros((rows, cols), dtype=np.bool_)
for char in self._output_characters}
# Perform the repaint of the board. If a character not in the character
# mapping turns up in the original observation, a RuntimeError will obtain.
board = self._board_converter(original_observation)
# Compute the mask layers from the newly repainted board.
for character, layer in six.iteritems(self._layers):
np.equal(board, ord(character), out=layer)
# Return the new observation.
return Observation(board=board, layers=self._layers)
class ObservationToArray(object):
"""Convert an `Observation` to a 2-D or 3-D numpy array.
This class is a general utility for converting `Observation`s into 2-D or
3-D numpy arrays. Specific uses of this class include converting
`Observation`s into RGB images, or "repainting" the characters used in an
`Observation`'s `board` property into new characters. (This class is used by
`ObservationCharacterRepainter`, which specifically supports that particular
application.)
"""
def __init__(self, value_mapping, dtype=None, permute=None):
"""Construct an `ObservationToArray`.
Builds a callable that will take `Observation`s and emit a 2-D or 3-D numpy
array, whose rows and columns contain the values obtained after mapping the
characters of the original `Observation` through `value_mapping`.
Args:
value_mapping: a dict mapping any characters that might appear in the
original `Observation`s to a scalar or 1-D vector value. All values
in this dict must be the same type and dimension. Note that strings
are considered 1-D vectors, not scalar values.
dtype: numpy dtype for the arrays created by this object. If unspecifed,
this class will attempt to infer a type from the values of
value_mapping.
permute: If not None, a tuple specifying an ordering of the integers
0 and 1 (if `value_mapping` holds scalars) or 0, 1, and 2 (if
`value_mapping` holds 1-D vectors). In the first case, returned 2-D
arrays will have their dimensions permuted so that the row and column
dimensions (corresponding to the integers 0 and 1 respectively) will
be ordered to match the ordering of the corresponding integers in the
tuple. In the second case (3-D arrays), 0, 1, and 2 specify the
ordering of the "vector", row, and column dimensions respectively.
*The "right ordering" for our convnet libraries is `(1, 2, 0)`.*
Raises:
ValueError: if the `permute` argument isn't a list or tuple containing
0 and 1 (for 2-D outputs) or 0, 1, and 2 (for 3-D outputs).
"""
self._value_mapping = value_mapping
# This array will be constructed lazily, i.e. as soon as we have an
# Observation to convert. Note that within this object, the array is
# always 3-D; for 2-D arrays, its first dimension has size 1.
self._array = None
# Attempt to infer a dtype for self._array if none is specified.
self._dtype = (dtype if dtype is not None else
np.array(next(six.itervalues(value_mapping))).dtype)
# Will we create a 2-D or a 3-D array? Only 3-D if the values in the mapping
# can be an argument to `len()`; if so, that's also the depth of our
# 3-D array.
try:
self._depth = len(next(six.itervalues(value_mapping)))
self._is_3d = True
except TypeError:
self._depth = 1 # Again, the array is always 3-D behind the scenes.
self._is_3d = False
# Save and check the permute argument.
self._permute = tuple(permute) if permute is not None else None
if permute is not None:
if self._is_3d and set(permute) != {0, 1, 2}:
raise ValueError('When the value mapping contains 1-D vectors, the '
'permute argument to the ObservationToArray '
'constructor must be a list or tuple containing some '
'permutation of the integers 0, 1, and 2.')
elif not self._is_3d and set(permute) != {0, 1}:
raise ValueError('When the value mapping contains scalars, the permute '
'argument to the ObservationToArray constructor must '
'be a list or tuple containing some permutation of '
'the integers 0 and 1.')
def __call__(self, observation):
"""Derives an array from an `Observation`.
Returns a 2-D or 3-D array whose values at each row, column coordinate come
from applying the value mapping supplied to the constructor to
`observation`.
Note: the returned array should be accessed in a *read-only* manner
exclusively; furthermore, if this method is called again, the contents of
the array returned in any prior call to this method are *undefined* (i.e.
not guaranteed to be anything---could be blank, random garbage, whatever).
Args:
observation: an `Observation` from which this method derives a
numpy array.
Returns:
a numpy array derived from `observation` as described.
Raises:
RuntimeError: `observation` contains a value that is not in the value
mapping passed to the constructor.
"""
# Determine whether we need to (re)allocate the array for this new
# (possibly differently-shaped) observation. If we do, do it.
if ((self._array is None) or
(self._array.shape[1:] != observation.board.shape)):
rows, cols = observation.board.shape
self._array = np.zeros((self._depth, rows, cols), dtype=self._dtype)
# Paint the array with mapped values for all of the characters in the
# observation. If a character not in the value mapping turns up in the
# original observation, raise a RuntimeError.
ascii_vals = np.unique(observation.board)
for ascii_value in ascii_vals:
try:
value = self._value_mapping[chr(ascii_value)]
except KeyError:
raise RuntimeError(
'This ObservationToArray only knows array values for the '
'characters {}, but it received an observation with a character '
'not in that set'.format(str(''.join(self._value_mapping.keys()))))
mask = observation.board == ascii_value
# I was hoping there would be an easier way to do this masking in the
# full-3D case, but this is the best I have for now.
if self._is_3d:
for layer, value_component in enumerate(value):
self._array[layer, mask] = value_component
else:
self._array[:, mask] = value
# Permute (if specified) and return the new array; note special handling in
# the 2-D mapping case.
result = self._array if self._is_3d else self._array[0]
if self._permute is None:
return result
else:
return np.transpose(result, self._permute)
class ObservationToFeatureArray(object):
"""Convert an `Observation` to a 3-D feature array.
This class provides a faster implementation of a common observation-to-array
operation: deriving a binary 3-D feature array from the observation's layers.
For example, if an `Observation`'s `layers` member is this dict (where `#`
represents `True` and a space represents `False`:
⎧ ⎫
⎪ ⎡ ## # ##⎤ ⎡ # # ⎤ ⎡ ⎤ ⎪
⎨ 'a': ⎢ ## ## ⎥ 'b': ⎢ # #⎥ 'c': ⎢ # ⎥ ⎬
⎪ ⎣ ⎦, ⎣ #######⎦, ⎣ ⎦ ⎪
⎩ ⎭,
then an `ObservationToFeatureArray` built with `'bc'` as its `layers` argument
will convert the `Observation` into a 3-D `float32` array `result` such that
`result[0,:,:]` is the dict's `b` entry (cast to 0.0 and 1.0 values), and
`result[1,:,:]` is the dict's 'c' entry.
If the `layers` argument includes a character that isn't an entry in the
`Observation`'s `layers` dict, then the corresponding layer of `result` will
be set to 0.0 throughout.
There is an additional option to permute the dimensions of the returned array,
which may be desirable for producing feature arrays that are friendlier to
convolutional networks or other operations.
"""
def __init__(self, layers, permute=None):
"""Construct an `ObservationToFeatureArray`.
Builds a callable that performs the conversion described in the class
docstring.
Args:
layers: An iterable of ASCII characters (a string will do) corresponding
to entries in the game's `Observation`'s `layer` dicts. Layers in the
returned 3-D arrays will be arranged in the order specified by this
iterable. (See the class docstring for a note about characters that
don't match any entry in the `layer` dicts.)
permute: If not None, a tuple specifying an ordering of the integers 0, 1,
and 2. Returned 3-D arrays will have their dimensions permuted so that
the feature, row, and column dimensions (corresponding to the integers
0, 1, and 2 respectively) will be ordered to match the ordering of the
corresponding integers in the tuple. *The "right ordering" for our
convnet libraries is `(1, 2, 0)`.*
Raises:
ValueError: if the `permute` argument isn't a list or tuple containing
0, 1, and 2.
"""
self._layers = layers
self._depth = len(layers)
self._permute = tuple(permute) if permute is not None else None
# Check the permute argument.
if permute is not None and sorted(permute) != [0, 1, 2]:
raise ValueError('The permute argument to the ObservationToFeatureArray '
'constructor must be a list or tuple containing some '
'permutation of the integers 0, 1, and 2.')
# This array will be constructed lazily, i.e. as soon as we have an
# Observation to convert.
self._array = None
def __call__(self, observation):
"""Derives an array from an `Observation`.
Returns a 3-D `float32` array whose 2-D submatrices, indexed by the major
index, are the float-cast binary layers of the `Observation` corresponding
to respective entries in the `layers` constructor argument.
Note: the returned array should be accessed in a *read-only* manner
exclusively; furthermore, if this method is called again, the contents of
the array returned in any prior call to this method are *undefined* (i.e.
not guaranteed to be anything---could be blank, random garbage, whatever).
Args:
observation: an `Observation` from which this method derives a
numpy array.
Returns:
a numpy array derived from `observation` as described.
Raises:
RuntimeError: the `layers` constructor argument contains no entries that
are present in the `layers` member of `observation`.
"""
# Raise a runtime error if none of the observation will make it into the
# final distilled feature array.
if not any(l in observation.layers for l in self._layers):
raise RuntimeError(
'The layers argument to this ObservationToFeatureArray, {}, has no '
'entry that refers to an actual feature in the input observation. '
'Actual features in the observation are {}.'.format(
repr(self._layers), repr(''.join(sorted(observation.layers)))))
# Determine whether we need to (re)allocate the array for this new
# (possibly differently-shaped) observation. If we do, do it.
if ((self._array is None) or
(self._array.shape[1:] != observation.board.shape)):
rows, cols = observation.board.shape
self._array = np.zeros((self._depth, rows, cols), dtype=np.float32)
# Paint the array with the contents of selected layers in the observation.
# If the game has no layer corresponding to one of the elements of the
# `layers` argument passed to the constructor, fill that layer with zeros.
for index, character in enumerate(self._layers):
try:
np.copyto(self._array[index], observation.layers[character])
except KeyError:
self._array[index] = 0.0
if self._permute is None:
return self._array
else:
return np.transpose(self._array, self._permute)
|
pycolab-master
|
pycolab/rendering.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
|
pycolab-master
|
pycolab/__init__.py
|
# coding=utf8
# Copyright 2018 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The pycolab game engine.
Refer to the docstring for `Engine` for details. This module also includes the
`Palette` helper class.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import numpy as np
from pycolab import plot
from pycolab import rendering
from pycolab import things
import six
class Engine(object):
"""The pycolab game engine.
Every pycolab game is an instance of `Engine`. These games all have certain
things in common:
* They're grid-based! ▦
* Games proceed in discrete steps: the player calls the `play` method with
their chosen action, and the `Engine` updates the board in response, which
then becomes the observation returned to the player.
* By default, observations are a single 2-D numpy array "board" with dtype
`uint8`, or, alternatively, a collection of binary masks (see
`Observation` in `rendering.py`).
* Values are painted onto the board by instances of `Backdrop`, `Sprite`,
and `Drape`, which are described in detail in `things.py`. (Now would be
a fine time to go read more about them. Go ahead--it'll be fun!)
* Additionally, it is expected that your game logic will be arranged within
these objects somehow.
* `Backdrop`, `Sprite`, and `Drape` instances can communicate with each other
and affect global game state (reward, termination, etc.) through the
game's `Plot` object. ("Plot" as in "thickens", not as in "Cartesian".)
* (Now is NOT the best time to read more about the `Plot`; for the time being,
just remember that it's a global blackboard. :-)
At each game iteration, the `Engine` instance consults the `Backdrop` and each
`Sprite` and `Drape` to determine how to update the board. These
consultations, which happen in a specified, fixed order, are also when the
game logic within those objects chooses how to react to the things they see on
the board, the actions from the player(s), and the information stored in the
game's `Plot`. Once all the updates have been applied, the new board is shown
to the user, and the `Engine` awaits the next action.
In the simplest arrangement, the `Engine` collects updates from the `Backdrop`
and from all `Sprite`s and `Drape`s, then repaints the board all at once.
This means that all of these objects will base their decision on the state of
the board as it was when the user chose an action. More complicated
arrangements are possible. By placing `Sprite`s and `Drape`s in separate
"update groups", you can force the `Engine` to repaint the board after only
some of the updates have been collected. For example, if update group 0
contains
[sprite_A, drape_B, sprite_C]
and update group 1 contains
[drape_D, sprite_E, sprite_F]
then the `Backdrop`, `sprite_A`, `drape_B`, and `sprite_C` will see the board
as it was last seen by the user, while `drape_D`, `sprite_E`, and `sprite_F`
will see the board after the updates from the first four are applied. This
may simplify your game logic.
No matter how things are arranged into update groups, the user will only see
the board after the updates from *all* `Sprite`s, `Drape`s, and the `Backdrop`
have been applied.
From here, it's probably best to read the documentation for `Plot` (it's okay
now!) and then the docstring for the `Engine` constructor.
"""
def __init__(self, rows, cols, occlusion_in_layers=True):
"""Construct a new pycolab game engine.
Builds a new pycolab game engine, ready to be populated with a `Backdrop`,
`Sprite`s, and `Drape`s (see `things.py`). Once set up, an `Engine` will
manage the rendering and logic of a game for one episode. (For new
episodes, make a new `Engine`).
A newly-constructed `Engine` makes for a really boring game: there is
nothing to draw on the game board and no game logic. In fact, the `Engine`
will refuse to work at all without a `Backdrop`.
Here's what you need to do: after construction, supply the engine with
a `Backdrop` object to paint the background of the game board (things like
walls and such), and then `Sprite` and `Drape` objects to move around on top
of it (see `things.py` for details). These objects can view the game board
and communicate with each other (usually via a `Plot` object), and the game
logic is implemented in their interactions.
Here is an example of a simple game setting up a new `Engine`:
engine = pycolab.Engine(rows=24, cols=80)
engine.set_backdrop('#+|-* ', my_game.Mansion, time='1 AM', moon='full')
engine.add_sprite('C', (22, 77), my_game.Ghost, name='Claudius')
engine.add_sprite('E', (19, 61), my_game.Ghost, name='Ebenezer')
engine.add_sprite('I', (11, 48), my_game.Ghost, name='Ichabod')
engine.add_sprite('!', (23, 18), my_game.Player, hit_points=99)
engine.add_drape('~', my_game.MistsAndVapours, breeze=1)
first_obs, first_reward, first_discount = engine.its_showtime()
The order in which `Sprite` and `Drape` objects are added to the `Engine`
determines (partially; read on) the order in which they will be consulted
for game board updates: in this case, after the `Backdrop`, which is always
consulted first, it's Claudius, Ebenezer, Ichabod, the player, and then a
`Drape` that paints spooky mists. This ordering cannot change once it is
set.
The order of addition is also the initial back-to-front "z-order": the order
in which the updates are painted onto the board. Although `Backdrop` updates
are always painted first, the rest of the layers can change their z-order at
any point in the game (by registering a request with the `Plot` object).
This may be useful if you ever want Ichabod to float in front of the spooky
mists. Z-order can also be changed at game set-up time via the `set_z_order`
method.
Once the `Backdrop` and all of the `Sprite`s and `Drape`s are ready,
call `its_showtime()` to start the game. This method "locks" the engine
(i.e. no new `Sprite`s or `Drape`s can be added) and starts the episode,
returning the first observation.
Here is a more elaborate game setting up its `Engine`:
engine = pycolab.Engine(rows=7, cols=7)
engine.set_backdrop(sokoban.Warehouse.CHARACTERS, sokoban.Warehouse)
engine.update_group('2. Player')
engine.add_sprite('P', (5, 3), sokoban.Player)
engine.update_group('1. Boxes')
engine.add_sprite('1', (3, 2), sokoban.Box)
engine.add_sprite('2', (5, 4), sokoban.Box)
engine.add_sprite('3', (2, 5), sokoban.Box)
engine.update_group('3. Judge')
engine.add_drape('J', sokoban.Judge)
first_obs, first_reward, first_discount = engine.its_showtime()
The `Engine`'s order for consulting `Sprite`s and `Drape`s for updates is
determined first by the sort order of the update group name, then by order
of addition. Thus, in this Sokoban implementation, the `Engine` will first
consult box sprites 1, 2, and 3 for board updates, then the player sprite,
and finally the "Judge". (The Judge in this game happens to be an invisible
`Drape` whose `update` method contains the logic that determines whether
the player has won the game.)
Nevertheless, the consultation order is different from the initial z-order,
which starts at the backdrop and proceeds directly in the order in which the
`Sprite`s and `Drape`s were `add_*`ed. (This structure could allow a player
to crawl under a box in this Sokoban---or perhaps a box to crush a player!)
This game has given a name to all of its update groups, which is a good idea
whenever you have more than one. The default update group is named `''`
(the empty string).
And, for one last hyper-technical detail: the `Backdrop` can be thought of
as belonging to the very first update group, and will always be the first
`Engine` entity to be consulted for an update in that group. If it is
desired that all `Sprite`s and `Drape`s be in a separate update group from
the backdrop, the best way to accomplish this is probably to establish an
update group that precedes all of your game's real `Sprite`s and `Drape`s,
and to populate it with an invisible sprite that never does anything.
Args:
rows: Height of the game board.
cols: Width of the game board.
occlusion_in_layers: If `True` (the default), game entities or `Backdrop`
characters that occupy the same position on the game board will be
rendered into the `layers` member of `rendering.Observation`s with
"occlusion": only the entity that appears latest in the game's Z-order
will have its `layers` entry at that position set to `True`. If
`False`, all entities and `Backdrop` characters at that position will
have `True` in their `layers` entries there.
This flag does not change the rendering of the "flat" `board` member
of `Observation`, which always paints game entities on top of each
other as dictated by the Z-order.
**NOTE: This flag also determines the occlusion behavior in `layers`
arguments to all game entities' `update` methods; see docstrings in
[things.py] for details.**
"""
self._rows = rows
self._cols = cols
self._occlusion_in_layers = occlusion_in_layers
# This game's Plot object
self._the_plot = plot.Plot()
# True iff its_showtime() has been called and the game is underway.
self._showtime = False
# True iff the game has terminated. (It's still "showtime", though.)
self._game_over = False
# This game's Backdrop object.
self._backdrop = None
# This game's collection of Sprites and Drapes. The ordering of this dict
# is the game's z-order, from back to front.
self._sprites_and_drapes = collections.OrderedDict()
# The collection of update groups. Before the its_showtime call, this is a
# dict keyed by update group name, whose values are lists of Sprites and
# Drapes in the update group. After the call, this becomes a dict-like list
# of tuples that freezes the ordering implied by the update-group keys.
self._update_groups = collections.defaultdict(list)
# The current update group---used by add(). Will be set to None once the
# game is underway.
self._current_update_group = ''
# This slot will hold the observation renderer once the game is underway.
self._renderer = None
# And this slot will hold the last observation rendered by the renderer.
# It is not intended that this member be available to the user directly.
# Code should not keep local references to this object or its members.
self._board = None
def set_backdrop(self, characters, backdrop_class, *args, **kwargs):
"""Add a `Backdrop` to this `Engine`.
A `Backdrop` supplies the background scenery to be painted onto the game
board using the characters specified in `characters`. It is always first
(rearmost) in the z-order and first consulted by the `Engine` for board
changes.
Args:
characters: A collection of ASCII characters that the `Backdrop` is
allowed to use. (A string will work as an argument here.)
backdrop_class: A subclass of `Backdrop` (including `Backdrop` itself)
that will be constructed by this method.
*args: Additional positional arguments for the `backdrop_class`
constructor.
**kwargs: Additional keyword arguments for the `backdrop_class`
constructor.
Returns:
the newly-created `Backdrop`.
Raises:
RuntimeError: if gameplay has already begun, if `set_backdrop` has already
been called for this engine, or if any characters in `characters` has
already been claimed by a preceding call to the `add` method.
TypeError: if `backdrop_class` is not a `Backdrop` subclass.
ValueError: if `characters` are not ASCII characters.
"""
self._runtime_error_if_called_during_showtime('set_backdrop')
return self.set_prefilled_backdrop(
characters, np.zeros((self._rows, self._cols), dtype=np.uint8),
backdrop_class, *args, **kwargs)
def set_prefilled_backdrop(
self, characters, prefill, backdrop_class, *args, **kwargs):
"""Add a `Backdrop` to this `Engine`, with a custom initial pattern.
Much the same as `set_backdrop`, this method also allows callers to
"prefill" the background with an arbitrary pattern. This method is mainly
intended for use by the `ascii_art` tools; most `Backdrop` subclasses should
fill their `curtain` on their own in the constructor (or in `update()`).
This method does NOT check to make certain that `prefill` contains only
ASCII values corresponding to characters in `characters`; your `Backdrop`
class should ensure that only valid characters are present in the curtain
after the first call to its `update` method returns.
Args:
characters: A collection of ASCII characters that the `Backdrop` is
allowed to use. (A string will work as an argument here.)
prefill: 2-D `uint8` numpy array of the same dimensions as this `Engine`.
The `Backdrop`'s curtain will be initialised with this pattern.
backdrop_class: A subclass of `Backdrop` (including `Backdrop` itself)
that will be constructed by this method.
*args: Additional positional arguments for the `backdrop_class`
constructor.
**kwargs: Additional keyword arguments for the `backdrop_class`
constructor.
Returns:
the newly-created `Backdrop`.
Raises:
RuntimeError: if gameplay has already begun, if `set_backdrop` has already
been called for this engine, or if any characters in `characters` has
already been claimed by a preceding call to the `add` method.
TypeError: if `backdrop_class` is not a `Backdrop` subclass.
ValueError: if `characters` are not ASCII characters.
"""
self._runtime_error_if_called_during_showtime('set_prefilled_backdrop')
self._value_error_if_characters_are_bad(characters)
self._runtime_error_if_characters_claimed_already(characters)
if self._backdrop:
raise RuntimeError('A backdrop of type {} has already been supplied to '
'this Engine.'.format(type(self._backdrop)))
if not issubclass(backdrop_class, things.Backdrop):
raise TypeError('backdrop_class arguments to Engine.set_backdrop must '
'either be a Backdrop class or one of its subclasses.')
# Construct a new curtain and palette for the Backdrop.
curtain = np.zeros((self._rows, self._cols), dtype=np.uint8)
palette = Palette(characters)
# Fill the curtain with the prefill data.
np.copyto(dst=curtain, src=prefill, casting='equiv')
# Build and set the Backdrop.
self._backdrop = backdrop_class(curtain, palette, *args, **kwargs)
return self._backdrop
def add_drape(self, character, drape_class, *args, **kwargs):
"""Add a `Drape` to this `Engine`.
A `Drape` supplies masks that the Engine uses to paint the same character to
multiple different places on the board. The positions of a particular
`Drape` in the painting order (z-order) and the `Engine`'s board change
consultation order are determined by order of its addition to the `Engine`
and various other factors; see the `Engine` constructor docstring for
details.
Args:
character: The ASCII character that this `Drape` directs the `Engine`
to paint on the game board.
drape_class: A subclass of `Drape` to be constructed by this method.
*args: Additional positional arguments for the `drape_class` constructor.
**kwargs: Additional keyword arguments for the `drape_class` constructor.
Returns:
the newly-created `Drape`.
Raises:
RuntimeError: if gameplay has already begun, or if any characters in
`characters` has already been claimed by a preceding call to the
`set_backdrop` or `add` methods.
TypeError: if `drape_class` is not a `Drape` subclass.
ValueError: if `character` is not a single ASCII character.
"""
self._runtime_error_if_called_during_showtime('add_drape')
return self.add_prefilled_drape(
character, np.zeros((self._rows, self._cols), dtype=np.bool_),
drape_class, *args, **kwargs)
def add_prefilled_drape(
self, character, prefill, drape_class, *args, **kwargs):
"""Add a `Drape` to this `Engine`, with a custom initial mask.
Much the same as `add_drape`, this method also allows callers to "prefill"
the drape's `curtain` with an arbitrary mask. This method is mainly intended
for use by the `ascii_art` tools; most `Drape` subclasses should fill their
`curtain` on their own in the constructor (or in `update()`).
Args:
character: The ASCII character that this `Drape` directs the `Engine`
to paint on the game board.
prefill: 2-D `bool_` numpy array of the same dimensions as this `Engine`.
The `Drape`'s curtain will be initialised with this pattern.
drape_class: A subclass of `Drape` to be constructed by this method.
*args: Additional positional arguments for the `drape_class` constructor.
**kwargs: Additional keyword arguments for the `drape_class` constructor.
Returns:
the newly-created `Drape`.
Raises:
RuntimeError: if gameplay has already begun, or if any characters in
`characters` has already been claimed by a preceding call to the
`set_backdrop` or `add` methods.
TypeError: if `drape_class` is not a `Drape` subclass.
ValueError: if `character` is not a single ASCII character.
"""
self._runtime_error_if_called_during_showtime('add_prefilled_drape')
self._value_error_if_characters_are_bad(character, mandatory_len=1)
self._runtime_error_if_characters_claimed_already(character)
if not issubclass(drape_class, things.Drape):
raise TypeError('drape_class arguments to Engine.add_drape must be a '
'subclass of Drape')
# Construct a new curtain for the drape.
curtain = np.zeros((self._rows, self._cols), dtype=np.bool_)
# Fill the curtain with the prefill data.
np.copyto(dst=curtain, src=prefill, casting='equiv')
# Build and save the drape.
drape = drape_class(curtain, character, *args, **kwargs)
self._sprites_and_drapes[character] = drape
self._update_groups[self._current_update_group].append(drape)
return drape
def add_sprite(self, character, position, sprite_class, *args, **kwargs):
"""Add a `Sprite` to this `Engine`.
A `Sprite` supplies coordinates that the Engine uses to paint a character to
one place on the board. The positions of a particular `Sprite` in the
painting order (z-order) and the `Engine`'s board change consultation order
are determined by order of its addition to the `Engine` and various other
factors; see the `Engine` constructor docstring for details.
Args:
character: The ASCII character that this `Sprite` directs the `Engine`
to paint on the game board.
position: A 2-tuple or similar indexable containing the `Sprite`'s
initial position on the game board.
sprite_class: A subclass of `Sprite` to be constructed by this method.
*args: Additional positional arguments for the `sprite_class` constructor.
**kwargs: Additional keyword arguments for the `sprite_class` constructor.
Returns:
the newly-created `Sprite`.
Raises:
RuntimeError: if gameplay has already begun, or if any characters in
`characters` has already been claimed by a preceding call to the
`set_backdrop` or `add` methods.
TypeError: if `sprite_class` is not a `Sprite` subclass.
ValueError: if `character` is not a single ASCII character, or if
`position` is not a valid game board coordinate.
"""
self._runtime_error_if_called_during_showtime('add_sprite')
self._value_error_if_characters_are_bad(character, mandatory_len=1)
self._runtime_error_if_characters_claimed_already(character)
if not issubclass(sprite_class, things.Sprite):
raise TypeError('sprite_class arguments to Engine.add_sprite must be a '
'subclass of Sprite')
if (not 0 <= position[0] < self._rows or
not 0 <= position[1] < self._cols):
raise ValueError('Position {} does not fall inside a {}x{} game board.'
''.format(position, self._rows, self._cols))
# Construct the game board dimensions for the benefit of this sprite.
corner = things.Sprite.Position(self._rows, self._cols)
# Construct a new position for the sprite.
position = things.Sprite.Position(*position)
# Build and save the drape.
sprite = sprite_class(corner, position, character, *args, **kwargs)
self._sprites_and_drapes[character] = sprite
self._update_groups[self._current_update_group].append(sprite)
return sprite
def update_group(self, group_name):
"""Change the update group for subsequent `add_sprite`/`add_drape` calls.
The `Engine` consults `Sprite`s and `Drape`s for board updates in an order
determined first by the update group name, then by the order in which the
`Sprite` or `Drape` was added to the `Engine`. See the `Engine` constructor
docstring for more details.
It's fine to return to an update group after leaving it.
Args:
group_name: name of the new current update group.
Raises:
RuntimeError: if gameplay has already begun.
"""
self._runtime_error_if_called_during_showtime('update_group')
self._current_update_group = group_name
def set_z_order(self, z_order):
"""Set the z-ordering of all `Sprite`s and `Drape`s in this engine.
Specify the complete order in which all `Sprite`s and `Drape`s should have
their characters painted onto the game board. This method is available
during game set-up only.
Args:
z_order: an ordered collection of all of the characters corresponding to
all `Sprite`s and `Drape`s registered with this `Engine`.
Raises:
RuntimeError: if gameplay has already begun.
ValueError: if the set of characters in `z_order` does not match the
set of characters corresponding to all `Sprite`s and `Drape`s
registered with this `Engine`.
"""
self._runtime_error_if_called_during_showtime('set_z_order')
if (set(z_order) != set(self._sprites_and_drapes.keys()) or
len(z_order) != len(self._sprites_and_drapes)):
raise ValueError('The z_order argument {} to Engine.set_z_order is not a '
'proper permutation of the characters corresponding to '
'Sprites and Drapes in this game, which are {}.'.format(
repr(z_order), self._sprites_and_drapes.keys()))
new_sprites_and_drapes = collections.OrderedDict()
for character in z_order:
new_sprites_and_drapes[character] = self._sprites_and_drapes[character]
self._sprites_and_drapes = new_sprites_and_drapes
def its_showtime(self):
"""Finalise `Engine` set-up and compute the first observation of the game.
Switches the `Engine` from set-up mode, where more `Sprite`s and `Drape`s
can be added, to "play" mode, where gameplay iterates via the `play` method.
After this permanent modal switch, no further calls to `add_drape` or
`add_sprite` can be made.
Once in "play" mode, consults the `Backdrop` and all `Sprite`s and `Drape`s
for updates, and uses these to compute the episode's first observation.
Returns:
A three-tuple with the following members:
* A `rendering.Observation` object containing single-array and
multi-array feature-map representations of the game board.
* An initial reward given to the player (or players) (before it/they
even gets/get a chance to play!). This reward can be any type---it all
depends on what the `Backdrop`, `Sprite`s, and `Drape`s have
communicated to the `Plot`. If none have communicated anything at all,
this will be None.
* A reinforcement learning discount factor value. By default, it will be
1.0 if the game is still ongoing; if the game has just terminated
(before the player got a chance to do anything!), `discount` will be
0.0 unless the game has chosen to supply a non-standard value to the
`Plot`'s `terminate_episode` method.
Raises:
RuntimeError: if this method is called more than once, or if no
`Backdrop` class has ever been provided to the Engine.
"""
self._runtime_error_if_called_during_showtime('its_showtime')
# It's showtime!
self._showtime = True
# Now that all the Sprites and Drapes are known, convert the update groups
# to a more efficient structure.
self._update_groups = [(key, self._update_groups[key])
for key in sorted(self._update_groups.keys())]
# And, I guess we promised to do this:
self._current_update_group = None
# Construct the game's observation renderer.
chars = set(self._sprites_and_drapes.keys()).union(self._backdrop.palette)
if self._occlusion_in_layers:
self._renderer = rendering.BaseObservationRenderer(
self._rows, self._cols, chars)
else:
self._renderer = rendering.BaseUnoccludedObservationRenderer(
self._rows, self._cols, chars)
# Render a "pre-initial" board rendering from all of the data in the
# Engine's Backdrop, Sprites, and Drapes. This rendering is only used as
# input to these entities to collect their updates for the very first frame;
# as it accesses data members inside the entities directly, it doesn't
# actually run any of their code (unless implementers ignore notes that say
# "Final. Do not override.").
self._render()
# The behaviour of this method is now identical to play() with None actions.
return self.play(None)
def play(self, actions):
"""Perform another game iteration, applying player actions.
Receives an action (or actions) from the player (or players). Consults the
`Backdrop` and all `Sprite`s and `Drape`s for updates in response to those
actions, and derives a new observation from them to show the user. Also
collects reward(s) for the last action and determines whether the episode
has terminated.
Args:
actions: Actions supplied by the external agent(s) in response to the last
board. Could be a scalar, could be an arbitrarily nested structure
of... stuff, it's entirely up to the game you're making. When the game
begins, however, it is guaranteed to be None. Used for the `update()`
method of the `Backdrop` and all `Sprite`s and `Layer`s.
Returns:
A three-tuple with the following members:
* A `rendering.Observation` object containing single-array and
multi-array feature-map representations of the game board.
* An reward given to the player (or players) for having performed
`actions` in response to the last observation. This reward can be any
type---it all depends on what the `Backdrop`, `Sprite`s, and `Drape`s
have communicated to the `Plot`. If none have communicated anything at
all, this will be None.
* A reinforcement learning discount factor value. By default, it will be
1.0 if the game is still ongoing; if the game has just terminated
(before the player got a chance to do anything!), `discount` will be
0.0 unless the game has chosen to supply a non-standard value to the
`Plot`'s `terminate_episode` method.
Raises:
RuntimeError: if this method has been called before the `Engine` has
been finalised via `its_showtime()`, or if this method has been called
after the episode has terminated.
"""
if not self._showtime:
raise RuntimeError('play() cannot be called until the Engine is placed '
'in "play mode" via the its_showtime() method.')
if self._game_over:
raise RuntimeError('play() was called after the episode handled by this '
'Engine has terminated.')
# Update Backdrop and all Sprites and Drapes.
self._update_and_render(actions)
# Apply all plot directives that the Backdrop, Sprites, and Drapes have
# submitted to the Plot during the update.
reward, discount, should_rerender = self._apply_and_clear_plot()
# If directives in the Plot changed our state in any way that would change
# the appearance of the observation (e.g. changing the z-order), we'll have
# to re-render it before we return it.
if should_rerender: self._render()
# Return first-frame rendering to the user.
return self._board, reward, discount
@property
def the_plot(self):
return self._the_plot
@property
def rows(self):
return self._rows
@property
def cols(self):
return self._cols
@property
def game_over(self):
return self._game_over
@property
def z_order(self):
"""Obtain a copy of the game's current z-order."""
return list(self._sprites_and_drapes.keys())
### Abstraction breakers ###
@property
def backdrop(self):
"""Obtain the `Engine`'s `Backdrop`.
Most pycolab applications don't need to access individual game entities, so
using this accessor may signal that your design challenges some abstraction
conventions. The canonical way to communicate with entities, for example, is
through messages in the Plot. Still, the final choice is yours. We recommend
you limit yourself to read-only interactions with the returned `Backdrop`.
Returns:
The `Engine`'s `Backdrop` object.
"""
return self._backdrop
@property
def things(self):
"""Obtain the `Engine`'s `Sprite`s and `Drape`s.
Most pycolab applications don't need to access individual game entities, so
using this accessor may signal that your design challenges some abstraction
conventions. The canonical way to communicate with entities, for example, is
through messages in the Plot. Still, the final choice is yours. We recommend
you limit yourself to read-only interactions with the returned `Sprite`s and
`Drape`s.
Returns:
A dict mapping ASCII characters to the `Sprite` and `Drape` entities that
paint those characters onto the game board.
"""
return {k: t for k, t in six.iteritems(self._sprites_and_drapes)}
### Private helpers ###
def _update_and_render(self, actions):
"""Perform all game entity updates and render the next observation.
This private method is the heart of the `Engine`: as dictated by the update
order, it consults the `Backdrop` and all `Sprite`s and `Layer`s for
updates, then renders the game board (`self._board`) based on those updates.
Args:
actions: Actions supplied by the external agent(s) in response to the last
board. Could be a scalar, could be an arbitrarily nested structure
of... stuff, it's entirely up to the game you're making. When the game
begins, however, it is guaranteed to be None. Used for the `update()`
method of the `Backdrop` and all `Sprite`s and `Layer`s.
"""
assert self._board, (
'_update_and_render() called without a prior rendering of the board')
# A new frame begins!
self._the_plot.frame += 1
# We start with the backdrop; it doesn't really belong to an update group,
# or it belongs to the first update group, depending on how you look at it.
self._the_plot.update_group = None
self._backdrop.update(actions,
self._board.board, self._board.layers,
self._sprites_and_drapes, self._the_plot)
# Now we proceed through each of the update groups in the prescribed order.
for update_group, entities in self._update_groups:
# First, consult each item in this update group for updates.
self._the_plot.update_group = update_group
for entity in entities:
entity.update(actions,
self._board.board, self._board.layers,
self._backdrop, self._sprites_and_drapes, self._the_plot)
# Next, repaint the board to reflect the updates from this update group.
self._render()
def _render(self):
"""Render a new game board.
Computes a new rendering of the game board, and assigns it to `self._board`,
based on the current contents of the `Backdrop` and all `Sprite`s and
`Drape`s. Uses properties of those objects to obtain those contents; no
computation should be done on their part.
Each object is "painted" on the board in a prescribed order: the `Backdrop`
first, then the `Sprite`s and `Drape`s according to the z-order (the order
in which they appear in `self._sprites_and_drapes`
"""
self._renderer.clear()
self._renderer.paint_all_of(self._backdrop.curtain)
for character, entity in six.iteritems(self._sprites_and_drapes):
# By now we should have checked fairly carefully that all entities in
# _sprites_and_drapes are Sprites or Drapes.
if isinstance(entity, things.Sprite) and entity.visible:
self._renderer.paint_sprite(character, entity.position)
elif isinstance(entity, things.Drape):
self._renderer.paint_drape(character, entity.curtain)
# Done with all the layers; render the board!
self._board = self._renderer.render()
def _apply_and_clear_plot(self):
"""Apply directives to this `Engine` found in its `Plot` object.
These directives are requests from the `Backdrop` and all `Drape`s and
`Sprite`s for the engine to alter its global state or its interaction with
the player (or players). They include requests to alter the z-order,
terminate the game, or report some kind of reward. For more information on
these directives, refer to `Plot` object documentation.
After collecting and applying these directives to the `Engine`s state, all
are cleared in preparation for the next game iteration.
Returns:
A 2-tuple with the following elements:
* A reward value summed over all of the rewards that the `Backdrop` and
all `Drape`s and `Sprite`s requested be reported to the player (or
players), or None if nobody specified a reward. Otherwise, this reward
can be any type; it all depends on what the `Backdrop`, `Drape`s, and
`Sprite`s have provided.
* A boolean value indicating whether the `Engine` should re-render the
observation before supplying it to the user. This is necessary if any
of the Plot directives change the `Engine`'s state in ways that would
change the appearance of the observation, like changing the z-order.
Raises:
RuntimeError: a z-order change directive in the Plot refers to a `Sprite`
or `Drape` that does not exist.
"""
directives = self._the_plot._get_engine_directives() # pylint: disable=protected-access
# So far, there's no reason to re-render the observation.
should_rerender = False
# We don't expect to have too many z-order changes, so this slow, simple
# algorithm will probably do the trick.
for move_this, in_front_of_that in directives.z_updates:
# We have a z-order change, so re-rendering is necessary.
should_rerender = True
# Make sure that the characters in the z-order change directive correspond
# to actual `Sprite`s and `Drape`s.
if move_this not in self._sprites_and_drapes:
raise RuntimeError(
'A z-order change directive said to move a Sprite or Drape '
'corresponding to character {}, but no such Sprite or Drape '
'exists'.format(repr(move_this)))
if in_front_of_that is not None:
if in_front_of_that not in self._sprites_and_drapes:
raise RuntimeError(
'A z-order change directive said to move a Sprite or Drape in '
'front of a Sprite or Drape corresponding to character {}, but '
'no such Sprite or Drape exists'.format(repr(in_front_of_that)))
# Each directive means replacing the entire self._sprites_and_drapes dict.
new_sprites_and_drapes = collections.OrderedDict()
# Retrieve the Sprite or Drape that we are directed to move.
moving_sprite_or_drape = self._sprites_and_drapes[move_this]
# This special case handles circumstances where a Sprite or Drape is moved
# all the way to the back of the z-order.
if in_front_of_that is None:
new_sprites_and_drapes[move_this] = moving_sprite_or_drape
# Copy all Sprites or Drapes into the new sprites_and_drapes OrderedDict,
# inserting the moving entity in front of the one it's meant to occulude.
for character, entity in six.iteritems(self._sprites_and_drapes):
if character == move_this: continue
new_sprites_and_drapes[character] = entity
if character == in_front_of_that:
new_sprites_and_drapes[move_this] = moving_sprite_or_drape
# Install the OrderedDict just made as the new z-order and catalogue
# of Sprites and Drapes.
self._sprites_and_drapes = new_sprites_and_drapes
# The Backdrop or one of the Sprites or Drapes may have directed the game
# to end. Update our game-over flag.
self._game_over = directives.game_over
# Collect the sum of all rewards from this latest game iteration, in
# preparation to return it to the player.
reward = directives.summed_reward
# Get the discount value from the latest game iteration.
discount = directives.discount
# Reset the Plot for the next game iteration, should there be one.
self._the_plot._clear_engine_directives() # pylint: disable=protected-access
return reward, discount, should_rerender
### Helpers for error detection ###
def _runtime_error_if_called_during_showtime(self, method_name):
if self._showtime:
raise RuntimeError('{} should not be called after its_showtime() '
'has been called'.format(method_name))
def _runtime_error_if_characters_claimed_already(self, characters):
for char in characters:
if self._backdrop and char in self._backdrop.palette:
raise RuntimeError('Character {} is already being used by '
'the backdrop'.format(repr(char)))
if char in self._sprites_and_drapes:
raise RuntimeError('Character {} is already being used by a sprite '
'or a drape'.format(repr(char)))
def _value_error_if_characters_are_bad(self, characters, mandatory_len=None):
if mandatory_len is not None and len(characters) != mandatory_len:
raise ValueError(
'{}, a string of length {}, was used where a string of length {} was '
'required'.format(repr(characters), len(characters), mandatory_len))
for char in characters:
try: # This test won't catch all non-ASCII characters; if
ord(char) # someone uses a unicode string, it'll pass. But that's
except TypeError: # hard to do by accident.
raise ValueError('Character {} is not an ASCII character'.format(char))
class Palette(object):
"""A helper class for turning human-readable characters into numerical values.
Classes like `Backdrop` need to assign certain `uint8` values to cells in the
game board. Since these values are typically printable ASCII characters, this
assignment can be both cumbersome (e.g. `board[r][c] = ord('j')`) and error-
prone (what if 'j' isn't a valid value for the Backdrop to use?).
A `Palette` object (which you can give a very short name, like `p`) is
programmed with all of the valid characters for your Backdrop. Those that are
valid Python variable names become attributes of the object, whose access
yields the corresponding ASCII ordinal value (e.g. `p.j == 106`). Characters
that are not legal Python names, like `#`, can be converted through lookup
notation (e.g. `p['#'] == 35`). However, any character that was NOT programmed
into the `Palette` object yields an `AttributeError` or and `IndexError`
respectively.
Finally, this class also supports a wide range of aliases for characters that
are not valid variable names. There is a decent chance that the name you give
to a symbolic character is there; for example, `p.hash == p['#'] == 35`. If
it's not there, consider adding it...
"""
_ALIASES = dict(
backtick='`', backquote='`', grave='`',
tilde='~',
zero='0', one='1', two='2', three='3', four='4',
five='5', six='6', seven='7', eight='8', nine='9',
bang='!', exclamation='!', exclamation_point='!', exclamation_pt='!',
at='@',
# regrettably, £ is not ASCII.
hash='#', hashtag='#', octothorpe='#', number_sign='#', pigpen='#',
pound='#',
dollar='$', dollar_sign='$', buck='$', mammon='$',
percent='%', percent_sign='%', food='%',
carat='^', circumflex='^', trap='^',
and_sign='&', ampersand='&',
asterisk='*', star='*', splat='*',
lbracket='(', left_bracket='(', lparen='(', left_paren='(',
rbracket=')', right_bracket=')', rparen=')', right_paren=')',
dash='-', hyphen='-',
underscore='_',
plus='+', add='+',
equal='=', equals='=',
lsquare='[', left_square_bracket='[',
rsquare=']', right_square_bracket=']',
lbrace='{', lcurly='{', left_brace='{', left_curly='{',
left_curly_brace='{',
rbrace='}', rcurly='}', right_brace='}', right_curly='}',
right_curly_brace='}',
pipe='|', bar='|',
backslash='\\', back_slash='\\', reverse_solidus='\\',
semicolon=';',
colon=':',
tick='\'', quote='\'', inverted_comma='\'', prime='\'',
quotes='"', double_inverted_commas='"', quotation_mark='"',
zed='z',
comma=',',
less_than='<', langle='<', left_angle='<', left_angle_bracket='<',
period='.', full_stop='.',
greater_than='>', rangle='>', right_angle='>', right_angle_bracket='>',
question='?', question_mark='?',
slash='/', solidus='/',
)
def __init__(self, legal_characters):
"""Construct a new `Palette` object.
Args:
legal_characters: An iterable of characters that users of this `Palette`
are allowed to use. (A string like "#.o " will work.)
Raises:
ValueError: a value inside `legal_characters` is not a single character.
"""
for char in legal_characters:
if len(char) != 1:
raise ValueError('Palette constructor requires legal characters to be '
'actual single charaters. "{}" is not.'.format(char))
self._legal_characters = set(legal_characters)
def __getattr__(self, name):
return self._actual_lookup(name, AttributeError)
def __getitem__(self, key):
return self._actual_lookup(key, IndexError)
def __getstate__(self):
# Because we define __getattr__, we also supply __getstate__ and
# __setstate__ to avoid recursion during some pickling and copy operations.
return self._legal_characters
def __setstate__(self, state):
self._legal_characters = set(state)
def __contains__(self, key):
# It is intentional, but probably not so important (as long as there are no
# single-character aliases) that we do not do an aliases lookup for key.
return key in self._legal_characters
def __iter__(self):
return iter(self._legal_characters)
def _actual_lookup(self, key, error):
"""Helper: perform character validation and conversion to numeric value."""
if key in self._ALIASES: key = self._ALIASES[key]
if key in self._legal_characters: return ord(key)
raise error(
'{} is not a legal character in this Palette; legal characters '
'are {}.'.format(key, list(self._legal_characters)))
|
pycolab-master
|
pycolab/engine.py
|
# Copyright 2018 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Stories: games made of programmable sequences of pycolab games.
All details are in the docstring for `Story`.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import numpy as np
from pycolab import cropping
from pycolab import engine
from pycolab import things
import six
class Story(object):
"""Base class for programmable sequences of pycolab games.
A story is a game made from other pycolab games. In the same way that many
video games present a sequence of distinct "levels", "stages", "rooms",
"chapters", "zones", etc. to the player, a story can present a programmable
sequence of mutually-compatible (see below) pycolab games as a continuous
gameplay experience. This is one way to make richer, more complicated games.
As a Python object, a `Story` has some of the methods and attributes of a
pycolab `Engine`, but not all, and some of the assumptions that you can make
about those methods and attributes for an `Engine` may not necessarily apply.
It's intended that a `Story` should do most of the things you expect an
`Engine` to do, and should plug into most of the places you expect a `Engine`
to go, but for applications that depend very specifically on what the `Engine`
methods and properties do (especially `z_order`, `things`, and `backdrop`),
you ought to check docstrings to be sure.
From the perspective of individual pycolab `Engine`s participating in the
story, there are few hints of being part of a greater whole. The main one is
that values left in the Plot by previous `Engine`s in the story are copied
into the current `Engine`'s Plot. In fact, this is the only official way to
pass information between successive pycolab games. `Story` transfers nothing
else; each `Engine` has its own set of game entities that get discarded when
the `Engine` terminates, and if sprite 'P' in game A is conceptually "the
same" as sprite 'P' in game B, then they had better pass whatever notes to
each other they need in the Plot in order to maintain this illusion.
To make a story, first assemble a collection of argumentless builder functions
for all of the pycolab games you want to include in the overall gameplay. Each
builder must return an `Engine` object ready for its `its_showtime` method to
be called. You will supply the builders to the `Story` constructor, as a dict
or a list/tuple:
- If a dict, then whenever a game terminates, the story queries that game's
Plot object for the key indicating the next game to start (see the
`Plot.next_chapter` setter). If this key is None, the story terminates.
This mechanism allows for online generation of dynamic storylines.
- If a list/tuple, then the story will present one game from each constructor
in sequence, only terminating (from the player's point of view) after the
last game terminates. (Games may still override this automatic ordering via
`Plot.next_chapter`, and even set up story termination by setting the next
chapter to None, but otherwise the sequential progress through the games
happens on its own.)
A story can only be assembled from compatible games. From `Story`'s
perspective, games are compatible when:
- any two games that use the same character use them in the same way (so,
if 'P' is used by games A and B, then if it's a Sprite in game A, it must
be a Sprite in game B as well).
- their observations all have the same numbers of rows and columns. (You
can use Croppers to help out with this---see the `__init__` docstring.)
Your use case likely has even stricter compatibility requirements than these:
for example, the available actions probably have to be the same across all
games. That's up to you to look after.
A few good things to know:
1. In order to gather game information and assess compatibility, each game
builder will be called at least once in `__init__`, and the `its_showtime`
method will be called for each game that results. (The games will then
be discarded.) *In this process, no information will be copied between
Plots, so an `Engine` cannot always rely on finding information from other
`Engine`s in the Plot, even if this is how they normally communicate.*
2. The final observation and discount of all but the very last game are
discarded. The final reward of all but the very last game is added to the
first reward of the game that follows it. See documentation for the `play`
method for further details.
"""
def __init__(self, chapters, first_chapter=None, croppers=None):
"""Initialise a Story.
Args:
chapters: A dict or a list/tuple of argumentless builder functions that
return `Engine` objects. See class docstring.
first_chapter: A key/index identifying the first game in `chapters` to
play in the story. If `chapters` is a list/tuple, this can be left
as None for the default first game index (0).
croppers: Optional `cropping.ObservationCropper` instance(s) for deriving
identically-shaped observations from all of the games. This argument
may either be:
* None: no cropping occurs.
* A single `cropping.ObservationCropper`: the same cropper is applied
to every game in `chapters`.
* An identical structure to `chapters`: the corresponding cropper is
used for each game. A None value in this structure indicates that
the corresponding game should not be cropped.
Note that unlike the human_ui, it's not possible to specify more than
one cropper per entry in `chapters`.
Raises:
ValueError: Arguments to the constructor are malformed, or the games
supplied to the constructor are incompatible in some way.
"""
# If chapters is a list/tuple, the user will expect the game to progress
# through the games automatically. The user will also expect the game to
# start on the first list element by default.
self._auto_advance = not isinstance(chapters, collections.Mapping)
if self._auto_advance and first_chapter is None: first_chapter = 0
# Argument checking and normalisation. If chapters and croppers were
# lists/tuples, this step will convert them to dicts indexed by integers.
self._chapters, self._croppers = _check_and_normalise_story_init_args(
chapters, first_chapter, croppers)
del chapters, croppers # Unnormalised; no longer needed.
# Game compatibility checking, understanding how characters in the games are
# used (i.e. as Sprites, Drapes, or in Backdrops), and identifying the shape
# of the game board.
(self._chars_sprites, self._chars_drapes, self._chars_backdrops,
(self._rows, self._cols)) = (
_check_game_compatibility_and_collect_game_facts(
self._chapters, self._croppers))
# Obtain the initial game and its cropper.
self._current_game = self._chapters[first_chapter]()
self._current_cropper = self._croppers[first_chapter]
self._current_cropper.set_engine(self._current_game)
# Set Story history attributes in the initial game's Plot.
plot = self._current_game.the_plot # Abbreviation.
plot.prior_chapter = None
plot.this_chapter = first_chapter
if self._auto_advance:
next_ch = plot.this_chapter + 1
plot.next_chapter = next_ch if next_ch in self._chapters else None
# True iff its_showtime() has been called and the game is underway.
self._showtime = False
# True iff the game has terminated. (It's still "showtime", though.)
self._game_over = False
# Cached dummy Sprites and Drapes for the .things attribute.
self._dummy_sprites_for_shape = dict()
self._dummy_drapes_for_shape = dict()
def its_showtime(self):
"""Start the `Story` and compute its first observation.
Operates analogously to `Engine.its_showtime`. In most circumstances, this
method will simply call `its_showtime` on the first game in the story (as
designated by the `chapters` or `first_chapter` arguments to the
constructor) and return its results. If the game terminates immediately on
the `its_showtime` call, though, the method creates and attempts to start
the next game---and again if that game terminates on `its_showtime`, and
so on.
Throughout all of these attempts, the reward returned by the games'
`its_showtime` methods is summed.
If this method runs out of games to start, it gives up, returning the last
game's observation, the sum of all the rewards returned by the
`its_showtime` methods, and the last game's discount. **Note that this means
that all preceding games' observations and discounts are discarded.**
Returns:
A three-tuple with the following members (see above and the `Engine`
documentation for more details):
* The observation: a `rendering.Observation` object.
* An initial reward.
* A reinforcement learning discount factor value.
Raises:
RuntimeError: if this method is called more than once.
"""
if self._showtime:
raise RuntimeError('its_showtime should not be called more than once.')
# It's showtime!
self._showtime = True
# Start off the very first game. If it terminates immediately, start the
# next. And so on, until a game doesn't terminate or we run out of games.
observation, reward, discount = self._current_game.its_showtime()
observation = self._current_cropper.crop(observation)
if self._current_game.game_over:
return self._start_next_game(observation, reward, discount)
else:
return observation, reward, discount
def play(self, actions):
"""Perform another game iteration, applying player actions.
Operates analogously to `Engine.play`. In most circumstances, this method
will simply call `play` on the current game and return its results. If the
game terminates immediately on the `play` call, though, the method creates
and attempts to start the next game---and again if that game terminates on
`its_showtime`, and so on.
Throughout all of these attempts, the reward returned by the games'
`its_showtime` methods is added to the reward returned by the game that
terminated in the first place.
Eventually, if a game finally starts successfully, this summed reward is
returned along with the first observation and discount of the new game. If
no game starts successfully, though, then the summed reward is returned
along with the observation and discount of the last game that this method
attempted to start.
**Note: The behaviour described above means that except for the very last
game in the story, the final observations and discounts of games are
discarded.** If it's important for an agent to see a game's final
observation before the next game in a story begins, it will be necessary
for this last game to introduce an extra "no-op" step just before
termination. One pattern for doing this is:
* In `play` for all game entities: check for a "dummy_step" entry in the
Plot and do nothing but call for termination if its value is the current
frame number:
`if the_plot.get('dummy_step') >= the_plot.frame:`
` return the_plot.terminate_episode()`.
Multiple entities will call for termination, but it doesn't matter.
* If an entity wishes to terminate the game, add the "dummy_step" entry
to the Plot: `the_plot['dummy_step'] = the_plot.frame + 1`. The value is
the frame number when true termination should occur---the example code
specifies the next frame.
Args:
actions: Actions supplied by the external agent(s) in response to the
last board. See `Engine.play` documentation for details.
Returns:
A three-tuple with the following members (see `Engine` documentation for
more details:
* The observation: a `rendering.Observation` object.
* An initial reward.
* A reinforcement learning discount factor value.
Raises:
RuntimeError: if this method has been called before the `Story` has been
finalised via `its_showtime()`, or if this method has been called
after the episode has terminated.
"""
if not self._showtime:
raise RuntimeError('play() cannot be called until the Story is placed in '
'"play mode" via the its_showtime() method.')
if self._game_over:
raise RuntimeError('play() was called after the last game managed by the '
'Story has terminated.')
# Play the action. If the current game terminates, start the next game. And
# so on, until a game doesn't terminate or we run out of games.
observation, reward, discount = self._current_game.play(actions)
observation = self._current_cropper.crop(observation)
if self._current_game.game_over:
return self._start_next_game(observation, reward, discount)
else:
return observation, reward, discount
@property
def the_plot(self):
"""A work-alike for `Engine.the_plot`.
Returns:
The Plot object from the current game. It is probably a bad idea to save
a local reference to the returned Plot, since the next game in the story
will use a different object.
"""
return self._current_game.the_plot
@property
def rows(self):
return self._rows
@property
def cols(self):
return self._cols
@property
def game_over(self):
return self._game_over
@property
def z_order(self):
"""A work-alike for `Engine.z_order`.
Returns:
A list of characters that would be a plausible z-order if this `Story`
were actually a pycolab `Engine`. All Sprite and Drape characters that are
not used by the current game are prepended to that game's z-order. It is
probably a bad idea to save a local reference to the returned list.
"""
current_game_z_order = self._current_game.z_order
leftover_chars = sorted(
self._chars_sprites.difference(current_game_z_order).union(
self._chars_drapes.difference(current_game_z_order)))
return leftover_chars + current_game_z_order
### Abstraction breakers ###
@property
def backdrop(self):
"""A work-alike for `Engine.backdrop`.
Returns:
A `things.Backdrop` object that would be a plausible Backdrop if this
`Story` were actually a pycolab `Engine`. The `curtain` member is the
actual curtain from the current game's Backdrop, but the `palette`
member considers all of the characters used in the Backdrops of all of
the games to be legal. The `update` method raises a RuntimeError.
Note: this attribute returns a new `Backdrop` at each call. It's probably
safe to save a local reference to the palette, but likely a bad idea to
save a reference to the curtain or to the returned `Backdrop` in general.
"""
return things.Backdrop(curtain=self._current_game.backdrop.curtain,
palette=engine.Palette(self._chars_backdrops))
@property
def things(self):
"""A work-alike for `Engine.things`.
Returns:
A dict mapping ASCII characters to `Sprite`s and `Drape`s---a collection
of such game entities that would be (barely) plausible if this `Story`
were actually a pycolab `Engine`. All the non-Backdrop entities from the
current game are present, but for characters only associated with
`Sprite`s and `Drape`s by the other games supplied to the `Story`
constructor, some dummy objects are used instead. If you'd like to know
whether a particular `Sprite` or `Drape` in the returned dict is a dummy,
use the `is_fictional` method in this module.
"""
synthesised_things = self._current_game.things
for c in self._chars_sprites:
if c not in synthesised_things:
shape = (self._current_game.rows, self._current_game.cols)
if shape not in self._dummy_sprites_for_shape:
self._dummy_sprites_for_shape[shape] = _DummySprite(
corner=things.Sprite.Position(*shape), character=c)
synthesised_things[c] = self._dummy_sprites_for_shape[shape]
for c in self._chars_drapes:
if c not in synthesised_things:
shape = (self._current_game.rows, self._current_game.cols)
if shape not in self._dummy_drapes_for_shape:
self._dummy_drapes_for_shape[shape] = _DummyDrape(
curtain=np.zeros(shape, dtype=bool), character=c)
synthesised_things[c] = self._dummy_drapes_for_shape[shape]
return synthesised_things
@property
def current_game(self):
"""The pycolab `Engine` corresponding to the current game.
Returns:
The pycolab `Engine` that the `Story` is running right now. It's
probably a bad idea to save a reference to this value, or really to use
this value for much of anything outside of testing.
"""
return self._current_game
### Private helpers ###
def _start_next_game(self, observation, reward, discount):
"""Try to start a new game to replace a game that just terminated.
Args:
observation: Last observation of the game that just terminated.
reward: Last reward of the game that just terminated.
discount: Last discount of the game that just terminated.
Returns:
A three-tuple with the following members:
* Either the first observation of a game that has successfully started
as a replacement for the terminated game; or, if no games would start
without terminating immediately, the final observation of the last game
to terminate. (This value could be the `observation` argument if there
were no games left to start.)
* The sum of (a) the `reward` argument, (b) the rewards returned by all
games that terminated immediately after this method tried to start them,
and (c) the first reward of the game that this method started
successfully (if this method did manage to start a game successfully).
* Either the first discount of a game that has successfully started as a
replacement for the terminated game; or, if no games would start without
terminating immediately, the final discount of the last game to
terminate. (This value could be the `discount` argument if there were no
games left to start.)
Raises:
KeyError: For `Story`s constructed with a `dict` for the `chapters`
argument: the key into `chapters` that a terminating game supplied
to its plot (via the `next_chapter` setter) is not a valid key.
"""
while True:
assert self._current_game.game_over
# Save the old game's Plot object.
old_plot = self._current_game.the_plot
# If there is no next game designated, the termination is final; pass
# it on to the caller.
if old_plot.next_chapter is None:
self._game_over = True
return observation, reward, discount
# Otherwise, identify and build the next game.
try:
new_game = self._chapters[old_plot.next_chapter]()
new_cropper = self._croppers[old_plot.next_chapter]
except KeyError:
# This error message seems like it could be misleading in the
# auto-advance case, but the user should never see it unless one of the
# games really did override the auto-advance indexing.
raise KeyError(
'The game that just finished in the Story currently underway '
'(identified by the key/index "{}") said that the next game in the '
'story should be {}, but no game was supplied to the Story '
'constructor under that key or index.'.format(
old_plot.this_chapter, repr(old_plot.next_chapter)))
# Copy values from the old plot to the new plot.
new_plot = new_game.the_plot # Abbreviation.
new_plot.update(old_plot)
# Set Story history attributes in the new plot.
new_plot.prior_chapter = old_plot.this_chapter
new_plot.this_chapter = old_plot.next_chapter
if self._auto_advance:
next_ch = new_plot.this_chapter + 1
new_plot.next_chapter = next_ch if next_ch in self._chapters else None
# The new game is now the current game.
self._current_game = new_game
self._current_cropper = new_cropper
self._current_cropper.set_engine(self._current_game)
# Start the new game. This game's first observation and discount replace
# the observation and discount from the old game, but reward accumulates.
observation, more_reward, discount = self._current_game.its_showtime()
observation = self._current_cropper.crop(observation)
if more_reward is not None:
reward = more_reward if reward is None else (reward + more_reward)
# If this game hasn't terminated, our search for the next game is
# complete. Break out of the loop by returning the game's first
# observation and discount, along with the summed reward.
if not self._current_game.game_over: return observation, reward, discount
def is_fictional(thing):
"""Test whether a `Sprite` or `Drape` is a dummy.
Args:
thing: A `Sprite` or `Drape`.
Returns:
True iff `thing` is one of the stand-in dummy `Sprite`s or `Drape`s returned
by `Story.things`.
"""
return isinstance(thing, (_DummySprite, _DummyDrape))
### Module-level private helpers ###
def _check_and_normalise_story_init_args(chapters, first_chapter, croppers):
"""Helper: check and normalise arguments for `Story.__init__`.
Args:
chapters: as in `Story.__init__`.
first_chapter: as in `Story.__init__`.
croppers: as in `Story.__init__`.
Returns:
a 2-tuple with the following members:
[0]: A shallow copy of the contents of `chapters` into a dict. If
`chapters` was a list, the resulting dict will have keys
0..`len(chapters)-1`.
[1]: A normalised version of `croppers`: always the same structure as
the first tuple element, with each value a
`cropping.ObservationCropper`; if no cropping was desired for a
game, "no-op" croppers are supplied.
Raises:
ValueError: any of several argument check failures. See the error messages
themselves for details.
"""
# All this checking aims to be instructive to users, but is a bit verbose for
# inclusion in the class constructor itself.
if not chapters: raise ValueError(
'The chapters argument to the Story constructor must not be empty.')
# First, if the `chapters` argument is a list or tuple, convert it into a
# dict, and convert a list/tuple `croppers` argument into a dict as well.
if isinstance(chapters, collections.Sequence):
chapters = dict(enumerate(chapters))
if isinstance(croppers, collections.Sequence):
croppers = dict(enumerate(croppers))
if not isinstance(chapters, collections.Mapping): raise ValueError(
'The chapters argument to the Story constructor must be either a dict '
'or a list.')
if None in chapters: raise ValueError(
'None may not be a key in a Story chapters dict.')
if first_chapter not in chapters: raise ValueError(
'The key "{}", specified as a Story\'s first_chapter, does not appear in '
'the chapters supplied to the Story constructor.'.format(first_chapter))
# Normalise croppers argument into a dict of croppers. Note that
# cropping.ObservationCropper is a "null cropper" that makes no changes.
if croppers is None: croppers = cropping.ObservationCropper()
if isinstance(croppers, cropping.ObservationCropper):
croppers = {k: croppers for k in chapters.keys()}
if (not isinstance(croppers, collections.Mapping) or
set(chapters.keys()) != set(croppers.keys())): raise ValueError(
'Since the croppers argument to the Story constructor was not None '
'or a single ObservationCropper, it must be a collection with the '
'same keys or indices as the chapters argument.')
croppers = {k: cropping.ObservationCropper() if c is None else c
for k, c in croppers.items()}
# Normalise chapters to be a dict; croppers already is.
chapters = dict(chapters)
return chapters, croppers
def _check_game_compatibility_and_collect_game_facts(chapters, croppers):
"""Helper: compatibility checks, info gathering for `Story.__init__`.
See the `Story` docstring for more information on compatibility.
Args:
chapters: `chapters` argument to `Story.__init__` after normalisation by
`_check_and_normalise_story_init_args`.
croppers: `croppers` argument to `Story.__init__` after normalisation by
`_check_and_normalise_story_init_args`.
Returns:
a 4-tuple with the following members:
[0]: The set of all characters used by at least one game for a Sprite.
[1]: The set of all characters used by at least one game for a Drape.
[2]: The set of all characters used by at least one game's Backdrop.
[3]: The rows, cols shape of game observations.
Raises:
ValueError: The games supplied to the `Story` constructor are incompatible.
"""
# Convert chapters and croppers to identically-sorted lists.
chapters = [c for _, c in sorted(chapters.items())]
croppers = [c for _, c in sorted(croppers.items())]
# Across all games:
observation_shapes = set() # What shapes are observations?
chars_sprites = set() # Which characters are used for Sprites?
chars_drapes = set() # Which characters are used for Drapes?
chars_backdrops = set() # Which characters are used for Backdrops?
# Instantiate each game and call its_showtime to collect data about shape and
# character usage.
for chapter, cropper in zip(chapters, croppers):
game = chapter()
cropper.set_engine(game)
observation, _, _ = game.its_showtime()
# Save the shape of the current observation.
observation_shapes.add(tuple(cropper.crop(observation).board.shape))
# Save the ways that the engine uses characters.
chars_backdrops.update(game.backdrop.palette)
for char, thing in six.iteritems(game.things):
if isinstance(thing, things.Sprite):
chars_sprites.add(char)
else:
chars_drapes.add(char)
# The checks themselves.
if len(observation_shapes) != 1: raise ValueError(
'All pycolab games supplied to the Story constructor should have '
'observations that are the same shape, either naturally or with the help '
'of observation croppers. The games provided to the constructor have '
'diverse shapes: {}.'.format(list(observation_shapes)))
intersect_sd = chars_sprites.intersection(chars_drapes)
intersect_sb = chars_sprites.intersection(chars_backdrops)
intersect_db = chars_drapes.intersection(chars_backdrops)
if intersect_sd or intersect_sb or intersect_db: raise ValueError(
'No two pycolab games supplied to the Story constructor should use the '
'same character in two different ways: if a character is a Sprite in '
'one game, it shouldn\'t be a Drape in another. Across the games '
'supplied to this Story, these characters are both a Sprite and a '
'Drape: [{}]; these are both a Sprite and in a Backdrop: [{}]; and '
'these are both a Drape and in a Backdrop: [{}].'.format(
*[''.join(s) for s in (intersect_sd, intersect_sb, intersect_db)]))
return chars_sprites, chars_drapes, chars_backdrops, observation_shapes.pop()
class _DummySprite(things.Sprite):
"""A Sprite that goes invisible and does nothing.
This Sprite exists so that the `Story.things` attribute can return a Sprite
under a Sprite character that isn't being used by the `Story`'s current game.
It does nothing and its update method should never be called.
"""
def __init__(self, corner, character):
super(_DummySprite, self).__init__(
corner=corner, position=self.Position(0, 0), character=character)
self._visible = False
def update(self, *args, **kwargs):
raise RuntimeError('_DummySprite.update should never be called.')
class _DummyDrape(things.Drape):
"""A Drape that does nothing.
This Drape exists so that the `Story.things` attribute can return a Drape
under a Drape character that isn't being used by the `Story`'s current game.
It does nothing and its update method should never be called.
There's little practical need for this Drape: the default Drape implementation
would be fine. It mainly exists to make debugging and inspection easier.
"""
def update(self, *args, **kwargs):
raise RuntimeError('_DummyDrape.update should never be called.')
|
pycolab-master
|
pycolab/storytelling.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Utilities to build a pycolab game from ASCII art diagrams."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import itertools
import numpy as np
from pycolab import engine
from pycolab import things
import six
def ascii_art_to_game(art,
what_lies_beneath,
sprites=None, drapes=None, backdrop=things.Backdrop,
update_schedule=None,
z_order=None,
occlusion_in_layers=True):
"""Construct a pycolab game from an ASCII art diagram.
This function helps to turn ASCII art diagrams like the following
(which is a Sokoban-like puzzle):
[' @@@@@@ ',
' @ . @ ', # '@' means "wall"
'@@ab @@ ', # 'P' means "player"
'@ .c @ ', # '.' means "box storage location"
'@. dP@ ', # 'a'-'g' are all for separate boxes
'@.@@@@@@', # ' ' means "open, traversable space"
'@ @ @@ @',
'@ e . @',
'@@@@@@@@',]
into pycolab games. The basic idea is that you supply the diagram, along with
hints about which characters correspond to `Sprite`s and `Drape`s and the
classes that implement those `Sprite`s and `Drape`s. This function then
returns an initialised `Engine` object, all ready for you to call the
`its_showtime` method and start the game.
Several of this function's arguments require you to supply subclasses of the
classes found in `things.py`. If your subclass constructors take the same
number of arguments as their `things.py` superclasses, then they can be
listed directly. Otherwise, you will need to pack the subclasses and their
additional `args` and `kwargs` into a `Partial` object. So, for example, if
you have a `Sprite` subclass with a constructor like this:
class MySprite(Sprite):
def __init__(self, corner, position, character, mood, drink_quantity):
...
you could package `MySprite` and the "extra" arguments in any of the following
ways (among others):
Partial(MySprite, 'drowsy', 'two pints')
Partial(MySprite, 'yawning', drink_quantity='three pints')
Partial(MySprite, mood='asleep', drink_quantity='four pints')
Args:
art: An ASCII art diagram depicting a game board. This should be a list or
tuple whose values are all strings containing the same number of ASCII
characters.
what_lies_beneath: a single-character ASCII string that will be substituted
into the `art` diagram at all places where a character that keys
`sprites` or `drapes` is found; *or*, this can also be an entire second
ASCII art diagram whose values will be substituted into `art` at (only)
those locations. In either case, the resulting diagram will be used to
initialise the game's `Backdrop`.
sprites: a dict mapping single-character ASCII strings to `Sprite` classes
(not objects); or to `Partial` objects that hold the classes and "extra"
`args`es and `kwargs`es to use during their construction. It's fine if a
character used as a key doesn't appear in the `art` diagram: in this
case, we assume that the corresponding `Sprite` will be located at
`0, 0`. (If you intend your `Sprite` to be invisible, the `Sprite` will
have to take care of that on its own after it is built.) (Optional;
omit if your game has no sprites.)
drapes: a dict mapping single-character ASCII strings to `Drape` classes
(not objects); or to `Partial` objects that hold the classes and "extra"
`args`es and `kwargs`es to use during their construction. It's fine if
a character used as a key doesn't appear in the `art` diagram: in this
case, we assume that the `Drape`'s curtain (i.e. its mask) is completely
empty (i.e. False). (Optional; omit if your game has no drapes.)
backdrop: a `Backdrop` class (not an object); or a `Partial` object that
holds the class and "extra" `args` and `kwargs` to use during its
construction. (Optional; if unset, `Backdrop` is used directly, which
is fine for a game where the background scenery never changes and
contains no game logic.)
update_schedule: A list of single-character ASCII strings indicating the
order in which the `Sprite`s and `Drape`s should be consulted by the
`Engine` for updates; or, a list of lists that imposes an ordering as
well, but that groups the entities in each list into separate
update groups (refer to `Engine` documentation). (Optional; if
unspecified, the ordering will be arbitrary---be mindful of this if your
game uses advanced features like scrolling, where update order is pretty
important.)
z_order: A list of single-character ASCII strings indicating the depth
ordering of the `Sprite`s and `Drape`s (from back to front). (Optional;
if unspecified, the ordering will be the same as what's used for
`update_schedule`).
occlusion_in_layers: If `True` (the default), game entities or `Backdrop`
characters that occupy the same position on the game board will be
rendered into the `layers` member of `rendering.Observation`s with
"occlusion": only the entity that appears latest in the game's Z-order
will have its `layers` entry at that position set to `True`. If
`False`, all entities and `Backdrop` characters at that position will
have `True` in their `layers` entries there.
This flag does not change the rendering of the "flat" `board` member
of `Observation`, which always paints game entities on top of each
other as dictated by the Z-order.
**NOTE: This flag also determines the occlusion behavior in `layers`
arguments to all game entities' `update` methods; see docstrings in
[things.py] for details.**
Returns:
An initialised `Engine` object as described.
Raises:
TypeError: when `update_schedule` is neither a "flat" list of characters
nor a list of lists of characters.
ValueError: numerous causes, nearly always instances of the user not heeding
the requirements stipulated in Args:. The exception messages should make
most errors fairly easy to debug.
"""
### 1. Set default arguments, normalise arguments, derive various things ###
# Convert sprites and drapes to be dicts of Partials only. "Bare" Sprite
# and Drape classes become Partials with no args or kwargs.
if sprites is None: sprites = {}
if drapes is None: drapes = {}
sprites = {char: sprite if isinstance(sprite, Partial) else Partial(sprite)
for char, sprite in six.iteritems(sprites)}
drapes = {char: drape if isinstance(drape, Partial) else Partial(drape)
for char, drape in six.iteritems(drapes)}
# Likewise, turn a bare Backdrop class into an argument-free Partial.
if not isinstance(backdrop, Partial): backdrop = Partial(backdrop)
# Compile characters corresponding to all Sprites and Drapes.
non_backdrop_characters = set()
non_backdrop_characters.update(sprites.keys())
non_backdrop_characters.update(drapes.keys())
if update_schedule is None: update_schedule = list(non_backdrop_characters)
# If update_schedule is a string (someone wasn't reading the docs!),
# gracefully convert it to a list of single-character strings.
if isinstance(update_schedule, str): update_schedule = list(update_schedule)
# If update_schedule is not a list-of-lists already, convert it to be one.
if all(isinstance(item, str) for item in update_schedule):
update_schedule = [update_schedule]
### 2. Argument checking and derivation of more... things ###
# The update schedule (flattened) is the basis for the default z-order.
try:
flat_update_schedule = list(itertools.chain.from_iterable(update_schedule))
except TypeError:
raise TypeError('if any element in update_schedule is an iterable (like a '
'list), all elements in update_schedule must be')
if set(flat_update_schedule) != non_backdrop_characters:
raise ValueError('if specified, update_schedule must list each sprite and '
'drape exactly once.')
# The default z-order is derived from there.
if z_order is None: z_order = flat_update_schedule
if set(z_order) != non_backdrop_characters:
raise ValueError('if specified, z_order must list each sprite and drape '
'exactly once.')
# All this checking is rather strict, but as this function is likely to be
# popular with new users, it will help to fail with a helpful error message
# now rather than an incomprehensible stack trace later.
if isinstance(what_lies_beneath, str) and len(what_lies_beneath) != 1:
raise ValueError(
'what_lies_beneath may either be a single-character ASCII string or '
'a list of ASCII-character strings')
# Note that the what_lies_beneath check works for characters and lists both.
try:
_ = [ord(character) for character in ''.join(what_lies_beneath)]
_ = [ord(character) for character in non_backdrop_characters]
_ = [ord(character) for character in z_order]
_ = [ord(character) for character in flat_update_schedule]
except TypeError:
raise ValueError(
'keys of sprites, keys of drapes, what_lies_beneath (or its entries), '
'values in z_order, and (possibly nested) values in update_schedule '
'must all be single-character ASCII strings.')
if non_backdrop_characters.intersection(''.join(what_lies_beneath)):
raise ValueError(
'any character specified in what_lies_beneath must not be one of the '
'characters used as keys in the sprites or drapes arguments.')
### 3. Convert all ASCII art to numpy arrays ###
# Now convert the ASCII art array to a numpy array of uint8s.
art = ascii_art_to_uint8_nparray(art)
# In preparation for masking out sprites and drapes from the ASCII art array
# (to make the background), do similar for what_lies_beneath.
if isinstance(what_lies_beneath, str):
what_lies_beneath = np.full_like(art, ord(what_lies_beneath))
else:
what_lies_beneath = ascii_art_to_uint8_nparray(what_lies_beneath)
if art.shape != what_lies_beneath.shape:
raise ValueError(
'if not a single ASCII character, what_lies_beneath must be ASCII '
'art whose shape is the same as that of the ASCII art in art.')
### 4. Other miscellaneous preparation ###
# This dict maps the characters associated with Sprites and Drapes to an
# identifier for the update group to which they belong. The sorted order of
# the identifiers matches the group ordering in update_schedule, but is
# otherwise generic.
update_group_for = {}
for i, update_group in enumerate(update_schedule):
group_id = '{:05d}'.format(i)
update_group_for.update({character: group_id for character in update_group})
### 5. Construct engine; populate with Sprites and Drapes ###
game = engine.Engine(*art.shape, occlusion_in_layers=occlusion_in_layers)
# Sprites and Drapes are added according to the depth-first traversal of the
# update schedule.
for character in flat_update_schedule:
# Switch to this character's update group.
game.update_group(update_group_for[character])
# Find locations where this character appears in the ASCII art.
mask = art == ord(character)
if character in drapes:
# Add the drape to the Engine.
partial = drapes[character]
game.add_prefilled_drape(character, mask,
partial.pycolab_thing,
*partial.args, **partial.kwargs)
if character in sprites:
# Get the location of the sprite in the ASCII art, if there was one.
row, col = np.where(mask)
if len(row) > 1:
raise ValueError('sprite character {} can appear in at most one place '
'in art.'.format(character))
# If there was a location, convert it to integer values; otherwise, 0,0.
# gpylint doesn't know how implicit bools work with numpy arrays...
row, col = (int(row), int(col)) if len(row) > 0 else (0, 0) # pylint: disable=g-explicit-length-test
# Add the sprite to the Engine.
partial = sprites[character]
game.add_sprite(character, (row, col),
partial.pycolab_thing,
*partial.args, **partial.kwargs)
# Clear out the newly-added Sprite or Drape from the ASCII art.
art[mask] = what_lies_beneath[mask]
### 6. Impose specified Z-order ###
game.set_z_order(z_order)
### 7. Add the Backdrop to the engine ###
game.set_prefilled_backdrop(
characters=''.join(chr(c) for c in np.unique(art)),
prefill=art.view(np.uint8),
backdrop_class=backdrop.pycolab_thing,
*backdrop.args, **backdrop.kwargs)
# That's all, folks!
return game
def ascii_art_to_uint8_nparray(art):
"""Construct a numpy array of dtype `uint8` from an ASCII art diagram.
This function takes ASCII art diagrams (expressed as lists or tuples of
equal-length strings) and derives 2-D numpy arrays with dtype `uint8`.
Args:
art: An ASCII art diagram; this should be a list or tuple whose values are
all strings containing the same number of ASCII characters.
Returns:
A 2-D numpy array as described.
Raises:
ValueError: `art` wasn't an ASCII art diagram, as described; this could be
because the strings it is made of contain non-ASCII characters, or do not
have constant length.
TypeError: `art` was not a list of strings.
"""
error_text = (
'the argument to ascii_art_to_uint8_nparray must be a list (or tuple) '
'of strings containing the same number of strictly-ASCII characters.')
try:
art = np.vstack([np.frombuffer(line.encode('ascii'), dtype=np.uint8)
for line in art])
except AttributeError as e:
if isinstance(art, (list, tuple)) and all(
isinstance(row, (list, tuple)) for row in art):
error_text += ' Did you pass a list of list of single characters?'
raise TypeError('{} (original error: {})'.format(error_text, e))
except ValueError as e:
raise ValueError('{} (original error from numpy: {})'.format(error_text, e))
if np.any(art > 127): raise ValueError(error_text)
return art
class Partial(object):
"""Holds a pycolab "thing" and its extra constructor arguments.
In a spirit similar to `functools.partial`, a `Partial` object holds a
subclass of one of the pycolab game entities described in `things.py`, along
with any "extra" arguments required for its constructor (i.e. those besides
the constructor arguments specified by the `things.py` base class
constructors).
`Partial` instances can be used to pass `Sprite`, `Drape` and `Backdrop`
subclasses *and* their necessary "extra" constructor arguments to
`ascii_art_to_game`.
"""
def __init__(self, pycolab_thing, *args, **kwargs):
"""Construct a new Partial object.
Args:
pycolab_thing: a `Backdrop`, `Sprite`, or `Drape` subclass (note: not an
object, the class itself).
*args: "Extra" positional arguments for the `pycolab_thing` constructor.
**kwargs: "Extra" keyword arguments for the `pycolab_thing` constructor.
Raises:
TypeError: `pycolab_thing` was not a `Backdrop`, a `Sprite`, or a `Drape`.
"""
if not issubclass(pycolab_thing,
(things.Backdrop, things.Sprite, things.Drape)):
raise TypeError('the pycolab_thing argument to ascii_art.Partial must be '
'a Backdrop, Sprite, or Drape subclass.')
self.pycolab_thing = pycolab_thing
self.args = args
self.kwargs = kwargs
|
pycolab-master
|
pycolab/ascii_art.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
|
pycolab-master
|
pycolab/prefab_parts/__init__.py
|
# coding=utf8
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""""Prefabricated" `Drape`s with all kinds of useful behaviour."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from pycolab import ascii_art
from pycolab import things
from pycolab.protocols import scrolling
class Scrolly(things.Drape):
"""A base class for scrolling `Drape`s, which usually implement game scenery.
*Note: This `Drape` subclass is mostly intended for games that implement
scrolling by having their game entities participate in the scrolling protocol
(see `protocols/scrolling.py`). If your game doesn't do any scrolling, or if
it is a game with a finite map where scrolling is more easily accomplished
using a `ScrollingCropper` (which just slides a moving window over the
observations produced by a pycolab game, giving the illusion of scrolling),
you probably don't need the added complication of using a `Scrolly`.*
If your game shows a top-down view of a world that can "scroll" around a
character as the character moves around inside of it (e.g. River Raid) then a
`Scrolly` is a `Drape` that contains much of the functionality that you need
to make the scrolling world. When used in tandem with `MazeWalker`-derived
`Sprite`s, very little code is required to obtain the basic elements of this
gameplay concept. The discussion in this documentation will therefore use that
arrangement as an example to help describe how `Scrolly`s work, although other
configurations are surely possible.
## Essential background: the scrolling protocol
A `Scrolly` figures out whether and where to scroll with the help of messages
in the game's `Plot` object (see `plot.py`) that are transacted according to
the scrolling protocol (see `protocols/scrolling.py`).
`Sprite`s and `Drape`s that participate in the protocol can be either of two
types: "egocentric" and not egocentric. An egocentric entity is one that
expects the world to scroll around them whilst they remain stationary relative
to the game board (i.e. the "screen")---like the player-controlled airplane in
River Raid. The other kind of entity should move whenever the rest of the
world does---like River Raid's helicopters, boats, and so on.
Egocentric entities are of particular concern to `Scrolly`s, since the game
probably should not scroll the scenery in a way that corresponds to these
entities making an "impossible" move. In a maze game, for example, a careless
implementation could accidentally scroll the player into a wall! Fortunately,
at each game iteration, all egocentric participants in the scrolling protocol
declare which kinds of scrolling moves will be acceptable ones. As long as a
`Scrolly` heeds these restrictions, it can avoid a catastrophe.
## What a `Scrolly` does
**A `Scrolly` should be told to move (or to consider moving) in the same way
as your game's egocentric `Sprite`s.** To help with this, `Scrolly`s have
"motion action helper methods" that are just like `MazeWalker`s: `_north`,
`_south`, `_east`, `_west` and so on. You call these in `update`, which you
must implement.
In the simplest case, a `Scrolly` will always scroll the world in the
corresponding motion direction *provided that* all egocentric entities have
said (via the scrolling protocol) that the motion is OK. If even one of them
considers that motion unacceptable, no scrolling will occur!
(Scrolling the world in a particular direction means moving the game board
over the world in that direction. A scroll to the "north" will move the
`Scrolly`'s scenery in the same way that "scrolling up" moves the text in your
web browser.)
`Scrolly` objects also support a less aggressive scrolling behaviour in which
egocentric `Sprite`s trigger scrolling only when they get close to the edges
of the game board.
## Update order, and who's in charge of scrolling
**For best results, `Scrolly` instances in charge of making non-traversible
game scenery should update before `Sprite`s do, in a separate update group.**
`Scrolly`s generally expect to be in charge of scrolling, or at least they
hope to have another `Scrolly` be in charge of it. The `Scrolly`'s "motion
action helper method" will issue a scrolling order (or not; see above), and
all of the other pycolab entities in the game will obey it. In order for them
to even have the chance to obey, it's necessary for the `Scrolly` to issue the
order before they are updated.
If the egocentric `Sprite`s are `MazeWalker`s, then the `Scrolly` should
perform its update in its own update group. This ensures that by the time the
`MazeWalker`s see it, the world will appear as it does _after_ the scrolling
takes place. This allows these `Sprite`s to compute and express (via the
scrolling protocol) which scrolling motions will be "legal" in the future.
It's fine to have more than one `Scrolly` in a pycolab game. Unless you are
doing something strange, the first one will be the one to issue scrolling
orders, and the rest will just follow along blindly.
## Loose interpration of "legal" scrolling motions
*It's probably safe to skip this discussion if your 'Sprite's and 'Drape's
will only ever move vertically or horizontally, never diagonally.*
Per the discussion under the same heading in the docstring at
`protocols/scrolling.py` (a recommended read!), a `Scrolly` can issue a
scrolling order that was not expressly permitted by the other egocentric
participants in the scrolling protocol. It can do this as long as it believes
that at the end of the game iteration, none of those participants will have
wound up in an illegal location, either due to them following the scrolling
order by itself *or* due to moving in response to the agent action *after*
following the scrolling order.
Naturally, this requires the scrolling-order-issuing `Scrolly` to know how
these other participating entities will behave. For this, it makes two
assumptions:
1. It interprets all of the scrolling motions permitted by the entities (i.e.
the 2-tuples used as `motion` arguments by `scrolling` module functions)
as actual motions that those entities could execute within the game world.
2. It assumes that the way that it interprets agent actions is identical to
the way that all the other participating egocentric entities interpret
them. So, if this object's `update` method maps action `0` to the `_north`
motion action helper method, which connotes an upward motion of one row,
it assumes that all Sprites will do the same.
Based on these assumptions, the `Scrolly` will predict where `Sprite`s will go
in response to agent actions and will direct only the most pleasing (i.e.
minimal) amount of scrolling required to keep the egocentric `Sprite`s within
the margins. If there are no egocentric `Sprite`s at all, then all the
`Sprite`s are by definition inside the margins, and no scrolling will ever
occur. (If scrolling is still desired, it could be that the behaviour evinced
by specifying `None` for the constructor's `scroll_margins` parameter will
produce the intended behavior; refer to the constructor docstring.)
"""
# Predefined single-step motions, for internal use only. Positive values in
# the first field mean move downward; positive values in the second field
# mean move rightward.
_NORTH = (-1, 0)
_NORTHEAST = (-1, 1)
_EAST = (0, 1)
_SOUTHEAST = (1, 1)
_SOUTH = (1, 0)
_SOUTHWEST = (1, -1)
_WEST = (0, -1)
_NORTHWEST = (-1, -1)
# Not technically a single-step motion.
_STAY = (0, 0)
class PatternInfo(object):
"""A helper class that interprets ASCII art scrolling patterns.
This class exists chiefly to make it easier to build constructor arguments
for `Scrolly` classes from (potentially large) ASCII art diagrams.
Additional convenience methods are present which may simplify other aspects
of game setup.
As with all the utilities in `ascii_art.py`, an ASCII art diagram is a
list or tuple of equal-length strings. See docstrings in that file for
example diagrams.
"""
def __init__(self, whole_pattern_art, board_art_or_shape,
board_northwest_corner_mark, what_lies_beneath):
"""Construct a PatternInfo instance.
Args:
whole_pattern_art: an ASCII art diagram depicting a game world. This
should be a list or tuple whose values are all strings containing
the same number of ASCII characters.
board_art_or_shape: either another ASCII art diagram depicting the
game board itself, or a 2-tuple containing the shape of the board
(the only thing this object cares about).
board_northwest_corner_mark: an ASCII character whose sole appearance
in the `whole_pattern_art` marks the intended initial scrolling
position of the game board (specifically, its top-left corner) with
respect to the game world diagram.
what_lies_beneath: the ASCII character that should replace the
`board_northwest_corner_mark` in the `whole_pattern_art` when using
the art to create `Scrolly` constructor arguments.
Raises:
ValueError: `what_lies_beneath` was not an ASCII character, or any
dimension of the game board is larger than the corresponding
dimension of the game world depicted in `whole_pattern_art`.
RuntimeError: the `whole_pattern_art` diagram does not contain exactly
one of the `board_northwest_corner_mark` characters.
"""
# Verify that what_lies_beneath is ASCII.
if ord(what_lies_beneath) > 127: raise ValueError(
'The what_lies_beneath value used to build a Scrolly.PatternInfo '
'must be an ASCII character.')
# Convert the pattern art into an array of character strings.
self._whole_pattern_art = ascii_art.ascii_art_to_uint8_nparray(
whole_pattern_art)
self._board_northwest_corner = self._whole_pattern_position(
board_northwest_corner_mark, 'the Scrolly.PatternInfo constructor')
self._whole_pattern_art[self._board_northwest_corner] = (
ord(what_lies_beneath))
# Determine the shape of the game board. We try two ways---the first way
# assumes that board_art_or_shape is the game board, the second assumes
# that it is a 2-tuple with the board shape.
try:
self._board_shape = len(board_art_or_shape), len(board_art_or_shape[0])
except TypeError:
rows, cols = board_art_or_shape # Enforce a 2-tuple.
self._board_shape = (rows, cols)
if (self._board_shape[0] > self._whole_pattern_art.shape[0] or
self._board_shape[1] > self._whole_pattern_art.shape[1]):
raise ValueError(
'The whole_pattern_art value used to build a Scrolly.PatternInfo '
'(size {}) cannot completely cover the game board (size '
'{}).'.format(self._whole_pattern_art.shape, self._board_shape))
def virtual_position(self, character):
"""Find board-relative position of a character in game world ASCII art.
The location returned by this method is the "virtual position" of the
character, that is, a location relative to the game board's (not the game
world's) top left corner. In contrast to a "true position", a virtual
position may exceed the bounds of the game board in any direction.
Args:
character: the character to search for inside the `whole_pattern_art`
supplied to the constructor. There must be exactly one of these
characters inside the game world art.
Returns:
A 2-tuple containing the row, column board-relative position of
`character` in the game world art.
Raises:
RuntimeError: the `whole_pattern_art` diagram does not contain exactly
one of the `board_northwest_corner_mark` characters.
"""
pattern_position = self._whole_pattern_position(
character, 'Scrolly.PatternInfo.virtual_position()')
return (pattern_position[0] - self._board_northwest_corner[0],
pattern_position[1] - self._board_northwest_corner[1])
def kwargs(self, character):
"""Build some of the keyword arguments for the `Scrolly` constructor.
Given a character whose pattern inside the game world ASCII art will be
the scrollable pattern managed by a `Scrolly`, return a dict which can
be **expanded into the arguments of the `Scrolly` constructor to provide
values for its `board_shape`, `whole_pattern`, and
`board_northwest_corner` arguments.
Args:
character: character to use to derive a binary mask from the game world
ASCII art passed to the constructor. This mask will become the
scrollable pattern managed by a `Scrolly` instance.
Returns:
a partial kwargs dictionary for the `Scrolly` constructor.
"""
# some (not all) kwargs that you can pass on to Scrolly.__init__.
return {'board_shape': self._board_shape,
'whole_pattern': self._whole_pattern_art == ord(character),
'board_northwest_corner': self._board_northwest_corner}
def _whole_pattern_position(self, character, error_name):
"""Find the absolute location of `character` in game world ASCII art."""
pos = list(np.argwhere(self._whole_pattern_art == ord(character)))
if not pos: raise RuntimeError(
'{} found no instances of {} in the pattern art used to build this '
'PatternInfo object.'.format(error_name, repr(character)))
if len(pos) > 1: raise RuntimeError(
'{} found multiple instances of {} in the pattern art used to build '
'this PatternInfo object.'.format(error_name, repr(character)))
return tuple(pos[0])
def __init__(self, curtain, character, board_shape,
whole_pattern, board_northwest_corner,
scroll_margins=(2, 3), scrolling_group=''):
"""Superclass constructor for `Scrolly`-derived classes.
`Scrolly` does not define `Drape.update`, so this constructor will fail
if you attempt to build a `Scrolly` on its own.
Args:
curtain: required by `Drape`.
character: required by `Drape`.
board_shape: 2-tuple containing the row, column dimensions of the game
board.
whole_pattern: a 2-D numpy array with dtype `bool_`, which will be "owned"
by this `Drape` and made accessible at `self.whole_pattern`.
Game-board-shaped regions of this array will be used to update this
`Drape`'s curtain, depending on where the game board has been
scrolled relative to the pattern.
board_northwest_corner: a row, column 2-tuple specifying the initial
scrolling position of the game board relative to the `whole_pattern`.
scroll_margins: either None, which means that the `Scrolly` should
scroll whenever all egocentric entities permit it (and as long as it
hasn't run out of pattern in the scrolling direction), or a 2-tuple
that controls the `Scrolly`'s "less aggressive" scrolling behaviour
(see class docstring). In this latter case, the `Scrolly` will only
attempt to scroll if an egocentric `Sprite` approaches within
`scroll_margins[0]` rows of the top or bottom of the board, or within
`scroll_margins[1]` columns of the left or right edges of the board.
Note that in this case, if there are no egocentric `Sprite`s, no
scrolling will ever occur!
scrolling_group: the scrolling group that this `Scrolly` should
participate in, if not the default (`''`).
Raises:
ValueError: any dimension of `board_shape` is larger than the
corresponding dimension of `whole_pattern`, or either of the margins
specified in `scroll_margins` so large that it overlaps more than
half of the game board.
"""
super(Scrolly, self).__init__(curtain, character)
# Local copies of certain arguments.
self._board_shape = board_shape
self._northwest_corner = board_northwest_corner
self._scrolling_group = scrolling_group
# We own this pattern now, and nobody should change our reference to it.
self._w_h_o_l_e_p_a_t_t_e_r_n = whole_pattern
# Top-left corner of the board must never exceed these limits.
self._northwest_corner_limit = (whole_pattern.shape[0] - board_shape[0],
whole_pattern.shape[1] - board_shape[1])
if any(lim < 0 for lim in self._northwest_corner_limit):
raise ValueError(
'The whole_pattern provided to the `Scrolly` constructor (size {}) '
'cannot completely cover the game board (size {}).'.format(
whole_pattern.shape, board_shape))
# If the user has supplied scrolling margins, figure out where they are.
self._have_margins = scroll_margins is not None
if self._have_margins:
# If a visible, egocentric Sprite will move into or beyond any of these
# bounds, then the Scrolly should scroll those bounds out of the way.
self._margin_north = scroll_margins[0] - 1
self._margin_south = board_shape[0] - scroll_margins[0]
self._margin_west = scroll_margins[1] - 1
self._margin_east = board_shape[1] - scroll_margins[1]
if (self._margin_west >= self._margin_east or
self._margin_north >= self._margin_south):
raise ValueError(
'The scrolling margins provided to the `Scrolly` constructor, {}, '
'are so large that a margin would overlap more than half of the '
'board.'.format(scroll_margins))
# Initialise the curtain with the portion of the pattern visible on the
# game board.
self._update_curtain()
# Keep track of the last frame index where which we considered executing a
# scrolling motion. The pattern_position_* methods use this information to
# provide consistent information before and after scrolling.
self._last_maybe_move_frame = -float('inf')
# Also for the pattern_position_* methods, we save the location of the game
# board prior to any game iteration's scrolling motion.
self._prescroll_northwest_corner = self._northwest_corner
def pattern_position_prescroll(self, virtual_position, the_plot):
"""Get "pattern coordinates" of a pre-scrolling `virtual_position`.
Most `Sprite`s and other game entities reason about "screen location" in
game-board-relative coordinates, but some may also need to know their
"absolute" location---their position with respect to the game scenery. For
scrolling games that use `Scrolly`s to implement a moving game world, the
`pattern_position_*` methods provide a way to translate a "virtual position"
(which is just a game-board-relative position that is allowed to extend
beyond the game board) to an "absolute" position: to coordinates relative to
the scrolling pattern managed by this `Scrolly`.
As the game board's scrolling location can change during a game iteration,
callers of these methods have to be specific about whether the virtual
position that they want to translate is a virtual position from before the
game board moved in the world (i.e. before scrolling) or after. For the
former, use this method; for the latter, use `pattern_position_postscroll`.
Args:
virtual_position: virtual position (as a row, column 2-tuple) to translate
into (pre-scroll) coordinates relative to this `Scrolly`'s pattern.
the_plot: this pycolab game's `Plot` object.
Returns:
A row, column 2-tuple containing the (pre-scroll) pattern-relative
translation of `virtual_position` into "absolute" coordinates.
"""
# This if statement replicates logic from _maybe_move, since this method
# could be called before _maybe_move does.
if self._last_maybe_move_frame < the_plot.frame:
self._prescroll_northwest_corner = self._northwest_corner
return things.Sprite.Position(
row=virtual_position[0] + self._prescroll_northwest_corner[0],
col=virtual_position[1] + self._prescroll_northwest_corner[1])
def pattern_position_postscroll(self, virtual_position, the_plot):
"""Get "pattern coordinates" of a post-scrolling `virtual_position`.
The discussion from `pattern_position_prescroll` applies here as well,
except this method translates `virtual_position` into coordinates relative
to the pattern after any scrolling has occurred.
Args:
virtual_position: virtual position (as a row, column 2-tuple) to translate
into (post-scroll) coordinates relative to this `Scrolly`'s pattern.
the_plot: this pycolab game's `Plot` object.
Returns:
A row, column 2-tuple containing the (post-scroll) pattern-relative
translation of `virtual_position` into "absolute" coordinates.
Raises:
RuntimeError: this `Scrolly` has not had any of its motion action helper
methods called in this game iteration, so it hasn't had a chance to
decide whether and where to scroll yet.
"""
if self._last_maybe_move_frame < the_plot.frame: raise RuntimeError(
'The pattern_position_postscroll method was called on a Scrolly '
'instance before that instance had a chance to decide whether or where '
'it would scroll.')
return things.Sprite.Position(
row=virtual_position[0] + self._northwest_corner[0],
col=virtual_position[1] + self._northwest_corner[1])
@property
def whole_pattern(self):
"""Retrieve the scrolling game world pattern managed by this `Scrolly`."""
return self._w_h_o_l_e_p_a_t_t_e_r_n
### Protected helpers (final, do not override) ###
def _northwest(self, the_plot):
"""Scroll one row upward and one column leftward, if necessary."""
return self._maybe_move(the_plot, self._NORTHWEST)
def _north(self, the_plot):
"""Scroll one row upward, if necessary."""
return self._maybe_move(the_plot, self._NORTH)
def _northeast(self, the_plot):
"""Scroll one row upward and one column rightward, if necessary."""
return self._maybe_move(the_plot, self._NORTHEAST)
def _east(self, the_plot):
"""Scroll one column rightward, if necessary."""
return self._maybe_move(the_plot, self._EAST)
def _southeast(self, the_plot):
"""Scroll one row downward and one column rightward, if necessary."""
return self._maybe_move(the_plot, self._SOUTHEAST)
def _south(self, the_plot):
"""Scroll one row downward, if necessary."""
return self._maybe_move(the_plot, self._SOUTH)
def _southwest(self, the_plot):
"""Scroll one row downward and one column leftward, if necessary."""
return self._maybe_move(the_plot, self._SOUTHWEST)
def _west(self, the_plot):
"""Scroll one column leftward, if necessary."""
return self._maybe_move(the_plot, self._WEST)
def _stay(self, the_plot):
"""Remain in place, but apply any other scrolling that may have happened."""
return self._maybe_move(the_plot, self._STAY)
### Private helpers (do not call; final, do not override) ###
def _maybe_move(self, the_plot, motion):
"""Handle all aspects of single-row and/or single-column scrolling.
Implements every aspect of deciding whether to scroll one step in any of the
nine possible gridworld directions (includes staying put). This amounts to:
1. Checking for scrolling orders from other entities (see
`protocols/scrolling.py`), and, if present, applying them
indiscriminately and returning.
2. Determining whether this `Scrolly` should scroll (e.g. one of the
sprites is encroaching on the board margins). If not, returning.
3. Determining whether this `Scrolly` can scroll---that is, it's not
constrained by egocentric entities, it wouldn't wind up scrolling the
board off of the pattern, and so on. If not, returning.
4. Issuing a scrolling order for the scroll, and updating the curtain from
the pattern.
Args:
the_plot: this pycolab game's `Plot` object.
motion: a 2-tuple indicating the number of rows and columns that the
game board should move over the pattern if scrolling is both
appropriate and possible. See class docstring for more details.
Raises:
scrolling.Error: another game entity has issued a scrolling order which
does not have any component in common with `motion`.
"""
# Save our last board location for pattern_position_prescroll.
if self._last_maybe_move_frame < the_plot.frame:
self._last_maybe_move_frame = the_plot.frame
self._prescroll_northwest_corner = self._northwest_corner
# First, was a scrolling order already issued by some other entity in this
# scrolling group? If so, verify that it was the same motion as `motion` in
# at least one dimension; if it was, apply it without doing any other
# checking. Otherwise, die.
scrolling_order = scrolling.get_order(self, the_plot, self._scrolling_group)
if scrolling_order:
if motion[0] != scrolling_order[0] and motion[1] != scrolling_order[1]:
raise scrolling.Error(
'The Scrolly corresponding to character {} received a fresh '
'scrolling order, {}, which has no component in common with the'
'current action-selected motion, which is {}.'.format(
self.character, scrolling_order, motion))
self._northwest_corner = things.Sprite.Position(
row=scrolling_order[0] + self._northwest_corner[0],
col=scrolling_order[1] + self._northwest_corner[1])
self._update_curtain()
return
# Short-circuit: nothing to do here if instructions say "stay put". But just
# in case the whole pattern itself has been changed, we update the curtain.
if motion == self._STAY:
self._update_curtain()
return
# If here, the decision to scroll is ours! The rest of this (long) method
# is divided into handling the two cases we need to consider:
#############
# Case 1: The user made scrolling mandatory (i.e. whenever possible).
#############
if not self._have_margins:
# The main complication in this case has to do with circumstances where
# only one component of the scrolling motions is possible. The user made
# scrolling *mandatory*, so we want to scroll as much as we can.
# The first thing we do is check for the legality of the motion itself.
# Any scrolling order we issue is issued to accommodate the motion that
# we expect egocentric entities to take. If they won't all do that motion,
# there's no good reasson to accommodate it.
if scrolling.is_possible(self, the_plot, motion, self._scrolling_group):
# The motion is legal, so now we determine where on the pattern the
# motion would move the northwest corner of the game board. From this,
# determine whether and which components of the motion would scroll the
# game board off of the pattern.
possible_board_edge_north = self._northwest_corner[0] + motion[0]
possible_board_edge_west = self._northwest_corner[1] + motion[1]
can_scroll_vertically = (
0 <= possible_board_edge_north <= self._northwest_corner_limit[0])
can_scroll_horizontally = (
0 <= possible_board_edge_west <= self._northwest_corner_limit[1])
# The scrolling order that we'll issue and execute will only contain
# the components of the motion that will *not* scroll the game board
# off of the pattern. This may mean that we issue a scrolling order that
# was not expressly by other egocentric game entities. See the "loose
# interpretation of 'legal' scrolling motions" discussion in the class
# docstring and elsewhere.
scrolling_order = (motion[0] if can_scroll_vertically else 0,
motion[1] if can_scroll_horizontally else 0)
self._northwest_corner = things.Sprite.Position(
row=scrolling_order[0] + self._northwest_corner[0],
col=scrolling_order[1] + self._northwest_corner[1])
scrolling.order(self, the_plot, scrolling_order, self._scrolling_group,
check_possible=False)
# Whether we've scrolled or not, update the curtain just in case the whole
# pattern itself has been changed.
self._update_curtain()
return
#############
# Case 2: We'll only consider scrolling if one of the visible egocentric
# sprites will move from the centre region of the board into the margins.
#############
action_demands_vertical_scrolling = False
action_demands_horizontal_scrolling = False
egocentric_participants = scrolling.egocentric_participants(
self, the_plot, self._scrolling_group)
for entity in egocentric_participants:
# Short-circuit if we already know we're scrolling both ways.
if (action_demands_vertical_scrolling and
action_demands_horizontal_scrolling): break
# See if this entity adds to the axes along which we should scroll because
# it threatens to enter or move more deeply into a margin. Here we assume
# that our motion argument is also a motion that this egocentric game
# entity expects it should attempt to make, relative to the whole world
# scenery. (This may mean no motion relative to the game board itself,
# because it's an egocentric entity, after all.)
if not isinstance(entity, things.Sprite): continue
burrowing_vertical, burrowing_horizontal = (
self._sprite_burrows_into_a_margin(entity, motion))
action_demands_vertical_scrolling |= burrowing_vertical
action_demands_horizontal_scrolling |= burrowing_horizontal
# If we don't need to scroll, then we won't do it, and we can stop right
# here! But just in case the whole pattern itself has been changed, we
# update the curtain first.
if not (action_demands_vertical_scrolling or
action_demands_horizontal_scrolling):
self._update_curtain()
return
# We know we should scroll, now to see what we'd actually do and where we'd
# wind up (i.e. where the northwest corner of the board would lie on the
# whole pattern) if we did it. Note here that we might be concocting a
# scrolling order that may not have been expressly permitted by other
# egocentric game entities. See the "loose interpretation of 'legal'
# scrolling motions" discussion in the class docstring and elsewhere.
scrolling_order = (motion[0] if action_demands_vertical_scrolling else 0,
motion[1] if action_demands_horizontal_scrolling else 0)
possible_northwest_corner = things.Sprite.Position(
row=scrolling_order[0] + self._northwest_corner[0],
col=scrolling_order[1] + self._northwest_corner[1])
# We know we should scroll, now to see whether we can. If we can, do it,
# and order all other participants in this scrolling group to do it as well.
we_can_actually_scroll = (
0 <= possible_northwest_corner[0] <= self._northwest_corner_limit[0])
we_can_actually_scroll &= (
0 <= possible_northwest_corner[1] <= self._northwest_corner_limit[1])
# Note how this test checks for the legality of the *motion*, not the
# scrolling order itself. This check also lies at the heart of the "loose
# interpretation of 'legal' scrolling motions" described in the class
# docstring and elsewhere. The scrolling order we derived just above is
# meant to accommodate this motion on the part of all of the egocentric
# entities, but if the motion itself is illegal for them, we won't scroll
# anywhere at all.
we_can_actually_scroll &= (
scrolling.is_possible(self, the_plot, motion, self._scrolling_group))
if we_can_actually_scroll:
self._northwest_corner = possible_northwest_corner
scrolling.order(self, the_plot, scrolling_order, self._scrolling_group,
check_possible=False)
# Whether we've scrolled or not, update the curtain just in case the whole
# pattern itself has been changed.
self._update_curtain()
def _sprite_burrows_into_a_margin(self, sprite, motion):
"""Would `motion` would move `sprite` (deeper) into either margin?
Args:
sprite: a `Sprite` instance present in this pycolab game.
motion: a 2-tuple indicating the number of rows and columns that the
sprite should add to its current position.
Returns:
a 2-tuple whose members are:
- True iff `sprite` would enter or move deeper into the left or right
margin.
- True iff `sprite` would enter or move deeper into the top or bottom
margin.
"""
sprite_old_row, sprite_old_col = sprite.position
sprite_new_row = sprite_old_row + motion[0]
sprite_new_col = sprite_old_col + motion[1]
return (
((sprite_old_row > sprite_new_row) and # Moving north into a margin, or
(sprite_new_row <= self._margin_north)) or
((sprite_old_row < sprite_new_row) and # ...moving south into a margin?
(sprite_new_row >= self._margin_south)),
((sprite_old_col > sprite_new_col) and # Moving west into a margin, or
(sprite_new_col <= self._margin_west)) or
((sprite_old_col < sprite_new_col) and # ...moving east into a margin?
(sprite_new_col >= self._margin_east)))
def _update_curtain(self):
"""Update this `Scrolly`'s curtain by copying data from the pattern."""
rows = slice(self._northwest_corner[0],
self._northwest_corner[0] + self._board_shape[0])
cols = slice(self._northwest_corner[1],
self._northwest_corner[1] + self._board_shape[1])
np.copyto(self.curtain, self.whole_pattern[rows, cols])
|
pycolab-master
|
pycolab/prefab_parts/drapes.py
|
# coding=utf8
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""""Prefabricated" `Sprite`s with all kinds of useful behaviour."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from pycolab import things
from pycolab.protocols import scrolling
class MazeWalker(things.Sprite):
"""A base class for "maze walkers" (e.g. Pac-Man, Zelda, Sokoban).
If your game shows a top-down view of a world where a character can go in all
directions (not counting walls, etc.), then a `MazeWalker` is a `Sprite` that
contains much of the functionality you need to build that character. It's up
to you to make a `MazeWalker` subclass that implements the actual `update`
method, but the "motion action" helper methods `_north`, `_south`, `_east`,
`_west`, `_northeast`, `_northwest`, `_southeast`, and `_southwest` will
hopefully make this easy to do. Call these methods, and your `Sprite` will
move in that direction---or the method will return a reason why it can't do
that (read on).
There is also a `_stay` method which doesn't move the `Sprite` at all.
Although it may seem useless, *you should consider calling it in your `update`
method whenever you want your `MazeWalker` to stay put*; if you do this, then
your `Sprite` will abide by the "scrolling" protocol (see
`protocols/scrolling.py`) "out of the box".
## Obstructions
On construction, you can tell a `MazeWalker` which characters in the board it
cannot traverse. If the `MazeWalker` would "step on" one of these characters
at any time whilst executing any of the motion actions, its position will not
be updated.
Attempts to move in any of the four "cardinal directions" will fail if one of
these "impassable" characters is in the place where the `MazeWalker` is
attempting to move. For diagonal motions, a motion will fail if two "corners"
are in the way. By example, if we assume that '#' is an impassable character,
then if a `MazeWalker` is attempting to move from position A to position B in
each of the following scenarios:
Scenario #1: Scenario #2: Scenario #3: Scenario #4:
+--+ +--+ +--+ +--+
|A | |A | |A#| |A#|
| B| |#B| | B| |#B|
+--+ +--+ +--+ +--+
the motion will succeed in all of them except #4. Of course, failure will also
occur if B contains an impassable character.
If a motion action helper method completes succesfully, it returns None.
Otherwise, it returns the impassable character (for "cardinal directions")
or characters (for "diagonal directions"---as a 3-tuple containing the
impassable character to the left of the motion vector (or None if that
character is passable), the character at the end of the motion vector
(likewise), and the character to the right of the motion vector (likewise)).
Thus you can always determine whether a motion action helper method has failed
by casting its return value to bool. (If this MazeWalker is not permitted to
exit the game board, per the `confined_to_board` constructor argument, then
obstructions that happen to be the impassable edge of the game board will be
represented as `MazeWalker.EDGE` constants.)
By default, a `MazeWalker` will happily walk right off the game board if you
tell it to (or if it gets scrolled off the board; see
`protocols/scrolling.py`). If it does, it makes itself invisible (unless you
override that behaviour) and sets its true position (i.e. the one available
via the `position` property) to `0, 0`. The `MazeWalker` keeps track of the
coordinates for where it _would_ have gone, however (its "virtual position",
available via the `virtual_position` property), and continues to update these
as directed by the motion action helper methods. If the `MazeWalker` manages
to "walk back" onto the game board somewhere, its original visibility is
restored, and its true position is set to that location.
As far as default `MazeWalker`s are concerned, the world outside of the game
board is a magical land free from all obstructions. A `MazeWalker` can move in
any direction out there that it wants.
## `MazeWalker`s and scrolling
If your game does not feature scrolling scenery, you can ignore this section.
As mentioned above, `MazeWalker`s are built to accommodate the scrolling
protocol (see `protocols/scrolling.py`) "out of the box"; that is, if a
game entity (e.g. a `drapes.Scrolly`) commands the game world to shift its
position on the game board, a `MazeWalker` will obey in accordance with
whether it is "egocentric". (Provided, of course, that your `MazeWalker`
calls `self._stay()` on game iterations when it doesn't move.)
An ordinary `MazeWalker` will simply shift itself so that it remains in the
same place relative to the game world. An egocentric `MazeWalker` will remain
at the same place on the game board and allow the world to shift around it.
Egocentric `MazeWalker`s cannot allow themselves to be scrolled into walls and
other obstacles, so as part of the scrolling protocol, they automatically
calculate and inform other protocol participants of the directions they will
be able to move at the next game iteration. In order for this calculation to
be accurate, in nearly all circumstances, game entities that control
obstructing characters for this `MazeWalker` should be in separate and earlier
update groups, allowing the `MazeWalker` to know what the world will look like
at the next game iteration.
_Now for an unfortunate qualification of the two preceding paragraphs._
Egocentric `MazeWalker`s don't always remain in the same board-relative place
when the rest of the world scrolls, and sometimes `MazeWalker`s will abide by
scrolling orders that it did not tell the other protocol participants were
legal. For details of this unfortunate special case and an example, see the
section "On the loose interpretation of 'legal' scrolling motions" in
`protocols/scrolling.py`.
This permissiveness allows for a more pleasing scrolling experience in concert
with `Drape`s that derive from `drapes.Scrolly`, but it requires that the
`Drape` issue the scrolling order, and that the issuing `Drape` and all other
participating egocentric entities issue the exact same motion action helper
methods at each game iteration.
"""
# Used in motion action helper method return values to represent the edge
# of the game board.
EDGE = 'edge!'
# Predefined single-step motions, for internal use only. Positive values in
# the first field mean move downward; positive values in the second field
# mean move rightward.
_NORTH = (-1, 0)
_NORTHEAST = (-1, 1)
_EAST = (0, 1)
_SOUTHEAST = (1, 1)
_SOUTH = (1, 0)
_SOUTHWEST = (1, -1)
_WEST = (0, -1)
_NORTHWEST = (-1, -1)
# Not technically a single-step motion.
_STAY = (0, 0)
def __init__(self, corner, position, character, impassable,
confined_to_board=False,
egocentric_scroller=False,
scrolling_group=''):
"""Superclass constructor for `MazeWalker`-derived classes.
`MazeWalker` does not define `Sprite.update`, so this constructor will fail
if you attempt to build a `MazeWalker` on its own.
Args:
corner: required by `Sprite`.
position: required by `Sprite`.
character: required by `Sprite`.
impassable: an indexable of ASCII characters that this `MazeWalker` is not
able to traverse. A string value containing these characters works.
confined_to_board: whether this `MazeWalker` is allowed to walk off of
the game board, or to be scrolled off of the game board.
egocentric_scroller: whether this `MazeWalker` should behave as an
egocentric scroller with respect to `scrolling_group` (see
`protocols/scrolling.py`). If your game does not feature a scrolling
game board, you don't need to worry about this argument.
scrolling_group: the scrolling group that this `MazeWalker` should
participate in, if not the default (`''`). If your game does not
feature a scrolling game world, you don't need to worry about this
argument.
Raises:
TypeError: `impassable` contains values that are not ASCII characters.
ValueError: `impassable` contains the character that represents this
`MazeWalker` on the game board.
"""
super(MazeWalker, self).__init__(corner, position, character)
_character_check(impassable, 'impassable', 'the MazeWalker constructor')
if character in impassable:
raise ValueError('A MazeWalker must not designate its own character {} '
'as impassable.'.format(repr(character)))
# Save various constructor arguments.
self._impassable = set(impassable)
self._confined_to_board = confined_to_board
self._egocentric_scroller = egocentric_scroller
self._scrolling_group = scrolling_group
# These coordinates are always relative to the board's origin at (0, 0), but
# they are allowed to range beyond the bounds of the board.
self._virtual_row, self._virtual_col = position
# When the MazeWalker leaves the board, this will hold the visibility it
# had just before it left. Unless overridden, the default behaviour is for
# this visibility to be restored to the MazeWalker if it ever returns to
# the board.
self._prior_visible = None
@property
def virtual_position(self):
"""This `MazeWalker's "virtual position" (see class docstring)."""
return self.Position(self._virtual_row, self._virtual_col)
@property
def on_the_board(self):
"""True iff the `MazeWalker`'s "virtual position" is on the game board."""
return self._on_board(self._virtual_row, self._virtual_col)
@property
def impassable(self):
"""The set of characters that this `MazeWalker` cannot traverse."""
return self._impassable
### Protected helpers (okay to override) ###
def _on_board_exit(self):
"""Code to run just before a `MazeWalker` exits the board.
Whatever is in this method is executed immediately prior to a `MazeWalker`
exiting the game board, either under its own power or due to scrolling.
("Exiting" refers to the `MazeWalker`'s "virtual position"---see class
docstring---since a `Sprite`'s true position cannot be outside of the game
board.)
Note that on certain rare occasions, it's possible for this method to run
alongside `_on_board_enter` in the same game iteration. On these occasions,
the `MazeWalker` is scrolled off the board, but then it performs a move in
the opposite direction (at least in part) that brings it right back on. Or,
vice versa: the `MazeWalker` gets scrolled onto the board and then walks
back off.
By default, this method caches the `MazeWalker`'s previous visibility and
then makes the `MazeWalker` invisible---a reasonable thing to do, since it
will be moved to "real" position `(0, 0)` as long as its virtual position
is not on the game board. If you would like to preserve this behaviour
but trigger additional actions on board exit, override this method, but be
sure to call this class's own implementation of it, too. Copy and paste:
super(MyCoolMazeWalker, self)._on_board_exit()
"""
self._prior_visible = self._visible
self._visible = False
def _on_board_enter(self):
"""Code to run just after a `MazeWalker` enters the board.
Whatever is in this method is executed immediately after a `MazeWalker`
enters the game board, either under its own power or due to scrolling.
("Entering" refers to the `MazeWalker`'s "virtual position"---see class
docstring---since a `Sprite`'s true position cannot be outside of the game
board.)
Note that on certain rare occasions, it's possible for this method to run
alongside `_on_board_exit` in the same game iteration. On these occasions,
the `MazeWalker` is scrolled off the board, but then it performs a move in
the opposite direction (at least in part) that brings it right back on. Or,
vice versa: the `MazeWalker` gets scrolled onto the board and then walks
back off.
By default, this method restores the `MazeWalker`'s previous visibility as
cached by `_on_board_exit`. If you would like to preserve this behaviour
but trigger additional actions on board exit, override this method, but be
sure to call this class's own implementation of it, too. Copy and paste:
super(MyCoolMazeWalker, self)._on_board_enter()
"""
# called just after board entrance
self._visible = self._prior_visible
### Protected helpers (final, do not override) ###
def _northwest(self, board, the_plot):
"""Try moving one cell upward and leftward. Returns `None` on success."""
return self._move(board, the_plot, self._NORTHWEST)
def _north(self, board, the_plot):
"""Try moving one cell upward. Returns `None` on success."""
return self._move(board, the_plot, self._NORTH)
def _northeast(self, board, the_plot):
"""Try moving one cell upward and rightward. Returns `None` on success."""
return self._move(board, the_plot, self._NORTHEAST)
def _east(self, board, the_plot):
"""Try moving one cell rightward. Returns `None` on success."""
return self._move(board, the_plot, self._EAST)
def _southeast(self, board, the_plot):
"""Try moving one cell downward and rightward. Returns `None` on success."""
return self._move(board, the_plot, self._SOUTHEAST)
def _south(self, board, the_plot):
"""Try moving one cell downward. Returns `None` on success."""
return self._move(board, the_plot, self._SOUTH)
def _southwest(self, board, the_plot):
"""Try moving one cell downward and leftward. Returns `None` on success."""
return self._move(board, the_plot, self._SOUTHWEST)
def _west(self, board, the_plot):
"""Try moving one cell leftward. Returns `None` on success."""
return self._move(board, the_plot, self._WEST)
def _stay(self, board, the_plot):
"""Remain in place, but account for any scrolling that may have happened."""
return self._move(board, the_plot, self._STAY)
def _teleport(self, virtual_position):
"""Set the new virtual position of the agent, applying side-effects.
This method is a somewhat "low level" method: it doesn't check whether the
new location has an impassible character in it, nor does it apply any
scrolling orders that may be current (if called during a game iteration).
This method is only grudgingly "protected" (and not "private"), mainly to
allow `MazeWalker` subclasses to initialise their location at a place
somewhere off the board. Use at your own risk.
This method does handle entering and exiting the board in the conventional
way. Virtual positions off of the board yield a true position of `(0, 0)`,
and `_on_board_exit` and `_on_board_enter` are called as appropriate.
Args:
virtual_position: A 2-tuple containing the intended virtual position for
this `MazeWalker`.
"""
new_row, new_col = virtual_position
old_row, old_col = self._virtual_row, self._virtual_col
# Determine whether either, both, or none of the endpoints are on the board.
old_on_board = self._on_board(old_row, old_col)
new_on_board = self._on_board(new_row, new_col)
# Call the exit handler if we are leaving the board.
if old_on_board and not new_on_board: self._on_board_exit()
# If our new virtual location is not on the board, set our true location
# to 0, 0. Otherwise, true and virtual locations can be the same.
self._virtual_row, self._virtual_col = new_row, new_col
if new_on_board:
self._position = self.Position(new_row, new_col)
else:
self._position = self.Position(0, 0)
# Call the entry handler if we are entering the board.
if not old_on_board and new_on_board: self._on_board_enter()
### Private helpers (do not call; final, do not override) ###
def _move(self, board, the_plot, motion):
"""Handle all aspects of single-row and/or single-column movement.
Implements every aspect of moving one step in any of the nine possible
gridworld directions (includes staying put). This amounts to:
1. Applying any scrolling orders (see `protocols/scrolling.py`).
2. Making certain the motion is legal.
3. If it is, applying the requested motion.
4. If this is an egocentric `MazeWalker`, calculating which scrolling orders
will be legal (as far as this `MazeWalker` is concerned) at the next
iteration.
5. Returning the success (None) or failure (see class docstring) result.
Args:
board: a 2-D numpy array with dtype `uint8` containing the completely
rendered game board from the last board repaint (which usually means
the last game iteration; see `Engine` docs for details).
the_plot: this pycolab game's `Plot` object.
motion: a 2-tuple whose components will be added to the `MazeWalker`'s
virtual coordinates (row, column respectively) to obtain its new
virtual position.
Returns:
None if the motion is executed successfully; otherwise, a tuple (for
diagonal motions) or a single-character ASCII string (for motions in
"cardinal direction") describing the obstruction blocking the
`MazeWalker`. See class docstring for details.
"""
self._obey_scrolling_order(motion, the_plot)
check_result = self._check_motion(board, motion)
if not check_result: self._raw_move(motion)
self._update_scroll_permissions(board, the_plot)
return check_result
def _raw_move(self, motion):
"""Apply a dx, dy movement.
This is the method that `_move` and `_obey_scrolling_order` actually use to
move the `MazeWalker` on the game board, updating its "true" and "virtual"
positions (see class docstring). The `_on_board_(enter|exit)` hooks are
called here as needed. The behaviour whereby `MazeWalker`s that wander or
fall off the board assume a true position of `(0, 0)` happens here as well.
This method does not verify that `motion` is a legal move for this
`MazeWalker`.
Args:
motion: a 2-tuple whose components will be added to the `MazeWalker`'s
virtual coordinates (row, column respectively) to obtain its new
virtual position.
"""
# Compute "virtual" endpoints of the motion.
new_row = self._virtual_row + motion[0]
new_col = self._virtual_col + motion[1]
self._teleport((new_row, new_col))
def _obey_scrolling_order(self, motion, the_plot):
"""Look for a scrolling order in the `Plot` object and apply if present.
Examines the `Plot` object to see if any entity preceding this `MazeWalker`
in the update order has issued a scrolling order (see
`protocols/scrolling.py`). If so, apply the additive inverse of the motion
in the scrolling order so as to remain "stationary" with respect to the
moving environment. (We expect that egocentric `MazeWalker`s will apply the
motion itself soon after we return so that they remain stationary with
respect to the board.)
(Egocentric `MazeWalker`s only.) Makes certain that this `MazeWalker` is
known to scrolling protocol participants as an egocentric entity, and
verifies that any non-None scrolling order is identical to the motion that
the `MazeWalker` is expected to perform.
No effort is made to verify that the world scrolling around an egocentric
`MazeWalker` will wind up putting the `MazeWalker` in an impossible
position.
Args:
motion: the motion that this `MazeWalker` will execute during this game
iteration (see docstring for `_move`).
the_plot: this pycolab game's `Plot` object.
Raises:
RuntimeError: this `MazeWalker` is egocentric, and the current non-None
scrolling order and the `MazeWalker`s motion have no components in
common.
"""
if self._egocentric_scroller:
scrolling.participate_as_egocentric(self, the_plot, self._scrolling_group)
order = scrolling.get_order(self, the_plot, self._scrolling_group)
if order is not None:
self._raw_move((-order[0], -order[1]))
if (self._egocentric_scroller and
order[0] != motion[0] and order[1] != motion[1]): raise RuntimeError(
'An egocentric MazeWalker corresponding to {} received a scroll '
'order {} that has no component in common with the motion {}, '
'which the MazeWalker was to carry out during the same game '
'iteration'.format(repr(self.character), order, motion))
def _update_scroll_permissions(self, board, the_plot):
"""Compute scrolling motions that will be compatible with this `MazeWalker`.
(Egocentric `MazeWalker`s only.) After the virtual position of this
`MazeWalker` has been updated by `_move`, declare which scrolling motions
will be legal on the next game iteration. (See `protocols/scrolling.py`.)
Args:
board: a 2-D numpy array with dtype `uint8` containing the completely
rendered game board from the last board repaint (which usually means
the last game iteration; see `Engine` docs for details).
the_plot: this pycolab game's `Plot` object.
"""
# to call after our location has been updated
if not self._egocentric_scroller: return
legal_motions = [self._STAY]
for motion in (self._NORTH, self._NORTHEAST, self._EAST, self._SOUTHEAST,
self._SOUTH, self._SOUTHWEST, self._WEST, self._NORTHWEST):
if not self._check_motion(board, motion): legal_motions.append(motion)
scrolling.permit(self, the_plot, legal_motions, self._scrolling_group)
def _check_motion(self, board, motion):
"""Deterimine whether `motion` is legal for this `MazeWalker`.
Computes whether the single-cell motion in `motion` would be legal for
this `MazeWalker` to execute. Reasons it might not be legal include: a
pattern of impassable characters is in the way, or for `MazeWalker`s
confined to the game board, the edge of the game board may be blocking.
Args:
board: a 2-D numpy array with dtype `uint8` containing the completely
rendered game board from the last board repaint (which usually means
the last game iteration; see `Engine` docs for details).
motion: A 2-tuple containing the motion as `(δrow, δcol)`.
Returns:
None if the motion is executed successfully; otherwise, a tuple (for
diagonal motions) or a single-character ASCII string (for motions in
"cardinal direction") describing the obstruction blocking the
`MazeWalker`. See class docstring for details.
"""
def at(coords):
"""Report character at egocentric `(row, col)` coordinates."""
drow, dcol = coords
new_row = self._virtual_row + drow
new_col = self._virtual_col + dcol
if not self._on_board(new_row, new_col): return self.EDGE
return chr(board[new_row, new_col])
def is_impassable(char):
"""Return True if `char` is impassable to this `MazeWalker`."""
return ((self._confined_to_board and (char is self.EDGE)) or
(char in self._impassable))
# Investigate all of the board positions that could keep this MazeWalker
# from executing the desired motion. Math is hard, so we just hard-code
# relative positions for each type of permissible motion.
if motion == self._STAY:
return None # Moving nowhere is always fine.
elif motion == self._NORTHWEST: # ↖
neighbs = at(self._WEST), at(self._NORTHWEST), at(self._NORTH)
elif motion == self._NORTH: # ↑
neighbs = at(self._NORTH)
elif motion == self._NORTHEAST: # ↗
neighbs = at(self._NORTH), at(self._NORTHEAST), at(self._EAST)
elif motion == (self._EAST): # →
neighbs = at(self._EAST)
elif motion == (self._SOUTHEAST): # ↘
neighbs = at(self._EAST), at(self._SOUTHEAST), at(self._SOUTH)
elif motion == (self._SOUTH): # ↓
neighbs = at(self._SOUTH)
elif motion == (self._SOUTHWEST): # ↙
neighbs = at(self._SOUTH), at(self._SOUTHWEST), at(self._WEST)
elif motion == (self._WEST): # ←
neighbs = at(self._WEST)
else:
assert False, 'illegal motion {}'.format(motion)
# Determine whether there are impassable obstacles in the neighbours. If
# there are, return the full array of neighbours.
if all(motion): # If the motion is diagonal:
if is_impassable(neighbs[1]): return neighbs
if is_impassable(neighbs[0]) and is_impassable(neighbs[2]): return neighbs
else: # Otherwise, if the motion is "cardinal":
if is_impassable(neighbs): return neighbs
# There are no obstacles; we're free to proceed.
return None
def _on_board(self, row, col):
"""Returns True iff `row`, `col` are on the game board."""
return (0 <= row < self.corner.row) and (0 <= col < self.corner.col)
def _character_check(items, argument_name, function_name):
"""Make sure all elements of `items` are single-character ASCII strings.
Args:
items: an iterable of things that should be single-character ASCII strings.
argument_name: if raising a `TypeError` due to finding an illegal value in
`items`, a name to give `items` in the exception string.
function_name: if raising a `TypeError` due to finding an illegal value in
`items`, a name to give the entity that objects to that value.
Raises:
TypeError: if anything that's not a single-character ASCII strings turns up
in `items`; the exception string will say that `function_name` objects
to finding such things in `argument_name`.
"""
for item in items:
try:
_ = ord(item)
except TypeError:
raise TypeError(
'{} requires all elements in its {} argument to be single-character '
'ASCII strings, but {} was found inside {}.'.format(
function_name, argument_name, repr(item), argument_name))
|
pycolab-master
|
pycolab/prefab_parts/sprites.py
|
# Copyright 2018 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests of the "Story" framework for making big games out of smaller ones."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import unittest
from pycolab import ascii_art
from pycolab import cropping
from pycolab import storytelling
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
from pycolab.tests import test_things as tt
import six
class StoryTest(tt.PycolabTestCase):
### Helpers ###
class _DieRightward(prefab_sprites.MazeWalker):
"""A boring Sprite that pauses, walks one step rightward, and terminates.
Some additional functions are present to support other tests:
- If the_plot['chapter_names'] is a list, then when this Sprite terminates
a game, it will pop that list and assign the resulting value to
the_plot.next_chapter, directing which chapter should follow.
"""
def __init__(self, corner, position, character):
super(StoryTest._DieRightward, self).__init__(
corner, position, character, impassable='', confined_to_board=True)
def update(self, actions, board, layers, backdrop, things, the_plot):
if the_plot.frame == 1:
self._east(board, the_plot)
the_plot.terminate_episode()
if 'chapter_names' in the_plot:
the_plot.next_chapter = the_plot['chapter_names'].pop(0)
class _IdleDrape(plab_things.Drape):
"""An even more boring Drape that does nothing at all."""
def update(self, *args, **kwargs):
pass
def _make_game(self, art):
"""Make a game with one _DieRightward sprite. Valid chars are [P.]."""
return ascii_art.ascii_art_to_game(
art, what_lies_beneath='.', sprites={'P': self._DieRightward})
### Tests ###
def testSequenceOfGames(self):
"""A `Story` will play through a sequence of games automatically."""
# The four games in the sequence use these four worlds.
arts = list(zip(['P..', '...', '...', '...'],
['...', '...', 'P..', '...'],
['...', 'P..', '...', '.P.']))
# Create and start the story.
story = storytelling.Story(
[lambda art=a: self._make_game(art) for a in arts])
observation, reward, pcontinue = story.its_showtime()
del reward, pcontinue # unused
# The first frame is the first game's first frame.
self.assertBoard(observation.board, arts[0])
# This should set us up to get the following sequence of observations.
self.assertMachinima(
engine=story,
frames=[
# The second frame is the second game's first frame. The terminal
# frame from the first game is discarded, so we never get to see
# the Sprite move rightward. (None was the action just prior to the
# second frame. Actions are not used in this test.)
(None, arts[1]),
# The third frame is the third game's first frame. Same reasoning.
(None, arts[2]),
# The fourth frame is the fourth game's first frame.
(None, arts[3]),
# The fifth frame is the fourth game's last frame. In a Story, you
# always see the terminal frame of the very last game (and you see
# no other game's terminal frame).
(None, ['...',
'...',
'..P'])
],
)
def testDictOfGames(self):
"""A `Story` will run as directed through a dict of games."""
# The two games in this dict will use these two worlds.
arts = {'one': ['P..',
'...',
'...'],
'two': ['...',
'.P.',
'...']}
# Create and start the story. Note how we inject a value into the first
# game's Plot that _DieRightward uses to tell Story how to advance through
# the various subgames. A bit roundabout, but it has the side-effect of also
# testing that Plot contents persist between games.
story = storytelling.Story(
{k: lambda art=v: self._make_game(art) for k, v in arts.items()},
first_chapter='one')
story.current_game.the_plot['chapter_names'] = ['two', 'one', 'one', None]
observation, reward, pcontinue = story.its_showtime()
del reward, pcontinue # unused
# For better narration of these observation comparisons, read through
# testSequenceOfGames.
self.assertBoard(observation.board, arts['one']) # First frame.
self.assertMachinima(engine=story, frames=[(None, arts['two']),
(None, arts['one']),
(None, arts['one']),
(None, ['.P.',
'...',
'...'])])
def testCropping(self):
"""Observations from subgames can be cropped for mutual compatibility."""
# The games will use these worlds.
arts = [
['P..',
'...',
'...'],
['...............',
'...............',
'.......P.......',
'...............',
'...............'],
['...',
'...',
'P..'],
]
# But these croppers will ensure that they all have a reasonable size.
croppers = [
None,
cropping.FixedCropper(top_left_corner=(1, 6), rows=3, cols=3),
cropping.FixedCropper(top_left_corner=(0, 0), rows=3, cols=3),
]
# Create and start the story.
story = storytelling.Story(
chapters=[lambda art=a: self._make_game(art) for a in arts],
croppers=croppers)
observation, reward, pcontinue = story.its_showtime()
del reward, pcontinue # unused
# For better narration of these observation comparisons, read through
# testSequenceOfGames.
self.assertBoard(observation.board, arts[0])
self.assertMachinima(engine=story, frames=[(None, ['...',
'.P.',
'...']),
(None, arts[2]),
(None, ['...',
'...',
'.P.'])])
def testInterGameRewardAccumulation(self):
"""Inter-game terminal rewards are carried into the next game."""
class GenerousQuitterDrape(plab_things.Drape):
"""This Drape gives a reward of 5 and quits immediately."""
def update(self, actions, board, layers, backdrop, things, the_plot):
the_plot.add_reward(5.0)
the_plot.terminate_episode()
# Create a new Story with all subgames using the usual art.
art = ['P..',
'...',
'...']
story = storytelling.Story([
# this is perfectly readable :-P
# pylint: disable=g-long-lambda
# We should see the initial observation from this first game, but not
# the second, terminal observation. The agent receives no reward.
lambda: ascii_art.ascii_art_to_game(art, what_lies_beneath='.',
sprites={'P': self._DieRightward}),
# We should see no observations from the next three games, since they
# all terminate immediately (courtesy of GenerousQuitterDrape). However,
# they also each contribute an additional 5.0 to the summed reward the
# agent will eventually see...
lambda: ascii_art.ascii_art_to_game(art, what_lies_beneath='.',
sprites={'P': self._DieRightward},
drapes={'Q': GenerousQuitterDrape}),
lambda: ascii_art.ascii_art_to_game(art, what_lies_beneath='.',
sprites={'P': self._DieRightward},
drapes={'Q': GenerousQuitterDrape}),
lambda: ascii_art.ascii_art_to_game(art, what_lies_beneath='.',
sprites={'P': self._DieRightward},
drapes={'Q': GenerousQuitterDrape}),
# ...when it sees the first observation of this game here. The second,
# terminal observation is dropped, but then...
lambda: ascii_art.ascii_art_to_game(art, what_lies_beneath='.',
sprites={'P': self._DieRightward}),
# ...we finally see an observation from a game involving a
# GenerousQuitterDrape when we see its first and terminal step, as the
# terminal step of the story. We also receive another 5.0 reward.
lambda: ascii_art.ascii_art_to_game(art, what_lies_beneath='.',
sprites={'P': self._DieRightward},
drapes={'Q': GenerousQuitterDrape}),
# pylint: enable=g-long-lambda
])
# Now to see if our predictions are true.
observation, reward, pcontinue = story.its_showtime() # First step.
self.assertBoard(observation.board, art)
self.assertIsNone(reward) # Nobody assigned any reward in this step.
self.assertEqual(pcontinue, 1.0)
observation, reward, pcontinue = story.play(None) # Second step.
self.assertBoard(observation.board, art) # First obs. of penultimate game.
self.assertEqual(reward, 15.0) # Summed across final steps of games 2-4.
self.assertEqual(pcontinue, 1.0)
observation, reward, pcontinue = story.play(None) # Third, final step.
self.assertBoard(observation.board, art) # Terminal obs. of final game.
self.assertEqual(reward, 5.0) # From the GenerousQuitterDrape.
self.assertEqual(pcontinue, 0.0)
def testStandIns(self):
"""The "abstraction breakers" in `Story` are suitably simulated."""
# The games will use these worlds.
arts = list(zip(['P~~', '..S'],
['~~~', '..D'],
['www', '###']))
# Create the story.
story = storytelling.Story([
# this is perfectly readable :-P
# pylint: disable=g-long-lambda
lambda: ascii_art.ascii_art_to_game(arts[0], what_lies_beneath='~',
sprites={'P': self._DieRightward},
drapes={'w': self._IdleDrape}),
lambda: ascii_art.ascii_art_to_game(arts[1], what_lies_beneath='.',
sprites={'S': self._DieRightward},
drapes={'D': self._IdleDrape})
# pylint: enable=g-long-lambda
])
# The "abstraction breaker" methods should fake the same sorts of results
# that you would get if the Story were actually implemented by a single
# Engine. Sprites and Drapes should contain an entry for any character
# associated with a Sprite or a Drape across all the games, and the
# contrived Backdrop's palette should have all the backdrop characters
# from anywhere in the story.
self.assertEqual(sorted(story.backdrop.palette), ['#', '.', '~'])
self.assertEqual(sorted(story.things), ['D', 'P', 'S', 'w'])
# The only real Sprites and Drapes in story.things are the ones from the
# current game; the others are dummies. Here we test the module function
# that identifies dummies.
self.assertTrue(storytelling.is_fictional(story.things['D']))
self.assertFalse(storytelling.is_fictional(story.things['P']))
self.assertTrue(storytelling.is_fictional(story.things['S']))
self.assertFalse(storytelling.is_fictional(story.things['w']))
def testCompatibilityChecking(self):
"""The `Story` constructor spots compatibility problems between games."""
# The first Story will fail because these game worlds have different sizes,
# and there are no croppers in use.
arts = [
['P..',
'...',
'...'],
['...............',
'...............',
'.......P.......',
'...............',
'...............'],
]
with six.assertRaisesRegex(self, ValueError,
'observations that are the same'):
_ = storytelling.Story([lambda art=a: self._make_game(art) for a in arts])
# This next Story will fail because characters are shared between Sprites,
# Drapes, and at least one Backdrop.
art = ['1..',
'.2.',
'..3']
error_regexp = (r'.*same character in two different ways'
r'.*both a Sprite and a Drape: \[2\];'
r'.*both a Sprite and in a Backdrop: \[1\];'
r'.*both a Drape and in a Backdrop: \[3\].*')
with six.assertRaisesRegex(self, ValueError, error_regexp):
_ = storytelling.Story([
# pylint: disable=g-long-lambda
lambda: ascii_art.ascii_art_to_game(art, what_lies_beneath='.',
sprites={'1': self._DieRightward},
drapes={'2': self._IdleDrape}),
lambda: ascii_art.ascii_art_to_game(art, what_lies_beneath='.',
sprites={'2': self._DieRightward},
drapes={'3': self._IdleDrape}),
# pylint: enable=g-long-lambda
])
def main(argv=()):
del argv # Unused.
unittest.main()
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/tests/story_test.py
|
# coding=utf8
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Basic tests of the pycolab engine.
Tests in this file evaluate the several core components of pycolab, not just
`engine.py`.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import sys
import unittest
from pycolab import ascii_art
from pycolab import rendering
from pycolab import things as plab_things
from pycolab.tests import test_things as tt
class EngineTest(tt.PycolabTestCase):
def testUpdateScheduleAndZOrder(self):
"""The engine abides by the update schedule and the Z-ordering."""
# Our test takes place in this 3x5 world...
art = ['.acb.',
'..c..',
'.dce.']
# Here we make the game.
engine = ascii_art.ascii_art_to_game(
art=art, what_lies_beneath='.',
# a, b, c, and d are sprites.
sprites=dict(a=ascii_art.Partial(tt.TestMazeWalker, impassable=''),
b=ascii_art.Partial(tt.TestMazeWalker, impassable=''),
d=ascii_art.Partial(tt.TestMazeWalker, impassable=''),
e=ascii_art.Partial(tt.TestMazeWalker, impassable='')),
# c is a drape that just sits there; Z is an invisible drape that
# also just sits there.
drapes=dict(c=tt.TestDrape,
Z=tt.TestDrape),
# This update schedule means that in a single game iteration:
# 1. the Backdrop, a, and b all update, then the board is re-rendered,
# 2. c updates, then the board is re-rendered,
# 3. d and e update, then the board is re-rendered,
# 4. Z updates, then the board is re-rendered.
update_schedule=[['a', 'b'], ['c'], ['d', 'e'], ['Z']],
# The Z-ordering says to render the entities in this order, from
# back to front.
z_order='Zabcde')
### GAME ITERATION #0. During the first update sweep, since none of the
### Sprites change their locations and none of the Drapes change their
### curtains, all entities will see the initial rendering of the board.
tt.pre_update(engine, 'a', self.expectBoard(art, err_msg='a @ 0'))
tt.pre_update(engine, 'b', self.expectBoard(art, err_msg='b @ 0'))
tt.pre_update(engine, 'c', self.expectBoard(art, err_msg='c @ 0'))
tt.pre_update(engine, 'd', self.expectBoard(art, err_msg='d @ 0'))
tt.pre_update(engine, 'e', self.expectBoard(art, err_msg='e @ 0'))
tt.pre_update(engine, 'Z', self.expectBoard(art, err_msg='Z @ 0'))
observation, unused_reward, discount = engine.its_showtime()
# Check that the observation is right and that discount is 1.
self.assertBoard(observation.board, art, err_msg='obs @ 0')
self.assertEqual(discount, 1.0)
# Check that miscellaneous properties work.
self.assertEqual(engine.rows, 3)
self.assertEqual(engine.cols, 5)
self.assertEqual(engine.z_order, ['Z', 'a', 'b', 'c', 'd', 'e'])
self.assertSetEqual(set(engine.things.keys()),
{'a', 'b', 'c', 'd', 'e', 'Z'})
self.assertIn('.', engine.backdrop.palette)
### GAME ITERATION #1. All sprites take a step to the right. As the
### update sweep takes place, the segmented update schedule causes
### different entities to see the board in different configurations.
# a and b see the board as it was rendered after the last iteration.
tt.pre_update(engine, 'a', self.expectBoard(art, err_msg='a @ 1'))
tt.pre_update(engine, 'b', self.expectBoard(art, err_msg='b @ 1'))
# c sees the board after a and b have moved right, but not d and e. Note
# the Z-ordering determining how c and d overlap.
tt.pre_update(engine, 'c', self.expectBoard(['..c.b',
'..c..',
'.dce.'], err_msg='c @ 1'))
## d and e see the board after c's update, but of course c didn't change...
tt.pre_update(engine, 'd', self.expectBoard(['..c.b',
'..c..',
'.dce.'], err_msg='d @ 1'))
tt.pre_update(engine, 'e', self.expectBoard(['..c.b',
'..c..',
'.dce.'], err_msg='e @ 1'))
# Z sees the board after everyone else has moved.
tt.pre_update(engine, 'Z', self.expectBoard(['..c.b',
'..c..',
'..d.e'], err_msg='Z @ 1'))
observation, unused_reward, unused_discount = engine.play('e')
# Check that the observation is right and that discount is 1.
self.assertBoard(observation.board, ['..c.b',
'..c..',
'..d.e'], err_msg='obs @ 1')
self.assertEqual(discount, 1.0)
### GAME ITERATION #2. All sprites take a step to the left. We'll trust
### that this took place in the expected order and just check that the
### observation is correct.
observation, unused_reward, unused_discount = engine.play('w')
self.assertBoard(observation.board, art, err_msg='obs @ 2')
self.assertEqual(discount, 1.0)
### GAME ITERATION #3. All sprites take another step to the left. We
### check everything again, this time.
# First update group.
tt.pre_update(engine, 'a', self.expectBoard(art, err_msg='a @ 3'))
tt.pre_update(engine, 'b', self.expectBoard(art, err_msg='b @ 3'))
# Second update group.
tt.pre_update(engine, 'c', self.expectBoard(['a.c..',
'..c..',
'.dce.'], err_msg='c @ 3'))
# Second update group.
tt.pre_update(engine, 'd', self.expectBoard(['a.c..',
'..c..',
'.dce.'], err_msg='d @ 3'))
tt.pre_update(engine, 'e', self.expectBoard(['a.c..',
'..c..',
'.dce.'], err_msg='e @ 3'))
observation, unused_reward, unused_discount = engine.play('w')
# Check that the observation is right and that discount is 1.
self.assertBoard(observation.board, ['a.c..',
'..c..',
'd.e..'], err_msg='obs @ 3')
self.assertEqual(discount, 1.0)
def testRewardAndEpisodeEndWithDefaultDiscount(self):
"""Game entities can assign reward, terminate game with default discount."""
# Not helpful in this test, since argument lists are long:
# pylint: disable=g-long-lambda
self._do_test_reward_and_episode_end(expected_discount=0.0, q_pre_update=(
lambda actions, board, layers, backdrop, things, the_plot: (
the_plot.terminate_episode())))
def testRewardAndEpisodeEndWithCustomDiscount(self):
"""Game entities can assign reward, terminate game with custom discount."""
# Not helpful in this test, since argument lists are long:
# pylint: disable=g-long-lambda
self._do_test_reward_and_episode_end(expected_discount=0.5, q_pre_update=(
lambda actions, board, layers, backdrop, things, the_plot: (
the_plot.terminate_episode(0.5))))
def _do_test_reward_and_episode_end(self, q_pre_update, expected_discount):
"""Core implementation of `testRewardAndEpisodeEndWith*Discount` tests.
Args:
q_pre_update: Pre-`update` code to inject for the Q sprite.
expected_discount: `discount` we expect to observe after the final
game step.
"""
# Not helpful in this test, since argument lists are long:
# pylint: disable=g-long-lambda
# Our test takes place in this tiny world:
art = ['.........',
'...Q.R...',
'.........']
# Here we make the game.
engine = ascii_art.ascii_art_to_game(
art=art, what_lies_beneath='.',
# Q and R are sprites.
sprites=dict(Q=tt.TestSprite, R=tt.TestSprite),
# We set a fixed update schedule for deterministic tests.
update_schedule='QR')
### GAME ITERATION #0. Nothing happens. No entity has issued a reward, so
### the reward is None.
unused_observation, reward, discount = engine.its_showtime()
self.assertIsNone(reward)
self.assertEqual(discount, 1.0)
self.assertFalse(engine.game_over)
### GAME ITERATION #1. Have the sprites credit us with some reward. Note
### how reward is accumulated across all entities.
tt.pre_update(engine, 'Q',
lambda actions, board, layers, backdrop, things, the_plot: (
the_plot.add_reward('pyco')))
tt.pre_update(engine, 'R',
lambda actions, board, layers, backdrop, things, the_plot: (
the_plot.add_reward('lab!')))
unused_observation, reward, discount = engine.play('mound of beans')
self.assertEqual(reward, 'pycolab!')
self.assertEqual(discount, 1.0)
self.assertFalse(engine.game_over)
### GAME ITERATION #2. Have Q call the whole thing off.
tt.pre_update(engine, 'Q', q_pre_update)
tt.pre_update(engine, 'R',
lambda actions, board, layers, backdrop, things, the_plot: (
the_plot.add_reward('trousers')))
unused_observation, reward, discount = engine.play('mound of beans')
self.assertEqual(reward, 'trousers')
self.assertEqual(discount, expected_discount)
self.assertTrue(engine.game_over)
def testChangingZOrdering(self):
"""Game entities can change the Z-ordering."""
# Not helpful in this test, since argument lists are long:
# pylint: disable=g-long-lambda
# Our test takes place in this very tiny world:
art = ['.abc.']
# Here we make the game.
engine = ascii_art.ascii_art_to_game(
art=art, what_lies_beneath='.',
# a, b, and c are sprites.
sprites=dict(a=ascii_art.Partial(tt.TestMazeWalker, impassable=''),
b=ascii_art.Partial(tt.TestMazeWalker, impassable=''),
c=ascii_art.Partial(tt.TestMazeWalker, impassable='')),
# Note this initial z-ordering.
z_order='abc')
### GAME ITERATION #0. Nothing happens; we just get the game started.
engine.its_showtime()
### GAME ITERATION #1. All of our sprites move to stand on top of one
### another. No Z-order change yet.
observation, unused_reward, unused_discount = engine.play(
{'a': 'e', 'c': 'w'})
self.assertBoard(observation.board, ['..c..'])
### GAME ITERATION #2. b moves in front of c. Z-ordering should be 'acb'.
tt.pre_update(engine, 'b',
lambda actions, board, layers, backdrop, things, the_plot: (
the_plot.change_z_order('b', 'c')))
observation, unused_reward, unused_discount = engine.play(None)
self.assertBoard(observation.board, ['..b..'])
### GAME ITERATION #2. c moves to the back. Z-ordering should be 'cab'.
tt.pre_update(engine, 'c',
lambda actions, board, layers, backdrop, things, the_plot: (
the_plot.change_z_order('c', None)))
observation, unused_reward, unused_discount = engine.play(None)
self.assertBoard(observation.board, ['..b..'])
### GAME ITERATION #3. b moves to the back. Z-ordering should be 'bca'.
tt.pre_update(engine, 'b',
lambda actions, board, layers, backdrop, things, the_plot: (
the_plot.change_z_order('b', None)))
observation, unused_reward, unused_discount = engine.play(None)
self.assertBoard(observation.board, ['..a..'])
def testPlotStateVariables(self):
"""State variables inside the Plot are updated correctly."""
# Our test takes place in this very tiny world:
art = ['.abc.']
# Here we make the game.
engine = ascii_art.ascii_art_to_game(
art=art, what_lies_beneath='.',
# a, b, and c are sprites.
sprites=dict(a=tt.TestSprite,
b=tt.TestSprite,
c=tt.TestSprite),
# We will test to see that these update groups are reflected in the
# update_group property of the Plot. The ascii_art_to_game function
# comes up with its own names for update groups, though, and those are
# off limits to us, so we can't just check values directly...
update_schedule=[['a', 'b'], ['c']])
# ...so, we will store game iterations and update group values in this
# dict, and check that all is as expected.
state_info = []
def add_state_info(actions, board, layers, backdrop, things, the_plot):
del actions, board, layers, backdrop, things # Unused.
state_info.append((the_plot.frame, the_plot.update_group))
### GAME ITERATION #0.
tt.pre_update(engine, 'a', add_state_info)
tt.pre_update(engine, 'b', add_state_info)
tt.pre_update(engine, 'c', add_state_info)
engine.its_showtime()
[(a_frame, a_update_group),
(b_frame, b_update_group),
(c_frame, c_update_group)] = state_info[:]
self.assertEqual([0, 0, 0], [a_frame, b_frame, c_frame])
self.assertEqual(a_update_group, b_update_group)
self.assertNotEqual(a_update_group, c_update_group)
### GAME ITERATION #1.
tt.pre_update(engine, 'a', add_state_info)
tt.pre_update(engine, 'b', add_state_info)
tt.pre_update(engine, 'c', add_state_info)
engine.play('↑↑↓↓←→←→BA★')
[(a_frame, a_new_update_group),
(b_frame, b_new_update_group),
(c_frame, c_new_update_group)] = state_info[3:] # note 3:
self.assertEqual([1, 1, 1], [a_frame, b_frame, c_frame])
self.assertEqual(a_update_group, a_new_update_group)
self.assertEqual(b_update_group, b_new_update_group)
self.assertEqual(c_update_group, c_new_update_group)
def testRenderingWithOcclusion(self):
"""Test rendering of non-overlapping game entities (occlusion enabled).
Note: although this test specifies that the engine should render overlapping
game entities in a particular way, it does not test this rendering
behaviour, focusing instead on non-overlapping game entities (which should
look identical in all renderings). Specific tests of occlusion behaviour
appear in `testOcclusionInLayers`.
"""
self._testRendering(occlusion_in_layers=True)
def testRenderingWithoutOcclusion(self):
"""Test rendering of non-overlapping game entities (occlusion disabled).
Note: although this test specifies that the engine should render overlapping
game entities in a particular way, it does not test this rendering
behaviour, focusing instead on non-overlapping game entities (which should
look identical in all renderings). Specific tests of occlusion behaviour
appear in `testOcclusionInLayers`.
"""
self._testRendering(occlusion_in_layers=False)
def _testRendering(self, occlusion_in_layers):
"""Test rendering of non-overlapping game entities."""
# Our test concerns renderings of this game world.
art = ['..H..H..o..',
'..HHHH..i..',
'..H..H..i..']
# Here we make the game. Note specification of Q, an empty Drape.
engine = ascii_art.ascii_art_to_game(
art=art, what_lies_beneath='.',
drapes=dict(
Q=tt.TestDrape),
occlusion_in_layers=occlusion_in_layers)
### GAME ITERATION 0. We just run it to get an observation.
observation, unused_reward, unused_discount = engine.its_showtime()
### Evaluate the observation's binary feature masks.
# The observation's layer member should have an entry for all characters
# that could be on the board, including ones for invisible Drapes.
self.assertEqual(sorted(observation.layers.keys()),
sorted(list('.HioQ')))
# Check that all the layer masks have the right contents.
self._assertMask(observation.layers['.'], ['11011011011',
'11000011011',
'11011011011'])
self._assertMask(observation.layers['H'], ['00100100000',
'00111100000',
'00100100000'])
self._assertMask(observation.layers['i'], ['00000000000',
'00000000100',
'00000000100'])
self._assertMask(observation.layers['o'], ['00000000100',
'00000000000',
'00000000000'])
self._assertMask(observation.layers['Q'], ['00000000000',
'00000000000',
'00000000000'])
### Test correct operation of ObservationCharacterRepainter.
repainter = rendering.ObservationCharacterRepainter(
dict(H='J', i='J', Q='M'))
repainted = repainter(observation)
# Check that the repainted board looks correct.
self.assertBoard(repainted.board, ['..J..J..o..',
'..JJJJ..J..',
'..J..J..J..'])
# The repainted board should have these binary feature masks:
self.assertEqual(sorted(repainted.layers.keys()),
sorted(list('.JoM')))
# The binary feature masks should have these contents:
self._assertMask(repainted.layers['.'], ['11011011011',
'11000011011',
'11011011011'])
self._assertMask(repainted.layers['J'], ['00100100000',
'00111100100',
'00100100100'])
self._assertMask(repainted.layers['o'], ['00000000100',
'00000000000',
'00000000000'])
self._assertMask(repainted.layers['M'], ['00000000000',
'00000000000',
'00000000000'])
### Test correct operation of ObservationToArray for 2-D and 3-D arrays.
# For the 2-D conversion, we'll do our own "homebrew" repainter, but just
# for the Observation.board representation. Recall that the board member of
# an Observation is a 2-D array of uint8s.
converter = rendering.ObservationToArray({'.': ord(' '),
'J': ord('#'),
'o': ord('*'),
'M': ord('?')}, dtype=np.uint8)
converted = converter(repainted)
self.assertBoard(converted, [' # # * ',
' #### # ',
' # # # '])
# Test that layer permutation happens correctly for the 2-D case.
converter = rendering.ObservationToArray({'.': ord(' '),
'J': ord('#'),
'o': ord('*'),
'M': ord('?')},
dtype=np.uint8, permute=(1, 0))
converted = converter(repainted)
self.assertBoard(converted, [' ',
' ',
'###',
' # ',
' # ',
'###',
' ',
' ',
'*##',
' ',
' '])
# For the 3-D conversion, we'll create a 3-D feature array that's a lot like
# our feature masks.
converter = rendering.ObservationToArray({'.': (1, 0, 0, 0),
'J': (0, 1, 0, 0),
'o': (0, 0, 1, 0),
'M': (0, 0, 0, 1)}, dtype=bool)
converted = converter(repainted)
self.assertEqual(converted.shape, (4, 3, 11))
self._assertMask(converted[0, :], ['11011011011',
'11000011011',
'11011011011'])
self._assertMask(converted[1, :], ['00100100000',
'00111100100',
'00100100100'])
self._assertMask(converted[2, :], ['00000000100',
'00000000000',
'00000000000'])
self._assertMask(converted[3, :], ['00000000000',
'00000000000',
'00000000000'])
# And another layer permutation test for the 3-D case.
converter = rendering.ObservationToArray({'.': (1, 0, 0, 0),
'J': (0, 1, 0, 0),
'o': (0, 0, 1, 0),
'M': (0, 0, 0, 1)},
dtype=bool, permute=(1, 2, 0))
converted = converter(repainted)
self.assertEqual(converted.shape, (3, 11, 4))
self._assertMask(converted[..., 0], ['11011011011',
'11000011011',
'11011011011'])
self._assertMask(converted[..., 1], ['00100100000',
'00111100100',
'00100100100'])
self._assertMask(converted[..., 2], ['00000000100',
'00000000000',
'00000000000'])
self._assertMask(converted[..., 3], ['00000000000',
'00000000000',
'00000000000'])
### Test ObservationToFeatureArray, which creates 3-D feature arrays faster.
converter = rendering.ObservationToFeatureArray('.JoM')
converted = converter(repainted)
self.assertEqual(converted.shape, (4, 3, 11))
self._assertMask(converted[0, :], ['11011011011',
'11000011011',
'11011011011'])
self._assertMask(converted[1, :], ['00100100000',
'00111100100',
'00100100100'])
self._assertMask(converted[2, :], ['00000000100',
'00000000000',
'00000000000'])
self._assertMask(converted[3, :], ['00000000000',
'00000000000',
'00000000000'])
### Test ObservationToFeatureArray's layer permutation capability.
converter = rendering.ObservationToFeatureArray('.J', permute=(1, 0, 2))
converted = converter(repainted)
self.assertEqual(converted.shape, (3, 2, 11))
self._assertMask(converted[0, :], ['11011011011',
'00100100000'])
self._assertMask(converted[1, :], ['11000011011',
'00111100100'])
self._assertMask(converted[2, :], ['11011011011',
'00100100100'])
def testOcclusionInLayers(self):
"""Test rendering of overlapping game entities."""
class FullOnDrape(plab_things.Drape):
"""A `Drape` class that fills its curtain immediately on construction."""
def __init__(self, curtain, character):
curtain.fill(True)
super(FullOnDrape, self).__init__(curtain, character)
def update(self, actions, board, layers, backdrop, things, the_plot):
"""Does nothing."""
pass
def build_engine(occlusion_in_layers):
# Our test concerns renderings of this game world.
art = ['..',
'..']
# Here we make the game. The sprite `a` will cover a Drape element `b` ,
# which covers another Sprite `c`. If `occlusion_in_layers` is False, we
# should still be able to see them in the layers, otherwise we should not.
# In the flat `board`, occlusion stil occurs regardless and we should only
# see those entities with higher z-order.
engine = ascii_art.ascii_art_to_game(
art=art, what_lies_beneath='.',
# Note: since a and c do not appear in the game art, these sprites
# are placed in the top-left corner (0, 0).
sprites=dict(a=ascii_art.Partial(tt.TestMazeWalker, impassable=''),
c=ascii_art.Partial(tt.TestMazeWalker, impassable='')),
drapes=dict(b=FullOnDrape),
occlusion_in_layers=occlusion_in_layers,
z_order='abc')
return engine
# Test occlusion disabled in layers
engine = build_engine(False)
observation, unused_reward, unused_discount = engine.its_showtime()
self._assertMask(observation.layers['.'], ['11',
'11'])
self._assertMask(observation.layers['a'], ['10',
'00'])
self._assertMask(observation.layers['b'], ['11',
'11'])
self._assertMask(observation.layers['c'], ['10',
'00'])
# Note that occlusion still occurs in the flat `board`.
self.assertBoard(observation.board, ['cb',
'bb'])
# Test occlusion enabled in layers
engine = build_engine(True)
observation, unused_reward, unused_discount = engine.its_showtime()
self._assertMask(observation.layers['.'], ['00',
'00'])
self._assertMask(observation.layers['a'], ['00',
'00'])
self._assertMask(observation.layers['b'], ['01',
'11'])
self._assertMask(observation.layers['c'], ['10',
'00'])
self.assertBoard(observation.board, ['cb',
'bb'])
def _assertMask(self, actual_mask, mask_art, err_msg=''): # pylint: disable=invalid-name
"""Compares numpy bool_ arrays with "art" drawn as lists of '0' and '1'."""
np.testing.assert_array_equal(
actual_mask,
np.array([list(row) for row in mask_art]).astype(bool),
err_msg)
def main(argv=()):
del argv # Unused.
unittest.main()
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/tests/engine_test.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
|
pycolab-master
|
pycolab/tests/__init__.py
|
# coding=utf8
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Basic tests of the `MazeWalker` `Sprite`, without scrolling."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import unittest
from pycolab import ascii_art
from pycolab.prefab_parts import sprites as prefab_sprites
from pycolab.tests import test_things as tt
class MazeWalkerTest(tt.PycolabTestCase):
def testBasicWalking(self):
"""A `MazeWalker` can walk, but not through walls."""
# Not helpful in this test, since argument lists are long:
# pylint: disable=g-long-lambda
# Our test takes place in this world...
art = ['.......',
'..abcd.',
'.n e.',
'.m P f.',
'.l g.',
'.kjih..',
'.......']
# Here we make the game.
engine = ascii_art.ascii_art_to_game(
art=art, what_lies_beneath=' ',
# Only P is a Sprite, and it can't walk through any of the walls.
sprites=dict(P=ascii_art.Partial(tt.TestMazeWalker,
impassable='abcdefghijklmn')))
# Go ahead and start the game. Nothing should change on the game board;
# P will stay put.
engine.its_showtime()
# Now we execute a sequence of motions, comparing the actual observations
# against ASCII-art depictions of our expected observations, and also making
# certain that the MazeWalker's motion action helper methods produce the
# expected return values (None when a motion succeeds; a description of the
# obstacle when a motion fails).
self.assertMachinima(
engine=engine,
post_updates=dict(
# This post-update callable for the Sprite is what checks the return
# value for correctness.
P=lambda actions, board, layers, backdrop, things, the_plot: (
self.assertEqual(the_plot['walk_result_P'],
the_plot['machinima_args'][0]))),
frames=[
# Head to the top of the room and try to walk through the wall.
('n', # After going in this direction...
['.......',
'..abcd.',
'.n P e.', # ...we expect to see this board...
'.m f.',
'.l g.',
'.kjih..', # ...and this return value from the motion
'.......'], None), # action helper methods.
('n',
['.......',
'..abcd.',
'.n P e.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], 'b'),
('nw',
['.......',
'..abcd.',
'.n P e.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], (' ', 'a', 'b')),
('ne',
['.......',
'..abcd.',
'.n P e.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], ('b', 'c', ' ')),
# Head to the top right corner of the room and try to escape.
('e',
['.......',
'..abcd.',
'.n Pe.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], None),
('e',
['.......',
'..abcd.',
'.n Pe.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], 'e'),
('nw',
['.......',
'..abcd.',
'.n Pe.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], (' ', 'b', 'c')),
('ne',
['.......',
'..abcd.',
'.n Pe.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], ('c', 'd', 'e')),
('se',
['.......',
'..abcd.',
'.n Pe.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], ('e', 'f', ' ')),
# Head to the bottom right corner of the room and try to escape.
('s',
['.......',
'..abcd.',
'.n e.',
'.m Pf.',
'.l g.',
'.kjih..',
'.......'], None),
('s',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.l Pg.',
'.kjih..',
'.......'], None),
('s',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.l Pg.',
'.kjih..',
'.......'], 'h'),
('ne',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.l Pg.',
'.kjih..',
'.......'], (' ', 'f', 'g')),
('se',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.l Pg.',
'.kjih..',
'.......'], ('g', '.', 'h')),
('sw',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.l Pg.',
'.kjih..',
'.......'], ('h', 'i', ' ')),
# Head to the bottom left corner of the room and try to escape.
('w',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.l P g.',
'.kjih..',
'.......'], None),
('w',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.lP g.',
'.kjih..',
'.......'], None),
('w',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.lP g.',
'.kjih..',
'.......'], 'l'),
('se',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.lP g.',
'.kjih..',
'.......'], (' ', 'i', 'j')),
('sw',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.lP g.',
'.kjih..',
'.......'], ('j', 'k', 'l')),
('nw',
['.......',
'..abcd.',
'.n e.',
'.m f.',
'.lP g.',
'.kjih..',
'.......'], ('l', 'm', ' ')),
# Head to the top left corner of the room and try to escape.
('n',
['.......',
'..abcd.',
'.n e.',
'.mP f.',
'.l g.',
'.kjih..',
'.......'], None),
('n',
['.......',
'..abcd.',
'.nP e.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], None),
('n',
['.......',
'..abcd.',
'.nP e.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], 'a'),
('sw',
['.......',
'..abcd.',
'.nP e.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], (' ', 'm', 'n')),
('nw',
['.......',
'..abcd.',
'.nP e.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], ('n', '.', 'a')),
('ne',
['.......',
'..abcd.',
'.nP e.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], ('a', 'b', ' ')),
# Make certain that diagonal moves work (so far, they've only been
# tried in situations where they fail).
('se',
['.......',
'..abcd.',
'.n e.',
'.m P f.',
'.l g.',
'.kjih..',
'.......'], None),
('ne',
['.......',
'..abcd.',
'.n Pe.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], None),
('sw',
['.......',
'..abcd.',
'.n e.',
'.m P f.',
'.l g.',
'.kjih..',
'.......'], None),
('nw',
['.......',
'..abcd.',
'.nP e.',
'.m f.',
'.l g.',
'.kjih..',
'.......'], None),
],
)
def testNotConfinedToBoard(self):
"""An ordinary MazeWalker disappears if it walks off the board."""
# Our test takes place in this world...
art = [' ',
' P ',
' ']
# Here we make the game.
engine = ascii_art.ascii_art_to_game(
art=art, what_lies_beneath=' ',
# P is a MazeWalker.
sprites=dict(P=ascii_art.Partial(tt.TestMazeWalker, impassable='')))
# Go ahead and start the game. Nothing should change on the game board;
# P will stay put.
engine.its_showtime()
# Now we execute a sequence of motions, comparing the actual observations
# against ASCII-art depictions of our expected observations, and also making
# sure that the MazeWalker's true position and virtual position change in
# the expected ways. First we define a post-update callable that the Sprite
# uses to check its true and virtual positions against expectations...
def check_positions(actions, board, layers, backdrop, things, the_plot):
del actions, board, layers, backdrop # Unused.
self.assertEqual(the_plot['machinima_args'][0],
things['P'].position)
self.assertEqual(the_plot['machinima_args'][1],
things['P'].virtual_position)
# ...and then we execute the sequence.
self.assertMachinima(
engine=engine,
post_updates=dict(P=check_positions),
frames=[
('n', # After going in this direction...
[' P ', # ...we expect to see this board,...
' ', # ... ↙ this true position, and...
' '], (0, 2), (0, 2)), # ... ← this virtual position.
# Exit the board to the north. True position becomes 0, 0 and the
# Sprite goes invisible there; virtual position carries on as if the
# board extended infinitely in all directions. So, we walk around
# outside of the board for a bit...
('n',
[' ',
' ',
' '], (0, 0), (-1, 2)),
('e',
[' ',
' ',
' '], (0, 0), (-1, 3)),
('e',
[' ',
' ',
' '], (0, 0), (-1, 4)),
# ...and then back onto the board...
('sw',
[' P ',
' ',
' '], (0, 3), (0, 3)),
('sw',
[' ',
' P ',
' '], (1, 2), (1, 2)),
('sw',
[' ',
' ',
' P '], (2, 1), (2, 1)),
# ...and off the board again...
('sw',
[' ',
' ',
' '], (0, 0), (3, 0)),
('nw',
[' ',
' ',
' '], (0, 0), (2, -1)),
# ...and we're back again!
('e',
[' ',
' ',
'P '], (2, 0), (2, 0)),
('e',
[' ',
' ',
' P '], (2, 1), (2, 1)),
('e',
[' ',
' ',
' P '], (2, 2), (2, 2)),
],
)
def testConfinedToBoard(self):
"""A confined-to-board MazeWalker can't walk off the board."""
# Not helpful in this test, since argument lists are long:
# pylint: disable=g-long-lambda
# Our test takes place in this world...
art = [' ',
' P ',
' ']
# Here we make the game.
engine = ascii_art.ascii_art_to_game(
art=art, what_lies_beneath=' ',
# P is a MazeWalker, but this time it's confined to the board.
sprites=dict(P=ascii_art.Partial(tt.TestMazeWalker, impassable='',
confined_to_board=True)))
# Go ahead and start the game. Nothing should change on the game board;
# P will stay put.
engine.its_showtime()
# We'll abbreviate the symbol that MazeWalkers use to describe the edge of
# the board in motion action helper method return values.
EDGE = prefab_sprites.MazeWalker.EDGE # pylint: disable=invalid-name
# Now we execute a sequence of motions, comparing the actual observations
# against ASCII-art depictions of our expected observations, and also making
# certain that the MazeWalker's motion action helper methods produce the
# expected return values (None when a motion succeeds; a description of the
# obstacle when a motion fails).
self.assertMachinima(
engine=engine,
post_updates=dict(
# This post-update callable for the Sprite is what checks the return
# value for correctness.
P=lambda actions, board, layers, backdrop, things, the_plot: (
self.assertEqual(the_plot['walk_result_P'],
the_plot['machinima_args'][0]))),
frames=[
('n', # After going in this direction...
[' P ', # ...we expect to see this board and this...
' ', # ... ↙ return value from motion action helper methods.
' '], None),
# Try to escape the board to the north, northwest, and northeast.
('n',
[' P ',
' ',
' '], EDGE),
('nw',
[' P ',
' ',
' '], (' ', EDGE, EDGE)),
('ne',
[' P ',
' ',
' '], (EDGE, EDGE, ' ')),
# Bolt for the southwest corner.
('sw',
[' ',
' P ',
' '], None),
('sw',
[' ',
' ',
'P '], None),
('sw',
[' ',
' ',
'P '], (EDGE, EDGE, EDGE)),
# Try the southeast corner.
('e',
[' ',
' ',
' P '], None),
('e',
[' ',
' ',
' P '], None),
('e',
[' ',
' ',
' P '], None),
('e',
[' ',
' ',
' P'], None),
('se',
[' ',
' ',
' P'], (EDGE, EDGE, EDGE)),
],
)
def main(argv=()):
del argv # Unused.
unittest.main()
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/tests/maze_walker_test.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""pycolab "things" for testing, and a protocol to talk to them.
This module contains several lightweight `Sprite`s and `Drape`s, and a protocol
that makes it easy to inject code into their `update` methods. The sites of
these injections are ideal for specifying tests, particularly if your test case
inherits from the `PycolabTestCase` class also defined in this module. A typical
pattern looks like this:
from pycolab.tests import test_things as tt
class MyTest(tt.PycolabTestCase):
def testSomething(self):
...
# set up the game
...
# Tell the Sprite or Drape (a class from this module) handling
# character 'p' to expect the game board to look a certain way.
tt.pre_update(engine, 'p', self.expectBoard(['...#########...',
'...# #...',
'...# p #...',
'...# X #...',
'...#########...']))
# Execute the next game iteration; the comparison we just expressed
# above will be evaluated here.
observation, reward, discount = engine.play('e')
Or use the versatile `assertMachinima` test function to test an entire sequence
of actions, expected observations, and more.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import unittest
import numpy as np
from pycolab import ascii_art
from pycolab import cropping
from pycolab import things as plab_things
from pycolab.prefab_parts import drapes
from pycolab.prefab_parts import sprites
import six
def pre_update(engine, character, thing_to_do):
"""Make the test entity for `character` do something before updating itself.
Assuming the pycolab game `engine` has the character `character` handled by
one of the `Sprite`s or `Drape`s handled in this module, then on the next game
iteration, that entity will execute `thing_to_do` before performing any of its
own update tasks.
This code injection works only for the next game iteration, after which it
is cleared.
Args:
engine: a pycolab game.
character: a character handled in the game by an instance of one of the
`Sprite`s or `Drape`s defined in this module.
thing_to_do: a callable that takes all of the arguments to the `Sprite`
or `Drape` `update` method.
"""
engine.the_plot.setdefault('test_pre_update', {})[character] = thing_to_do
def post_update(engine, character, thing_to_do):
"""Make the test entity for `character` do something after updating itself.
Assuming the pycolab game `engine` has the character `character` handled by
one of the `Sprite`s or `Drape`s handled in this module, then on the next game
iteration, that entity will execute `thing_to_do` after performing all of its
own update tasks.
This code injection works only for the next game iteration, after which it
is cleared.
Args:
engine: a pycolab game.
character: a character handled in the game by an instance of one of the
`Sprite`s or `Drape`s defined in this module.
thing_to_do: a callable that takes all of the arguments to the `Sprite`
or `Drape` `update` method.
"""
engine.the_plot.setdefault('test_post_update', {})[character] = thing_to_do
def get_pre_update(entity, the_plot):
"""Retrieve pre-update callable for `entity` for the next game iteration.
Once retrieved, the pre-update callable is cleared, so the callable will only
be called for the current game iteration.
This function is intended mainly as a helper for the `Sprite`s and `Drape`s
defined in this module. Most user code will not need to use it.
Args:
entity: the pycolab game entity for which we wish to retrieve any pre-update
callable.
the_plot: the `Plot` object for the pycolab game passed to `pre_update` when
registering a callable for `entity`.
Returns:
the callable registered for this entity via `pre_update`, or a null
callable if none was registered.
"""
return the_plot.setdefault('test_pre_update', {}).pop(
entity.character, lambda *args, **kwargs: None)
def get_post_update(entity, the_plot):
"""Retrieve post-update callable for `entity` for the next game iteration.
Once retrieved, the post-update callable is cleared, so the callable will only
be called for the current game iteration.
This function is intended mainly as a helper for the `Sprite`s and `Drape`s
defined in this module. Most user code will not need to use it.
Args:
entity: the pycolab game entity for which we wish to retrieve any
post-update callable.
the_plot: the `Plot` object for the pycolab game passed to `post_update`
when registering a callable for `entity`.
Returns:
the callable registered for this entity via `post_update`, or a null
callable if none was registered.
"""
return the_plot.setdefault('test_post_update', {}).pop(
entity.character, lambda *args, **kwargs: None)
class TestSprite(plab_things.Sprite):
"""A `Sprite` subclass that executes injected pre- and post-update callables.
This `Sprite` does nothing by default except execute the pre- and post-update
callables registered by `pre_update` and `post_update`. You may subclass this
`Sprite` and add your own behaviours by overriding the `real_update` method,
which this `Sprite`'s `update` method calls in between the two injected
callables.
"""
def update(self, actions, board, layers, backdrop, things, the_plot):
"""This `update` implementation is "final". Do not override."""
pre_update_callable = get_pre_update(self, the_plot)
pre_update_callable(actions, board, layers, backdrop, things, the_plot)
self.real_update(actions, board, layers, backdrop, things, the_plot)
post_update_callable = get_post_update(self, the_plot)
post_update_callable(actions, board, layers, backdrop, things, the_plot)
def real_update(self, actions, board, layers, backdrop, things, the_plot):
"""Override this method to add `update` code to `TestSprite` subclasses."""
pass
class TestDrape(plab_things.Drape):
"""A `Drape` subclass that executes injected pre- and post-update callables.
This `Drape` does nothing by default except execute the pre- and post-update
callables registered by `pre_update` and `post_update`. You may subclass this
`Drape` and add your own behaviours by overriding the `real_update` method,
which this `Drape`'s `update` method calls in between the two injected
callables.
"""
def update(self, actions, board, layers, backdrop, things, the_plot):
"""This `update` implementation is "final". Do not override."""
pre_update_callable = get_pre_update(self, the_plot)
pre_update_callable(actions, board, layers, backdrop, things, the_plot)
self.real_update(actions, board, layers, backdrop, things, the_plot)
post_update_callable = get_post_update(self, the_plot)
post_update_callable(actions, board, layers, backdrop, things, the_plot)
def real_update(self, actions, board, layers, backdrop, things, the_plot):
"""Override this method to add `update` code to `TestDrape` subclasses."""
pass
class TestMazeWalker(sprites.MazeWalker, TestSprite):
"""A `MazeWalker` that supports the injected callables of `TestSprite`.
Overrides `TestSprite`s `real_update` method to implement basic maze-walking
behaviour; you may override `real_update` if you'd prefer your own mapping
from actions to invocations of `MazeWalker` motion action helper methods.
By default, actions may either be strings denoting compass-directions of
single-cell motion ('n', 'ne', 'e', 'se', 's', 'sw', 'w', and 'nw') or
dicts mapping characters to such strings, in which case this `Sprite` will
obey the string stored under `self.character`.
If no valid action can be identified for this `Sprite` by either means, the
`Sprite` will invoke the `_stay` motion action helper method.
The result of any motion action helper method invoked by a `TestMazeWalker`
is stored in the `Plot` object under the key 'walk_result_X', where X is the
sprite character controlled by this `TestMazeWalker`.
"""
def real_update(self, actions, board, layers, backdrop, things, the_plot):
if isinstance(actions, str):
direction = actions
elif isinstance(actions, dict):
direction = actions.get(self.character, None)
else:
direction = None
if direction == 'nw':
result = self._northwest(board, the_plot)
elif direction == 'n':
result = self._north(board, the_plot)
elif direction == 'ne':
result = self._northeast(board, the_plot)
elif direction == 'e':
result = self._east(board, the_plot)
elif direction == 'se':
result = self._southeast(board, the_plot)
elif direction == 's':
result = self._south(board, the_plot)
elif direction == 'sw':
result = self._southwest(board, the_plot)
elif direction == 'w':
result = self._west(board, the_plot)
else:
result = self._stay(board, the_plot)
the_plot['walk_result_{}'.format(self.character)] = result
class TestScrolly(drapes.Scrolly, TestDrape):
"""A `Scrolly` that supports the injected callables of `TestSprite`.
Overrides `TestDrape`s `real_update` method to implement basic maze-walking
behaviour; you may override `real_update` if you'd prefer your own mapping
from actions to invocations of `Scrolly` motion action helper methods.
By default, actions may either be strings denoting compass-directions of
single-cell motion ('n', 'ne', 'e', 'se', 's', 'sw', 'w', and 'nw') or
dicts mapping characters to such strings, in which case this `Sprite` will
obey the string stored under `self.character` (or do nothing if there is no
such entry).
If no valid action can be identified for this `Drape` by either means, the
`Drape` will invoke the `_stay` motion action helper method.
"""
def real_update(self, actions, board, layers, backdrop, things, the_plot):
if isinstance(actions, str):
direction = actions
elif isinstance(actions, dict):
direction = actions.get(self.character, None)
else:
direction = None
if direction == 'nw':
self._northwest(the_plot)
elif direction == 'n':
self._north(the_plot)
elif direction == 'ne':
self._northeast(the_plot)
elif direction == 'e':
self._east(the_plot)
elif direction == 'se':
self._southeast(the_plot)
elif direction == 's':
self._south(the_plot)
elif direction == 'sw':
self._southwest(the_plot)
elif direction == 'w':
self._west(the_plot)
else:
self._stay(the_plot)
class PycolabTestCase(unittest.TestCase):
"""`TestCase` subclass with convenience methods for pycolab testing."""
def assertBoard(self, actual_board, art, err_msg=''):
"""Assert that a pycolab game board matches expected ASCII art.
Args:
actual_board: a pycolab game board, in its 2-D `uint8` nparray
manifestation. This is the `board` member of a `rendering.Observation`
namedtuple.
art: an ASCII-art diagram, as a list of same-length ASCII strings,
portraying the expected game board.
err_msg: optional error message to include in `AssertionError`s raised
by this method.
Raises:
AssertionError: `art` does not match `actual_board`.
"""
np.testing.assert_array_equal(actual_board,
ascii_art.ascii_art_to_uint8_nparray(art),
err_msg)
def expectBoard(self, art, err_msg=''): # pylint: disable=invalid-name
"""Produce a callable that invokes `assertBoard`.
This method is a convenient means of injecting a call to `assertBoard`
via the `pre_update` and `post_update` methods defined above. The second
argument to the callable returned by this method will be used as the
`actual_board` argument to `assertBoard`, with the remaining arguments
supplied by this function's parameters.
Args:
art: see `assertBoard`.
err_msg: see `assertBoard`.
Returns:
a callable suitable for use as the `thing_to_do` argument to `pre_update`
and `post_update`.
"""
def expecter(actions, board, layers, backdrop, things, the_plot):
del actions, layers, backdrop, things, the_plot # Unused.
self.assertBoard(board, art, err_msg)
return expecter
def assertMachinima(self, engine, frames,
pre_updates=None, post_updates=None, result_checker=None,
croppers=None):
"""Assert that gameplay produces a "movie" of expected observations.
[Machinima](https://en.wikipedia.org/wiki/Machinima) is the creation of
movies with game engines. This test method allows you to demonstrate that
a sequence of canned actions would produce a sequence of observations. Other
tests and behaviours may be imposed on the `Sprite`s and `Drape`s in the
sequence as well.
Args:
engine: a pycolab game engine whose `its_showtime` method has already been
called. Note: if you are using croppers, you may want to supply the
observation result from `its_showtime` to the croppers so that they
will have a chance to see the first observation in the same way they
do in the `CursesUi`.
frames: a sequence of n-tuples, where `n >= 2`. The first element in each
tuple is the action that should be submitted to `engine` via the
`play` method; the second is an ASCII-art diagram (see `assertBoard`)
portraying the observation we expect the `play` method to return, or a
list of such diagrams if the `croppers` argument is not None (see
below). Any further elements of the tuple are stored in the engine's
`Plot` object under the key `'machinima_args'`. These are commonly
used to pass expected values to `assertEqual` tests to callables
provided via `pre_updates` and `post_updates`.
pre_updates: optional dict mapping single-character strings (which should
correspond to `Sprite`s and `Drape`s that inherit from test classes in
this module) to a callable that is injected into the entity via
`pre_update` at each game iteration. These callables are usually used
to specify additional testing asserts.
post_updates: optional dict mapping single-character strings (which should
correspond to `Sprite`s and `Drape`s that inherit from test classes in
this module) to a callable that is injected into the entity via
`post_update` at each game iteration. These callables are usually used
to specify additional testing asserts.
result_checker: optional callable that, at every game iteration, receives
arguments `observation`, `reward`, `discount`, and `args`. The first
three are the return values of the engine's `play` method; `args` is
the `machinima_args` elements for that game iteration (see `frames`).
The `observation` is the original game engine observation;
`result_checker` does not receive the output of any of the `croppers`.
(If you need to check cropped observations, consider passing your
croppers to `result_checker` via `machinima_args` and cropping the
observation yourself.)
croppers: None, or a list of `cropping.ObservationCropper` instances
and/or None values. If None, then `frames[i][1]` should be an
ASCII-art diagram to compare against frames as emitted by the engine;
if a list, then `frames[i][1]` should be a list of diagrams to compare
against the outputs of each of the croppers. A None value in
`croppers` is a "null" or "pass-through" cropper: the corresponding
entry in `frames[i][1]` should expect the original game engine
observation. NB: See important usage note in the documentation for
the `engine` arg.
Raises:
AssertionError: an observation produced by the game engine does not match
one of the observation art diagrams in `frames`.
ValueError: if croppers is non-None and the number of
`ObservationCropper`s it contains differs from the number of ASCII-art
diagrams in one of the elements of `frames`.
"""
if pre_updates is None: pre_updates = {}
if post_updates is None: post_updates = {}
# If we have croppers, replace None values with pass-through croppers, then
# tell all croppers which game we're playing.
if croppers is not None:
try:
croppers = tuple(
cropping.ObservationCropper() if c is None else c for c in croppers)
except TypeError:
raise TypeError('The croppers argument to assertMachinima must be a '
'sequence or None, not a "bare" object.')
for cropper in croppers:
cropper.set_engine(engine)
# Step through the game and verify expected results at each frame.
for i, frame in enumerate(frames):
action = frame[0]
art = frame[1]
args = frame[2:]
engine.the_plot['machinima_args'] = args
for character, thing_to_do in six.iteritems(pre_updates):
pre_update(engine, character, thing_to_do)
for character, thing_to_do in six.iteritems(post_updates):
post_update(engine, character, thing_to_do)
observation, reward, discount = engine.play(action)
if croppers is None:
self.assertBoard(observation.board, art,
err_msg='Frame {} observation mismatch'.format(i))
else:
# It will be popular to construct iterables of ASCII art using zip (as
# shown in cropping_test.py); we graciously convert art to a tuple,
# since the result of Python 3's zip does not support len().
art = tuple(art)
if len(art) != len(croppers): raise ValueError(
'Frame {} in the call to assertMachinima has {} ASCII-art diagrams '
'for {} croppers. These counts should be the same.'.format(
i, len(art), len(croppers)))
for j, (cropped_art, cropper) in enumerate(zip(art, croppers)):
self.assertBoard(
cropper.crop(observation).board, cropped_art,
err_msg='Frame {}, crop {} observation mismatch'.format(i, j))
if result_checker is not None:
result_checker(observation, reward, discount, args)
|
pycolab-master
|
pycolab/tests/test_things.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for the scrolling protocol, Scrolly, and MazeWalker."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import sys
import unittest
from pycolab import ascii_art
from pycolab import plot
from pycolab import things
from pycolab.prefab_parts import drapes as prefab_drapes
from pycolab.protocols import scrolling
from pycolab.tests import test_things as tt
import six
class ScrollingTest(tt.PycolabTestCase):
def testProtocol(self):
"""Verify correct behaviour of the scrolling protocol helpers."""
# In this test, we pretend to be an Engine. Here are components we need:
the_plot = plot.Plot()
sprite = tt.TestSprite(corner=things.Sprite.Position(11, 10),
position=things.Sprite.Position(5, 5),
character='P')
drape = tt.TestDrape(curtain=np.zeros((10, 10), dtype=np.bool),
character='X')
# Registration of scrolling participants, in the default scrolling group.
scrolling.participate_as_egocentric(sprite, the_plot)
scrolling.participate_as_egocentric(drape, the_plot)
self.assertEqual({sprite, drape},
set(scrolling.egocentric_participants(sprite, the_plot)))
# Registration of scrolling participants, in a custom scrolling group.
the_plot = plot.Plot() # Use a fresh Plot object.
scrolling.participate_as_egocentric(sprite, the_plot, scrolling_group='!')
scrolling.participate_as_egocentric(drape, the_plot, scrolling_group='!')
self.assertEqual({sprite, drape}, set(scrolling.egocentric_participants(
sprite, the_plot, scrolling_group='!')))
# Verify that no scrolling order exists for this scrolling group yet.
self.assertIsNone(
scrolling.get_order(sprite, the_plot, scrolling_group='!'))
# Confirm an exception if an entity requests scrolling information for a
# scrolling group it doesn't belong to.
with six.assertRaisesRegex(self, scrolling.Error, 'known to belong'):
scrolling.get_order(sprite, the_plot, scrolling_group='cantaloupe')
# Start over with a fresh Plot, and go back to the default scrolling group.
the_plot = plot.Plot()
scrolling.participate_as_egocentric(sprite, the_plot)
scrolling.participate_as_egocentric(drape, the_plot)
for i in range(101): # Now let's advance the game a few steps.
the_plot.frame = i # There will be an error unless we go one at a time.
# The Sprite and Drape advertise that they will be able to execute certain
# sets of motions at the next game iteration.
scrolling.permit(sprite, the_plot, motions=[(0, 0), (0, 1), (1, 0)])
scrolling.permit(drape, the_plot, motions=[(0, 0), (1, 1)])
# But that permission is for the next game iteration. In the current
# iteration, no scrolling is permitted.
self.assertFalse(scrolling.is_possible(drape, the_plot, motion=(0, 0)))
self.assertFalse(scrolling.is_possible(drape, the_plot, motion=(0, 1)))
self.assertFalse(scrolling.is_possible(drape, the_plot, motion=(1, 0)))
self.assertFalse(scrolling.is_possible(drape, the_plot, motion=(1, 1)))
# Now let's pretend it's the next game iteration and query again. Only the
# one scrolling direction that's compatible with everyone is permissible.
the_plot.frame = 101
self.assertTrue(scrolling.is_possible(drape, the_plot, motion=(0, 0)))
self.assertFalse(scrolling.is_possible(drape, the_plot, motion=(0, 1)))
self.assertFalse(scrolling.is_possible(drape, the_plot, motion=(1, 0)))
self.assertFalse(scrolling.is_possible(drape, the_plot, motion=(1, 1)))
# The Sprite and Drape now advertise where they can scroll at iter. 102.
scrolling.permit(sprite, the_plot, motions=[(0, 1), (1, 1)])
scrolling.permit(drape, the_plot, motions=[(0, 0), (1, 0), (1, 1)])
# We advance to frame 102 and try to have the drape order some scrolling.
the_plot.frame = 102
with six.assertRaisesRegex(self, scrolling.Error, 'impossible'):
scrolling.order(drape, the_plot, motion=(1, 0)) # Illegal for 'P'.
scrolling.order(drape, the_plot, motion=(1, 1))
# We confirm that the sprite can receive the order.
self.assertEqual((1, 1), scrolling.get_order(sprite, the_plot))
def testScrolly(self):
"""Verify correct interoperation of `Scrolly` and `MazeWalker`."""
# Not helpful in this test, since argument lists are long:
# pylint: disable=g-long-lambda
# The test takes place in this scrolling world.
maze_art = ['########################',
'# # # #',
'# # ###### # ### # # #',
'# # # # # # # #',
'######## +#### ### # # #', # Note top-left corner.
'# # # # #N # #', # A non-player character.
'# # ###### # # #########',
'# #P #', # The player.
'# #################### #',
'# #',
'########################']
board_art = ['~~~~~', # The maze art will drape across this board art.
'~~~~~',
'~~~~~',
'~~~~~',
'~~~~~']
# Build and test the helper object that helps us construct a Scrolly object.
scrolly_info = prefab_drapes.Scrolly.PatternInfo(
maze_art, board_art,
board_northwest_corner_mark='+', what_lies_beneath='#')
self.assertEqual((5, 5), scrolly_info.kwargs('#')['board_shape'])
self.assertEqual((4, 9), scrolly_info.kwargs('#')['board_northwest_corner'])
np.testing.assert_array_equal(
scrolly_info.kwargs('#')['whole_pattern'], np.array(
[list(row) for row in ['111111111111111111111111',
'100000000001000000010001',
'101011111101000111010101',
'101000000100010001010101',
'111111110111110111010101',
'101000000100010100000101',
'101011111101010111111111',
'100000000001000000000001',
'101111111111111111111101',
'100000000000000000000001',
'111111111111111111111111']]).astype(bool))
# Here we make the game. In this game, scrolling will only occur if it looks
# like we are getting to within one pixel of the edge of the game board.
engine = ascii_art.ascii_art_to_game(
art=board_art, what_lies_beneath='~',
# N and P are MazeWalkers, and P is an egocentric scroller.
sprites=dict(N=ascii_art.Partial(tt.TestMazeWalker, impassable=''),
P=ascii_art.Partial(tt.TestMazeWalker, impassable='#N',
egocentric_scroller=True)),
# The world itself is a Scrolly drape with narrow margins.
drapes={'#': ascii_art.Partial(
tt.TestScrolly, scroll_margins=(1, 1), **scrolly_info.kwargs('#'))},
# The update schedule is in a separate and later update group from the
# group containing the pycolab entities that control non-traversable
# characters (i.e. the wall, '#').
update_schedule=[['#'], ['N', 'P']])
# Go ahead and start the game. We will take this opportunity to teleport the
# two sprites into their proper locations in the scrolling world. This is
# often something you take care of in your Sprite's constructor, and doing
# it this way is not encouraged at all.
tt.pre_update(engine, 'N', thing_to_do=(
lambda actions, board, layers, backdrop, things, the_plot: (
things['N']._teleport(scrolly_info.virtual_position('N')))))
tt.pre_update(engine, 'P', thing_to_do=(
lambda actions, board, layers, backdrop, things, the_plot: (
things['P']._teleport(scrolly_info.virtual_position('P')))))
engine.its_showtime()
# We will soon want to execute a sequence of motions that the player Sprite
# P and the moving Scrolly drape # should pay attention to, but the
# non-player Sprite N should ignore. We can send motion commands just to P
# and # by using "dict format" actions for TestMazeWalker and TestScrolly.
go = lambda direction: {'P': direction, '#': direction}
# Now we execute a sequence of motions, comparing the actual observations
# against ASCII-art depictions of our expected observations.
self.assertMachinima(
engine=engine,
frames=[
# Let's start by doing nothing and seeing that the world looks as
# we expect.
(None,
['#####',
'#~~~#',
'#~#~#',
'~~#P~',
'#####']),
# Let's try to go in directions that are blocked off and verify that
# we stay put.
(go('w'),
['#####',
'#~~~#',
'#~#~#',
'~~#P~',
'#####']),
(go('sw'),
['#####',
'#~~~#',
'#~#~#',
'~~#P~',
'#####']),
(go('s'),
['#####',
'#~~~#',
'#~#~#',
'~~#P~',
'#####']),
# Now let's try to go drive by our friend N.
(go('e'),
['####~',
'~~~#~',
'~#~#~',
'~#~P~',
'#####']),
(go('e'),
['###~#',
'~~#~#',
'#~#~#',
'#~~P~',
'#####']),
(go('e'),
['##~##',
'~#~#N',
'~#~##',
'~~~P~',
'#####']),
(go('nw'),
['##~##',
'~#~#N',
'~#P##',
'~~~~~',
'#####']),
(go('n'),
['##~##',
'~#P#N',
'~#~##',
'~~~~~',
'#####']),
(go('n'),
['~#~~~',
'##P##',
'~#~#N',
'~#~##',
'~~~~~']),
# And back to our starting place. The 'sw' move in particular is
# tricky, since it only requires a scroll in one dimension, even
# though the Sprite is moving in two dimensions at once.
(go('s'),
['~#~~~',
'##~##',
'~#P#N',
'~#~##',
'~~~~~']),
(go('s'),
['~#~~~',
'##~##',
'~#~#N',
'~#P##',
'~~~~~']),
(go('sw'),
['##~##',
'~#~#N',
'~#~##',
'~P~~~',
'#####']),
(go('w'),
['###~#',
'~~#~#',
'#~#~#',
'#P~~~',
'#####']),
# Now exercise that same logic again along the horizontal axis (at
# the "se" move in particular).
(go('e'),
['###~#',
'~~#~#',
'#~#~#',
'#~P~~',
'#####']),
(go('ne'),
['###~#',
'~~#~#',
'#~#P#',
'#~~~~',
'#####']),
(go('se'),
['##~##',
'~#~#N',
'~#~##',
'~~~P~',
'#####']),
],
)
# Now let's start over with a new game. In this next game, we set no margins
# at all, so scrolling the world is mandatory at each game iteration.
engine = ascii_art.ascii_art_to_game(
art=board_art, what_lies_beneath='~',
# N and P are MazeWalkers, and P is an egocentric scroller.
sprites=dict(N=ascii_art.Partial(tt.TestMazeWalker, impassable=''),
P=ascii_art.Partial(tt.TestMazeWalker, impassable='#N',
egocentric_scroller=True)),
# The world itself is a Scrolly drape with narrow margins.
drapes={'#': ascii_art.Partial(
tt.TestScrolly, scroll_margins=None, **scrolly_info.kwargs('#'))},
# The update schedule is in a separate and later update group from the
# group containing the pycolab entities that control non-traversable
# characters (i.e. the wall, '#').
update_schedule=[['#'], ['N', 'P']])
# Again we use our start-of-game "teleportation trick", which is not really
# appropriate for anything but tests, and even then it's pushing it...
tt.pre_update(engine, 'N', thing_to_do=(
lambda actions, board, layers, backdrop, things, the_plot: (
things['N']._teleport(scrolly_info.virtual_position('N')))))
tt.pre_update(engine, 'P', thing_to_do=(
lambda actions, board, layers, backdrop, things, the_plot: (
things['P']._teleport(scrolly_info.virtual_position('P')))))
engine.its_showtime()
# Here is a sequence of motions and the observations we expect to see.
self.assertMachinima(
engine=engine,
frames=[
# Let's start by doing nothing and seeing that the world looks as
# we expect.
(None,
['#####',
'#~~~#',
'#~#~#',
'~~#P~',
'#####']),
# As before, let's try to go in directions that are blocked off and
# verify that we stay put.
(go('w'),
['#####',
'#~~~#',
'#~#~#',
'~~#P~',
'#####']),
(go('sw'),
['#####',
'#~~~#',
'#~#~#',
'~~#P~',
'#####']),
(go('s'),
['#####',
'#~~~#',
'#~#~#',
'~~#P~',
'#####']),
# We're going to head for the western edge of the map. First we need
# to head over this short vertically-oriented wall...
(go('n'),
['#~~~#',
'#####',
'#~~~#',
'#~#P#',
'~~#~~']),
(go('nw'),
['##~#~',
'~#~~~',
'~####',
'~#~P~',
'##~#~']),
(go('sw'),
['~~#~~',
'#~###',
'~~#~~',
'###P#',
'~~~~#']),
(go('sw'),
['##~##',
'~~~#~',
'####~',
'~~~P~',
'#####']),
# Now, westward ho! An interesting thing will happen when the
# scrolling world runs out of scenery---the sprite will actually
# have to change its location on the game board.
(go('w'),
['###~#',
'~~~~#',
'#####',
'~~~P~',
'#####']),
(go('w'),
['####~',
'~~~~~',
'#####',
'~~~P~',
'#####']),
(go('w'),
['#####',
'~~~~~',
'~####',
'~~~P~',
'#####']),
(go('w'),
['#####',
'#~~~~',
'#~###',
'~~~P~',
'#####']),
(go('w'),
['#####',
'~#~~~',
'~#~##',
'~~~P~',
'~####']),
(go('w'),
['#####',
'#~#~~',
'#~#~#',
'#~~P~',
'#~###']),
(go('w'), # Behold: eppur non si muove. The world is stuck, and
['#####', # the Sprite is forced to move around inside if it.
'#~#~~',
'#~#~#',
'#~P~~',
'#~###']),
# Now, what happens if we try to go southwest? The board can (and
# should) scroll vertically to keep the Sprite on the same row, but
# it still can't scroll horizontally.
(go('sw'),
['#~#~~',
'#~#~#',
'#~~~~',
'#P###',
'#~~~~']),
# Now we head up and back east, and then that's about enough. In
# both of these motions, the world can scroll around the Sprite, so
# it's back to business as usual.
(go('ne'),
['#####',
'~#~~~',
'~#~##',
'~P~~~',
'~####']),
(go('e'),
['#####',
'#~~~~',
'#~###',
'~P~~~',
'#####']),
],
)
def main(argv=()):
del argv # Unused.
unittest.main()
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/tests/scrolling_test.py
|
# coding=utf8
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Basic tests for the ascii_art module.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import unittest
from pycolab import ascii_art
import six
class AsciiArtTest(unittest.TestCase):
def testRaiseErrors(self):
"""Checks how `ascii_art_to_uint8_nparray` handles incorrect input."""
# Correct input.
art = ['ab', 'ba']
_ = ascii_art.ascii_art_to_uint8_nparray(art)
# Incorrect input: not all the same length.
art = ['ab', 'bab']
with six.assertRaisesRegex(
self,
ValueError, 'except for the concatenation axis must match exactly'):
_ = ascii_art.ascii_art_to_uint8_nparray(art)
# Incorrect input: not all strings.
art = ['a', 2]
with six.assertRaisesRegex(
self,
TypeError, 'the argument to ascii_art_to_uint8_nparray must be a list'):
_ = ascii_art.ascii_art_to_uint8_nparray(art)
# Incorrect input: list of list (special case of the above).
art = [['a', 'b'], ['b', 'a']]
with six.assertRaisesRegex(
self,
TypeError, 'Did you pass a list of list of single characters?'):
_ = ascii_art.ascii_art_to_uint8_nparray(art)
def main(argv=()):
del argv # Unused.
unittest.main()
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/tests/ascii_art_test.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for pycolab croppers."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import unittest
from pycolab import ascii_art
from pycolab import cropping
from pycolab import things as plab_things
from pycolab.tests import test_things as tt
class CroppingTest(tt.PycolabTestCase):
def make_engine(self, art, croppers):
"""Every test in this class will use game engines made by this helper.
Characteristics of the returned engine: there is a single MazeWalker called
'P' which can't pass through walls marked with '#'. There is also a drape
called '%' which doesn't do anything at all.
The `its_showtime` method will be called on the new engine.
Args:
art: ASCII-art diagram (a list of strings) of the game.
croppers: List of croppers that will be applied to the obserations created
by the engine. This function will "reset" these croppers by calling
their `set_engine` methods with the new engine and by presenting the
observation returned by the `its_showtime` call to their `crop`
methods, emulating the behaviour of the `CursesUi`. The outputs of
the `crop` calls will not be checked.
Returns:
a pycolab game engine, as described.
"""
class DoNothingDrape(plab_things.Drape):
"""Our Drape that does nothing."""
def update(self, *args, **kwargs):
pass
# Create and start the game engine.
engine = ascii_art.ascii_art_to_game(
art=art, what_lies_beneath=' ',
sprites={'P': ascii_art.Partial(tt.TestMazeWalker, impassable='#')},
drapes={'%': DoNothingDrape})
observation, reward, pcontinue = engine.its_showtime()
del reward, pcontinue # unused
# "Reset" the croppers.
for cropper in croppers:
cropper.set_engine(engine)
cropper.crop(observation)
return engine
def testDefaultCropper(self):
"""The default cropper passes observations through unchanged."""
# This test also helps check basic cropper functionality in assertMachinima.
# Our test takes place in this world.
art = ['.......',
'.#####.',
'.# #.',
'.# P #.',
'.# #.',
'.#####.',
'.......']
# In a fresh engine, execute a (short!) sequence of motions with two None
# croppers specified. For these, assertMachinima should use the default
# cropper, cropping.ObservationCropper, which passes observations through.
# (We cheat a bit on the croppers arg to MakeEngine in this case: there's
# no need to "reset" the default cropper.)
self.assertMachinima(
engine=self.make_engine(art, []),
croppers=[None, None],
frames=[
('stay', # After executing this action...
[['.......',
'.#####.', # ...we expect this from the first cropper...
'.# #.',
'.# P #.',
'.# #.',
'.#####.',
'.......'],
['.......',
'.#####.', # ...and this from the second cropper.
'.# #.',
'.# P #.',
'.# #.',
'.#####.',
'.......']]),
],
)
def testFixedCropper(self):
"""Fixed croppers crop the designated part of the observation."""
# All cropping in cropping.py uses the same cropping helper method, so
# with this text and the next one we try to cover a diverse range of
# cropping situations.
# Our test takes place in this world.
art = ['.......',
'.#####.',
'.# #.',
'.# P #.',
'.# #.',
'.#####.',
'.......']
# Build several fixed croppers focusing on different parts of the board. All
# have the same size, which lets us use zip to make our art easier to read.
croppers = [
# These croppers extend beyond all four corners of the game board,
# allowing us to test the padding functionality.
cropping.FixedCropper((-1, -1), rows=4, cols=4, pad_char=' '),
cropping.FixedCropper((-1, 4), rows=4, cols=4, pad_char=' '),
cropping.FixedCropper((4, -1), rows=4, cols=4, pad_char=' '),
cropping.FixedCropper((4, 4), rows=4, cols=4, pad_char=' '),
# This cropper sits right in the middle and requires no padding.
cropping.FixedCropper((1, 1), rows=4, cols=4),
]
# In a fresh engine, execute some actions and check for expected crops.
# pylint: disable=bad-whitespace
self.assertMachinima(
engine=self.make_engine(art, croppers),
croppers=croppers,
frames=[
('stay', # The action, and cropped observations below.
zip([' ', ' ', ' .# ', ' #. ', '####'],
[' ...', '... ', ' .##', '##. ', '# '],
[' .##', '##. ', ' ...', '... ', '# P '],
[' .# ', ' #. ', ' ', ' ', '# '])),
('nw',
zip([' ', ' ', ' .# ', ' #. ', '####'],
[' ...', '... ', ' .##', '##. ', '#P '],
[' .##', '##. ', ' ...', '... ', '# '],
[' .#P', ' #. ', ' ', ' ', '# '])),
('e',
zip([' ', ' ', ' .# ', ' #. ', '####'],
[' ...', '... ', ' .##', '##. ', '# P '],
[' .##', '##. ', ' ...', '... ', '# '],
[' .# ', ' #. ', ' ', ' ', '# '])),
('e',
zip([' ', ' ', ' .# ', ' #. ', '####'],
[' ...', '... ', ' .##', '##. ', '# P'],
[' .##', '##. ', ' ...', '... ', '# '],
[' .# ', 'P#. ', ' ', ' ', '# '])),
('s',
zip([' ', ' ', ' .# ', ' #. ', '####'],
[' ...', '... ', ' .##', '##. ', '# '],
[' .##', '##. ', ' ...', '... ', '# P'],
[' .# ', ' #. ', ' ', ' ', '# '])),
('s',
zip([' ', ' ', ' .# ', 'P#. ', '####'],
[' ...', '... ', ' .##', '##. ', '# '],
[' .##', '##. ', ' ...', '... ', '# '],
[' .# ', ' #. ', ' ', ' ', '# P'])),
('w',
zip([' ', ' ', ' .# ', ' #. ', '####'],
[' ...', '... ', ' .##', '##. ', '# '],
[' .##', '##. ', ' ...', '... ', '# '],
[' .# ', ' #. ', ' ', ' ', '# P '])),
('w',
zip([' ', ' ', ' .#P', ' #. ', '####'],
[' ...', '... ', ' .##', '##. ', '# '],
[' .##', '##. ', ' ...', '... ', '# '],
[' .# ', ' #. ', ' ', ' ', '#P '])),
],
)
# pylint: enable=bad-whitespace
def testWeirdFixedCrops(self):
"""Cropping works even for strange cropping sizes and locations."""
# All cropping in cropping.py uses the same cropping helper method, so
# with this text and the prior one we try to cover a diverse range of
# cropping situations.
# Our test takes place in this world.
art = ['.......',
'.#####.',
'.#P #.',
'.# #.',
'.# #.',
'.#####.',
'.......']
# Build several fixed croppers that crop in assorted odd ways.
croppers = [
# Extends beyond the original observation on all sides.
cropping.FixedCropper((-1, -2), rows=9, cols=11, pad_char=' '),
# A 1x1 crop right on the agent.
cropping.FixedCropper((2, 2), rows=1, cols=1),
# A long, short crop right through the agent.
cropping.FixedCropper((2, -2), rows=1, cols=11, pad_char=' '),
# A tall, skinny crop right through the agent.
cropping.FixedCropper((-2, 2), rows=11, cols=1, pad_char=' '),
# Altogether ouside of the observation.
cropping.FixedCropper((-4, -4), rows=2, cols=2, pad_char=' '),
# This, too
cropping.FixedCropper((14, 14), rows=2, cols=2, pad_char=' '),
]
# In a fresh engine, execute some actions and check for expected crops.
self.assertMachinima(
engine=self.make_engine(art, croppers),
croppers=croppers,
frames=[
('stay', # After executing this action...
[[' ',
' ....... ', # ...we expect this from the first cropper...
' .#####. ',
' .#P #. ',
' .# #. ',
' .# #. ',
' .#####. ',
' ....... ',
' '],
['P'], # ...and this from the second cropper...
[' .#P #. '], # ...and this from the third...
[c for c in ' .#P #. '], # ...and this from the fourth...
[' ', # ...fifth...
' '],
[' ', # ...and the sixth.
' ']]),
],
)
def testEgocentricScrolling(self):
"""Basic egocentric scrolling works as advertised."""
# Our test takes place in this world.
art = ['#######',
'# . . #',
'#. . .#',
'# .P. #',
'#. . .#',
'# . . #',
'#######']
# We have two types of egocentric croppers. The first is allowed to crop a
# region outside the board, while the second is not.
croppers = [
# We have two types of egocentric croppers. This one is allowed to have
# its cropping region extend outside of the game board.
cropping.ScrollingCropper(
rows=5, cols=5, to_track=['P'],
scroll_margins=(None, None), pad_char=' '),
# This one is not allowed to do that.
cropping.ScrollingCropper(
rows=5, cols=5, to_track=['P'],
scroll_margins=(None, None)),
]
# In a fresh engine, walk northwest and check for expected crops.
# pylint: disable=bad-whitespace
self.assertMachinima(
engine=self.make_engine(art, croppers),
croppers=croppers,
frames=[
('nw', # The action, and cropped observations below.
zip(['#####', '#####'],
['# . .', '# . .'],
['#.P. ', '#.P. '],
['# . .', '# . .'],
['#. . ', '#. . '])),
('nw',
zip([' ', '#####'],
[' ####', '#P. .'],
[' #P. ', '#. . '],
[' #. .', '# . .'],
[' # . ', '#. . '])),
],
)
# pylint: enable=bad-whitespace
# In a fresh engine, walk southeast and check for expected crops.
# pylint: disable=bad-whitespace
self.assertMachinima(
engine=self.make_engine(art, croppers),
croppers=croppers,
frames=[
('se',
zip([' . .#', ' . .#'],
['. . #', '. . #'],
[' .P.#', ' .P.#'],
['. . #', '. . #'],
['#####', '#####'])),
('se',
zip([' . # ', ' . .#'],
['. .# ', '. . #'],
[' .P# ', ' . .#'],
['#### ', '. .P#'],
[' ', '#####'])),
],
)
# pylint: enable=bad-whitespace
def testScrollingSaccade(self):
"""`ScrollingCropper` can "saccade" correctly between scroll targets."""
# Our test takes place in this world.
art = [' . . . ',
'. . . .',
' . . . ',
'. .P. .', # The agent...
' . .%% ',
'. .%%%.', # ...and a blobby drape.
' . %%. ']
# We have two kinds of egocentric croppers: one that can saccade between
# scroll targets (i.e. if its scroll target moves more than one pixel in any
# direction, it jumps to follow it) and one that does not. In this test, we
# name two scrolling targets: the highest priority is the Sprite 'P', and
# the Drape '%' is the lowest priority. Both can crop a region outside of
# the game board.
croppers = [
cropping.ScrollingCropper(
rows=3, cols=5, to_track=['P', '%'],
scroll_margins=(None, None), pad_char=' ', saccade=True),
cropping.ScrollingCropper(
rows=3, cols=5, to_track=['P', '%'],
scroll_margins=(None, None), pad_char=' ', saccade=False),
]
# In a fresh engine, walk the Sprite around; we check for expected crops.
# pylint: disable=bad-whitespace
self.assertMachinima(
engine=self.make_engine(art, croppers),
croppers=croppers,
frames=[
# The first three steps to the west proceed normally.
('w',
zip([' . . ', ' . . '],
['. P .', '. P .'],
[' . .%', ' . .%'])),
('w',
zip([' . .', ' . .'],
[' .P. ', ' .P. '],
[' . .', ' . .'])),
('w',
zip([' . ', ' . '], # So far, so normal. We're now at the
[' P .', ' P .'], # western edge of the board.
[' . ', ' . '])),
# With this step northwest, the Sprite will "leave the board" and
# become invisible. The cropper that can saccade will jump straight
# to the second-priority target, while the cropper that can't
# saccade will wait patiently in place for a scroll target to drift
# back into the centre of its window.
('nw',
zip([' .%% ', ' . '],
['.%%%.', ' . .'],
[' %%. ', ' . '])),
# Bringing the Sprite back in two rows above the place where it
# exited will snap the saccading cropper back into place. But it's
# still too far away for the non-saccading cropper.
('ne',
zip([' . ', ' . '],
[' P .', ' . .'],
[' . ', ' . '])),
# But if the Sprite drops one row, it's within one step---scrolling
# distance---of the place where the non-saccading cropper was
# waiting. That's close enough for it to "lock on"!
('s',
zip([' . .', ' . .'],
[' P. ', ' P. '],
[' . .', ' . .'])),
],
)
# pylint: enable=bad-whitespace
def testScrollingMargins(self):
"""Scrolling margins work, interacting with board edges as intended."""
# Our test takes place in this world.
art = ['.........',
'. ; ; ; .',
'.; , , ;.',
'. , . , .',
'.; .P. ;.',
'. , . , .',
'.; , , ;.',
'. ; ; ; .',
'.........']
# Our six croppers are the Cartesian product of:
# margin is on { vertical edges; horizontal edges; both edges }
# and
# the scrolling window { can; cannot } go beyond the edge of the board.
# And to be clear, "no margin" means egocentric scrolling---in a sense, the
# tightest possible margins.
croppers = [
cropping.ScrollingCropper( # Margins on vertical edges,
rows=5, cols=5, to_track=['P'], # can overlap the board's edge.
scroll_margins=(None, 1), pad_char=' '),
cropping.ScrollingCropper( # cannot overlap the board's edge.
rows=5, cols=5, to_track=['P'],
scroll_margins=(None, 1)),
cropping.ScrollingCropper( # Margins on horizontal edges,
rows=5, cols=5, to_track=['P'], # can overlap the board's edge.
scroll_margins=(1, None), pad_char=' '),
cropping.ScrollingCropper( # cannot overlap the board's edge.
rows=5, cols=5, to_track=['P'],
scroll_margins=(1, None)),
cropping.ScrollingCropper( # Margins on both edges,
rows=5, cols=5, to_track=['P'], # can overlap the board's edge.
scroll_margins=(1, 1), pad_char=' '),
cropping.ScrollingCropper( # cannot overlap the board's edge.
rows=5, cols=5, to_track=['P'],
scroll_margins=(1, 1)),
]
# In a fresh engine, walk the Sprite westward and check for expected crops.
# pylint: disable=bad-whitespace
self.assertMachinima(
engine=self.make_engine(art, croppers),
croppers=croppers,
frames=[
('w',
zip([' , , ', ' , , ', '; , ,', '; , ,', ' , , ', ' , , '],
[', . ,', ', . ,', ' , . ', ' , . ', ', . ,', ', . ,'],
[' P . ', ' P . ', '; P .', '; P .', ' P . ', ' P . '],
[', . ,', ', . ,', ' , . ', ' , . ', ', . ,', ', . ,'],
[' , , ', ' , , ', '; , ,', '; , ,', ' , , ', ' , , '])),
('w',
zip(['; , ,', '; , ,', '.; , ', '.; , ', '; , ,', '; , ,'],
[' , . ', ' , . ', '. , .', '. , .', ' , . ', ' , . '],
[';P. .', ';P. .', '.;P. ', '.;P. ', ';P. .', ';P. .'],
[' , . ', ' , . ', '. , .', '. , .', ' , . ', ' , . '],
['; , ,', '; , ,', '.; , ', '.; , ', '; , ,', '; , ,'])),
('w',
zip(['.; , ', '.; , ', ' .; ,', '.; , ', '.; , ', '.; , '],
['. , .', '. , .', ' . , ', '. , .', '. , .', '. , .'],
['.P . ', '.P . ', ' .P .', '.P . ', '.P . ', '.P . '],
['. , .', '. , .', ' . , ', '. , .', '. , .', '. , .'],
['.; , ', '.; , ', ' .; ,', '.; , ', '.; , ', '.; , '])),
('w',
zip([' .; ,', '.; , ', ' .; ', '.; , ', ' .; ,', '.; , '],
[' . , ', '. , .', ' . ,', '. , .', ' . , ', '. , .'],
[' P; .', 'P; . ', ' P; ', 'P; . ', ' P; .', 'P; . '],
[' . , ', '. , .', ' . ,', '. , .', ' . , ', '. , .'],
[' .; ,', '.; , ', ' .; ', '.; , ', ' .; ,', '.; , '])),
],
)
# In a fresh engine, walk the Sprite eastward and check for expected crops.
self.assertMachinima(
engine=self.make_engine(art, croppers),
croppers=croppers,
frames=[
('e',
zip([' , , ', ' , , ', ', , ;', ', , ;', ' , , ', ' , , '],
[', . ,', ', . ,', ' . , ', ' . , ', ', . ,', ', . ,'],
[' . P ', ' . P ', '. P ;', '. P ;', ' . P ', ' . P '],
[', . ,', ', . ,', ' . , ', ' . , ', ', . ,', ', . ,'],
[' , , ', ' , , ', ', , ;', ', , ;', ' , , ', ' , , '])),
('e',
zip([', , ;', ', , ;', ' , ;.', ' , ;.', ', , ;', ', , ;'],
[' . , ', ' . , ', '. , .', '. , .', ' . , ', ' . , '],
['. .P;', '. .P;', ' .P;.', ' .P;.', '. .P;', '. .P;'],
[' . , ', ' . , ', '. , .', '. , .', ' . , ', ' . , '],
[', , ;', ', , ;', ' , ;.', ' , ;.', ', , ;', ', , ;'])),
('e',
zip([' , ;.', ' , ;.', ', ;. ', ' , ;.', ' , ;.', ' , ;.'],
['. , .', '. , .', ' , . ', '. , .', '. , .', '. , .'],
[' . P.', ' . P.', '. P. ', ' . P.', ' . P.', ' . P.'],
['. , .', '. , .', ' , . ', '. , .', '. , .', '. , .'],
[' , ;.', ' , ;.', ', ;. ', ' , ;.', ' , ;.', ' , ;.'])),
('e',
zip([', ;. ', ' , ;.', ' ;. ', ' , ;.', ', ;. ', ' , ;.'],
[' , . ', '. , .', ', . ', '. , .', ' , . ', '. , .'],
['. ;P ', ' . ;P', ' ;P ', ' . ;P', '. ;P ', ' . ;P'],
[' , . ', '. , .', ', . ', '. , .', ' , . ', '. , .'],
[', ;. ', ' , ;.', ' ;. ', ' , ;.', ', ;. ', ' , ;.'])),
],
)
# In a fresh engine, walk the Sprite northward and check for expected crops.
self.assertMachinima(
engine=self.make_engine(art, croppers),
croppers=croppers,
frames=[
('n',
zip(['; ; ;', '; ; ;', ' , , ', ' , , ', ' , , ', ' , , '],
[' , , ', ' , , ', ', P ,', ', P ,', ', P ,', ', P ,'],
[', P ,', ', P ,', ' . . ', ' . . ', ' . . ', ' . . '],
[' . . ', ' . . ', ', . ,', ', . ,', ', . ,', ', . ,'],
[', . ,', ', . ,', ' , , ', ' , , ', ' , , ', ' , , '])),
('n',
zip(['.....', '.....', '; ; ;', '; ; ;', '; ; ;', '; ; ;'],
['; ; ;', '; ; ;', ' ,P, ', ' ,P, ', ' ,P, ', ' ,P, '],
[' ,P, ', ' ,P, ', ', . ,', ', . ,', ', . ,', ', . ,'],
[', . ,', ', . ,', ' . . ', ' . . ', ' . . ', ' . . '],
[' . . ', ' . . ', ', . ,', ', . ,', ', . ,', ', . ,'])),
('n',
zip([' ', '.....', '.....', '.....', '.....', '.....'],
['.....', '; P ;', '; P ;', '; P ;', '; P ;', '; P ;'],
['; P ;', ' , , ', ' , , ', ' , , ', ' , , ', ' , , '],
[' , , ', ', . ,', ', . ,', ', . ,', ', . ,', ', . ,'],
[', . ,', ' . . ', ' . . ', ' . . ', ' . . ', ' . . '])),
('n',
zip([' ', '..P..', ' ', '..P..', ' ', '..P..'],
[' ', '; ; ;', '..P..', '; ; ;', '..P..', '; ; ;'],
['..P..', ' , , ', '; ; ;', ' , , ', '; ; ;', ' , , '],
['; ; ;', ', . ,', ' , , ', ', . ,', ' , , ', ', . ,'],
[' , , ', ' . . ', ', . ,', ' . . ', ', . ,', ' . . '])),
],
)
# In a fresh engine, walk the Sprite southward and check for expected crops.
self.assertMachinima(
engine=self.make_engine(art, croppers),
croppers=croppers,
frames=[
('s',
zip([', . ,', ', . ,', ' , , ', ' , , ', ' , , ', ' , , '],
[' . . ', ' . . ', ', . ,', ', . ,', ', . ,', ', . ,'],
[', P ,', ', P ,', ' . . ', ' . . ', ' . . ', ' . . '],
[' , , ', ' , , ', ', P ,', ', P ,', ', P ,', ', P ,'],
['; ; ;', '; ; ;', ' , , ', ' , , ', ' , , ', ' , , '])),
('s',
zip([' . . ', ' . . ', ', . ,', ', . ,', ', . ,', ', . ,'],
[', . ,', ', . ,', ' . . ', ' . . ', ' . . ', ' . . '],
[' ,P, ', ' ,P, ', ', . ,', ', . ,', ', . ,', ', . ,'],
['; ; ;', '; ; ;', ' ,P, ', ' ,P, ', ' ,P, ', ' ,P, '],
['.....', '.....', '; ; ;', '; ; ;', '; ; ;', '; ; ;'])),
('s',
zip([', . ,', ' . . ', ' . . ', ' . . ', ' . . ', ' . . '],
[' , , ', ', . ,', ', . ,', ', . ,', ', . ,', ', . ,'],
['; P ;', ' , , ', ' , , ', ' , , ', ' , , ', ' , , '],
['.....', '; P ;', '; P ;', '; P ;', '; P ;', '; P ;'],
[' ', '.....', '.....', '.....', '.....', '.....'])),
('s',
zip([' , , ', ' . . ', ', . ,', ' . . ', ', . ,', ' . . '],
['; ; ;', ', . ,', ' , , ', ', . ,', ' , , ', ', . ,'],
['..P..', ' , , ', '; ; ;', ' , , ', '; ; ;', ' , , '],
[' ', '; ; ;', '..P..', '; ; ;', '..P..', '; ; ;'],
[' ', '..P..', ' ', '..P..', ' ', '..P..'])),
],
)
# pylint: enable=bad-whitespace
def testScrollingInitialOffset(self):
"""Initial offsets (for dramatic effect) produce expected crops."""
# Our test takes place in this world.
art = ['#######',
'# . . #',
'#. . .#',
'# P . #',
'#. . .#',
'# . . #',
'#######']
# All croppers have options that interact with the initial_offset
# parameter in various ways.
croppers = [
# The first cropper is an easy case. The offset moves the window a
# little bit, but the tracked agent is still within the scroll margins
# (or within one row/column of them).
cropping.ScrollingCropper(
rows=3, cols=5, to_track=['P'], scroll_margins=(1, 1),
initial_offset=(0, -1)),
# The second cropper shifts the window so that the tracked agent is
# outside the scroll margins---far enough (i.e. beyond one row/column)
# that the cropper cannot scroll the agent back into the margins.
# BUT: saccade is True, so the cropper should just shift to put the
# agent at the centre.
cropping.ScrollingCropper(
rows=3, cols=5, to_track=['P'], scroll_margins=(None, None),
initial_offset=(-1, -2), saccade=True),
# The third cropper is like the above, but saccade is False. There will
# be no shifting the agent back to the centre.
cropping.ScrollingCropper(
rows=3, cols=5, to_track=['P'], scroll_margins=(None, None),
initial_offset=(-1, -2), saccade=False),
# This cropper would like to shift the window so that it overlaps the
# left edge of the world. Luckily, it specifies a padding character.
cropping.ScrollingCropper(
rows=3, cols=5, to_track=['P'], scroll_margins=(1, 1),
initial_offset=(0, 1), pad_char=' '),
# This cropper doesn't, so the window will be confined to the board.
cropping.ScrollingCropper(
rows=3, cols=5, to_track=['P'], scroll_margins=(1, 1),
initial_offset=(0, 1)),
]
# In a fresh engine, execute a "stay" move and check for expected crops.
# pylint: disable=bad-whitespace
self.assertMachinima(
engine=self.make_engine(art, croppers),
croppers=croppers,
frames=[
('stay',
zip(['. . .', '#. . ', 'P . #', ' #. .', '#. . '],
[' P . ', '# P .', ' . .#', ' # P ', '# P .'],
['. . .', '#. . ', '. . #', ' #. .', '#. . ']))
],
)
# pylint: enable=bad-whitespace
def main(argv=()):
del argv # Unused.
unittest.main()
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/tests/cropping_test.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A "game" whereby you move text around the board.
Keys: up, down, left, right - move. q - quit.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import numpy as np
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import things
HELLO_ART = [' ',
' # # ### # # ### ',
' # # # # # # # ',
' ##### #### # # # # ',
' # # # # # # # ',
' # # ### ### ### ### ',
' ',
' @ @ @@@ @@@ @ @@@@ 1 ',
' @ @ @ @ @ @ @ @ @ 2 ',
' @ @ @ @ @ @@@@ @ @ @ 3 ',
' @ @ @ @ @ @ @ @ @ @ ',
' @@@ @@@ @ @ @@@ @@@@ 4 ',
' ']
HELLO_COLOURS = {' ': (123, 123, 123), # Only used in this program by
'#': (595, 791, 928), # the CursesUi.
'@': (54, 501, 772),
'1': (999, 222, 222),
'2': (222, 999, 222),
'3': (999, 999, 111),
'4': (222, 222, 999)}
def make_game():
"""Builds and returns a Hello World game."""
return ascii_art.ascii_art_to_game(
HELLO_ART,
what_lies_beneath=' ',
sprites={'1': ascii_art.Partial(SlidingSprite, 0),
'2': ascii_art.Partial(SlidingSprite, 1),
'3': ascii_art.Partial(SlidingSprite, 2),
'4': ascii_art.Partial(SlidingSprite, 3)},
drapes={'@': RollingDrape},
z_order='12@34')
class RollingDrape(things.Drape):
"""A Drape that just `np.roll`s the mask around either axis."""
# There are four rolls to choose from: two shifts of size 1 along both axes.
_ROLL_AXES = [0, 0, 1, 1]
_ROLL_SHIFTS = [-1, 1, -1, 1]
def update(self, actions, board, layers, backdrop, all_things, the_plot):
del board, layers, backdrop, all_things # unused
if actions is None: return # No work needed to make the first observation.
if actions == 4: the_plot.terminate_episode() # Action 4 means "quit".
# If the player has chosen a motion action, use that action to index into
# the set of four rolls.
if actions < 4:
rolled = np.roll(self.curtain, # Makes a copy, alas.
self._ROLL_SHIFTS[actions], self._ROLL_AXES[actions])
np.copyto(self.curtain, rolled)
the_plot.add_reward(1) # Give ourselves a point for moving.
class SlidingSprite(things.Sprite):
"""A Sprite that moves in diagonal directions."""
# We have four mappings from actions to motions to choose from. The mappings
# are arranged so that given any index i, then across all sets, the motion
# that undoes motion i always has the same index j.
_DX = ([-1, 1, -1, 1], [-1, 1, -1, 1], [1, -1, 1, -1], [1, -1, 1, -1])
_DY = ([-1, 1, 1, -1], [1, -1, -1, 1], [1, -1, -1, 1], [-1, 1, 1, -1])
def __init__(self, corner, position, character, direction_set):
"""Build a SlidingSprite.
Args:
corner: required argument for Sprite.
position: required argument for Sprite.
character: required argument for Sprite.
direction_set: an integer in `[0,3]` that selects from any of four
mappings from actions to (diagonal) motions.
"""
super(SlidingSprite, self).__init__(corner, position, character)
self._dx = self._DX[direction_set]
self._dy = self._DY[direction_set]
def update(self, actions, board, layers, backdrop, all_things, the_plot):
del board, layers, backdrop, all_things, the_plot # unused
# Actions 0-3 are motion actions; the others we ignore.
if actions is None or actions > 3: return
new_col = (self._position.col + self._dx[actions]) % self.corner.col
new_row = (self._position.row + self._dy[actions]) % self.corner.row
self._position = self.Position(new_row, new_col)
def main(argv=()):
del argv # Unused.
# Build a Hello World game.
game = make_game()
# Log a message in its Plot object.
game.the_plot.log('Hello, world!')
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_UP: 0, curses.KEY_DOWN: 1, curses.KEY_LEFT: 2,
curses.KEY_RIGHT: 3, 'q': 4, 'Q': 4, -1: 5},
delay=50, colour_fg=HELLO_COLOURS)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/hello_world.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Swimming a river, walking a chain, whatever you like to call it.
Keys: left, right - move the "swimmer". Fight current to get to the right.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import numpy as np
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
GAME_ART = ['===================================================',
' . : , ` ~ , . ` ',
' , ~ P : . ` , , ~ ` ',
' ` . ~~ , . : . ` ` ~',
'===================================================']
COLOURS_FG = {'P': (0, 999, 0), # The swimmer
'=': (576, 255, 0), # The river bank
' ': (0, 505, 999), # Empty water
'.': (999, 999, 999), # Waves on the water
',': (999, 999, 999),
'`': (999, 999, 999),
':': (999, 999, 999),
'~': (999, 999, 999)}
COLOURS_BG = {'.': (0, 505, 999), # Waves on the water have the "water"
',': (0, 505, 999), # colour as their background colour.
'`': (0, 505, 999),
':': (0, 505, 999),
'~': (0, 505, 999)}
def make_game():
"""Builds and returns a Fluvial Natation game."""
return ascii_art.ascii_art_to_game(
GAME_ART, what_lies_beneath=' ',
sprites={'P': PlayerSprite},
backdrop=RiverBackdrop)
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player.
This `Sprite` ties actions to going left and right. On even-numbered game
iterations, it moves left in addition to whatever the user action specifies,
akin to the current sweeping a swimmer downriver. If the player goes beyond
the right edge of the game board, the game is won; if it goes beyond the left
edge, the game is lost.
"""
def __init__(self, corner, position, character):
"""Inform superclass that we can go anywhere."""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='')
def update(self, actions, board, layers, backdrop, things, the_plot):
del layers, backdrop, things # Unused.
# Move one square left on even game iterations.
if the_plot.frame % 2 == 0:
self._west(board, the_plot)
# Apply swimming commands.
if actions == 0: # swim leftward?
self._west(board, the_plot)
elif actions == 1: # swim rightward?
self._east(board, the_plot)
# See if the game is won or lost.
if self.virtual_position[1] < 0:
the_plot.add_reward(-1)
the_plot.terminate_episode()
elif self.virtual_position[1] >= board.shape[1]:
the_plot.add_reward(1)
the_plot.terminate_episode()
class RiverBackdrop(plab_things.Backdrop):
"""A `Backdrop` for the river.
This `Backdrop` rotates the river part of the backdrop leftward on every even
game iteration, making the river appear to be flowing.
"""
def update(self, actions, board, layers, things, the_plot):
del actions, board, layers, things # Unused.
if the_plot.frame % 2 == 0:
self.curtain[1:4, :] = np.roll(self.curtain[1:4, :], shift=-1, axis=1)
def main(argv=()):
del argv # Unused.
# Build a Fluvial Natation game.
game = make_game()
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_LEFT: 0, curses.KEY_RIGHT: 1, -1: 2},
delay=200, colour_fg=COLOURS_FG, colour_bg=COLOURS_BG)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/fluvial_natation.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
|
pycolab-master
|
pycolab/examples/__init__.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A scrolling maze to explore. Collect all of the coins!
Better Scrolly Maze is better than Scrolly Maze because it uses a much simpler
scrolling mechanism: cropping! As far as the pycolab engine is concerned, the
game world doesn't scroll at all: it just renders observations that are the size
of the entire map. Only later do "cropper" objects crop out a part of the
observation to give the impression of a moving world.
This cropping mechanism also makes it easier to derive multiple observations
from the same game, so the human user interface shows three views of the map at
once: a moving view that follows the player, another one that follows the
Patroller Sprite identified by the 'c' character, and a third that remains fixed
on a tantalisingly large hoard of gold coins, tempting the player to explore.
Regrettably, the cropper approach does mean that we have to give up the cool
starfield floating behind the map in Scrolly Maze. If you like the starfield a
lot, then Better Scrolly Maze isn't actually better.
Command-line usage: `better_scrolly_maze.py <level>`, where `<level>` is an
optional integer argument selecting Better Scrolly Maze levels 0, 1, or 2.
Keys: up, down, left, right - move. q - quit.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import sys
from pycolab import ascii_art
from pycolab import cropping
from pycolab import human_ui
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
# pylint: disable=line-too-long
MAZES_ART = [
# Each maze in MAZES_ART must have exactly one of the patroller sprites
# 'a', 'b', and 'c'. I guess if you really don't want them in your maze, you
# can always put them down in an unreachable part of the map or something.
#
# Make sure that the Player will have no way to "escape" the maze.
#
# Legend:
# '#': impassable walls. 'a': patroller A.
# '@': collectable coins. 'b': patroller B.
# 'P': player starting location. 'c': patroller C.
# ' ': boring old maze floor.
#
# Finally, don't forget to update INITIAL_OFFSET and TEASER_CORNER if you
# add or make substantial changes to a level.
# Maze #0:
['#########################################################################################',
'# # # # # # @ @ @ @ # @ @ @ #',
'# # ##### ##### # # ##### # # ##### ############# # @ ######### #',
'# @ # # # # # # # # # @ # @ @ @ #',
'# ##### ##### ######### ################# ##### # # # #################',
'# # # @ @ # # # # # # #',
'# @ # # # @ ######### ##### # # # ######### ##### # ############# #',
'# # # # @ # @ @ # # # # # # # # # #',
'# # ############# ##### ######### # ##### ##### ##### # # #########',
'# @ # @ @ @ # # # # @ # # # a # #',
'# ##### ##### # @ # ##### # # ############# # ##################### #',
'# # @ @ # # # # # # @ @ # # # @ @ @ @ # #',
'# @ # ##### # @ # ##### ##### ######### # ##### ##### ######### #####',
'# # # # @ # # # # @ @ # # # # @ #',
'# # @ # # ######### ##### ######### ############################# ##### @ #',
'# @ # # # # # # # # # # @ # #',
'# # # # # # ################# # @ # ##### # ######### ##### # #',
'# @ # # # # # # # # # # # @ # @ #',
'######### ############# # ##### # # ##### # ######### # # ##### #',
'# # # # # # # # @ # # # # @ # @ #',
'# # ############# # ######### # # # ######### # # # # ##### @ #',
'# # # # b # # # # # # # @ # #',
'# ######### # ######### # # ##### # # ##### ##### # ##### # #',
'# # # @ # # P # # # # # # @ # @ #',
'# # # @ ##################################### # ##################### # # #',
'# # # @ # @ # # # # # @ #',
'# # ######### @ # # # # ################# ######### ######### #########',
'# # # # @ # @ # # # # # # #',
'# # ##### ############# ######### ##### ################# # # ##### #',
'# # # # # # # # # # # #',
'# ##### ############# ##### # ##### ##### ##### # ############# # #',
'# # # # # # # # # # #',
'##### # ######### ##### ######### ############# # ######### # #########',
'# # # @ # # # # # # # #',
'# ############# ##### # ##### # # ##### # ##### # # ##### # #',
'# # @ # @ # # # # # # # # #',
'##### # ######### ######### ######### ##################################### #',
'# # # @ # @ # @ @ # # @ @ @ @ # @ # @ @ # #',
'# ##### @ # ##### # ##### ############# ######### # # @ # # ##### #',
'# # # @ @ # @ @ # # @ # @ # # @ # @ # #',
'# # ##### ################# # # # ##### # # ################# #####',
'# # # @ @ # @ # # # # @ # # # # #',
'# ##### ######### # # # ##### ##### ######### # # ############# #',
'# # @ # # # c #',
'#########################################################################################'],
# Maze #1
['##############################',
'# #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# #',
'######### a #########',
'########## b ##########',
'# #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# #',
'####### c #######',
'# #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# P #',
'##############################'],
# Maze #2
[' ',
' ################################################################################### ',
' # @ @ @ @ @ @ @ @ @ @ P # ',
' # ########################################################################### # ',
' # @ # # # ',
' # # # # ',
' # @ # ###################################################### # ',
' # # # # ',
' # @ # # ###################################################### ',
' # # # # ',
' # @ # # # ',
' # # # ###################################################### ',
' # @ # # # ',
' # # ###################################################### # ',
' # @ # # # ',
' # # # # ',
' # @ # ############################## # ',
' # # ## # # ',
' # @ # # @@@@@ ######### # # ',
' # # # @@@@@@@@@@@ # # # # ',
' # @ ########### ##@@@@@@@@@@@@@@@@@## # # # ',
' # # @ @ @ # ##@@@@@@@@@@@@@@@@@@@## # # # ',
' # @ # a # ##@@@@@@@@@@@@@@@@@@@@@## # # # ',
' # # b # ##@@@@@@@@@@@@@@@@@@@@@@@## # # # ',
' # @ # c # ##@@@@@@@@@@@@@@@@@@@@@@@## # # # ',
' # ####### # ##@@@@@@@@@@@@@@@@@@@@@## # # # ',
' # @ @ @ # ##@@@@@@@@@@@@@@@@@@@## # # ',
' ############### ##################### ######### ',
' '],
]
# pylint: enable=line-too-long
# The "teaser observations" (see docstring) have their top-left corners at these
# row, column maze locations. (The teaser window is 12 rows by 20 columns.)
TEASER_CORNER = [(3, 9), # For level 0
(4, 5), # For level 1
(16, 53)] # For level 2
# For dramatic effect, none of the levels start the game with the first
# observation centred on the player; instead, the view in the window is shifted
# such that the player is this many rows, columns away from the centre.
STARTER_OFFSET = [(-2, -12), # For level 0
(10, 0), # For level 1
(-3, 0)] # For level 2
# These colours are only for humans to see in the CursesUi.
COLOUR_FG = {' ': (0, 0, 0), # Default black background
'@': (999, 862, 110), # Shimmering golden coins
'#': (764, 0, 999), # Walls of the maze
'P': (0, 999, 999), # This is you, the player
'a': (999, 0, 780), # Patroller A
'b': (145, 987, 341), # Patroller B
'c': (987, 623, 145)} # Patroller C
COLOUR_BG = {'@': (0, 0, 0)} # So the coins look like @ and not solid blocks.
def make_game(level):
"""Builds and returns a Better Scrolly Maze game for the selected level."""
return ascii_art.ascii_art_to_game(
MAZES_ART[level], what_lies_beneath=' ',
sprites={
'P': PlayerSprite,
'a': PatrollerSprite,
'b': PatrollerSprite,
'c': PatrollerSprite},
drapes={
'@': CashDrape},
update_schedule=['a', 'b', 'c', 'P', '@'],
z_order='abc@P')
def make_croppers(level):
"""Builds and returns `ObservationCropper`s for the selected level.
We make three croppers for each level: one centred on the player, one centred
on one of the Patrollers (scary!), and one centred on a tantalising hoard of
coins somewhere in the level (motivating!)
Args:
level: level to make `ObservationCropper`s for.
Returns:
a list of three `ObservationCropper`s.
"""
return [
# The player view.
cropping.ScrollingCropper(rows=10, cols=30, to_track=['P'],
initial_offset=STARTER_OFFSET[level]),
# The patroller view.
cropping.ScrollingCropper(rows=7, cols=10, to_track=['c'],
pad_char=' ', scroll_margins=(None, 3)),
# The teaser!
cropping.FixedCropper(top_left_corner=TEASER_CORNER[level],
rows=12, cols=20, pad_char=' '),
]
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player, the maze explorer."""
def __init__(self, corner, position, character):
"""Constructor: just tells `MazeWalker` we can't walk through walls."""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='#')
def update(self, actions, board, layers, backdrop, things, the_plot):
del backdrop, things, layers # Unused
if actions == 0: # go upward?
self._north(board, the_plot)
elif actions == 1: # go downward?
self._south(board, the_plot)
elif actions == 2: # go leftward?
self._west(board, the_plot)
elif actions == 3: # go rightward?
self._east(board, the_plot)
elif actions == 4: # stay put? (Not strictly necessary.)
self._stay(board, the_plot)
if actions == 5: # just quit?
the_plot.terminate_episode()
class PatrollerSprite(prefab_sprites.MazeWalker):
"""Wanders back and forth horizontally, killing the player on contact."""
def __init__(self, corner, position, character):
"""Constructor: list impassables, initialise direction."""
super(PatrollerSprite, self).__init__(
corner, position, character, impassable='#')
# Choose our initial direction based on our character value.
self._moving_east = bool(ord(character) % 2)
def update(self, actions, board, layers, backdrop, things, the_plot):
del actions, backdrop # Unused.
# We only move once every two game iterations.
if the_plot.frame % 2:
self._stay(board, the_plot) # Also not strictly necessary.
return
# If there is a wall next to us, we ought to switch direction.
row, col = self.position
if layers['#'][row, col-1]: self._moving_east = True
if layers['#'][row, col+1]: self._moving_east = False
# Make our move. If we're now in the same cell as the player, it's instant
# game over!
(self._east if self._moving_east else self._west)(board, the_plot)
if self.position == things['P'].position: the_plot.terminate_episode()
class CashDrape(plab_things.Drape):
"""A `Drape` handling all of the coins.
This Drape detects when a player traverses a coin, removing the coin and
crediting the player for the collection. Terminates if all coins are gone.
"""
def update(self, actions, board, layers, backdrop, things, the_plot):
# If the player has reached a coin, credit one reward and remove the coin
# from the scrolling pattern. If the player has obtained all coins, quit!
player_pattern_position = things['P'].position
if self.curtain[player_pattern_position]:
the_plot.log('Coin collected at {}!'.format(player_pattern_position))
the_plot.add_reward(100)
self.curtain[player_pattern_position] = False
if not self.curtain.any(): the_plot.terminate_episode()
def main(argv=()):
level = int(argv[1]) if len(argv) > 1 else 0
# Build a Better Scrolly Maze game.
game = make_game(level)
# Build the croppers we'll use to scroll around in it, etc.
croppers = make_croppers(level)
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_UP: 0, curses.KEY_DOWN: 1,
curses.KEY_LEFT: 2, curses.KEY_RIGHT: 3,
-1: 4,
'q': 5, 'Q': 5},
delay=100, colour_fg=COLOUR_FG, colour_bg=COLOUR_BG,
croppers=croppers)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/better_scrolly_maze.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""What would it be like to play tennis in a long corridor?
This tennis-like uses a court too big to fit on your screen, so instead you
and your opponent get three separate views: one of your paddle, one of your
opponent's paddle, and one that follows the ball.
The game terminates when either player gets four points.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import random
import enum
import numpy as np
from pycolab import ascii_art
from pycolab import cropping
from pycolab import human_ui
from pycolab import things as plab_things
# pylint: disable=line-too-long
MAZE_ART = [
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%',
'% ## # ### # ### ### ### # %',
'% 1 ##### # ### ## # ## # # ### ### # # ### # %',
'% 1 @ # # ### # ### ## # # # # # ## # # ### # ### # # # # ### # %',
'% # # # # ### ## # # # # # # # # # ## # # ### # # ### ### # # ### ### # %',
'% # ##### # ### # ### ## # # # # # # # # # ## # # ### # ### # # ### ### # # ### ### # %',
'% # # ## # ## # # # # # # # # # ## # ## # # ### ### # # # # # 2 %',
'% #### # # # # # # # # # # # # # ### # # ### 2 %',
'% # # # # # # # # ### ### %',
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%']
# pylint: enable=line-too-long
# These colours are only for humans to see in the CursesUi.
COLOUR_FG = {' ': (0, 0, 0), # Default black background
'%': (82, 383, 86), # Dark green court border
'#': (123, 574, 129), # Lighter green court features
'1': (999, 999, 999), # White player-1 paddle
'2': (999, 999, 999), # White player-2 paddle
'@': (787, 999, 227)} # Tennis ball
COLOUR_BG = {'@': (0, 0, 0)} # So the tennis ball looks like @ and not a block.
class Actions(enum.IntEnum):
"""Actions for paddle movement."""
STAY = 0
UP = 1
DOWN = 2
QUIT = 3
def make_game():
"""Builds and returns a game of tennnnnnnnnnnnnnnnnnnnnnnnis."""
return ascii_art.ascii_art_to_game(
MAZE_ART, what_lies_beneath=' ',
sprites={
'@': BallSprite},
drapes={
'1': PaddleDrape,
'2': PaddleDrape},
update_schedule=['1', '2', '@'])
def make_croppers():
"""Builds and returns three `ObservationCropper`s for tennnn...nnnnis."""
return [
# Player 1 view.
cropping.FixedCropper(
top_left_corner=(0, 0), rows=10, cols=10),
# The ball view.
cropping.ScrollingCropper(
rows=10, cols=31, to_track=['@'], scroll_margins=(0, None)),
# Player 2 view.
cropping.FixedCropper(
top_left_corner=(0, len(MAZE_ART[0])-10), rows=10, cols=10),
]
class BallSprite(plab_things.Sprite):
"""A Sprite that handles the ball, and also scoring and quitting."""
def __init__(self, corner, position, character):
super(BallSprite, self).__init__(corner, position, character)
self._y_shift_modulus = 1 # Every this-many frames...
self._dy = 0 # ...shift the ball vertically this amount.
self._dx = -1 # Horizontally this amount in *all* frames.
self._score = np.array([0, 0]) # We keep track of score internally.
def update(self, actions, board, layers, backdrop, things, the_plot):
row, col = self._position # Current ball position.
reward = np.array([0, 0]) # Default reward for a game step.
def horizontal_bounce(new_dx): # Shared actions for horizontal bounces.
self._y_shift_modulus = random.randrange(1, 6)
self._dy = random.choice([-1, 1])
self._dx = new_dx
# Handle vertical motion.
self._dy = {1: 1, 8: -1}.get(row, self._dy) # Bounce off top/bottom walls!
if the_plot.frame % self._y_shift_modulus == 0: row += self._dy
# Handle horizontal motion.
col += self._dx
# Have we hit a paddle?
if things['1'].curtain[row, col-1]:
horizontal_bounce(new_dx=1)
elif things['2'].curtain[row, col+1]:
horizontal_bounce(new_dx=-1)
# Have we hit a wall? Same as for a paddle, but awards the opponent a point.
elif layers['%'][row, col-1]:
reward = np.array([0, 1])
horizontal_bounce(new_dx=1)
elif layers['%'][row, col+1]:
reward = np.array([1, 0])
horizontal_bounce(new_dx=-1)
# Update the position and the score.
self._position = self.Position(row=row, col=col)
the_plot.add_reward(reward)
self._score += reward
# Finally, see if a player has won, or if a user wants to quit.
if any(self._score >= 4): the_plot.terminate_episode()
if actions is not None and actions.get('quit'): the_plot.terminate_episode()
class PaddleDrape(plab_things.Drape):
"""A Drape that handles a paddle."""
def __init__(self, curtain, character):
"""Finds out where the paddle is."""
super(PaddleDrape, self).__init__(curtain, character)
self._paddle_top = min(np.where(self.curtain)[0])
self._paddle_col = min(np.where(self.curtain)[1])
def update(self, actions, board, layers, backdrop, things, the_plot):
# Move up or down as directed if there is room.
action = Actions.STAY if actions is None else actions[self.character]
if action == Actions.UP:
if self._paddle_top > 1: self._paddle_top -= 1
elif action == Actions.DOWN:
if self._paddle_top < 7: self._paddle_top += 1
# Repaint the paddle. Note "blinking" effect if the ball slips past us.
self.curtain[:, self._paddle_col] = False
blink = (things['@'].position.col <= self._paddle_col # "past" us depends
if self.character == '1' else # on which paddle
things['@'].position.col >= self._paddle_col) # we are.
if not blink or (the_plot.frame % 2 == 0):
paddle_rows = np.s_[self._paddle_top:(self._paddle_top + 2)]
self.curtain[paddle_rows, self._paddle_col] = True
def main():
# Build a game of tennnnnnnnnnnnnnnnnnnnnnnnis.
game = make_game()
# Build the croppers we'll use to make the observations.
croppers = make_croppers()
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
# Multi-agent arguments don't have to be dicts---they can be just about
# anything; numpy arrays, scalars, nests, whatever.
keys_to_actions={
'r': {'1': Actions.UP, '2': Actions.STAY},
'f': {'1': Actions.DOWN, '2': Actions.STAY},
'u': {'1': Actions.STAY, '2': Actions.UP},
'j': {'1': Actions.STAY, '2': Actions.DOWN},
'q': {'1': Actions.STAY, '2': Actions.STAY, 'quit': True},
-1: {'1': Actions.STAY, '2': Actions.STAY},
},
delay=33, colour_fg=COLOUR_FG, colour_bg=COLOUR_BG,
croppers=croppers)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main()
|
pycolab-master
|
pycolab/examples/tennnnnnnnnnnnnnnnnnnnnnnnis.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A game that has absolutely nothing to do with Sokoban.
Command-line usage: `warehouse_manager.py <level>`, where `<level>` is an
optional integer argument selecting Warehouse Manager levels 0, 1, or 2.
Keys: up, down, left, right - move. q - quit.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import numpy as np
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import rendering
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
WAREHOUSES_ART = [
# Legend:
# '#': impassable walls. '.': outdoor scenery.
# '_': goal locations for boxes. 'P': player starting location.
# '0'-'9': box starting locations. ' ': boring old warehouse floor.
['..........',
'..######..', # Map #0, "Tyro"
'..# _ #..',
'.##12 ##..', # In this map, all of the sprites have the same thing
'.# _3 #..', # underneath them: regular warehouse floor (' ').
'.#_ 4P#..', # (Contrast with Map #1.) This allows us to use just a
'.#_######.', # single character as the what_lies_beneath argument to
'.# # ## #.', # ascii_art_to_game.
'.# 5 _ #.',
'.########.',
'..........'],
['.............',
'.....#######.', # Map #1, "Pretty Easy Randomly Generated Map"
'....## _#.',
'.#### ## __#.', # This map starts one of the boxes (5) atop one of the
'.# #.', # box goal locations, and since that means that there are
'.# 1__# 2 #.', # different kinds of things under the sprites depending
'.# 3 ### #.', # on the map location, we have to use a whole separate
'.# 45 67##.', # ASCII art diagram for the what_lies_beneath argument to
'.# P #..', # ascii_art_to_game.
'.##########..',
'.............'],
['.............',
'....########.', # Map #2, "The Open Source Release Will Be Delayed if I
'....# _ 1 #.', # Can't Think of a Name for This Map"
'.#### 2 # #.',
'.#_ # 3 ## #.', # This map also requires a full-map what_lies_beneath
'.# _ _#P#.', # argument.
'.# 45_6 _# #.',
'.# #78# #.',
'.# _ 9 #.',
'.###########.',
'.............'],
]
WAREHOUSES_WHAT_LIES_BENEATH = [
# What lies below Sprite characters in WAREHOUSES_ART?
' ', # In map #0, ' ' lies beneath all sprites.
['.............',
'.....#######.', # In map #1, different characters lie beneath sprites.
'....## _#.',
'.#### ## __#.', # This ASCII art map shows an entirely sprite-free
'.# #.', # rendering of Map #1, but this is mainly for human
'.# ___# #.', # convenience. The ascii_art_to_game function will only
'.# ### #.', # consult cells that are "underneath" characters
'.# _ ##.', # corresponding to Sprites and Drapes in the original
'.# #..', # ASCII art map.
'.##########..',
'.............'],
['.............',
'....########.', # For map #2.
'....# _ #.',
'.#### # #.',
'.#_ # _ ## #.',
'.# _ _# #.',
'.# __ _# #.',
'.# # # #.',
'.# _ #.',
'.###########.',
'.............'],
]
# Using the digits 0-9 in the ASCII art maps is how we allow each box to be
# represented with a different sprite. The only reason boxes should look
# different (to humans or AIs) is when they are in a goal location vs. still
# loose in the warehouse.
#
# Boxes in goal locations are rendered with the help of an overlying Drape that
# paints X characters (see JudgeDrape), but for loose boxes, we will use a
# rendering.ObservationCharacterRepainter to convert the digits to identical 'x'
# characters.
WAREHOUSE_REPAINT_MAPPING = {c: 'x' for c in '0123456789'}
# These colours are only for humans to see in the CursesUi.
WAREHOUSE_FG_COLOURS = {' ': (870, 838, 678), # Warehouse floor.
'#': (428, 135, 0), # Warehouse walls.
'.': (39, 208, 67), # External scenery.
'x': (729, 394, 51), # Boxes loose in the warehouse.
'X': (850, 603, 270), # Boxes on goal positions.
'P': (388, 400, 999), # The player.
'_': (834, 588, 525)} # Box goal locations.
WAREHOUSE_BG_COLOURS = {'X': (729, 394, 51)} # Boxes on goal positions.
def make_game(level):
"""Builds and returns a Warehouse Manager game for the selected level."""
warehouse_art = WAREHOUSES_ART[level]
what_lies_beneath = WAREHOUSES_WHAT_LIES_BENEATH[level]
# Create a Sprite for every box in the game ASCII-art.
sprites = {c: BoxSprite for c in '1234567890' if c in ''.join(warehouse_art)}
sprites['P'] = PlayerSprite
# We also have a "Judge" drape that marks all boxes that are in goal
# locations, and that holds the game logic for determining if the player has
# won the game.
drapes = {'X': JudgeDrape}
# This update schedule simplifies the game logic considerably. The boxes
# move first, and they only move if there is already a Player next to them
# to push in the same direction as the action. (This condition can only be
# satisfied by one box at a time.
#
# The Judge runs next, and handles various adminstrative tasks: scorekeeping,
# deciding whether the player has won, and listening for the 'q'(uit) key. If
# neither happen, the Judge draws Xs over all boxes that are in a goal
# position. The Judge runs in its own update group so that it can detect a
# winning box configuration the instant it is made---and so it can clean up
# any out-of-date X marks in time for the Player to move into the place where
# they used to be.
#
# The Player moves last, and by the time they try to move into the spot where
# the box they were pushing used to be, the box (and any overlying drape) will
# have moved out of the way---since it's in a third update group (see `Engine`
# docstring).
update_schedule = [[c for c in '1234567890' if c in ''.join(warehouse_art)],
['X'],
['P']]
# We are also relying on the z order matching a depth-first traversal of the
# update schedule by default---that way, the JudgeDrape gets to make its mark
# on top of all of the boxes.
return ascii_art.ascii_art_to_game(
warehouse_art, what_lies_beneath, sprites, drapes,
update_schedule=update_schedule)
class BoxSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for boxes in our warehouse.
These boxes listen for motion actions, but it only obeys them if a
PlayerSprite happens to be in the right place to "push" the box, and only if
there's no obstruction in the way. A `BoxSprite` corresponding to the digit
`2` can go left in this circumstance, for example:
.......
.#####.
.# #.
.# 2P#.
.#####.
.......
but in none of these circumstances:
....... ....... .......
.#####. .#####. .#####.
.# #. .#P #. .# #.
.#P2 #. .# 2 #. .##2P#.
.#####. .#####. .#####.
....... ....... .......
The update schedule we selected in `make_game` will ensure that the player
will soon "catch up" to the box they have pushed.
"""
def __init__(self, corner, position, character):
"""Constructor: simply supplies characters that boxes can't traverse."""
impassable = set('#.0123456789PX') - set(character)
super(BoxSprite, self).__init__(corner, position, character, impassable)
def update(self, actions, board, layers, backdrop, things, the_plot):
del backdrop, things # Unused.
# Implements the logic described in the class docstring.
rows, cols = self.position
if actions == 0: # go upward?
if layers['P'][rows+1, cols]: self._north(board, the_plot)
elif actions == 1: # go downward?
if layers['P'][rows-1, cols]: self._south(board, the_plot)
elif actions == 2: # go leftward?
if layers['P'][rows, cols+1]: self._west(board, the_plot)
elif actions == 3: # go rightward?
if layers['P'][rows, cols-1]: self._east(board, the_plot)
class JudgeDrape(plab_things.Drape):
"""A `Drape` that marks boxes atop goals, and also decides whether you've won.
This `Drape` sits atop all of the box `Sprite`s and provides a "luxury"
Sokoban feature: if one of the boxes is sitting on one of the goal states, it
marks the box differently from others that are loose in the warehouse.
While doing so, the `JudgeDrape` also counts the number of boxes on goal
states, and uses this information to update the game score and to decide
whether the game has finished.
"""
def __init__(self, curtain, character):
super(JudgeDrape, self).__init__(curtain, character)
self._last_num_boxes_on_goals = 0
def update(self, actions, board, layers, backdrop, things, the_plot):
# Clear our curtain and mark the locations of all the boxes True.
self.curtain.fill(False)
for box_char in (c for c in '0123456789' if c in layers):
self.curtain[things[box_char].position] = True
# We can count the number of boxes we have now:
num_boxes = np.sum(self.curtain)
# Now logically-and the box locations with the goal locations. These are
# all of the goals that are occupied by boxes at the moment.
np.logical_and(self.curtain, (backdrop.curtain == backdrop.palette._),
out=self.curtain)
# Compute the reward to credit to the player: the change in how many goals
# are occupied by boxes at the moment.
num_boxes_on_goals = np.sum(self.curtain)
the_plot.add_reward(num_boxes_on_goals - self._last_num_boxes_on_goals)
self._last_num_boxes_on_goals = num_boxes_on_goals
# See if we should quit: it happens if the user solves the puzzle or if
# they give up and execute the 'quit' action.
if (actions == 5) or (num_boxes_on_goals == num_boxes):
the_plot.terminate_episode()
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player, the Warehouse Manager.
This `Sprite` requires no logic beyond tying actions to `MazeWalker`
motion action helper methods, which keep the player from walking on top of
obstacles. If the player has pushed a box, then the update schedule has
already made certain that the box is out of the way (along with any
overlying characters from the `JudgeDrape`) by the time the `PlayerSprite`
gets to move.
"""
def __init__(self, corner, position, character):
"""Constructor: simply supplies characters that players can't traverse."""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='#.0123456789X')
def update(self, actions, board, layers, backdrop, things, the_plot):
del backdrop, things, layers # Unused.
if actions == 0: # go upward?
self._north(board, the_plot)
elif actions == 1: # go downward?
self._south(board, the_plot)
elif actions == 2: # go leftward?
self._west(board, the_plot)
elif actions == 3: # go rightward?
self._east(board, the_plot)
def main(argv=()):
# Build a Warehouse Manager game.
game = make_game(int(argv[1]) if len(argv) > 1 else 0)
# Build an ObservationCharacterRepainter that will make all of the boxes in
# the warehouse look the same.
repainter = rendering.ObservationCharacterRepainter(WAREHOUSE_REPAINT_MAPPING)
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_UP: 0, curses.KEY_DOWN: 1,
curses.KEY_LEFT: 2, curses.KEY_RIGHT: 3,
-1: 4,
'q': 5, 'Q': 5},
repainter=repainter, delay=100,
colour_fg=WAREHOUSE_FG_COLOURS,
colour_bg=WAREHOUSE_BG_COLOURS)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/warehouse_manager.py
|
# Copyright 2018 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""An heroic undertaking of exploration and derring-do! Slay the dragon/duck!
Also, a demonstration of `storytelling.Story`.
Keys: up, down, left, right - move. q - quit.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import sys
from pycolab import ascii_art
from pycolab import cropping
from pycolab import human_ui
from pycolab import storytelling
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
GAME_ART_CASTLE = ['## ## ## ##',
'###############',
'# #',
'# D #', # As in "dragon" or "duck".
'# #',
'# #',
'# #',
'###### P ######'] # As in "player".
GAME_ART_CAVERN = ['@@@@@@@@@@@@@@@',
'@@@@@@ @@@@',
'@@@@@ @@@@',
'@ @@ S @@', # As in "sword".
' @@@',
'P @@@ @@@@@', # As in "player".
'@@@@@@ @@@@@@@',
'@@@@@@@@@@@@@@@']
GAME_ART_KANSAS = ['######%%%######wwwwwwwwwwwwwwwwwwwwww@wwwwwww',
'w~~~~~%%%~~~~~~~~~~~~~~~~@~~~wwwww~~~~~~~~~~@',
'ww~~~~%%%~~~~~~~~~@~~~~~~~~~~~~~~~~~~~~~~@@@@',
'ww~~~~~%%%%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@@@@',
'@ww~~~~~~%%%%~~~~~~~~~~~~~@~~%%%%%%%%%%%%%%%%',
'ww~~~~~~~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%',
'w~~~~~~@~~~~~~~~%%%%%%%%%%%%%%~~~~~~~~~~~~@@@',
'ww~~~~~~~~~~P~~~~~~~~~~~~~~~~~~~~~~~~~@~~~@@@', # "Player".
'wwww~@www~~~~~~~~~wwwwww~~~@~~~~wwwww~~~~~~ww',
'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww']
# These colours are only for humans to see in the CursesUi.
COLOURS = {' ': (0, 0, 0), # Interior floors.
'#': (447, 400, 400), # Castle walls.
'%': (999, 917, 298), # Road.
'~': (270, 776, 286), # Grass.
'@': (368, 333, 388), # Stones and cave walls.
'w': (309, 572, 999), # Water. (The shores of Kansas.)
'P': (999, 364, 0), # Player.
'S': (500, 999, 948), # Sword.
'D': (670, 776, 192)} # Dragonduck.
def make_game():
"""Builds and returns an Ordeal game."""
# Factories for building the three subgames of Ordeal.
def make_castle():
return ascii_art.ascii_art_to_game(
GAME_ART_CASTLE, what_lies_beneath=' ',
sprites=dict(P=PlayerSprite, D=DragonduckSprite),
update_schedule=['P', 'D'], z_order=['D', 'P'])
def make_cavern():
return ascii_art.ascii_art_to_game(
GAME_ART_CAVERN, what_lies_beneath=' ',
sprites=dict(P=PlayerSprite), drapes=dict(S=SwordDrape),
update_schedule=['P', 'S'])
def make_kansas():
return ascii_art.ascii_art_to_game(
GAME_ART_KANSAS, what_lies_beneath='~', sprites=dict(P=PlayerSprite))
# A cropper for cropping the "Kansas" part of the game to the size of the
# other two games.
crop_kansas = cropping.ScrollingCropper(
rows=8, cols=15, to_track='P', scroll_margins=(2, 3))
return storytelling.Story(
chapters=dict(castle=make_castle, cavern=make_cavern, kansas=make_kansas),
croppers=dict(castle=None, cavern=None, kansas=crop_kansas),
first_chapter='kansas')
class SwordDrape(plab_things.Drape):
"""A `Drape` for the sword.
This `Drape` simply disappears if the player sprite steps on any element where
its curtain is True, setting the 'has_sword' flag in the Plot as it goes.
I guess we'll give the player a reward for sword collection, too.
"""
def update(self, actions, board, layers, backdrop, things, the_plot):
if self.curtain[things['P'].position]:
the_plot['has_sword'] = True
the_plot.add_reward(1.0)
if the_plot.get('has_sword'): self.curtain[:] = False # Only one sword.
class DragonduckSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for the castle dragon, or duck. Whatever.
This creature shuffles toward the player. It moves faster than the player
since it can go diagonally. If the player has the sword, then if the creature
touches the player, it dies and the player receives a point. Otherwise,
contact is fatal to the player.
"""
def __init__(self, corner, position, character):
"""Simply registers impassables and board confinement to the superclass."""
super(DragonduckSprite, self).__init__(
corner, position, character, impassable='#', confined_to_board=True)
def update(self, actions, board, layers, backdrop, things, the_plot):
if the_plot.frame == 0: return # Do nothing on the first frame..
# Where is the player in relation to us?
player = things['P'].position
relative_locations = (self.position.row > player.row, # Player is above us.
self.position.col < player.col, # To the right.
self.position.row < player.row, # Below us.
self.position.col > player.col) # To the left.
# Move toward player! -- (North..East...West..South).
if relative_locations == (True, False, False, False):
self._north(board, the_plot)
elif relative_locations == (True, True, False, False):
self._northeast(board, the_plot)
elif relative_locations == (False, True, False, False):
self._east(board, the_plot)
elif relative_locations == (False, True, True, False):
self._southeast(board, the_plot)
elif relative_locations == (False, False, True, False):
self._south(board, the_plot)
elif relative_locations == (False, False, True, True):
self._southwest(board, the_plot)
elif relative_locations == (False, False, False, True):
self._west(board, the_plot)
elif relative_locations == (True, False, False, True):
self._northwest(board, the_plot)
# If we're on top of the player, battle! Note that we use the layers
# argument to determine whether we're on top, which keeps there from being
# battles that don't look like battles (basically, where the player and the
# monster both move to the same location, but the screen hasn't updated
# quite yet).
if layers['P'][self.position]:
# This battle causes a termination that will end the game.
the_plot.next_chapter = None
the_plot.terminate_episode()
# But who is the winner?
if the_plot.get('has_sword'):
the_plot.add_reward(1.0) # Player had the sword! Our goose is cooked!
the_plot.change_z_order(move_this='D', in_front_of_that='P')
else:
the_plot.add_reward(-1.0) # No sword. Chomp chomp chomp!
the_plot.change_z_order(move_this='P', in_front_of_that='D')
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player.
This `Sprite` mainly ties actions to the arrow keys, although it contains
some logic that uses the Plot to make sure that when we transition between
subgames (i.e. when we go from Cavern to Kansas and so forth), the player
position reflects the idea that we've only moved a single step in the
"real world".
"""
def __init__(self, corner, position, character):
"""Simply registers impassables and board confinement to the superclass."""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='@#w', confined_to_board=True)
# Like corner, but inclusive of the last row/column.
self._limits = self.Position(corner.row - 1, corner.col - 1)
def update(self, actions, board, layers, backdrop, things, the_plot):
limits = self._limits # Abbreviation.
# This large if statement probably deserves to be abbreviated with a
# protocol. Anyhow, the first four clauses handle actual agent actions.
# Note how much of the work amounts to detecting whether we are moving
# beyond the edge of the board, and if so, which game we should go to next.
if actions == 0: # go upward?
if the_plot.this_chapter == 'kansas' and self.position.row <= 0:
the_plot.next_chapter = 'castle'
the_plot.terminate_episode()
else:
self._north(board, the_plot)
elif actions == 1: # go downward?
if the_plot.this_chapter == 'castle' and self.position.row >= limits.row:
the_plot.next_chapter = 'kansas'
the_plot.terminate_episode()
else:
self._south(board, the_plot)
elif actions == 2: # go leftward?
if the_plot.this_chapter == 'cavern' and self.position.col <= 0:
the_plot.next_chapter = 'kansas'
the_plot.terminate_episode()
else:
self._west(board, the_plot)
elif actions == 3: # go rightward?
if the_plot.this_chapter == 'kansas' and self.position.col >= limits.col:
the_plot.next_chapter = 'cavern'
the_plot.terminate_episode()
else:
self._east(board, the_plot)
elif actions == 4: # just quit?
the_plot.next_chapter = None # This termination will be final.
the_plot.terminate_episode()
# This last clause of the big if statement handles the very first action in
# a game. If we are starting this game just after concluding the previous
# game in a Story, we teleport to a place that "lines up" with where we were
# in the last game, so that our motion appears to be smooth.
elif the_plot.frame == 0:
if (the_plot.prior_chapter == 'kansas' and
the_plot.this_chapter == 'castle'):
self._teleport((limits.row, the_plot['last_position'].col))
elif (the_plot.prior_chapter == 'castle' and
the_plot.this_chapter == 'kansas'):
self._teleport((0, the_plot['last_position'].col))
elif (the_plot.prior_chapter == 'kansas' and
the_plot.this_chapter == 'cavern'):
self._teleport((the_plot['last_position'].row, 0))
elif (the_plot.prior_chapter == 'cavern' and
the_plot.this_chapter == 'kansas'):
self._teleport((the_plot['last_position'].row, limits.col))
# We always save our position to support the teleporting just above.
the_plot['last_position'] = self.position
def main(argv=()):
del argv # Unused.
# Build an Ordeal game.
game = make_game()
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_UP: 0, curses.KEY_DOWN: 1,
curses.KEY_LEFT: 2, curses.KEY_RIGHT: 3,
'q': 4, -1: None}, # quit
delay=200, colour_fg=COLOURS)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/ordeal.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A game that has absolutely nothing to do with Portal.
In Aperture, your goal is to reach the cranachan (`C`). Use your Aperture
Blaster to convert special walls (dark blue) into 'apertures' (blue). You can
create up to two apertures at a time, and walking into one aperture will
transport you instantly to the other! You'll need to use you Blaster to get
around this world of platforms surrounded by deadly green ooze.
Command-line usage: `aperture.py <level>`, where `<level>` is an optional
integer argument selecting Aperture levels 0, 1, or 2.
Keys:
up, down, left, right - move.
w, a, s, d - shoot blaster up, left, down, right.
q - quit.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
from six.moves import xrange # pylint: disable=redefined-builtin
LEVELS = [
# Level 0: Entranceway.
[
'##############',
'## A ... @#',
'## ... @#',
'##@@@... @#',
'##...... @#',
'##...... @#',
'#@ ... @#',
'#@ ... @#',
'## .......##',
'## C .......##',
'##############'
],
# Level 1: Alien Containment Zone.
[
'#####################',
'##A#@###########C#@##',
'## # # # # ##',
'## # ZZ ZZ # ##',
'## ### Z Z Z ### ##',
'##.# ZZ ZZ ..##',
'##.# ZZZZZ ..##',
'##.# Z Z Z Z ..##',
'##.# Z Z Z Z # ##',
'## # Z Z Z Z # ##',
'## # # ##',
'## ............... @#',
'##@##################',
'#####################',
],
# Level 2: Turbine Room.
[
'####################',
'#########@@@########',
'##C ########',
'########## ##@######',
'#A #......... ##',
'## #..... ..... @#',
'## #..... @ ..... @#',
'## #......#......###',
'## .. ..#.. ..@##',
'## .. @##Z##@ .. ##',
'## .. ..#.. .. ##',
'##@@......#...... ##',
'####..... @ ..... ##',
'##@ ..... ..... ##',
'##@ ............. @#',
'####... .....###',
'#######@@@@@########',
'####################'
]
]
FG_COLOURS = {
'A': (999, 500, 0), # Player wears an orange jumpsuit.
'X': (200, 200, 999), # Apertures are blue.
'#': (700, 700, 700), # Normal wall, bright grey.
'@': (400, 400, 600), # Special wall, grey-blue.
'.': (100, 300, 100), # Green ooze.
'C': (999, 0, 0), # Cranachan.
' ': (200, 200, 200), # Floor.
'Z': (0, 999, 0) # Alien skin.
}
BG_COLOURS = {
'A': (200, 200, 200),
'X': (200, 200, 999),
'#': (800, 800, 800),
'@': (400, 400, 600),
'.': (100, 300, 100),
'C': (999, 800, 800),
' ': (200, 200, 200)
}
class PlayerSprite(prefab_sprites.MazeWalker):
"""The player.
Parent class handles basic movement and collision detection. The special
aperture drape handles the blaster. This class handles quitting the game and
cranachan-consumption detection.
"""
def __init__(self, corner, position, character):
super(PlayerSprite, self).__init__(
corner, position, character, impassable='#.@')
def update(self, actions, board, layers, backdrop, things, the_plot):
del backdrop # Unused.
# Handles basic movement, but not movement through apertures.
if actions == 0: # go upward?
self._north(board, the_plot)
elif actions == 1: # go downward?
self._south(board, the_plot)
elif actions == 2: # go leftward?
self._west(board, the_plot)
elif actions == 3: # go rightward?
self._east(board, the_plot)
elif actions == 9: # quit?
the_plot.terminate_episode()
# Did we walk onto exit? If so, we win!
if layers['C'][self.position]:
the_plot.add_reward(1)
the_plot.terminate_episode()
# Did we walk onto an aperture? If so, then teleport!
if layers['X'][self.position]:
destinations = [p for p in things['X'].apertures if p != self.position]
if destinations: self._teleport(destinations[0])
class ApertureDrape(plab_things.Drape):
"""Drape for all apertures.
Tracks aperture locations, creation of new apertures using blaster, and will
teleport the player if necessary.
"""
def __init__(self, curtain, character):
super(ApertureDrape, self).__init__(curtain, character)
self._apertures = [None, None]
def update(self, actions, board, layers, backdrop, things, the_plot):
ply_y, ply_x = things['A'].position
if actions == 5: # w - shoot up?
dx, dy = 0, -1
elif actions == 6: # a - shoot left?
dx, dy = -1, 0
elif actions == 7: # s - shoot down?
dx, dy = 0, 1
elif actions == 8: # d - shoot right?
dx, dy = 1, 0
else:
return
# Walk from the player along direction of blaster shot.
height, width = layers['A'].shape
for step in xrange(1, max(height, width)):
cur_x = ply_x + dx * step
cur_y = ply_y + dy * step
if cur_x < 0 or cur_x >= width or cur_y < 0 or cur_y >= height:
# Out of bounds, beam went nowhere.
break
elif layers['#'][cur_y, cur_x]:
# Hit normal wall before reaching a special wall.
break
elif layers['X'][cur_y, cur_x]:
# Hit an existing aperture.
break
if layers['@'][cur_y, cur_x]:
# Hit special wall, create an aperture.
self._apertures = self._apertures[1:] + [(cur_y, cur_x)]
self.curtain.fill(False)
for aperture in self.apertures: # note use of None-filtered set.
self.curtain[aperture] = True
break
@property
def apertures(self):
"""Returns locations of all apertures in the map."""
return tuple(a for a in self._apertures if a is not None)
def make_game(level_idx):
return ascii_art.ascii_art_to_game(
art=LEVELS[level_idx],
what_lies_beneath=' ',
sprites={'A': PlayerSprite},
drapes={'X': ApertureDrape},
update_schedule=[['A'], ['X']], # Move player, then check apertures.
z_order=['X', 'A']) # Draw player on top of aperture.
def main(argv=()):
game = make_game(int(argv[1]) if len(argv) > 1 else 0)
ui = human_ui.CursesUi(
keys_to_actions={
# Basic movement.
curses.KEY_UP: 0,
curses.KEY_DOWN: 1,
curses.KEY_LEFT: 2,
curses.KEY_RIGHT: 3,
-1: 4, # Do nothing.
# Shoot aperture gun.
'w': 5,
'a': 6,
's': 7,
'd': 8,
# Quit game.
'q': 9,
'Q': 9,
},
delay=50,
colour_fg=FG_COLOURS,
colour_bg=BG_COLOURS)
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/aperture.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A game faintly reminiscent of Catch.
Keys: left, right - move the "catcher".
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import random
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import rendering
from pycolab.prefab_parts import sprites as prefab_sprites
GAME_ART = [' b ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' P ']
# In Catch, both the ball and the player look identical.
REPAINT_MAPPING = {'b': 'X', 'P': 'X'}
# These "colours" are only for humans to see in the CursesUi.
COLOURS = {' ': (0, 0, 0), # The game board is black.
'X': (999, 999, 999)} # The sprites are white.
def make_game():
"""Builds and returns an Apprehend game."""
return ascii_art.ascii_art_to_game(
GAME_ART, what_lies_beneath=' ',
sprites={'P': PlayerSprite, 'b': BallSprite},
update_schedule=['b', 'P'])
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player.
This `Sprite` ties actions to going left and right. After every move, it
checks whether its position is the same as the ball's position. If so, the
game is won.
"""
def __init__(self, corner, position, character):
"""Simply indicates to the superclass that we can't walk off the board."""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='', confined_to_board=True)
def update(self, actions, board, layers, backdrop, things, the_plot):
del layers, backdrop # Unused.
if actions == 0: # go leftward?
self._west(board, the_plot)
elif actions == 1: # go rightward?
self._east(board, the_plot)
if self.virtual_position == things['b'].virtual_position:
the_plot.add_reward(1)
the_plot.terminate_episode()
class BallSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for the falling ball.
This `Sprite` marches linearly toward one of the positions in the bottom row
of the game board, selected at random. If it is able to go beyond this
position, the game is lost.
"""
def __init__(self, corner, position, character):
"""Inform superclass that we can go anywhere; initialise falling maths."""
super(BallSprite, self).__init__(
corner, position, character, impassable='')
# Choose one of the positions in the bottom row of the game board, and
# compute the per-row X motion (fractional) we'd need to fall there.
self._dx = random.uniform(-2.499, 2.499) / (corner[0] - 1.0)
# At each game iteration, we add _dx to this accumulator. If the accumulator
# exceeds 0.5, we move one position right; if it goes below -0.5, we move
# one position left. We then bump the accumulator by -1 and 1 respectively.
self._x_accumulator = 0.0
def update(self, actions, board, layers, backdrop, things, the_plot):
del actions, layers, backdrop, things # Unused.
# The ball is always falling downward.
self._south(board, the_plot)
self._x_accumulator += self._dx
# Sometimes the ball shifts left or right.
if self._x_accumulator < -0.5:
self._west(board, the_plot)
self._x_accumulator += 1.0
elif self._x_accumulator > 0.5:
self._east(board, the_plot)
self._x_accumulator -= 1.0
# Log the motion information for review in e.g. game consoles.
the_plot.log('Falling with horizontal velocity {}.\n'
' New location: {}.'.format(self._dx, self.virtual_position))
# If we've left the board altogether, then the game is lost.
if self.virtual_position[0] >= board.shape[0]:
the_plot.add_reward(-1)
the_plot.terminate_episode()
def main(argv=()):
del argv # Unused.
# Build an Apprehend game.
game = make_game()
# Build an ObservationCharacterRepainter that will make the player and the
# ball look identical.
repainter = rendering.ObservationCharacterRepainter(REPAINT_MAPPING)
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_LEFT: 0, curses.KEY_RIGHT: 1, -1: 2},
repainter=repainter, delay=500,
colour_fg=COLOURS)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/apprehend.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""A scrolling maze to explore. Collect all of the coins!
The scrolling mechanism used by this example is a bit old-fashioned. For a
recommended simpler, more modern approach to scrolling in games with finite
worlds, have a look at `better_scrolly_maze.py`. On the other hand, if you have
a game with an "infinite" map (for example, a maze that generates itself "on
the fly" as the agent walks through it), then a mechanism using the scrolling
protocol (as the game entities in this game do) is worth investigating.
Command-line usage: `scrolly_maze.py <level>`, where `<level>` is an optional
integer argument selecting Scrolly Maze levels 0, 1, or 2.
Keys: up, down, left, right - move. q - quit.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab.prefab_parts import drapes as prefab_drapes
from pycolab.prefab_parts import sprites as prefab_sprites
# pylint: disable=line-too-long
MAZES_ART = [
# Each maze in MAZES_ART must have exactly one of the patroller sprites
# 'a', 'b', and 'c'. I guess if you really don't want them in your maze, you
# can always put them down in an unreachable part of the map or something.
#
# Make sure that the Player will have no way to "escape" the maze.
#
# Legend:
# '#': impassable walls. 'a': patroller A.
# '@': collectable coins. 'b': patroller B.
# 'P': player starting location. 'c': patroller C.
# ' ': boring old maze floor. '+': initial board top-left corner.
#
# Don't forget to specify the initial board scrolling position with '+', and
# take care that it won't cause the board to extend beyond the maze.
# Remember also to update the MAZES_WHAT_LIES_BENEATH array whenever you add
# a new maze.
# Maze #0:
['#########################################################################################',
'# # # # # # @ @ @ @ # @ @ @ #',
'# # ##### ##### # # ##### # # ##### ############# # @ ######### #',
'# @ # # # # # # # # # @ # @ @ @ #',
'# ##### ##### ######### ################# ##### # # # #################',
'# # # @ @ # # # # # # #',
'# @ # # # @ ######### ##### # # # ######### ##### # ############# #',
'# # # # @ # @ @ # # # # # # # # # #',
'# # ############# ##### ######### # ##### ##### ##### # # #########',
'# @ # @ @ @ # # # # @ # # # a # #',
'# ##### ##### # @ # ##### # # ############# # ##################### #',
'# # @ @ # # # # # # @ @ # # # @ @ @ @ # #',
'# @ # ##### # @ # ##### ##### ######### # ##### ##### ######### #####',
'# # # # @ # # # # @ @ # # # # @ #',
'# # @ # # ######### ##### ######### ############################# ##### @ #',
'# @ # # # # # # # # # # @ # #',
'# # # # # # ################# # @ # ##### # ######### ##### # #',
'# @ # # # # # # # # # # # @ # @ #',
'######### ############# # ##### # # ##### # ######### # # ##### #',
'# # # # # # # # @ # # # # @ # @ #',
'# # ############# # ###+##### # # # ######### # # # # ##### @ #',
'# # # # b # # # # # # # @ # #',
'# ######### # ######### # # ##### # # ##### ##### # ##### # #',
'# # # @ # # P # # # # # # @ # @ #',
'# # # @ ##################################### # ##################### # # #',
'# # # @ # @ # # # # # @ #',
'# # ######### @ # # # # ################# ######### ######### #########',
'# # # # @ # @ # # # # # # #',
'# # ##### ############# ######### ##### ################# # # ##### #',
'# # # # # # # # # # # #',
'# ##### ############# ##### # ##### ##### ##### # ############# # #',
'# # # # # # # # # # #',
'##### # ######### ##### ######### ############# # ######### # #########',
'# # # @ # # # # # # # #',
'# ############# ##### # ##### # # ##### # ##### # # ##### # #',
'# # @ # @ # # # # # # # # #',
'##### # ######### ######### ######### ##################################### #',
'# # # @ # @ # @ @ # # @ @ @ @ # @ # @ @ # #',
'# ##### @ # ##### # ##### ############# ######### # # @ # # ##### #',
'# # # @ @ # @ @ # # @ # @ # # @ # @ # #',
'# # ##### ################# # # # ##### # # ################# #####',
'# # # @ @ # @ # # # # @ # # # # #',
'# ##### ######### # # # ##### ##### ######### # # ############# #',
'# # @ # # # c #',
'#########################################################################################'],
# Maze #1
['##############################',
'# #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# #',
'######### a #########',
'########## b ##########',
'# #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# #',
'+###### c #######',
'# #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# @ @ @ @ @ @ #',
'# P #',
'##############################'],
# Maze #2
[' + ',
' ################################################################################### ',
' # @ @ @ @ @ @ @ @ @ @ P # ',
' # ########################################################################### # ',
' # @ # # # ',
' # # # # ',
' # @ # ###################################################### # ',
' # # # # ',
' # @ # # ###################################################### ',
' # # # # ',
' # @ # # # ',
' # # # ###################################################### ',
' # @ # # # ',
' # # ###################################################### # ',
' # @ # # # ',
' # # # # ',
' # @ # ############################## # ',
' # # ## # # ',
' # @ # # @@@@@ ######### # # ',
' # # # @@@@@@@@@@@ # # # # ',
' # @ ########### ##@@@@@@@@@@@@@@@@@## # # # ',
' # # @ @ @ # ##@@@@@@@@@@@@@@@@@@@## # # # ',
' # @ # a # ##@@@@@@@@@@@@@@@@@@@@@## # # # ',
' # # b # ##@@@@@@@@@@@@@@@@@@@@@@@## # # # ',
' # @ # c # ##@@@@@@@@@@@@@@@@@@@@@@@## # # # ',
' # ####### # ##@@@@@@@@@@@@@@@@@@@@@## # # # ',
' # @ @ @ # ##@@@@@@@@@@@@@@@@@@@## # # ',
' ############### ##################### ######### ',
' '],
]
# pylint: enable=line-too-long
MAZES_WHAT_LIES_BENEATH = [
# What lies below '+' characters in MAZES_ART?
# Unlike the what_lies_beneath argument to ascii_art_to_game, only single
# characters are supported here for the time being.
'#', # Maze #0
'#', # Maze #1
' ', # Maze #2
]
STAR_ART = [' . . . ',
' . . . ',
' . . .',
' . . . . ',
'. . . . .',
' . . .',
' . . ',
' . . . ',
' . . . ',
' . . . . ']
# These colours are only for humans to see in the CursesUi.
COLOUR_FG = {' ': (0, 0, 0), # Inky blackness of SPAAAACE
'.': (949, 929, 999), # These stars are full of lithium
'@': (999, 862, 110), # Shimmering golden coins
'#': (764, 0, 999), # Walls of the SPACE MAZE
'P': (0, 999, 999), # This is you, the player
'a': (999, 0, 780), # Patroller A
'b': (145, 987, 341), # Patroller B
'c': (987, 623, 145)} # Patroller C
COLOUR_BG = {'.': (0, 0, 0), # Around the stars, inky blackness etc.
'@': (0, 0, 0)}
def make_game(level):
"""Builds and returns a Scrolly Maze game for the selected level."""
# A helper object that helps us with Scrolly-related setup paperwork.
scrolly_info = prefab_drapes.Scrolly.PatternInfo(
MAZES_ART[level], STAR_ART,
board_northwest_corner_mark='+',
what_lies_beneath=MAZES_WHAT_LIES_BENEATH[level])
walls_kwargs = scrolly_info.kwargs('#')
coins_kwargs = scrolly_info.kwargs('@')
player_position = scrolly_info.virtual_position('P')
patroller_a_position = scrolly_info.virtual_position('a')
patroller_b_position = scrolly_info.virtual_position('b')
patroller_c_position = scrolly_info.virtual_position('c')
return ascii_art.ascii_art_to_game(
STAR_ART, what_lies_beneath=' ',
sprites={
'P': ascii_art.Partial(PlayerSprite, player_position),
'a': ascii_art.Partial(PatrollerSprite, patroller_a_position),
'b': ascii_art.Partial(PatrollerSprite, patroller_b_position),
'c': ascii_art.Partial(PatrollerSprite, patroller_c_position)},
drapes={
'#': ascii_art.Partial(MazeDrape, **walls_kwargs),
'@': ascii_art.Partial(CashDrape, **coins_kwargs)},
# The base Backdrop class will do for a backdrop that just sits there.
# In accordance with best practices, the one egocentric MazeWalker (the
# player) is in a separate and later update group from all of the
# pycolab entities that control non-traversable characters.
update_schedule=[['#'], ['a', 'b', 'c', 'P'], ['@']],
z_order='abc@#P')
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player, the maze explorer.
This egocentric `Sprite` requires no logic beyond tying actions to
`MazeWalker` motion action helper methods, which keep the player from walking
on top of obstacles.
"""
def __init__(self, corner, position, character, virtual_position):
"""Constructor: player is egocentric and can't walk through walls."""
super(PlayerSprite, self).__init__(
corner, position, character, egocentric_scroller=True, impassable='#')
self._teleport(virtual_position)
def update(self, actions, board, layers, backdrop, things, the_plot):
del backdrop, things, layers # Unused
if actions == 0: # go upward?
self._north(board, the_plot)
elif actions == 1: # go downward?
self._south(board, the_plot)
elif actions == 2: # go leftward?
self._west(board, the_plot)
elif actions == 3: # go rightward?
self._east(board, the_plot)
elif actions == 4: # do nothing?
self._stay(board, the_plot)
class PatrollerSprite(prefab_sprites.MazeWalker):
"""Wanders back and forth horizontally, killing the player on contact."""
def __init__(self, corner, position, character, virtual_position):
"""Constructor: changes virtual position to match the argument."""
super(PatrollerSprite, self).__init__(corner, position, character, '#')
self._teleport(virtual_position)
# Choose our initial direction based on our character value.
self._moving_east = bool(ord(character) % 2)
def update(self, actions, board, layers, backdrop, things, the_plot):
del actions, layers, backdrop # Unused.
# We only move once every two game iterations.
if the_plot.frame % 2:
self._stay(board, the_plot)
return
# MazeWalker would make certain that we don't run into a wall, but only
# if the sprite and the wall are visible on the game board. So, we have to
# look after this ourselves in the general case.
pattern_row, pattern_col = things['#'].pattern_position_prescroll(
self.virtual_position, the_plot)
next_to_wall = things['#'].whole_pattern[
pattern_row, pattern_col+(1 if self._moving_east else -1)]
if next_to_wall: self._moving_east = not self._moving_east
# Make our move. If we're now in the same cell as the player, it's instant
# game over!
(self._east if self._moving_east else self._west)(board, the_plot)
if self.virtual_position == things['P'].virtual_position:
the_plot.terminate_episode()
class MazeDrape(prefab_drapes.Scrolly):
"""A scrolling `Drape` handling the maze scenery.
This `Drape` requires no logic beyond tying actions to `Scrolly` motion
action helper methods. Our job as programmers is to make certain that the
actions we use have the same meaning between all `Sprite`s and `Drape`s in
the same scrolling group (see `protocols/scrolling.py`).
"""
def update(self, actions, board, layers, backdrop, things, the_plot):
del backdrop, things, layers # Unused
if actions == 0: # is the player going upward?
self._north(the_plot)
elif actions == 1: # is the player going downward?
self._south(the_plot)
elif actions == 2: # is the player going leftward?
self._west(the_plot)
elif actions == 3: # is the player going rightward?
self._east(the_plot)
elif actions == 4: # is the player doing nothing?
self._stay(the_plot)
class CashDrape(prefab_drapes.Scrolly):
"""A scrolling `Drape` handling all of the coins.
This `Drape` ties actions to `Scrolly` motion action helper methods, and once
again we take care to map the same actions to the same methods. A little
extra logic updates the scrolling pattern for when the player touches the
coin, credits reward, and handles game termination.
"""
def update(self, actions, board, layers, backdrop, things, the_plot):
# If the player has reached a coin, credit one reward and remove the coin
# from the scrolling pattern. If the player has obtained all coins, quit!
player_pattern_position = self.pattern_position_prescroll(
things['P'].position, the_plot)
if self.whole_pattern[player_pattern_position]:
the_plot.log('Coin collected at {}!'.format(player_pattern_position))
the_plot.add_reward(100)
self.whole_pattern[player_pattern_position] = False
if not self.whole_pattern.any(): the_plot.terminate_episode()
if actions == 0: # is the player going upward?
self._north(the_plot)
elif actions == 1: # is the player going downward?
self._south(the_plot)
elif actions == 2: # is the player going leftward?
self._west(the_plot)
elif actions == 3: # is the player going rightward?
self._east(the_plot)
elif actions == 4: # is the player doing nothing?
self._stay(the_plot)
elif actions == 5: # does the player want to quit?
the_plot.terminate_episode()
def main(argv=()):
# Build a Scrolly Maze game.
game = make_game(int(argv[1]) if len(argv) > 1 else 0)
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_UP: 0, curses.KEY_DOWN: 1,
curses.KEY_LEFT: 2, curses.KEY_RIGHT: 3,
-1: 4,
'q': 5, 'Q': 5},
delay=100, colour_fg=COLOUR_FG, colour_bg=COLOUR_BG)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/scrolly_maze.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Defeat marauders from somewhere exterior to this planet.
Keys: left, right - move. space - fire. q - quit.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import numpy as np
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import rendering
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
# Not shown in this ASCII art diagram are the Sprites we use for laser blasts,
# which control the characters listed in UPWARD_BOLT_CHARS and
# DOWNWARD_BOLT_CHARS below.
GAME_ART = [' X X X X X X X X ', # Row 0
' X X X X X X X X ',
' X X X X X X X X ',
' X X X X X X X X ',
' X X X X X X X X ',
' ', # Row 5
' ',
' ',
' ',
' ',
' ', # Row 10. If a Marauder
' BBBB BBBB BBBB BBBB ', # makes it to row 10,
' BBBB BBBB BBBB BBBB ', # the game is over.
' BBBB BBBB BBBB BBBB ',
' ',
' P ']
# Characters listed in UPWARD_BOLT_CHARS are used for Sprites that represent
# laser bolts that the player shoots toward Marauders. Add more characters if
# you want to be able to have more than two of these bolts in the "air" at once.
UPWARD_BOLT_CHARS = 'abcd'
# Characters listed in DOWNWARD_BOLT_CHARS are used for Sprites that represent
# laser bolts that Marauders shoot toward the player. Add more charcters if you
# want more shooting from the Marauders.
DOWNWARD_BOLT_CHARS = 'yz'
# Shorthand for various points in the program:
_ALL_BOLT_CHARS = UPWARD_BOLT_CHARS + DOWNWARD_BOLT_CHARS
# To make life a bit easier for the player (and avoid the need for frame
# stacking), we use different characters to indicate the directions that the
# bolts go. If you'd like to make this game harder, you might try mapping both
# kinds of bolts to the same character.
LASER_REPAINT_MAPPING = dict(
[(b, '^') for b in UPWARD_BOLT_CHARS] +
[(b, '|') for b in DOWNWARD_BOLT_CHARS])
# These colours are only for humans to see in the CursesUi.
COLOURS_FG = {' ': (0, 0, 0), # Space, inky blackness of.
'X': (999, 999, 999), # The Marauders.
'B': (400, 50, 30), # The bunkers.
'P': (0, 999, 0), # The player.
'^': (0, 999, 999), # Bolts from player to aliens.
'|': (0, 999, 999)} # Bolts from aliens to player.
COLOURS_BG = {'^': (0, 0, 0), # Bolts from player to aliens.
'|': (0, 0, 0)} # Bolts from aliens to player.
def make_game():
"""Builds and returns an Extraterrestrial Marauders game."""
return ascii_art.ascii_art_to_game(
GAME_ART, what_lies_beneath=' ',
sprites=dict(
[('P', PlayerSprite)] +
[(c, UpwardLaserBoltSprite) for c in UPWARD_BOLT_CHARS] +
[(c, DownwardLaserBoltSprite) for c in DOWNWARD_BOLT_CHARS]),
drapes=dict(X=MarauderDrape,
B=BunkerDrape),
update_schedule=['P', 'B', 'X'] + list(_ALL_BOLT_CHARS))
class BunkerDrape(plab_things.Drape):
"""A `Drape` for the bunkers at the bottom of the screen.
Bunkers are gradually eroded by laser bolts, for which the user loses one
point. Other than that, they don't really do much. If a laser bolt hits a
bunker, this Drape leaves a note about it in the Plot---the bolt's Sprite
checks this and removes itself from the board if it's present.
"""
def update(self, actions, board, layers, backdrop, things, the_plot):
# Where are the laser bolts? Bolts from players or marauders do damage.
bolts = np.logical_or.reduce([layers[c] for c in _ALL_BOLT_CHARS], axis=0)
hits = bolts & self.curtain # Any hits to a bunker?
np.logical_xor(self.curtain, hits, self.curtain) # If so, erode the bunker...
the_plot.add_reward(-np.sum(hits)) # ...and impose a penalty.
# Save the identities of bunker-striking bolts in the Plot.
the_plot['bunker_hitters'] = [chr(c) for c in board[hits]]
class MarauderDrape(plab_things.Drape):
"""A `Drape` for the marauders descending downward toward the player.
The Marauders all move in lockstep, which makes them an ideal application of
a Drape. Bits of the Drape get eroded by laser bolts from the player; each
hit earns ten points. If the Drape goes completely empty, or if any Marauder
makes it down to row 10, the game terminates.
As with `BunkerDrape`, if a laser bolt hits a Marauder, this Drape leaves a
note about it in the Plot; the bolt's Sprite checks this and removes itself
from the board if present.
"""
def __init__(self, curtain, character):
# The constructor just sets the Marauder's initial horizontal direction.
super(MarauderDrape, self).__init__(curtain, character)
self._dx = -1
def update(self, actions, board, layers, backdrop, things, the_plot):
# Where are the laser bolts? Only bolts from the player kill a Marauder.
bolts = np.logical_or.reduce([layers[c] for c in UPWARD_BOLT_CHARS], axis=0)
hits = bolts & self.curtain # Any hits to Marauders?
np.logical_xor(self.curtain, hits, self.curtain) # If so, zap the marauder...
the_plot.add_reward(np.sum(hits)*10) # ...and supply a reward.
# Save the identities of marauder-striking bolts in the Plot.
the_plot['marauder_hitters'] = [chr(c) for c in board[hits]]
# If no Marauders are left, or if any are sitting on row 10, end the game.
if (not self.curtain.any()) or self.curtain[10, :].any():
return the_plot.terminate_episode() # i.e. return None.
# We move faster if there are fewer Marauders. The odd divisor causes speed
# jumps to align on the high sides of multiples of 8; so, speed increases as
# the number of Marauders decreases to 32 (or 24 etc.), not 31 (or 23 etc.).
if the_plot.frame % max(1, np.sum(self.curtain)//8.0000001): return
# If any Marauder reaches either side of the screen, reverse horizontal
# motion and advance vertically one row.
if np.any(self.curtain[:, 0] | self.curtain[:, -1]):
self._dx = -self._dx
self.curtain[:] = np.roll(self.curtain, shift=1, axis=0)
self.curtain[:] = np.roll(self.curtain, shift=self._dx, axis=1)
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player.
This `Sprite` simply ties actions to going left and right. In interactive
settings, the user can also quit.
"""
def __init__(self, corner, position, character):
"""Simply indicates to the superclass that we can't walk off the board."""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='', confined_to_board=True)
def update(self, actions, board, layers, backdrop, things, the_plot):
del layers, backdrop, things # Unused.
if actions == 0: # go leftward?
self._west(board, the_plot)
elif actions == 1: # go rightward?
self._east(board, the_plot)
elif actions == 4: # quit?
the_plot.terminate_episode()
class UpwardLaserBoltSprite(prefab_sprites.MazeWalker):
"""Laser bolts shot from the player toward Marauders."""
def __init__(self, corner, position, character):
"""Starts the Sprite in a hidden position off of the board."""
super(UpwardLaserBoltSprite, self).__init__(
corner, position, character, impassable='')
self._teleport((-1, -1))
def update(self, actions, board, layers, backdrop, things, the_plot):
if self.visible:
self._fly(board, layers, things, the_plot)
elif actions == 2:
self._fire(layers, things, the_plot)
def _fly(self, board, layers, things, the_plot):
"""Handles the behaviour of visible bolts flying toward Marauders."""
# Disappear if we've hit a Marauder or a bunker.
if (self.character in the_plot['bunker_hitters'] or
self.character in the_plot['marauder_hitters']):
return self._teleport((-1, -1))
# Otherwise, northward!
self._north(board, the_plot)
def _fire(self, layers, things, the_plot):
"""Launches a new bolt from the player."""
# We don't fire if the player fired another bolt just now.
if the_plot.get('last_player_shot') == the_plot.frame: return
the_plot['last_player_shot'] = the_plot.frame
# We start just above the player.
row, col = things['P'].position
self._teleport((row-1, col))
class DownwardLaserBoltSprite(prefab_sprites.MazeWalker):
"""Laser bolts shot from Marauders toward the player."""
def __init__(self, corner, position, character):
"""Starts the Sprite in a hidden position off of the board."""
super(DownwardLaserBoltSprite, self).__init__(
corner, position, character, impassable='')
self._teleport((-1, -1))
def update(self, actions, board, layers, backdrop, things, the_plot):
if self.visible:
self._fly(board, layers, things, the_plot)
else:
self._fire(layers, the_plot)
def _fly(self, board, layers, things, the_plot):
"""Handles the behaviour of visible bolts flying toward the player."""
# Disappear if we've hit a bunker.
if self.character in the_plot['bunker_hitters']:
return self._teleport((-1, -1))
# End the game if we've hit the player.
if self.position == things['P'].position: the_plot.terminate_episode()
self._south(board, the_plot)
def _fire(self, layers, the_plot):
"""Launches a new bolt from a random Marauder."""
# We don't fire if another Marauder fired a bolt just now.
if the_plot.get('last_marauder_shot') == the_plot.frame: return
the_plot['last_marauder_shot'] = the_plot.frame
# Which Marauder should fire the laser bolt?
col = np.random.choice(np.nonzero(layers['X'].sum(axis=0))[0])
row = np.nonzero(layers['X'][:, col])[0][-1] + 1
# Move ourselves just below that Marauder.
self._teleport((row, col))
def main(argv=()):
del argv # Unused.
# Build an Extraterrestrial Marauders game.
game = make_game()
# Build an ObservationCharacterRepainter that will make laser bolts of the
# same type all look identical.
repainter = rendering.ObservationCharacterRepainter(LASER_REPAINT_MAPPING)
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_LEFT: 0, curses.KEY_RIGHT: 1,
' ': 2, # shoot
-1: 3, # no-op
'q': 4}, # quit
repainter=repainter, delay=300,
colour_fg=COLOURS_FG, colour_bg=COLOURS_BG)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/extraterrestrial_marauders.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Get to the top to win, but watch out for the fiery shockwaves of death.
Command-line usage: `shockwave.py <level>`, where `<level>` is an optional
integer argument that is either -1 (selecting a randomly-generated map) or
0 (selecting the map hard-coded in this module).
Tip: Try hiding in the blue bunkers.
Keys: up, left, right.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import sys
import numpy as np
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
from scipy import ndimage
# Just one level for now.
LEVELS = [
['^^^^^^^^^^^^^^^',
' ',
' + +',
' == ++ == +',
' +',
'======= +',
' + +',
' + ++ ',
'+ == ',
'+ + ',
' = ',
' +++ P ++ '],
]
COLOURS = {'+': (0, 0, 999), # Blue background. Safe from fire here.
'P': (0, 999, 0), # The green player.
' ': (500, 500, 500), # Exposed areas where the player might die.
'^': (700, 700, 700), # Permanent safe zone.
'=': (999, 600, 200), # Impassable wall.
'@': (999, 0, 0)} # The fiery shockwave.
def random_level(height=12, width=12, safety_density=0.15):
"""Returns a random level."""
level = np.full((height, width), ' ', dtype='|S1')
# Add some safe areas.
level[np.random.random_sample(level.shape) < safety_density] = '+'
# Place walls on random, but not consecutive, rows. Also not on the top or
# bottom rows.
valid_rows = set(range(1, height))
while valid_rows:
row = np.random.choice(list(valid_rows))
n_walls = np.random.randint(2, width - 1 - 2)
mask = np.zeros((width,), dtype=np.bool)
mask[:n_walls] = True
np.random.shuffle(mask)
level[row, mask] = '='
valid_rows.discard(row - 1)
valid_rows.discard(row)
valid_rows.discard(row + 1)
# Add the player.
level[-1, np.random.randint(0, width - 1)] = 'P'
# Add the safe zone.
level[0] = '^'
return [row.tostring() for row in level]
class PlayerSprite(prefab_sprites.MazeWalker):
def __init__(self, corner, position, character):
super(PlayerSprite, self).__init__(
corner, position, character, impassable='=', confined_to_board=True)
def update(self, actions, board, layers, backdrop, things, the_plot):
if actions == 0: # go upward?
self._north(board, the_plot)
elif actions == 1: # go leftward?
self._west(board, the_plot)
elif actions == 2: # go rightward?
self._east(board, the_plot)
elif actions == 3: # stay put!
self._stay(board, the_plot)
class ShockwaveDrape(plab_things.Drape):
"""Drape for the shockwave."""
def __init__(self, curtain, character, width=2):
"""Initializes the `ShockwaveDrape`.
Args:
curtain: The curtain.
character: Character for this drape.
width: Integer width of the shockwave.
"""
super(ShockwaveDrape, self).__init__(curtain, character)
self._width = width
self._distance_from_impact = np.zeros(self.curtain.shape)
self._steps_since_impact = 0
def update(self, actions, board, layers, backdrop, things, the_plot):
if not self.curtain.any():
impact_point = np.unravel_index(
np.random.randint(0, self.curtain.size),
self.curtain.shape)
impact_map = np.full_like(self.curtain, True)
impact_map[impact_point] = False
self._distance_from_impact = ndimage.distance_transform_edt(impact_map)
self._steps_since_impact = 0
the_plot.log('BOOM! Shockwave initiated at {} at frame {}.'.format(
impact_point, the_plot.frame))
self.curtain[:] = (
(self._distance_from_impact > self._steps_since_impact) &
(self._distance_from_impact <= self._steps_since_impact + self._width) &
(np.logical_not(layers['=']))
)
# Check if the player is safe, dead, or has won.
player_position = things['P'].position
if layers['^'][player_position]:
the_plot.add_reward(1)
the_plot.terminate_episode()
under_fire = self.curtain[player_position]
in_danger_zone = things[' '].curtain[player_position]
if under_fire and in_danger_zone:
the_plot.add_reward(-1)
the_plot.terminate_episode()
self._steps_since_impact += 1
class MinimalDrape(plab_things.Drape):
"""A Drape that just holds a curtain and contains no game logic."""
def update(self, actions, board, layers, backdrop, things, the_plot):
del actions, board, layers, backdrop, things, the_plot # Unused.
def make_game(level):
"""Builds and returns a Shockwave game."""
if level == -1:
level_art = random_level()
else:
level_art = LEVELS[level]
return ascii_art.ascii_art_to_game(
level_art,
what_lies_beneath='+',
sprites={'P': PlayerSprite},
drapes={'@': ShockwaveDrape, ' ': MinimalDrape, '^': MinimalDrape},
update_schedule=[' ', '^', 'P', '@'],
z_order=[' ', '^', '@', 'P'],
)
def main(argv=()):
game = make_game(int(argv[1]) if len(argv) > 1 else 0)
keys_to_actions = {
curses.KEY_UP: 0,
curses.KEY_LEFT: 1,
curses.KEY_RIGHT: 2,
-1: 3,
}
ui = human_ui.CursesUi(
keys_to_actions=keys_to_actions,
delay=500, colour_fg=COLOURS)
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/shockwave.py
|
# Copyright 2018 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Position yourself to catch blocks based on a visual cue.
This game proceeds in two phases. The first phase is a "programming phase",
where the player sees each of the four visual cues (green blocks at the bottom
of the game board) paired randomly with either of two additional visual cues
(larger green blocks just above the cues, called "ball symbols"). These pairings
tell the player what actions they should take in the second phase of the game.
In the second phase of the game, the player must repeatedly move itself up or
down to position itself in front of either of two blocks: a yellow block or a
cyan block. These blocks approach the player from right to left. If the player
"catches" the correct block, it receives a point. The correct block is indicted
by the visual cue shown as the blocks begin to approach the player. If the cue
was paired with the left "ball symbol" during the programming phase, the player
should catch the yellow block; otherwise it should catch the cyan block.
Each episode of "Cued Catch" starts with a different mapping from cues to
blocks. The player must learn to remember these associations in order to play
the game successfully.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import curses
import random
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
# ASCII art for the game board. Not too representative: there is usually some
# cue showing on some part of the board.
GAME_ART = [
' ',
' P a ',
' b ',
' ',
' ',
' ',
' ',
]
if __name__ == '__main__': # Avoid defining flags when used as a library.
parser = argparse.ArgumentParser(
description='Play Cued Catch.',
epilog=(
'NOTE: Default options configure the game as the agents in the paper '
'played it. These settings may not be much fun for humans, though.'))
parser.add_argument('--initial_cue_duration', metavar='t', type=int,
default=10, help='Programming cue duration.')
parser.add_argument('--cue_duration', metavar='t', type=int, default=10,
help='Query cue duration.')
parser.add_argument('--num_trials', metavar='K', type=int, default=100,
help='Number of trials per episode.')
# This flag is for establishing a control that requires no long term memory.
parser.add_argument('--always_show_ball_symbol', action='store_true',
help='Control case: show ball symbols during trials.')
# This flag is for experiments that require noise-tolerant memory.
parser.add_argument('--reward_sigma', metavar='s', type=float, default=0.0,
help='Stddev for noise to add to ball-catch rewards.')
# This flag is for experiments that require very long term memory.
parser.add_argument('--reward_free_trials', metavar='K', type=int, default=40,
help='Provide no reward for the first K trials')
FLAGS = parser.parse_args()
# These colours are only for humans to see in the CursesUi.
COLOURS = {' ': (0, 0, 0), # Black background
'P': (999, 999, 999), # This is you, the player
'Q': (0, 999, 0), # Cue blocks
'a': (999, 999, 0), # Top ball
'b': (0, 999, 999)} # Bottom ball
def make_game(initial_cue_duration, cue_duration, num_trials,
always_show_ball_symbol=False,
reward_sigma=0.0,
reward_free_trials=0):
return ascii_art.ascii_art_to_game(
art=GAME_ART,
what_lies_beneath=' ',
sprites={'P': ascii_art.Partial(
PlayerSprite,
reward_sigma=reward_sigma,
reward_free_trials=reward_free_trials),
'a': BallSprite,
'b': BallSprite},
drapes={'Q': ascii_art.Partial(
CueDrape,
initial_cue_duration, cue_duration, num_trials,
always_show_ball_symbol)},
update_schedule=['P', 'a', 'b', 'Q'])
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player, the catcher."""
def __init__(self, corner, position, character,
reward_sigma=0.0, reward_free_trials=0):
"""Initialise a PlayerSprite.
Args:
corner: standard `Sprite` constructor parameter.
position: standard `Sprite` constructor parameter.
character: standard `Sprite` constructor parameter.
reward_sigma: standard deviation of reward for catching the ball (or
not). A value of 0.0 means rewards with no noise.
reward_free_trials: number of trials before any reward can be earned.
"""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='', confined_to_board=True)
self._reward_sigma = reward_sigma
self._trials_till_reward = reward_free_trials
def update(self, actions, board, layers, backdrop, things, the_plot):
# Our motions are quite constrained: we can only move up or down one spot.
if actions == 1 and self.virtual_position.row > 1: # go up?
self._north(board, the_plot)
elif actions == 2 and self.virtual_position.row < 2: # go down?
self._south(board, the_plot)
elif actions in [0, 4]: # quit the game?
the_plot.terminate_episode()
else: # do nothing?
self._stay(board, the_plot) # (or can't move?)
# Give ourselves a point if we landed on the correct ball.
correct_ball = 'a' if the_plot.get('which_ball') == 'top' else 'b'
if self._reward_sigma:
if (self.position.col == things[correct_ball].position.col and
self._trials_till_reward <= 0):
the_plot.add_reward(
float(self.position == things[correct_ball].position) +
random.normalvariate(mu=0, sigma=self._reward_sigma))
else:
the_plot.add_reward(0)
else:
the_plot.add_reward(int(
self.position == things[correct_ball].position and
self._trials_till_reward <= 0
))
# Decrement trials left till reward.
if (self.position.col == things[correct_ball].position.col and
self._trials_till_reward > 0):
self._trials_till_reward -= 1
class BallSprite(plab_things.Sprite):
"""A `Sprite` for the balls approaching the player."""
def __init__(self, corner, position, character):
"""Mark ourselves as invisible at first."""
super(BallSprite, self).__init__(corner, position, character)
# Save start position.
self._start_position = position
# But mark ourselves invisible for now.
self._visible = False
def update(self, actions, board, layers, backdrop, things, the_plot):
# Wait patiently until the initial programming cues have been shown.
if not the_plot.get('programming_complete'): return
# Cues are shown; we are visible now.
self._visible = True
# If we're to the left of the player, reposition ourselves back at the start
# position and tell the cue drape to pick a new correct ball.
if self.position.col < things['P'].position.col:
self._position = self._start_position
the_plot['last_ball_reset'] = the_plot.frame
else:
self._position = self.Position(self.position.row, self.position.col - 1)
class CueDrape(plab_things.Drape):
""""Programs" the player, then chooses correct balls and shows cues.
The cue drape goes through two phases.
In the first phase, it presents each of the four cues serially along with a
symbol that indicates whether the top ball or the bottom ball is the correct
choice for that cue. (The symbol does not resemble one of the balls.) During
this phase, no balls appear. Agent actions can move the player but accomplish
nothing else. Each associational cue presentation lasts for a number of
timesteps controlled by the `initial_cue_duration` constructor argument.
Once all four cues have been shown in this way, the second phase presents a
sequence of `num_trials` fixed-length trials. In each trial, one of the four
cues is shown for `cue_duration` timesteps, and the two balls advance toward
the player from the right-hand side of the screen. The agent must position the
player to "catch" the ball that matches the cue shown at the beginning of the
trial.
The two phases can also be visually distinguished by the presence of some
additional markers on the board.
"""
_NUM_CUES = 4 # Must divide 12 evenly and be divisible by 2. So, 2, 4, 6, 12.
def __init__(self, curtain, character,
initial_cue_duration,
cue_duration,
num_trials,
always_show_ball_symbol):
super(CueDrape, self).__init__(curtain, character)
self._initial_cue_duration = initial_cue_duration
self._cue_duration = cue_duration
self._num_trials_left = num_trials
self._always_show_ball_symbol = always_show_ball_symbol
# Assign balls to each of the cues.
self._cues_to_balls = random.sample(
['top'] * (self._NUM_CUES // 2) + ['bottom'] * (self._NUM_CUES // 2),
self._NUM_CUES)
self._phase = 'first'
# State for first phase.
self._first_phase_tick = self._NUM_CUES * self._initial_cue_duration
# State for second phase, initialised to bogus values.
self._second_phase_cue_choice = -1
self._second_phase_tick = -1
self._second_phase_last_reset = -float('inf')
def update(self, actions, board, layers, backdrop, things, the_plot):
# Show the agent which phase we're in.
self._show_phase_cue(self._phase)
# Do phase-specific update.
if self._phase == 'first':
self._do_first_phase(the_plot)
elif self._phase == 'second':
self._do_second_phase(the_plot)
## Phase-specific updates.
def _do_first_phase(self, the_plot):
# Iterate through showing each of the cues.
self._first_phase_tick -= 1 # Decrement number of steps left in this phase.
cue = self._first_phase_tick // self._initial_cue_duration
self._show_ball_symbol(self._cues_to_balls[cue])
self._show_cue(cue)
# End of phase? Move on to the next phase.
if self._first_phase_tick <= 0:
self._phase = 'second'
the_plot['programming_complete'] = True
self._second_phase_reset(the_plot)
def _do_second_phase(self, the_plot):
self._show_ball_symbol('neither') # Clear ball symbol.
# Reset ourselves if the balls have moved beyond the player.
if the_plot.get('last_ball_reset') > self._second_phase_last_reset:
self._second_phase_reset(the_plot)
# Show the cue if it's still visible in this trial.
if self._second_phase_tick > 0:
self._show_cue(self._second_phase_cue_choice)
if self._always_show_ball_symbol: self._show_ball_symbol(
self._cues_to_balls[self._second_phase_cue_choice])
else:
self._show_cue(None)
self._show_ball_symbol(None)
# Countdown second phase clock.
self._second_phase_tick -= 1
def _second_phase_reset(self, the_plot):
self._second_phase_cue_choice = random.randrange(self._NUM_CUES)
the_plot['which_ball'] = self._cues_to_balls[self._second_phase_cue_choice]
self._second_phase_tick = self._cue_duration
self._second_phase_last_reset = the_plot.frame
# Terminate if we've run out of trials.
if self._num_trials_left <= 0: the_plot.terminate_episode()
self._num_trials_left -= 1
## Display helpers
def _show_phase_cue(self, phase):
self.curtain[1:3, :] = False
if phase == 'first':
self.curtain[1:3, 0:2] = True
self.curtain[1:3, -2:] = True
# No cue for the second phase.
def _show_ball_symbol(self, ball):
self.curtain[3:5, :] = False
if ball == 'top':
self.curtain[3:5, 0:6] = True
elif ball == 'bottom':
self.curtain[3:5, -6:] = True
def _show_cue(self, cue=None):
self.curtain[-2:, :] = False
if 0 <= cue < self._NUM_CUES:
width = self.curtain.shape[1] // self._NUM_CUES
l = cue * width
r = l + width
self.curtain[-2:, l:r] = True
def main(argv):
del argv # Unused.
# Build a cued_catch game.
game = make_game(FLAGS.initial_cue_duration,
FLAGS.cue_duration, FLAGS.num_trials,
FLAGS.always_show_ball_symbol,
FLAGS.reward_sigma,
FLAGS.reward_free_trials)
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_UP: 1, curses.KEY_DOWN: 2,
-1: 3,
'q': 4, 'Q': 4},
delay=200, colour_fg=COLOURS)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/research/lp-rnn/cued_catch.py
|
# Copyright 2018 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The agent must remember a sequence of lights.
This task is reminiscent of electronic toy memory games from the '70s and '80s.
The player starts out immobilised at the centre of the screen while a sequence
of coloured lights flashes on the four surrounding "pads". After the sequence
ends, the agent is free to move. It must visit the pads in the same order as the
sequence it was just shown, as quickly as possible. If the same pad flashes
twice in a row, then the agent must enter, exit, and re-enter the pad in order
to replicate the sequence.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import curses
import random
import sys
import enum
import numpy as np
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import rendering
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
if __name__ == '__main__': # Avoid defining flags when used as a library.
parser = argparse.ArgumentParser(
description='Play Sequence Recall.',
epilog=(
'NOTE: Default options configure the game as the agents in the paper '
'played it. These settings may not be much fun for humans, though.'))
parser.add_argument(
'--sequence_length', metavar='K', type=int, default=4,
help='Length of the light sequence the player must learn.')
parser.add_argument(
'--demo_light_on_frames', metavar='t', type=int, default=60,
help='Lights during the "demo" stay on for t frames.')
parser.add_argument(
'--demo_light_off_frames', metavar='t', type=int, default=30,
help='Lights during the "demo" stay off for t frames.')
parser.add_argument(
'--pause_frames', metavar='t', type=int, default=1,
help='Agent is held t frames after the demo before moving.')
parser.add_argument(
'--timeout_frames', metavar='t', type=int, default=1000,
help='Frames before game times out (-1 for infinity).')
FLAGS = parser.parse_args()
GAME_ART = [
'#####################',
'# 222 #',
'# 2222222 #',
'# 2222222 #',
'# 2222222 #',
'# 222 #',
'# 111 333 #',
'#1111111 %%% 3333333#',
'#1111111 %P% 3333333#',
'#1111111 %%% 3333333#',
'# 111 333 #',
'# 444 #',
'# 4444444 #',
'# 4444444 #',
'# 4444444 #',
'# 444 #',
'#####################',
]
# Repaints the WaitForSeekDrape to look identical to the maze walls.
REPAINT_MAPPING = {
'%': '#',
}
# These colours are only for humans to see in the CursesUi.
COLOURS = {' ': (0, 0, 0), # Black background
'#': (764, 0, 999), # Board walls
'1': (0, 999, 0), # Green light
'2': (999, 0, 0), # Red light
'3': (0, 0, 999), # Blue light
'4': (999, 999, 0), # Yellow light
'M': (300, 300, 300), # Mask drape (for turning a light "off")
'P': (0, 999, 999)} # Player
class _State(enum.Enum):
"""States for the game's internal state machine.
In the game, states are placed in tuples with arguments like duration, etc.
"""
# All lights off for some duration. Agent is frozen.
OFF = 0
# Specified light on for some duration. Agent is frozen.
ON = 1
# Agent is free to move. If they enter a specified light, they get a point. If
# they enter any other light, they lose a point.
SEEK = 2
# Agent is free to move and is currently in one of the lights. This state is
# basically the game waiting for the agent to leave the light.
EXIT = 3
# Game over!
QUIT = 4
def make_game(sequence_length=4,
demo_light_on_frames=60,
demo_light_off_frames=30,
pause_frames=30,
timeout_frames=-1):
"""Builds and returns a sequence_recall game."""
# Sample a game-controlling state machine program.
program = _make_program(sequence_length,
demo_light_on_frames, demo_light_off_frames,
pause_frames)
# Build the game engine.
engine = ascii_art.ascii_art_to_game(
GAME_ART, what_lies_beneath=' ',
sprites={'P': PlayerSprite},
drapes={'M': MaskDrape,
'%': WaitForSeekDrape},
update_schedule=['P', 'M', '%'],
z_order='MP%')
# Save the program and other global state in the game's Plot object.
engine.the_plot['program'] = program
engine.the_plot['frames_in_state'] = 0 # How long in the current state?
engine.the_plot['timeout_frames'] = ( # Frames left until the game times out.
float('inf') if timeout_frames < 0 else timeout_frames)
return engine
def _make_program(sequence_length,
demo_light_on_frames, demo_light_off_frames,
pause_frames):
"""Sample a game-controlling state machine program."""
# Select the sequence of lights that we'll illuminate.
sequence = [random.choice('1234') for _ in range(sequence_length)]
# Now create the state machine program that will control the game.
program = []
# Phase 1. Present the sequence.
for g in sequence:
program.extend([
(_State.OFF, demo_light_off_frames), # All lights off.
(_State.ON, demo_light_on_frames, g), # Turn on light g
])
# Phase 2. Detain the agent for a little while.
program.append(
(_State.OFF, max(1, pause_frames)), # At least 1 to turn off the light.
)
# Phase 3. The agent tries to replicate the sequence.
for g in sequence:
program.extend([
(_State.SEEK, g), # Agent should try to enter light g.
(_State.EXIT,), # Agent must leave whatever light it's in.
])
# Phase 4. Quit the game.
program[-1] = (_State.QUIT,) # Replace final EXIT with a QUIT.
return program
class MaskDrape(plab_things.Drape):
"""A `Drape` for the mask that obscures the game's lights.
Also controls the state machine and performs score keeping.
"""
def __init__(self, curtain, character):
super(MaskDrape, self).__init__(curtain, character)
# Both of the following to be filled by self._set_up_masks.
# What the contents of the curtain should be when all lights are off.
self._all_off_mask = None
# Which parts of the curtain cover which light.
self._mask_for_light = {g: None for g in '1234'}
def _set_up_masks(self, backdrop):
self._all_off_mask = np.zeros_like(backdrop.curtain, dtype=np.bool)
for g in '1234':
mask = (backdrop.curtain == backdrop.palette[g])
self._mask_for_light[g] = mask
self._all_off_mask |= mask
def update(self, actions, board, layers, backdrop, things, the_plot):
# One-time: set up our mask data.
if self._all_off_mask is None: self._set_up_masks(backdrop)
state = the_plot['program'][0][0] # Get current game state.
args = the_plot['program'][0][1:] # Get all arguments for the state.
# Get player position---it's often useful.
pos = things['P'].position
# Increment the number of frames we will have been in this state at the end
# of this game step.
the_plot['frames_in_state'] += 1
frames_in_state = the_plot['frames_in_state'] # Abbreviated
# Behave as dictated by the state machine.
if state == _State.QUIT:
if frames_in_state == 1: # If we just entered the QUIT state,
the_plot['timeout_frames'] = 1 # direct the game to time out.
elif state == _State.OFF:
if frames_in_state == 1: # If we just entered the OFF state,
self.curtain[:] |= self._all_off_mask # turn out all the lights.
elif frames_in_state >= args[0]: # If we've been here long enough,
the_plot['program'].pop(0) # move on to the next state.
the_plot['frames_in_state'] = 0
elif state == _State.ON: # If we just entered the ON state,
if frames_in_state == 1: # turn on the specified light.
self.curtain[:] -= self._mask_for_light[args[1]]
elif frames_in_state >= args[0]: # If we've been here long enough,
the_plot['program'].pop(0) # move on to the next state.
the_plot['frames_in_state'] = 0
elif state == _State.SEEK: # In the SEEK state, wait for the
agent_above = chr(backdrop.curtain[pos]) # agent to enter a light.
if agent_above != ' ': # Entry!
self.curtain[:] -= self._mask_for_light[agent_above] # Light goes on.
the_plot.add_reward( # Was it the right light?
1.0 if agent_above == args[0] # Yes, reward for you!
else 0.0) # No. You get nothing.
the_plot['program'].pop(0) # On to the next state.
the_plot['frames_in_state'] = 0
elif state == _State.EXIT: # In the EXIT state, wait for the
agent_above = chr(backdrop.curtain[pos]) # agent to exit a light.
if agent_above == ' ': # Exit!
self.curtain[:] |= self._all_off_mask # All lights go out.
the_plot['program'].pop(0) # On to the next state.
the_plot['frames_in_state'] = 0
class WaitForSeekDrape(plab_things.Drape):
"""A `Drape` that disappears when the game first enters a SEEK state."""
def update(self, actions, board, layers, backdrop, things, the_plot):
if (the_plot['frames_in_state'] == 1 and
the_plot['program'][0][0] == _State.SEEK and
self.curtain.any()): self.curtain[:] = False
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player.
This `Sprite` ties actions to going in the four cardinal directions. In
interactive settings, the user can also quit. `PlayerSprite` also administers
a small penalty at every timestep to motivate the agent to act quickly.
Finally, `PlayerSprite` handles episode timeout and all termination.
"""
def __init__(self, corner, position, character):
"""Tells superclass we can't walk off the board or through walls."""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='#', confined_to_board=True)
def update(self, actions, board, layers, backdrop, things, the_plot):
del layers, backdrop, things # Unused.
state = the_plot['program'][0][0] # Get current game state.
if actions in [0, 6]:
# Humans can quit the game at any time.
the_plot['timeout_frames'] = 1
elif state in (_State.SEEK, _State.EXIT):
# But no agent is allowed to move unless the game state permits it.
if actions == 1: # go upward?
self._north(board, the_plot)
elif actions == 2: # go downward?
self._south(board, the_plot)
elif actions == 3: # go leftward?
self._west(board, the_plot)
elif actions == 4: # go rightward?
self._east(board, the_plot)
elif actions == 5: # do nothing?
self._stay(board, the_plot)
# Quit the game if timeout occurs.
if the_plot['timeout_frames'] <= 0:
the_plot.terminate_episode()
else:
# Otherwise, add a slight penalty for all episode frames (except the
# first) to encourage the agent to act efficiently.
if the_plot.frame > 1: the_plot.add_reward(-0.005)
the_plot['timeout_frames'] -= 1
def main(argv):
del argv # Unused.
# Build a sequence_recall game.
game = make_game(FLAGS.sequence_length,
FLAGS.demo_light_on_frames,
FLAGS.demo_light_off_frames,
FLAGS.pause_frames,
FLAGS.timeout_frames)
# Build an ObservationCharacterRepainter that will turn the light numbers into
# actual colours.
repainter = rendering.ObservationCharacterRepainter(REPAINT_MAPPING)
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_UP: 1, curses.KEY_DOWN: 2,
curses.KEY_LEFT: 3, curses.KEY_RIGHT: 4,
-1: 5,
'q': 6, 'Q': 6},
delay=100, repainter=repainter, colour_fg=COLOURS)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/research/lp-rnn/sequence_recall.py
|
# Copyright 2018 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""T-mazes of varying difficulty.
In this variation of the classic T-maze task, the agent starts in a small
chamber. A cue displays indicating which arm of the T maze to go down. Soon
(configurable), a blue "teleporter" appears. As soon as the agent traverses the
teleporter, the cue disappears, and the agent is transported into a "limbo" cell
where it is completely immobilised for a time. Before long (configurable), the
agent is transported again to the T-maze itself and must go down the arm cued at
the start of the episode.
The `--difficulty` flag selects between six different T-mazes which differ only
in size. A larger maze presumably will require better exploration for the agent
to solve.
NOTE: This game achieves egocentric scrolling via pycolab's "scrolly"
infrastructure. The newer "cropping" method is a much easier way to make games
with scrolling. Please refer to `examples/better_scrolly_maze.py` for a better
example of cropping at work.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import curses
import random
import sys
import numpy as np
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import rendering
from pycolab import things as plab_things
from pycolab.prefab_parts import drapes as prefab_drapes
from pycolab.prefab_parts import sprites as prefab_sprites
if __name__ == '__main__': # Avoid defining flags when used as a library.
parser = argparse.ArgumentParser(
description='Play T-maze.', epilog=(
'NOTE: Default options configure the game as the agents in the paper '
'played it. These settings may not be much fun for humans, though.'))
parser.add_argument('--difficulty', metavar='d', type=int, default=4,
help='Difficulty setting. Higher=harder.')
parser.add_argument('--cue_after_teleport', action='store_true',
help='Show cue after teleport.')
parser.add_argument('--timeout_frames', metavar='t', type=int, default=1000,
help='Frames before game times out (-1 for infinity).')
parser.add_argument('--teleport_delay', metavar='t', type=int, default=50,
help='Frames before teleporter "opens".')
parser.add_argument('--limbo_time', metavar='t', type=int, default=280,
help='Time in limbo while teleporting.')
FLAGS = parser.parse_args()
# pylint: disable=line-too-long,bad-continuation
MAZE_ART = [
# | 0 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 110 | 120 | 130 | 140 | 150 | 160 | 170 | 180 | 190
' ', # 0
' ## # ## ',
' ## # ## ',
' + ##### ### ',
' #ttt# ##### ##### ', # 4
' # # ### ',
' # P # ## # ## ',
' ##### ## # ## ', # 7
' ',
' ',
'***********************************************************************************************************************************************************************************************', # 10
'***********************************************************************************************************************************************************************************************',
'************************************************************************************#####################**************************************************************************************',
'************************************************************************************# #**************************************************************************************',
'************************************************************************************# #**************************************************************************************',
'************************************************************************************# ############# #**************************************************************************************', # 15
'************************************************************************************# #***********# #**************************************************************************************',
'************************************************************************************# #***********# #**************************************************************************************',
'************************************************************************************#lll#***********#rrr#**************************************************************************************',
'************************************************************************************#####***********#####**************************************************************************************',
'***********************************************************************************************************************************************************************************************', # 20
'***********************************************************************************************************************************************************************************************',
'***********************************************************************************************************************************************************************************************',
'*******************************************************************************###############################*********************************************************************************',
'*******************************************************************************# #*********************************************************************************',
'*******************************************************************************# #*********************************************************************************', # 25
'*******************************************************************************# ####################### #*********************************************************************************',
'*******************************************************************************# #*********************# #*********************************************************************************',
'*******************************************************************************# #*********************# #*********************************************************************************',
'*******************************************************************************#lll#*********************#rrr#*********************************************************************************',
'*******************************************************************************#####*********************#####*********************************************************************************', # 30
'***********************************************************************************************************************************************************************************************',
'***********************************************************************************************************************************************************************************************',
'***********************************************************************************************************************************************************************************************',
'************************************************************************#############################################**************************************************************************',
'************************************************************************# #**************************************************************************', # 35
'************************************************************************# #**************************************************************************',
'************************************************************************# ##################################### #**************************************************************************',
'************************************************************************# #***********************************# #**************************************************************************',
'************************************************************************# #***********************************# #**************************************************************************',
'************************************************************************#lll#***********************************#rrr#**************************************************************************', # 40
'************************************************************************#####***********************************#####**************************************************************************',
'***********************************************************************************************************************************************************************************************',
'***********************************************************************************************************************************************************************************************',
'***********************************************************************************************************************************************************************************************',
'***********************************************************#######################################################################*************************************************************', # 45
'***********************************************************# #*************************************************************',
'***********************************************************# #*************************************************************',
'***********************************************************# ############################################################### #*************************************************************',
'***********************************************************# #*************************************************************# #*************************************************************',
'***********************************************************# #*************************************************************# #*************************************************************', # 50
'***********************************************************#lll#*************************************************************#rrr#*************************************************************',
'***********************************************************#####*************************************************************#####*************************************************************',
'***********************************************************************************************************************************************************************************************',
'***********************************************************************************************************************************************************************************************',
'***********************************************************************************************************************************************************************************************', # 55
'***************************************#################################################################################################################***************************************',
'***************************************# #***************************************',
'***************************************# #***************************************',
'***************************************# ######################################################################################################### #***************************************',
'***************************************# #*******************************************************************************************************# #***************************************', # 60
'***************************************# #*******************************************************************************************************# #***************************************',
'***************************************#lll#*******************************************************************************************************#rrr#***************************************',
'***************************************#####*******************************************************************************************************#####***************************************',
'***********************************************************************************************************************************************************************************************',
'***********************************************************************************************************************************************************************************************', # 65
'***********************************************************************************************************************************************************************************************',
'***#########################################################################################################################################################################################***',
'***# #***',
'***# #***',
'***# ################################################################################################################################################################################# #***', # 70
'***# #*******************************************************************************************************************************************************************************# #***',
'***# #*******************************************************************************************************************************************************************************# #***',
'***#lll#*******************************************************************************************************************************************************************************#rrr#***',
'***#####*******************************************************************************************************************************************************************************#####***',
'***********************************************************************************************************************************************************************************************', # 75
'***********************************************************************************************************************************************************************************************',
]
# pylint: enable=line-too-long,bad-continuation
# These are big blocks that cue the player which direction to move in the maze.
CUE_ART = [
' ',
' ',
' ',
' ',
'QQ QQ',
'QQ QQ',
'QQ QQ',
]
# The initial teleporter and all goals look the same. Also, the "dirt" and the
# maze walls look the same.
REPAINT_MAPPING = {'t': '~', 'l': '~', 'r': '~', '*': '#'}
# These colours are only for humans to see in the CursesUi.
COLOURS = {' ': (0, 0, 0), # Black background
'#': (764, 0, 999), # Maze walls
'P': (0, 999, 999), # This is you, the player
'Q': (0, 999, 0), # Cue blocks
'~': (0, 0, 999)} # Teleporter and goals
def make_game(level, cue_after_teleport,
timeout_frames=-1,
teleport_delay=0,
limbo_time=10):
"""Builds and returns a T-maze for the selected level."""
# A helper object that helps us with Scrolly-related setup paperwork.
scrolly_info = prefab_drapes.Scrolly.PatternInfo(
MAZE_ART, CUE_ART,
board_northwest_corner_mark='+', what_lies_beneath=' ')
walls_kwargs = scrolly_info.kwargs('#')
speckle_kwargs = scrolly_info.kwargs('*')
teleporter_kwargs = scrolly_info.kwargs('t')
left_kwargs = scrolly_info.kwargs('l')
right_kwargs = scrolly_info.kwargs('r')
player_position = scrolly_info.virtual_position('P')
engine = ascii_art.ascii_art_to_game(
CUE_ART, what_lies_beneath=' ',
sprites={
'P': ascii_art.Partial(PlayerSprite, player_position)},
drapes={
'Q': ascii_art.Partial(CueDrape, cue_after_teleport),
'#': ascii_art.Partial(MazeDrape, **walls_kwargs),
'*': ascii_art.Partial(SpeckleDrape, **speckle_kwargs),
't': ascii_art.Partial(TeleporterDrape,
level, teleport_delay, limbo_time,
**teleporter_kwargs),
'l': ascii_art.Partial(GoalDrape, 'left', **left_kwargs),
'r': ascii_art.Partial(GoalDrape, 'right', **right_kwargs)},
update_schedule=[['Q', '#', '*'], ['P'], ['l', 't', 'r']],
z_order='*#ltrQP')
# Store timeout frames in the Plot so all sprites and drapes can access it.
engine.the_plot['timeout_frames'] = (
float('inf') if timeout_frames < 0 else timeout_frames)
return engine
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player, the maze explorer."""
def __init__(self, corner, position, character, virtual_position):
"""Constructor: player is egocentric and can't walk through walls."""
super(PlayerSprite, self).__init__(
corner, position, character, egocentric_scroller=True, impassable='#')
self._teleport(virtual_position)
def update(self, actions, board, layers, backdrop, things, the_plot):
del backdrop, things, layers # Unused
if 0 <= the_plot.frame - the_plot.get('teleportation_order_frame', -1) <= 1:
self._stay(board, the_plot) # See PseudoTeleportingScrolly docstring.
elif actions == 1: # go upward?
self._north(board, the_plot)
elif actions == 2: # go downward?
self._south(board, the_plot)
elif actions == 3: # go leftward?
self._west(board, the_plot)
elif actions == 4: # go rightward?
self._east(board, the_plot)
elif actions == 5: # do nothing?
self._stay(board, the_plot)
elif actions in [0, 6]: # quit the game?
the_plot['timeout_frames'] = the_plot.frame + 1
class CueDrape(plab_things.Drape):
"""Cues the player to seek the left or right goal.
Also responsible for choosing which goal the player should seek in the first
place. This choice is noted in the `which_goal` attribute of this Object.
Also imposes a very slight penalty for simply existing.
"""
def __init__(self, curtain, character, cue_after_teleport):
super(CueDrape, self).__init__(curtain, character)
# Choose the goal direction and blank out half the cue to indicate which
# direction the player should go.
self.which_goal = 'left' if random.random() < 0.5 else 'right'
if self.which_goal == 'left':
self.curtain[:, 6:] = False
else:
self.curtain[:, :6] = False
# Mark whether we should disappear after the player teleports.
self._cue_after_teleport = cue_after_teleport
def update(self, actions, board, layers, backdrop, things, the_plot):
# Just clears the cue after teleport, if desired.
if not self._cue_after_teleport and the_plot.get('yo_we_have_teleported'):
del the_plot['yo_we_have_teleported']
self.curtain[:] = False
# If it's time to time out, end the episode. Otherwise, incur a penalty for
# doing nothing. But never award a score on the first or last frame, since
# FlowEnvironment is buggy and can't handle it (at least not on the first).
if the_plot.frame >= the_plot['timeout_frames']:
the_plot.terminate_episode()
elif the_plot.frame > 1:
the_plot.add_reward(-0.001)
class PseudoTeleportingScrolly(prefab_drapes.Scrolly):
"""A scrolling `Drape` that pretends to support teleportation.
So `prefab_drapes.Scrolly` does NOT like motions whose dx and dy are greater
in magnitude than 1. Well, if you can't teleport within the scenery, we can at
least pretend to do this by moving the entire scenery! Because `Scrolly`s can
do whatever they please to their whole pattern. Sure, the `Scrolly` superclass
tends to assume that the pattern is static, but we won't move the scenery
around in a way that gets us into trouble. For best results, this means that
the same motion constraints (i.e. walls in the way) should be present for all
egocentric sprites both before and after the teleport.
This superclass effectively establishes a protocol for teleportation. All
subclasses should call its `update` before doing their own updates: if a
"teleportation order" is found in the Plot, the method will `np.roll` the
scenery to obey the order. None of the fancy safety checking stuff that comes
along with the scrolling protocol is here. No sprites are moved to compensate
for the motion. Also, take care not to scroll the scenery in a way that gives
a `MazeWalker` a way to wander off of the screen...
Any subclass can put in a teleportation order (to be obeyed in the next game
iteration) via the `place_teleportation_order` method.
All MazeWalker sprites and Scrolly drapes are advised to execute `_stay`
commands during the frame specified in `the_plot['teleportation_order_frame']`
and the frame immediately after. Otherwise you may walk through walls.
Sorry about that.
"""
def update(self, actions, board, layers, backdrop, things, the_plot):
# Is there a teleportation order for this frame?
if the_plot.get('teleportation_order_frame', -1) != the_plot.frame: return
row_shift, col_shift = the_plot['teleportation_order']
self.whole_pattern[:] = np.roll(self.whole_pattern, -row_shift, axis=0)
self.whole_pattern[:] = np.roll(self.whole_pattern, -col_shift, axis=1)
def place_teleportation_order(self, the_plot, row_shift, col_shift):
"""Order a teleportation to take place on the next game iteration.
Args:
the_plot: the game's `Plot` object.
row_shift: number of rows to shift the scenery upward. Can be negative.
col_shift: number of columns to shift the scenery left. Can be negative.
"""
the_plot['teleportation_order_frame'] = the_plot.frame + 1
the_plot['teleportation_order'] = (row_shift, col_shift)
class MazeDrape(PseudoTeleportingScrolly):
"""A scrolling `Drape` handling the maze scenery."""
def __init__(self, *args, **kwargs):
"""Just eliminates the scroll margins."""
super(MazeDrape, self).__init__(*args, scroll_margins=None, **kwargs)
def update(self, actions, board, layers, backdrop, things, the_plot):
super(MazeDrape, self).update(
actions, board, layers, backdrop, things, the_plot)
if 0 <= the_plot.frame - the_plot.get('teleportation_order_frame', -1) <= 1:
self._stay(the_plot) # See note in PseudoTeleportingScrolly docstring.
elif actions == 1: # is the player going upward?
self._north(the_plot)
elif actions == 2: # is the player going downward?
self._south(the_plot)
elif actions == 3: # is the player going leftward?
self._west(the_plot)
elif actions == 4: # is the player going rightward?
self._east(the_plot)
elif actions == 5: # is the player doing nothing?
self._stay(the_plot)
class SpeckleDrape(PseudoTeleportingScrolly):
"""More scenery: this is just background with a nice speckle pattern."""
def __init__(self, *args, **kwargs):
"""Just speckles the background scenery and eliminates scroll margins."""
super(SpeckleDrape, self).__init__(*args, scroll_margins=None, **kwargs)
self.whole_pattern[np.random.rand(*self.whole_pattern.shape) < 0.4] = False
def update(self, actions, board, layers, backdrop, things, the_plot):
super(SpeckleDrape, self).update(
actions, board, layers, backdrop, things, the_plot)
if 0 <= the_plot.frame - the_plot.get('teleportation_order_frame', -1) <= 1:
self._stay(the_plot) # See note in PseudoTeleportingScrolly docstring.
elif actions == 1: # is the player going upward?
self._north(the_plot)
elif actions == 2: # is the player going downward?
self._south(the_plot)
elif actions == 3: # is the player going leftward?
self._west(the_plot)
elif actions == 4: # is the player going rightward?
self._east(the_plot)
elif actions == 5: # is the player doing nothing?
self._stay(the_plot)
class TeleporterDrape(PseudoTeleportingScrolly):
"""A scrolling `Drape` handling the teleporter."""
def __init__(self, curtain, character, level, teleport_delay, limbo_time,
*args, **kwargs):
"""The `level` arg determines which maze we warp to."""
super(TeleporterDrape, self).__init__(
curtain, character, *args, scroll_margins=None, **kwargs)
# If there is a delay before the teleporter is available, we save the
# curtain supplied to the constructor (containing the visible teleporter)
# and replace it with an empty curtain.
self._teleport_delay = teleport_delay
if self._teleport_delay > 0:
self._saved_whole_pattern = self.whole_pattern.copy()
self.whole_pattern[:] = False
# Save the number of frames we have left in "limbo" whilst teleporting.
self._limbo_countdown = limbo_time
# Are we in limbo right now?
self._in_limbo = False
# The row and column containing the "limbo" cell.
self._limbo_row = 4
self._limbo_col = 140
# The distance from the column of the limbo cell to the centre of any
# of the goal selection hallways.
self._dx = -46
# The distance from the row of the limbo cell to the goal selection
# hallway corresponding to the chosen difficulty level.
self._dy = 11 * level + 9
if (self._dy + 5) > self.whole_pattern.shape[0]: raise ValueError(
'There is no {} difficulty level.'.format(level))
def update(self, actions, board, layers, backdrop, things, the_plot):
super(TeleporterDrape, self).update(
actions, board, layers, backdrop, things, the_plot)
# If there is a delay before the teleporter is available, count it down and
# then show the teleporter once the delay expires.
if self._teleport_delay > 0:
self._teleport_delay -= 1
if self._teleport_delay <= 0:
np.copyto(self.whole_pattern, src=self._saved_whole_pattern)
if 0 <= the_plot.frame - the_plot.get('teleportation_order_frame', -1) <= 1:
self._stay(the_plot) # See note in PseudoTeleportingScrolly docstring.
elif actions == 1: # is the player going upward?
self._north(the_plot)
elif actions == 2: # is the player going downward?
self._south(the_plot)
elif actions == 3: # is the player going leftward?
self._west(the_plot)
elif actions == 4: # is the player going rightward?
self._east(the_plot)
else: # is the player doing nothing or quitting?
self._stay(the_plot)
# If the player has reached the teleporter, teleport them and leave a note
# in the plot (besides helping us keep track, it also tells the cue drape to
# hide the cues, if so configured.
if not the_plot.get('yo_we_have_teleported'): # Not teleported yet?
player_pattern_position = self.pattern_position_postscroll(
things['P'].position, the_plot)
if self.whole_pattern[player_pattern_position]: # Player on teleporter?
the_plot['yo_we_have_teleported'] = True # We'll teleport now.
if self._limbo_countdown <= 0: # Bypass limbo, go straight to the maze.
self.place_teleportation_order(
the_plot, row_shift=self._dy, col_shift=0)
else: # No bypass, go to limbo!
self._in_limbo = True
self.place_teleportation_order(
the_plot,
row_shift=(self._limbo_row - player_pattern_position.row),
col_shift=(self._limbo_col - player_pattern_position.col))
# If we're in limbo, wait until we can get out and then teleport to the
# appropriate goal selection hallway.
if self._in_limbo:
self._limbo_countdown -= 1
if self._limbo_countdown == 0:
self._in_limbo = False
self.place_teleportation_order(
the_plot, row_shift=self._dy, col_shift=self._dx)
class GoalDrape(PseudoTeleportingScrolly):
"""A Drape for handling the goal pads."""
def __init__(self, curtain, character, name, *args, **kwargs):
"""The `name` arg will be matched against the cue drape's chosen goal."""
super(GoalDrape, self).__init__(
curtain, character, *args, scroll_margins=None, **kwargs)
self._name = name
def update(self, actions, board, layers, backdrop, things, the_plot):
super(GoalDrape, self).update(
actions, board, layers, backdrop, things, the_plot)
# If the player has reached the goal, assign a reward and prepare to
# terminate the episode. (We can't terminate it ourselves because
# FlowEnvironment maybe can't deal with terminating on a reward.)
player_pattern_position = self.pattern_position_prescroll(
things['P'].position, the_plot)
if (self.whole_pattern[player_pattern_position] and
the_plot.frame < the_plot['timeout_frames']):
the_plot.add_reward(1.0 if self._name == things['Q'].which_goal else -1.0)
the_plot['timeout_frames'] = the_plot.frame + 1
if 0 <= the_plot.frame - the_plot.get('teleportation_order_frame', -1) <= 1:
self._stay(the_plot) # See note in PseudoTeleportingScrolly docstring.
elif actions == 1: # is the player going upward?
self._north(the_plot)
elif actions == 2: # is the player going downward?
self._south(the_plot)
elif actions == 3: # is the player going leftward?
self._west(the_plot)
elif actions == 4: # is the player going rightward?
self._east(the_plot)
elif actions == 5: # is the player doing nothing?
self._stay(the_plot)
def main(argv):
del argv # Unused.
# Build a t_maze game.
game = make_game(FLAGS.difficulty,
FLAGS.cue_after_teleport,
FLAGS.timeout_frames,
FLAGS.teleport_delay,
FLAGS.limbo_time)
# Build an ObservationCharacterRepainter that will make the teleporter and all
# the goals look identical.
repainter = rendering.ObservationCharacterRepainter(REPAINT_MAPPING)
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_UP: 1, curses.KEY_DOWN: 2,
curses.KEY_LEFT: 3, curses.KEY_RIGHT: 4,
-1: 5,
'q': 6, 'Q': 6},
repainter=repainter, delay=100, colour_fg=COLOURS)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/research/lp-rnn/t_maze.py
|
# Copyright 2019 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Box-World game for Pycolab.
See README.md for more details.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import itertools
import string
import sys
import numpy as np
from pycolab import ascii_art
from pycolab import human_ui
from pycolab import things as plab_things
from pycolab.prefab_parts import sprites as prefab_sprites
if __name__ == '__main__': # Avoid defining flags when used as a library.
parser = argparse.ArgumentParser(description='Play Box-World.')
parser.add_argument(
'--grid_size', type=int, default=12, help='height and width of the grid.')
parser.add_argument(
'--solution_length',
nargs='+',
type=int,
default=(1, 2, 3, 4),
help='number of boxes in the path to the goal.')
parser.add_argument(
'--num_forward',
nargs='+',
type=int,
default=(0, 1, 2, 3, 4),
help='possible values for num of forward distractors.')
parser.add_argument(
'--num_backward',
nargs='+',
type=int,
default=(0,),
help='possible values for num of backward distractors.')
parser.add_argument(
'--branch_length',
type=int,
default=1,
help='length of forward distractor branches.')
parser.add_argument(
'--max_num_steps',
type=int,
default=120,
help='number of steps before the episode is halted.')
parser.add_argument(
'--random_state',
type=int,
default=None,
help='random number generator state.')
FLAGS = parser.parse_args()
# Module constants
GEM = '*'
PLAYER = '.'
BACKGROUND = ' '
BORDER = '#'
COLORS = [(700, 350, 350), (700, 454, 350), (700, 559, 350), (700, 664, 350),
(629, 700, 350), (524, 700, 350), (420, 700, 350), (350, 700, 384),
(350, 700, 490), (350, 700, 595), (350, 700, 700), (350, 594, 700),
(350, 490, 700), (350, 384, 700), (419, 350, 700), (524, 350, 700),
(630, 350, 700), (700, 350, 665), (700, 350, 559), (700, 350, 455)]
MAX_NUM_KEYS = len(COLORS)
KEYS = list(string.ascii_lowercase[:MAX_NUM_KEYS])
LOCKS = list(string.ascii_uppercase[:MAX_NUM_KEYS])
OBJECT_COLORS = {
PLAYER: (500, 500, 500),
GEM: (999, 999, 999),
BACKGROUND: (800, 800, 800),
BORDER: (0, 0, 0),
}
OBJECT_COLORS.update({k: v for (k, v) in zip(KEYS, COLORS)})
OBJECT_COLORS.update({k: v for (k, v) in zip(LOCKS, COLORS)})
REWARD_GOAL = 10.
REWARD_STEP = 0.
REWARD_OPEN_CORRECT = 1.
REWARD_OPEN_WRONG = -1.
WALL_WIDTH = 1
MAX_PLACEMENT_TRIES = 200
MAX_GENERATION_TRIES = 200
NORTH = (-1, 0)
EAST = (0, 1)
SOUTH = (1, 0)
WEST = (0, -1)
ACTION_NORTH = 0
ACTION_SOUTH = 1
ACTION_WEST = 2
ACTION_EAST = 3
ACTION_DELAY = -1
ACTION_MAP = {
ACTION_NORTH: NORTH,
ACTION_SOUTH: SOUTH,
ACTION_WEST: WEST,
ACTION_EAST: EAST,
}
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for the player.
This `Sprite` simply ties actions to moving.
"""
def __init__(self, corner, position, character, grid_size, x, y, distractors,
max_num_steps):
"""Initialise a PlayerSprite.
Args:
corner: standard `Sprite` constructor parameter.
position: standard `Sprite` constructor parameter.
character: standard `Sprite` constructor parameter.
grid_size: int, height and width of the grid.
x: int, initial player x coordinate on the grid.
y: int, initial player y coordinate on the grid.
distractors: <desc>.
max_num_steps: int, number of steps before the episode is halted.
"""
# Indicate to the superclass that we can't walk off the board.
super(PlayerSprite, self).__init__(
corner, [y, x], character, impassable=BORDER, confined_to_board=True)
self.distractors = distractors
self._max_num_steps = max_num_steps
self._step_counter = 0
def _in_direction(self, direction, board):
"""Report character in the direction of movement and its coordinates."""
new_position = np.array(self.position) + direction
char = chr(board[new_position[0], new_position[1]])
if char == BORDER:
return None, None
else:
return char, new_position.tolist()
def update(self, actions, board, layers, backdrop, things, the_plot):
del backdrop # Unused.
# Only actually move if action is one of the 4 directions of movement.
# Action could be -1, in which case we skip this altogether.
if actions in range(4):
# Add penalty per step.
the_plot.add_reward(REWARD_STEP)
direction = ACTION_MAP[actions]
target_character, target_position = self._in_direction(direction, board)
# This will return None if target_character is None
target_thing = things.get(target_character)
inventory_item = chr(board[0, 0])
# Moving the player can only occur under 3 conditions:
# (1) Move if there is nothing in the way.
if not target_thing:
self._move(board, the_plot, direction)
else:
# (2) If there is a lock in the way, only move if you hold the key that
# opens the lock.
is_lock = target_character in LOCKS
if is_lock and inventory_item == target_thing.key_that_opens:
self._move(board, the_plot, direction)
# (3) If there is a gem or key in the way, only move if that thing is
# not locked.
thing_is_locked = target_thing.is_locked_at(things, target_position)
if not is_lock and not thing_is_locked:
self._move(board, the_plot, direction)
self._step_counter += 1
# Episode terminates if maximum number of steps is reached.
if self._step_counter > self._max_num_steps:
the_plot.terminate_episode()
# Inform plot of overlap between player and thing.
if target_thing:
the_plot['over_this'] = (target_character, self.position)
class BoxThing(plab_things.Drape):
"""Base class for locks, keys and gems."""
def __init__(self, curtain, character, x, y):
super(BoxThing, self).__init__(curtain, character)
self.curtain[y][x] = True
def is_locked_at(self, things, position):
"""Check if a key or gem is locked at a given position."""
y, x = position
# Loop through all possible locks that can be locking this key or gem.
for lock_chr in things.keys():
if lock_chr in LOCKS and things[lock_chr].curtain[y][x + 1]:
return True
return False
def where_player_over_me(self, the_plot):
"""Check if player is over this thing. If so, returns the coordinates."""
over_this = the_plot.get('over_this')
if over_this:
character, (y, x) = over_this
if character == self.character and self.curtain[y][x]:
return y, x
else:
return False
class GemDrape(BoxThing):
"""The gem."""
def update(self, actions, board, layers, backdrop, things, the_plot):
if self.where_player_over_me(the_plot):
the_plot.add_reward(REWARD_GOAL)
the_plot.terminate_episode()
class KeyDrape(BoxThing):
"""The keys."""
def update(self, actions, board, layers, backdrop, things, the_plot):
position = self.where_player_over_me(the_plot)
if position:
inventory_item = chr(board[0, 0])
if inventory_item in KEYS:
things[inventory_item].curtain[0][0] = False
self.curtain[position[0]][position[1]] = False
self.curtain[0][0] = True
class LockDrape(BoxThing):
"""The locks."""
def __init__(self, curtain, character, x, y):
super(LockDrape, self).__init__(curtain, character, x, y)
self.key_that_opens = KEYS[LOCKS.index(self.character)]
def update(self, actions, board, layers, backdrop, things, the_plot):
position = self.where_player_over_me(the_plot)
if position:
self.curtain[position[0]][position[1]] = False
inventory_item = chr(board[0, 0])
things[inventory_item].curtain[0][0] = False
if (position[1], position[0]) in things[PLAYER].distractors:
the_plot.add_reward(REWARD_OPEN_WRONG)
the_plot.terminate_episode()
else:
the_plot.add_reward(REWARD_OPEN_CORRECT)
def _sample_keys_locks_long(rand,
solution_length_range,
num_forward_range,
num_backward_range,
branch_length=1):
"""Randomly sample a new problem."""
solution_length = rand.choice(solution_length_range)
num_forward = rand.choice(num_forward_range)
num_backward = rand.choice(num_backward_range)
locks = list(range(solution_length + 1))
keys = list(range(1, solution_length + 1)) + [-1]
# Forward distractors
for _ in range(num_forward):
lock = rand.choice(range(1, solution_length + 1))
for _ in range(branch_length):
key = None
while key is None or key == lock:
key = rand.choice(range(solution_length + 1, MAX_NUM_KEYS))
locks.append(lock)
keys.append(key)
lock = key
# Backward distractors. Note that branch length is not implemented here.
for _ in range(num_backward):
key = rand.choice(range(1, solution_length + 1))
lock = rand.choice(range(solution_length + 1, MAX_NUM_KEYS))
locks.append(lock)
keys.append(key)
return (solution_length, np.array([locks, keys]).T)
def _check_spacing(art, x, y):
"""Check that there's room for key and adjacent lock (incl. surround)."""
bg = BACKGROUND
space_for_key = all(
art[i][j] == bg
for i, j in itertools.product(range(y - 1, y + 2), range(x - 1, x + 2)))
also_space_for_box = all(art[i][x + 2] == bg for i in range(y - 1, y + 2))
return space_for_key and also_space_for_box
def _generate_random_game(rand, grid_size, solution_length, num_forward,
num_backward, branch_length, max_num_steps):
"""Generate game proceduraly; aborts if `MAX_PLACEMENT_TRIES` is reached."""
# Sample new problem.
solution_length, locks_keys = _sample_keys_locks_long(rand,
solution_length,
num_forward,
num_backward,
branch_length)
# By randomizing the list of keys and locks we use all the possible colors.
key_lock_ids = list(zip(KEYS, LOCKS))
rand.shuffle(key_lock_ids)
full_map_size = grid_size + WALL_WIDTH * 2
art = [
[BACKGROUND for i in range(full_map_size)] for _ in range(full_map_size)
]
art = np.array(art)
art[:WALL_WIDTH, :] = BORDER
art[-WALL_WIDTH:, :] = BORDER
art[:, :WALL_WIDTH] = BORDER
art[:, -WALL_WIDTH:] = BORDER
drapes = {}
distractors = []
placement_tries = 0
# Place items necessary for the sampled problem
for i, (l, k) in enumerate(locks_keys):
is_distractor = False
if i > solution_length:
is_distractor = True
placed = False
while not placed:
if placement_tries > MAX_PLACEMENT_TRIES:
return False
x = rand.randint(0, grid_size - 3) + WALL_WIDTH
y = rand.randint(1, grid_size - 1) + WALL_WIDTH
if _check_spacing(art, x, y):
placed = True
# Check if box contains the gem
if k == -1:
art[y][x] = GEM
drapes[GEM] = ascii_art.Partial(GemDrape, x=x, y=y)
else:
key = key_lock_ids[k - 1][0]
art[y][x] = key
drapes[key] = ascii_art.Partial(KeyDrape, x=x, y=y)
# Check if box has a lock
if l != 0:
lock = key_lock_ids[l - 1][1]
art[y][x + 1] = lock
drapes[lock] = ascii_art.Partial(LockDrape, x=x + 1, y=y)
if is_distractor:
distractors.append((x + 1, y))
else:
placement_tries += 1
# Place player
placed = False
while not placed:
if placement_tries > MAX_PLACEMENT_TRIES:
return False
x = rand.randint(0, grid_size - 1) + WALL_WIDTH
y = rand.randint(1, grid_size - 1) + WALL_WIDTH
if art[y][x] == BACKGROUND:
sprites = {
PLAYER:
ascii_art.Partial(PlayerSprite, grid_size, x, y, distractors,
max_num_steps)
}
placed = True
art[y][x] = PLAYER
else:
placement_tries += 1
order = sorted(drapes.keys())
update_schedule = [PLAYER] + order
z_order = order + [PLAYER]
art_as_list_of_strings = []
for art_ in art:
art_as_list_of_strings.append(''.join(art_))
art = art_as_list_of_strings
art = [''.join(a) for a in art]
game = ascii_art.ascii_art_to_game(
art=art,
what_lies_beneath=BACKGROUND,
sprites=sprites,
drapes=drapes,
update_schedule=update_schedule,
z_order=z_order)
return game
def make_game(grid_size,
solution_length,
num_forward,
num_backward,
branch_length,
random_state=None,
max_num_steps=120):
"""Create a new Box-World game."""
if random_state is None:
random_state = np.random.RandomState(None)
game = False
tries = 0
while tries < MAX_GENERATION_TRIES and not game:
game = _generate_random_game(
random_state,
grid_size=grid_size,
solution_length=solution_length,
num_forward=num_forward,
num_backward=num_backward,
branch_length=branch_length,
max_num_steps=max_num_steps)
tries += 1
if not game:
raise RuntimeError('Could not generate game in MAX_GENERATION_TRIES tries.')
return game
def main(unused_argv):
game = make_game(
grid_size=FLAGS.grid_size,
solution_length=FLAGS.solution_length,
num_forward=FLAGS.num_forward,
num_backward=FLAGS.num_backward,
branch_length=FLAGS.branch_length,
max_num_steps=FLAGS.max_num_steps,
random_state=FLAGS.random_state,
)
ui = human_ui.CursesUi(
keys_to_actions={
'w': ACTION_NORTH,
's': ACTION_SOUTH,
'a': ACTION_WEST,
'd': ACTION_EAST,
-1: ACTION_DELAY,
},
delay=50,
colour_fg=OBJECT_COLORS)
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/research/box_world/box_world.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""An example implementation of the classic cliff-walk problem."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab.prefab_parts import sprites as prefab_sprites
GAME_ART = ['............',
'............',
'............',
'P...........']
def make_game():
"""Builds and returns a cliff-walk game."""
return ascii_art.ascii_art_to_game(
GAME_ART, what_lies_beneath='.',
sprites={'P': PlayerSprite})
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player.
This `Sprite` ties actions to going in the four cardinal directions. If it
walks into all but the first and last columns of the bottom row, it receives a
reward of -100 and the episode terminates. Moving to any other cell yields a
reward of -1; moving into the bottom right cell terminates the episode.
"""
def __init__(self, corner, position, character):
"""Inform superclass that we can go anywhere, but not off the board."""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='', confined_to_board=True)
def update(self, actions, board, layers, backdrop, things, the_plot):
del layers, backdrop, things # Unused.
# Apply motion commands.
if actions == 0: # walk upward?
self._north(board, the_plot)
elif actions == 1: # walk downward?
self._south(board, the_plot)
elif actions == 2: # walk leftward?
self._west(board, the_plot)
elif actions == 3: # walk rightward?
self._east(board, the_plot)
else:
# All other actions are ignored. Although humans using the CursesUi can
# issue action 4 (no-op), agents should only have access to actions 0-3.
# Otherwise staying put is going to look like a terrific strategy.
return
# See what reward we get for moving where we moved.
if (self.position[0] == (self.corner[0] - 1) and
0 < self.position[1] < (self.corner[1] - 2)):
the_plot.add_reward(-100.0) # Fell off the cliff.
else:
the_plot.add_reward(-1.0)
# See if the game is over.
if self.position[0] == (self.corner[0] - 1) and 0 < self.position[1]:
the_plot.terminate_episode()
def main(argv=()):
del argv # Unused.
# Build a cliff-walk game.
game = make_game()
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_UP: 0, curses.KEY_DOWN: 1,
curses.KEY_LEFT: 2, curses.KEY_RIGHT: 3,
-1: 4},
delay=200)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/classics/cliff_walk.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""An example implementation of the classic four-rooms scenario."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab.prefab_parts import sprites as prefab_sprites
GAME_ART = ['#############',
'# # #',
'# # #',
'# # #',
'# #',
'# # #',
'#### ###### #',
'# # #',
'# # #',
'# #',
'# # #',
'# P # #',
'#############']
def make_game():
"""Builds and returns a four-rooms game."""
return ascii_art.ascii_art_to_game(
GAME_ART, what_lies_beneath=' ',
sprites={'P': PlayerSprite})
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player.
This `Sprite` ties actions to going in the four cardinal directions. If we
reach a magical location (in this example, (4, 3)), the agent receives a
reward of 1 and the episode terminates.
"""
def __init__(self, corner, position, character):
"""Inform superclass that we can't walk through walls."""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='#')
def update(self, actions, board, layers, backdrop, things, the_plot):
del layers, backdrop, things # Unused.
# Apply motion commands.
if actions == 0: # walk upward?
self._north(board, the_plot)
elif actions == 1: # walk downward?
self._south(board, the_plot)
elif actions == 2: # walk leftward?
self._west(board, the_plot)
elif actions == 3: # walk rightward?
self._east(board, the_plot)
# See if we've found the mystery spot.
if self.position == (4, 3):
the_plot.add_reward(1.0)
the_plot.terminate_episode()
def main(argv=()):
del argv # Unused.
# Build a four-rooms game.
game = make_game()
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_UP: 0, curses.KEY_DOWN: 1,
curses.KEY_LEFT: 2, curses.KEY_RIGHT: 3,
-1: 4},
delay=200)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/classics/four_rooms.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
|
pycolab-master
|
pycolab/examples/classics/__init__.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""An example implementation of the classic chain-walk problem."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import curses
import sys
from pycolab import ascii_art
from pycolab import human_ui
from pycolab.prefab_parts import sprites as prefab_sprites
GAME_ART = ['..P...................']
def make_game():
"""Builds and returns a chain-walk game."""
return ascii_art.ascii_art_to_game(
GAME_ART, what_lies_beneath='.',
sprites={'P': PlayerSprite})
class PlayerSprite(prefab_sprites.MazeWalker):
"""A `Sprite` for our player.
This sprite ties actions to going left and right. If it reaches the leftmost
extreme of the board, it receives a small reward; if it reaches the rightmost
extreme it receives a large reward. The game terminates in either case.
"""
def __init__(self, corner, position, character):
"""Inform superclass that we can go anywhere."""
super(PlayerSprite, self).__init__(
corner, position, character, impassable='')
def update(self, actions, board, layers, backdrop, things, the_plot):
del layers, backdrop, things # Unused.
# Apply motion commands.
if actions == 0: # walk leftward?
self._west(board, the_plot)
elif actions == 1: # walk rightward?
self._east(board, the_plot)
# See if the game is over.
if self.position[1] == 0:
the_plot.add_reward(1.0)
the_plot.terminate_episode()
elif self.position[1] == (self.corner[1] - 1):
the_plot.add_reward(100.0)
the_plot.terminate_episode()
def main(argv=()):
del argv # Unused.
# Build a chain-walk game.
game = make_game()
# Make a CursesUi to play it with.
ui = human_ui.CursesUi(
keys_to_actions={curses.KEY_LEFT: 0, curses.KEY_RIGHT: 1, -1: 2},
delay=200)
# Let the game begin!
ui.play(game)
if __name__ == '__main__':
main(sys.argv)
|
pycolab-master
|
pycolab/examples/classics/chain_walk.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Simple message logging for pycolab game entities.
The interactive nature of pycolab games makes it difficult to do useful things
like "printf debugging"---if you're using an interface like the Curses UI, you
won't be able to see printed strings. This protocol allows game entities to log
messages to the Plot object. User interfaces can query this object and display
accumulated messages to the user in whatever way is best.
Most game implementations will not need to import this protocol directly---
logging is so fundamental that the Plot object expresses a `log` method that's
syntactic sugar for the log function in this file.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def log(the_plot, message):
"""Log a message for eventual disposal by the game engine user.
Here, "game engine user" means a user interface or an environment interface,
for example. (Clients are not required to deal with messages, but if they do,
this is how to get a message to them.)
Most game implementations will not need to call this function directly---
logging is so fundamental that the Plot object expresses a `log` method that's
syntactic sugar for this function.
Args:
the_plot: the pycolab game's `Plot` object.
message: A string message to convey to the game engine user.
"""
the_plot.setdefault('log_messages', []).append(message)
def consume(the_plot):
"""Obtain messages logged by game entities since the last call to `consume`.
This function is meant to be called by "game engine users" (user interfaces,
environment interfaces, etc.) to obtain the latest set of log messages
emitted by the game entities. These systems can then dispose of these messages
in whatever manner is the most appropriate.
Args:
the_plot: the pycolab game's `Plot` object.
Returns:
The list of all log messages supplied by the `log` method since the last
time `consume` was called (or ever, if `consume` has never been called).
"""
messages = the_plot.setdefault('log_messages', [])
# Hand off the current messages to a new list that we return.
our_messages = messages[:]
del messages[:]
return our_messages
|
pycolab-master
|
pycolab/protocols/logging.py
|
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
|
pycolab-master
|
pycolab/protocols/__init__.py
|
# coding=utf8
# Copyright 2017 the pycolab Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Routines for pycolab game entities to discuss game board scrolling.
*Note: the scrolling mechanism that this module facilitates is only one way to
achieve scrolling behaviour in pycolab... and it happens to be one of the more
complicated ways. If you just want to scroll around a finite map, consider using
a mechanism like `ScrollingCropper` in `croppers.py`, which moves a tracking
window around the observation emitted by the game engine, and so doesn't require
game entities to think about or even know that scrolling is underway. (See
`examples/better_scrolly_maze.py` for a usage example.) You may still need the
scrolling protocol in some cases -- e.g. if you have a generated "infinite"
map -- in which case, buckle in and read on...*
Plenty of cool video games are scrolling video games (think Zelda, Defender,
Super Mario Bros.), and pycolab should be able to scroll, too. The only problem
is that with different objects putting all kinds of scenery all over the game
board, we need some way to make certain that they all move their stuff in unison
as they should. (Or not! Egocentric characters like Link and Mario move the
world around them, after all...)
In order to help everyone scroll harmoniously, the functions in this file
provide a handy way for `Sprite`s, `Drape`s, and the `Backdrop` to talk about
scrolling. Any one of these entities could scroll---your `Backdrop` could be a
scrolling window over a huge game world, or the `Backdrop` could be some neat-o
fixed starfield with a `Drape`-powered set of scrolling platforms and obstacles
to jump around; in either of these cases, `Sprite`s could be objects for the
player to collect, and would therefore have to scroll with the scenery.
## How it works:
Participation in the scrolling protocol is optional for `Sprite`s, `Drape`s, and
the `Backdrop`. Entities that do participate, however, are either egocentric
(the world scrolls around them, like Mario or Link) or not (they scroll with the
rest of the world, like Goombas and coins). While there's no need to worry much
about non-egocentric entities, any attempt to scroll the world will have to be
careful that it doesn't scroll egocentric entities into impossible places! You
can't scroll Mario into a wall, or he will be stuck there forever.
Therefore, the first step is for egocentric participants to register themselves
as egocentric via the `participate_as_egocentric` function of this module. After
this registration, the `order` (as in "command"!) function within this module
will know to check whether a particular motion is okay for all the egocentric
entities before issuing a "scrolling order" (more on this in a second).
For this reason, at each game iteration, all egocentric game entities will need
to provide a set of "legal" scrolling motions that could be undertaken *during
the next game iteration* without causing that entity to do something
impossible---like walk into a wall, or scroll partially off of the screen (if
that's something you care about). This is done via this module's `permit`
function.
By the time the next game iteration rolls around, whichever entity wants to
scroll the world can check whether a particular scrolling motion is acceptable
to all egocentric entities (via the `is_possible` function). If it is, it can
issue a "scrolling order" to all of the participating entities via the `order`
function, which simply places a note in the `Plot` object that says that a
particular scrolling motion is taking place. All of these entities should look
at the `Plot` object to see whether a scrolling order has been made, and if one
has, then they should update their `position`s or `curtain`s accordingly.
Remember, a protocol is only a way for game entities to *discuss* scrolling;
it's up to the entities themselves to actually do the scrolling if so commanded.
For convenience, any entities can see whether a scrolling order is present by
using the `get_order` function.
Important note: the scrolling protocol will only allow a single game entity to
make a scrolling order per game iteration.
## A note about update ordering:
This protocol is designed around the assumption that whichever entity issues a
scrolling order, then among all of the game entities participating in scrolling,
the "ordering entity" will have had its `update` method called by the `Engine`
first. This is because it is up to participating entities to update their
`curtain`s or `position`s to account for scrolling during the same game
iteration in which a scrolling order is made, and if an order is made _after_
another entity's `update` method has been called, then that entity will never
get the chance to do this.
For related reasons, it's anticipated that a scrolling order's "ordering entity"
will occupy a distinct and earlier update group (see discussion at the `Engine`
docstring) than the other egocentric game entities participating in scrolling.
Otherwise, it may be difficult for game entities to look at the game board
(which would probably show the last game iteration) and figure out which moves
will be legal during the next game iteration.
That said, in both of these warnings, the author may very well underestimate the
cleverness of pycolab game developers, who may discover new and ingenious ways
of using this protocol.
In case they don't, the official recommendation about update ordering is this:
whichever entity makes the orders gets updated first, non-egocentric entities
should get updated before egocentric ones do, and remaining egocentric entities
should live in a separate, later update group than the "ordering entity".
## Scrolling groups:
Most games may only have one "kind" of scrolling: the world scrolling around,
for example. The discussion so far and all of the function defaults are
engineered around this use case.
This said, all functions allow the specification of an optional string tag that
directs the function to work in the context of a "scrolling group" associated
with that tag. Each scrolling group operates exactly as described in the
preceding discussion, almost completely independently of any other scrolling
group.
There is just one exception to this independence: a pycolab game entity may
belong to at most one scrolling group. Protocol functions attempt to enforce
this restriction where possible.
## On the loose interpretation of "legal" scrolling motions:
With apologies... please consider the following circumstance. Within this
game board:
.....
#..#.
..P#.
..##.
`P` denotes an egocentric `Sprite` and `#` marks an obstacle within the game's
scrolling scenery. Replicating the dynamics of famous video games, we would only
like the game board to scroll if it *has* to---in this case, if the `Sprite`
would otherwise occupy the first/last row/column of the game board. So, the
board would not scroll if the `Sprite` moved upward or leftward, but would
certainly scroll if the `Sprite` moved downward (of course, in this case, an
obstacle is in the way).
What if the `Sprite` moved downward *and* leftward: "to the southwest", so to
speak?
The most minimal and natural scrolling behaviour would see the board scroll
downward only, i.e.
#..#.
...#.
.P##.
.....
since there is room for the `Sprite` to also move leftward without impinging on
the first column of the game board. Unfortunately, the `Sprite` would never have
explicitly permitted a downward scrolling motion, since naively scrolling the
game board downward would scroll `P` into the wall that was just beneath it.
The disappointing solution to this conundrum is to permit an annoyingly subtle
flexibility in the interpretation of "legal" scrolling motions. A game entity
may issue an "illegal" scrolling order if it can be *sure* that all entities
subject to that order will remain on the game board after:
1. first moving themselves relative to the game board to comply with the
scrolling order, i.e. move along with the world's scenery, THEN
2. moving relative to the game board AND the scenery to obey whatever
action(s) are issued by the agent.
Illustrating in the example from above, when confronted with an agent action
indicating a "southwesterly" motion, the `Drape` or `Backdrop` responsible for
the background scenery would issue a strictly downward scrolling order,
understanding that `P` could be trusted to handle the scrolling and the motion
responsibly. When it came `P`'s turn to update itself, `P` would notionally
apply the scrolling order first, yielding
#..#. # note that the game scenery has already scrolled
..P#.
..##.
.....
and then, after that, it would interpret and execute the southwesterly motion,
arriving at this board state (same as what's shown above):
#..#.
...#.
.P##.
.....
Naturally, the coordination between entities that interpret scrolling motions
loosely in this way will have to be even tighter than the basic semantics
encoded by this protocol. Notably, `prefab_parts.drapes.Scrolly` and egocentric
`prefab_parts.sprites.MazeWalker` entities do work together in this way,
provided that the very same motion action helper methods are called on these
entities at every game iteration.
## Representation within the `Plot` object:
For this section, it helps to know that the name of the default scrolling group
is `''` (the empty string).
Although you should hopefully never need to examine `Plot` object entries
relating to the scrolling protocol directly (i.e. in lieu of using this module's
functions), the following dict entries in the `Plot` object are what the
functions work with behind the scenes:
`the_plot['scrolling_everyone']`: a mapping from pycolab game entity objects
participating in scrolling to the string identifiers of the scrolling group in
which they participate. Since non-egocentric entities don't have to register
with this module, the mapping may not be complete, but as soon as an entity
calls `get_order`, it will be added.
`the_plot['scrolling_X_egocentrists']`: the set of pycolab game entity objects,
belonging to scrolling group X, that participate in scrolling in an egocentric
way.
`the_plot['scrolling_X_order']`: a 2-tuple containing scrolling directions to be
obeyed by all participants in scrolling group X. These directions are the
number of rows and the number of columns that the game window will move over
the world, conceptually speaking, with positive row values meaning that the
window moves downward, and positive column values meaning that the window
moves rightward. Non-egocentric entities should therefore *subtract* these
values from their own internal screen-relative coordinates so that they appear
to move along with the rest of the world.
`the_plot['scrolling_X_order_frame']`: the number of the game iteration to which
`the_plot['scrolling_X_order']` applies. If
`the_plot.frame != the_plot['scrolling_X_order_frame']`, the order should be
ignored.
`the_plot['scrolling_X_permitted']`: a mapping from egocentric pycolab game
entity objects in scrolling group X to a set of scrolling order 2-tuples that
will not result in the entity being "moved" in an impossible way.
`the_plot['scrolling_X_permitted_frame']`: a mapping from egocentric
pycolab game entity objects in scrolling group X to the number of the game
iteration to which the information in `the_plot['scrolling_X_permitted']`
applies. If
`the_plot.frame != the_plot['scrolling_X_permitted_frame'][entity]`, then
the scrolling protocol will assume that no motion is permissible for `entity`.
## Even more nitty-gritty details:
One final caveat, since you've probably had enough reading: unless great care is
taken, it is likely to be a bad idea to issue an `order` on the very first
iteration of a game (i.e. during the `Engine.its_showtime` call). Barring
"unusual" update orders, none of the other scrolling participants will have had
a chance to register themselves as egocentric or to say which directions will be
safe to scroll during the iteration. The `order` call is likely to succeed, but
there is a chance that one of the egocentric entities will be forced into an
illegal location before it even has a chance to live.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from pycolab import things
# Some predefined scrolling motions. These motions are the number of rows and
# the number of columns that the game window will move over the world,
# conceptually speaking, with positive row values meaning that the window moves
# downward, and positive column values meaning that the window moves rightward.
# Non-egocentric entities should therefore *subtract* these values from their
# own internal screen-relative coordinates so that they appear to move along
# with the rest of the world.
NORTH = (-1, 0)
NORTHEAST = (-1, 1)
EAST = (0, 1)
SOUTHEAST = (1, 1)
SOUTH = (1, 0)
SOUTHWEST = (1, -1)
WEST = (0, -1)
NORTHWEST = (-1, -1)
class Error(RuntimeError):
"""An exception for mishandling of scrolling protocol functions.
Clients of this protocol may also express this error when a scrolling-related
error arises.
"""
def participate_as_egocentric(entity, the_plot, scrolling_group=''):
"""Register `entity` as egocentric with respect to the scrolling group.
Once registered, any entity that wishes to check or issue a scrolling order
will need to make certain that scrolling the world "around" this entity will
not wind up making the entity execute an impossible move. (See `permit`,
`is_possible` and `order`.)
There is no harm in registering more than once, as long as `scrolling_group`
remains the same.
Args:
entity: the pycolab game entity we wish to register as egocentric.
the_plot: the pycolab game's `Plot` object.
scrolling_group: a string identifier for the scrolling group with respect to
which we are marking `entity` as egocentric.
Raises:
TypeError: `entity` is not a pycolab entity.
Error: `entity` is known to belong to a scrolling group distinct from
`scrolling_group`.
"""
_check_scrolling_group(entity, the_plot, scrolling_group)
egocentrists = the_plot.setdefault(
'scrolling_{}_egocentrists'.format(scrolling_group), set())
egocentrists.add(entity)
def egocentric_participants(entity, the_plot, scrolling_group=''):
"""Get all entities registered egocentric with respect to `scrolling_group`.
Args:
entity: the pycolab game entity interested in obtaining the set of
egocentric entities within `scrolling_group`.
the_plot: the pycolab game's `Plot` object.
scrolling_group: a string identifier for the scrolling group that the
caller is querying for egocentric entities.
Returns:
The set of all pycolab entities registered egocentric with respect to
`scrolling_group`.
Raises:
TypeError: `entity` is not a pycolab entity.
Error: `entity` is known to belong to a scrolling group distinct from
`scrolling_group`.
"""
_check_scrolling_group(entity, the_plot, scrolling_group)
return the_plot.get(
'scrolling_{}_egocentrists'.format(scrolling_group), set())
def get_order(entity, the_plot, scrolling_group=''):
"""Retrieve the current scrolling order for `scrolling_group`, if one exists.
Args:
entity: the pycolab game entity retrieving the scrolling order.
the_plot: the pycolab game's `Plot` object.
scrolling_group: a string identifier for the scrolling group for which
`entity` is requesting the current scrolling order.
Returns:
a scrolling order for the current game iteration, or None if there is none.
If not None, this is a 2-tuple to be obeyed by all participants in
`scrolling_group`. These directions are the number of rows and the number of
columns that the game window will move over the world, conceptually
speaking, with positive row values meaning that the window moves downward,
and positive column values meaning that the window moves rightward.
Non-egocentric entities should therefore *subtract* these values from their
own internal screen-relative coordinates so that they appear to move along
with the rest of the world.
Raises:
TypeError: `entity` is not a pycolab entity.
Error: `entity` is known to belong to a scrolling group distinct from
`scrolling_group`.
"""
_check_scrolling_group(entity, the_plot, scrolling_group)
order_frame = the_plot.setdefault(
'scrolling_{}_order_frame'.format(scrolling_group), None)
if the_plot.frame != order_frame: return None
return the_plot.setdefault(
'scrolling_{}_order'.format(scrolling_group), None)
def permit(entity, the_plot, motions, scrolling_group=''):
"""Indicate next permissible motions for the egocentric entity `entity`.
Although it's mentioned in the argument description, it's worth pointing out
that these are motions that will be permissible for `entity` in the next
game iteration, not in the current one.
It is fine for the same entity to call this function more than once in the
same game iteration, as long as `scrolling_group` is always the same.
See the section "On the loose interpretation of 'legal' scrolling motions"
for a disappointing but necessary complication of the semantics of this
function.
Args:
entity: the egocentric pycolab game entity giving permission for
certain scrolling motions during the next game iteration.
the_plot: the pycolab game's `Plot` object.
motions: an iterable of scrolling motions that will be allowable *during the
next game iteration*. These motions are 2-tuples which can be
interpreted as the (possibly negative) number of rows/columns that the
game window is allowed to move downward/rightward over the game board;
or, conveniently, this is a (sub?)set of valid (δrow, δcolumn) motions
that `entity` will be able to make at the next iteration (the numbers
are the same either way).
scrolling_group: a string identifier for the scrolling group for which
`entity` is granting scrolling permission.
Raises:
TypeError: `entity` is not a pycolab entity.
Error: `entity` is known to belong to a scrolling group distinct from
`scrolling_group`, or `entity` is not registered as egocentric within
`scrolling_group`.
"""
_check_scrolling_group(entity, the_plot, scrolling_group)
# Make certain this entity is an egocentric entity.
egocentrists = the_plot.setdefault(
'scrolling_{}_egocentrists'.format(scrolling_group), set())
if entity not in egocentrists:
raise Error(
'{} is not registered as an egocentric entity in scrolling group '
'{}'.format(_entity_string_for_errors(entity), repr(scrolling_group)))
# This is the game iteration for which we are giving scrolling motion
# permission.
my_permit_frame = the_plot.frame + 1
# See whether there is any old permission information around for this entity,
# and clear it if so. While we're at it, update the frame number associated
# with this entity's permission information.
all_permit_frames = the_plot.setdefault(
'scrolling_{}_permitted_frame'.format(scrolling_group), dict())
all_permits = the_plot.setdefault(
'scrolling_{}_permitted'.format(scrolling_group), dict())
my_permits = all_permits.setdefault(entity, set())
if all_permit_frames.setdefault(entity, my_permit_frame) != my_permit_frame:
all_permit_frames[entity] = my_permit_frame
my_permits.clear()
# Add the argument motions to the set of permitted motions.
my_permits.update(motions)
def is_possible(entity, the_plot, motion, scrolling_group=''):
"""Is a scrolling order legal for egocentric `scrolling_group` entities?
See the section "On the loose interpretation of 'legal' scrolling motions"
for a disappointing but necessary complication of the semantics of this
function.
Args:
entity: the pycolab game entity interested in knowing whether `motion` is
legal for `scrolling_group`. This entity should also be a participant
in `scrolling_group`; external queries are not allowed.
the_plot: the pycolab game's `Plot` object.
motion: a 2-tuple to be obeyed by all participants in `scrolling_group`.
These directions are the number of rows and the number of columns that
the game window will move over the world, conceptually speaking, with
positive row values meaning that the window moves downward, and positive
column values meaning that the window moves rightward.
scrolling_group: a string identifier for the scrolling group for which
`entity` is attempting to validate a scrolling order.
Returns:
True iff all of the registered egocentric entities for `scrolling_group`
have listed motion as a permissible motion for the current game iteration.
Raises:
TypeError: `entity` is not a pycolab entity.
Error: `entity` is known to belong to a scrolling group distinct from
`scrolling_group`
"""
_check_scrolling_group(entity, the_plot, scrolling_group)
egocentrists = the_plot.get(
'scrolling_{}_egocentrists'.format(scrolling_group), set())
for other_entity in egocentrists:
# See if this other entity has supplied permitted moves for this frame.
# If not, return False.
permit_frames = the_plot.get(
'scrolling_{}_permitted_frame'.format(scrolling_group), {})
if permit_frames.get(other_entity) != the_plot.frame: return False
# See if the motion we're interested in is allowed by the other entity.
# If not, return False.
permitted = the_plot.get(
'scrolling_{}_permitted'.format(scrolling_group), dict()).get(
other_entity, set())
if motion not in permitted: return False
# All egocentric entities are OK with the motion.
return True
def order(entity, the_plot, motion, scrolling_group='', check_possible=True):
"""Issue a scrolling order for participants in `scrolling_group`.
Args:
entity: the pycolab game entity attempting to issue the scrolling order.
the_plot: the pycolab game's `Plot` object.
motion: a 2-tuple to be obeyed by all participants in `scrolling_group`.
These directions are the number of rows and the number of columns that
the game window will move over the world, conceptually speaking, with
positive row values meaning that the window moves downward, and positive
column values meaning that the window moves rightward.
scrolling_group: a string identifier for the scrolling group for which
`entity` is attempting to issue a scrolling order.
check_possible: if True, perform a check that ensures that `motion` is
compatible with all participants in `scrolling_group`.
Raises:
TypeError: `entity` is not a pycolab entity.
Error: `entity` is known to belong to a scrolling group distinct from
`scrolling_group`; a scrolling order has already been issued for
`scrolling_group` at this game iteration; or `motion` is not a scrolling
motion that is permitted by all egocentric members of `scrolling_group`.
"""
_check_scrolling_group(entity, the_plot, scrolling_group)
# Check that the scrolling order is permitted by all of the egocentric
# participants in this scrolling group, and that no other scrolling order has
# been set for this game iteration.
order_frame = the_plot.setdefault(
'scrolling_{}_order_frame'.format(scrolling_group), None)
if order_frame == the_plot.frame:
raise Error(
'{} attempted to issue a second scrolling order for scrolling group {}.'
''.format(_entity_string_for_errors(entity), repr(scrolling_group)))
if (check_possible and
not is_possible(entity, the_plot, motion, scrolling_group)):
raise Error(
'{} attempted to order an impossible scrolling motion "{}" for '
'scrolling group {}.'.format(_entity_string_for_errors(entity), motion,
repr(scrolling_group)))
# Put the scrolling order for this scrolling group in place.
the_plot['scrolling_{}_order_frame'.format(scrolling_group)] = the_plot.frame
the_plot['scrolling_{}_order'.format(scrolling_group)] = motion
### Private helpers ###
def _check_scrolling_group(entity, the_plot, scrolling_group):
"""Raise Error if `entity` is in a different scrolling group than the arg.
This function also handles all aspects of managing the registry that maps
pycolab entities to scrolling groups.
Args:
entity: the pycolab game entity against whose scrolling group affiliation
we are going to compare `scrolling_group`.
the_plot: the pycolab game's `Plot` object.
scrolling_group: a string identifier for the scrolling group to which we are
making certain `entity` belongs.
Raises:
TypeError: `entity` is not a pycolab entity.
Error: `entity` is known to belong to a scrolling group distinct from
`scrolling_group`.
"""
# We could make this a decorator, but then we'd have to go to some trouble
# to handle default arguments.
if not isinstance(entity, (things.Backdrop, things.Drape, things.Sprite)):
raise TypeError('an object that was not a pycolab game entity ({}) '
'attempted to use the scrolling protocol.'.format(entity))
scrolling_groups = the_plot.setdefault('scrolling_everyone', {})
last_scrolling_group = scrolling_groups.setdefault(entity, scrolling_group)
if scrolling_group != last_scrolling_group:
raise Error('{} has attempted to participate in the scrolling protocol as '
'part of scrolling group {}, but is already known to belong to '
'scrolling group {}.'.format(
_entity_string_for_errors(entity),
repr(scrolling_group), repr(last_scrolling_group)))
def _entity_string_for_errors(entity):
"""Derive a string describing `entity` for use in error messages."""
try:
character = entity.character
return 'a Sprite or Drape handling character {}'.format(repr(character))
except AttributeError:
return 'the Backdrop'
|
pycolab-master
|
pycolab/protocols/scrolling.py
|
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Setup for pip package."""
import setuptools
_VERSION = '0.0.1'
def _parse_requirements(requirements_txt_path):
parse_line = lambda l: l.split('#')[0].strip()
with open(requirements_txt_path) as f:
return [parse_line(l) for l in f]
setuptools.setup(
name='dmvr',
version=_VERSION,
url='https://github.com/deepmind/dmvr',
license='Apache 2.0',
author='DeepMind',
description=(
'DMVR is a library for reading and processing multimodal datasets.'),
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author_email='[email protected]',
# Contained modules and scripts.
packages=setuptools.find_namespace_packages(exclude=['*_test.py']),
install_requires=_parse_requirements('requirements.txt'),
tests_require=_parse_requirements('requirements-test.txt'),
requires_python='>=3.6',
include_package_data=True,
zip_safe=False,
# PyPI package information.
classifiers=[
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Libraries',
],
)
|
dmvr-master
|
setup.py
|
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Python script to generate TFRecords of SequenceExample from raw videos."""
import contextlib
import math
import os
from typing import Dict, Optional, Sequence
from absl import app
from absl import flags
import ffmpeg
import numpy as np
import pandas as pd
import tensorflow as tf
flags.DEFINE_string("csv_path", None, "Input csv")
flags.DEFINE_string("output_path", None, "Tfrecords output path.")
flags.DEFINE_string("video_root_path", None,
"Root directory containing the raw videos.")
flags.DEFINE_integer(
"num_shards", -1, "Number of shards to output, -1 means"
"it will automatically adapt to the sqrt(num_examples).")
flags.DEFINE_bool("decode_audio", False, "Whether or not to decode the audio")
flags.DEFINE_bool("shuffle_csv", False, "Whether or not to shuffle the csv.")
FLAGS = flags.FLAGS
_JPEG_HEADER = b"\xff\xd8"
@contextlib.contextmanager
def _close_on_exit(writers):
"""Call close on all writers on exit."""
try:
yield writers
finally:
for writer in writers:
writer.close()
def add_float_list(key: str, values: Sequence[float],
sequence: tf.train.SequenceExample):
sequence.feature_lists.feature_list[key].feature.add(
).float_list.value[:] = values
def add_bytes_list(key: str, values: Sequence[bytes],
sequence: tf.train.SequenceExample):
sequence.feature_lists.feature_list[key].feature.add(
).bytes_list.value[:] = values
def add_int_list(key: str, values: Sequence[int],
sequence: tf.train.SequenceExample):
sequence.feature_lists.feature_list[key].feature.add(
).int64_list.value[:] = values
def set_context_int_list(key: str, value: Sequence[int],
sequence: tf.train.SequenceExample):
sequence.context.feature[key].int64_list.value[:] = value
def set_context_bytes(key: str, value: bytes,
sequence: tf.train.SequenceExample):
sequence.context.feature[key].bytes_list.value[:] = (value,)
def set_context_float(key: str, value: float,
sequence: tf.train.SequenceExample):
sequence.context.feature[key].float_list.value[:] = (value,)
def set_context_int(key: str, value: int, sequence: tf.train.SequenceExample):
sequence.context.feature[key].int64_list.value[:] = (value,)
def extract_frames(video_path: str,
start: float,
end: float,
fps: int = 10,
min_resize: int = 256):
"""Extract list of jpeg bytes from video_path using ffmpeg."""
new_width = "(iw/min(iw,ih))*{}".format(min_resize)
cmd = (
ffmpeg
.input(video_path)
.trim(start=start, end=end)
.filter("fps", fps=fps)
.filter("scale", new_width, -1)
.output("pipe:", format="image2pipe")
)
jpeg_bytes, _ = cmd.run(capture_stdout=True, quiet=True)
jpeg_bytes = jpeg_bytes.split(_JPEG_HEADER)[1:]
jpeg_bytes = map(lambda x: _JPEG_HEADER + x, jpeg_bytes)
return list(jpeg_bytes)
def extract_audio(video_path: str,
start: float,
end: float,
sampling_rate: int = 48000):
"""Extract raw mono audio float list from video_path with ffmpeg."""
cmd = (
ffmpeg
.input(video_path, ss=start, t=end-start)
.output("pipe:", ac=1, ar=sampling_rate, format="s32le")
)
audio, _ = cmd.run(capture_stdout=True, quiet=True)
audio = np.frombuffer(audio, np.float32)
return list(audio)
def generate_sequence_example(video_path: str,
start: float,
end: float,
label_name: Optional[str] = None,
caption: Optional[str] = None,
label_map: Optional[Dict[str, int]] = None):
"""Generate a sequence example."""
if FLAGS.video_root_path:
video_path = os.path.join(FLAGS.video_root_path, video_path)
imgs_encoded = extract_frames(video_path, start, end)
# Initiate the sequence example.
seq_example = tf.train.SequenceExample()
# Add the label list as text and indices.
if label_name:
set_context_int("clip/label/index", label_map[label_name], seq_example)
set_context_bytes("clip/label/text", label_name.encode(), seq_example)
if caption:
set_context_bytes("caption/string", caption.encode(), seq_example)
# Add the frames as one feature per frame.
for img_encoded in imgs_encoded:
add_bytes_list("image/encoded", [img_encoded], seq_example)
# Add audio.
if FLAGS.decode_audio:
audio = extract_audio(video_path, start, end)
add_float_list("WAVEFORM/feature/floats", audio, seq_example)
# Add other metadata.
set_context_bytes("video/filename", video_path.encode(), seq_example)
# Add start and time in micro seconds.
set_context_int("clip/start/timestamp", int(1000000 * start), seq_example)
set_context_int("clip/end/timestamp", int(1000000 * end), seq_example)
return seq_example
def main(argv):
del argv
# reads the input csv.
input_csv = pd.read_csv(FLAGS.csv_path)
if FLAGS.num_shards == -1:
num_shards = int(math.sqrt(len(input_csv)))
else:
num_shards = FLAGS.num_shards
# Set up the TFRecordWriters.
basename = os.path.splitext(os.path.basename(FLAGS.csv_path))[0]
shard_names = [
os.path.join(FLAGS.output_path, f"{basename}-{i:05d}-of-{num_shards:05d}")
for i in range(num_shards)
]
writers = [tf.io.TFRecordWriter(shard_name) for shard_name in shard_names]
if "label" in input_csv:
unique_labels = list(set(input_csv["label"].values))
l_map = {unique_labels[i]: i for i in range(len(unique_labels))}
else:
l_map = None
if FLAGS.shuffle_csv:
input_csv = input_csv.sample(frac=1)
with _close_on_exit(writers) as writers:
for i in range(len(input_csv)):
print(
"Processing example %d of %d (%d%%) \r" %
(i, len(input_csv), i * 100 / len(input_csv)),
end="")
v = input_csv["video_path"].values[i]
s = input_csv["start"].values[i]
e = input_csv["end"].values[i]
l = input_csv["label"].values[i] if "label" in input_csv else None
c = input_csv["caption"].values[i] if "caption" in input_csv else None
seq_ex = generate_sequence_example(
v, s, e, label_name=l, caption=c, label_map=l_map)
writers[i % len(writers)].write(seq_ex.SerializeToString())
if __name__ == "__main__":
app.run(main)
|
dmvr-master
|
examples/generate_from_file.py
|
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""HMDB51 linear evaluation of MMV models."""
from absl import app
from absl import flags
from dmvr import builders
import hmdb
import numpy as np
from sklearn import preprocessing
from sklearn import svm
import tensorflow.compat.v2 as tf
import tensorflow_datasets as tfds
import tensorflow_hub as hub
flags.DEFINE_enum('model_name', 's3d',
['s3d', 'tsm-resnet50', 'tsm-resnet50x2'],
'Which MMV backbone to load.')
flags.DEFINE_string('data_path', '/path/to/hmdb/', 'Path where shards live.')
flags.DEFINE_integer('eval_batch_size', 1,
'The batch size for evaluation.')
flags.DEFINE_integer('train_batch_size', 16,
'The batch size for training.')
flags.DEFINE_integer('num_train_epochs', 10,
'How many epochs to collect features during training.')
flags.DEFINE_integer('num_test_clips', 10,
'How many clips to average on during test.')
flags.DEFINE_integer('min_resize', 224,
'Min value to resize images to during preprocessing.')
flags.DEFINE_integer('crop_size', 200,
'Value to resize images to during preprocessing.')
flags.DEFINE_integer('num_frames', 32, 'Number of video frames.')
flags.DEFINE_integer('stride', 1, 'Stride for video frames.')
flags.DEFINE_integer('hmdb51_split', 1, 'Which split of hmdb51 to use.')
FLAGS = flags.FLAGS
_MODELS2REG = {'s3d': 0.0003,
'tsm-resnet50': 0.0001,
'tsm-resnet50x2': 0.0003}
def compute_accuracy_metrics(pred: np.ndarray, gt: np.ndarray,
prefix: str = ''):
order_pred = np.argsort(pred, axis=1)
assert len(gt.shape) == len(order_pred.shape) == 2
top1_pred = order_pred[:, -1:]
top5_pred = order_pred[:, -5:]
top1_acc = np.mean(top1_pred == gt)
top5_acc = np.mean(np.max(top5_pred == gt, 1))
return {prefix + 'top1': top1_acc,
prefix + 'top5': top5_acc}
def main(argv):
del argv
# Load the model.
sklearn_reg = _MODELS2REG[FLAGS.model_name]
module = hub.load(f'https://tfhub.dev/deepmind/mmv/{FLAGS.model_name}/1')
def get_features(input_frames: np.ndarray):
vision_output = module.signatures['video'](
tf.constant(tf.cast(input_frames, dtype=tf.float32)))
return vision_output['before_head'].numpy()
def collect_features_and_labels(ds: tf.data.Dataset, subset: str):
"""Collect features and labels."""
features = []
labels = []
print(f'Computing features on {subset}')
examples = iter(tfds.as_numpy(ds))
num_examples = 0
for ex in examples:
vid_representation = get_features(ex[builders.IMAGE_FEATURE_NAME])
labels.append(ex[builders.LABEL_INDEX_FEATURE_NAME])
features.append(vid_representation)
num_examples += ex[builders.LABEL_INDEX_FEATURE_NAME].shape[0]
if num_examples % 100 == 0:
print(f'Processed {num_examples} examples.')
labels = np.concatenate(labels, axis=0)
features = np.concatenate(features, axis=0)
print(f'Finish collecting {subset} features of shape {features.shape}')
return features, labels
# Generate the training and testing datasets.
conf_kwargs = dict(
num_frames=FLAGS.num_frames,
stride=FLAGS.stride,
min_resize=FLAGS.min_resize,
crop_size=FLAGS.crop_size,
one_hot_label=False)
train_ds = hmdb.HMDB51Factory(
FLAGS.data_path, subset='train', split=FLAGS.hmdb51_split).configure(
is_training=True, **conf_kwargs).make_dataset(
shuffle=True,
num_epochs=FLAGS.num_train_epochs,
batch_size=FLAGS.train_batch_size)
test_ds = hmdb.HMDB51Factory(
FLAGS.data_path, subset='test', split=FLAGS.hmdb51_split).configure(
is_training=False, num_test_clips=FLAGS.num_test_clips,
**conf_kwargs).make_dataset(shuffle=False,
num_epochs=1,
batch_size=FLAGS.eval_batch_size)
# Collect features and labels.
train_features, train_labels = collect_features_and_labels(train_ds, 'train')
test_features, test_labels = collect_features_and_labels(test_ds, 'test')
# Train classifier
print('Training linear classifier!')
classifier = svm.LinearSVC(C=sklearn_reg)
scaler = preprocessing.StandardScaler().fit(train_features)
train_features = scaler.transform(train_features)
classifier.fit(train_features, train_labels.ravel())
print('Training done !')
# Evaluation.
test_features = scaler.transform(test_features)
print('Running inference on train')
pred_train = classifier.decision_function(train_features)
print('Running inference on test')
pred_test = classifier.decision_function(test_features)
if FLAGS.num_test_clips > 1:
pred_test = np.reshape(
pred_test, (test_labels.shape[0], -1, pred_test.shape[1]))
pred_test = pred_test.mean(axis=1)
# Compute accuracies.
metrics = compute_accuracy_metrics(pred_train, train_labels, prefix='train_')
metrics.update(
compute_accuracy_metrics(pred_test, test_labels, prefix='test_'))
print(metrics)
if __name__ == '__main__':
app.run(main)
|
dmvr-master
|
examples/linear_mmv_hmdb.py
|
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""HMDB51 video dataset."""
import os
from typing import Optional
from dmvr import modalities
from dmvr import video_dataset
class HMDB51Factory(video_dataset.BaseVideoDatasetFactory):
"""HMDB51 reader."""
_SUBSETS = ('train', 'test')
_SPLITS = (1, 2, 3)
_NUM_CLASSES = 51
_NUM_SHARDS = {'train': 59, 'test': 39}
def __init__(
self,
base_dir: str,
subset: str = 'train',
split: int = 1):
"""Constructor of HMDB51Factory."""
if subset not in HMDB51Factory._SUBSETS:
raise ValueError('Invalid subset "{}". The available subsets are: {}'
.format(subset, HMDB51Factory._SUBSETS))
if split not in HMDB51Factory._SPLITS:
raise ValueError('Invalid split "{}". The available splits are: {}'
.format(split, HMDB51Factory._SPLITS))
num_shards = self._NUM_SHARDS[subset]
shards = [f'{subset}_{split}-{i:05d}-of-{num_shards:05d}'
for i in range(num_shards)]
super().__init__(shards=[os.path.join(base_dir, s) for s in shards])
def _build(self,
is_training: Optional[bool] = True,
# Video related parameters.
num_frames: int = 32,
stride: int = 1,
num_test_clips: int = 1,
min_resize: int = 256,
crop_size: int = 224,
zero_centering_image: bool = False,
# Label related parameters.
one_hot_label: bool = True,
add_label_name: bool = False):
"""Default build for this dataset.
Args:
is_training: Whether or not in training mode.
num_frames: Number of frames per subclip. For single images, use 1.
stride: Temporal stride to sample frames.
num_test_clips: Number of test clips (1 by default). If more than 1, this
will sample multiple linearly spaced clips within each video at test
time. If 1, then a single clip in the middle of the video is sampled.
The clips are aggreagated in the batch dimension.
min_resize: Frames are resized so that `min(height, width)` is
`min_resize`.
crop_size: Final size of the frame after cropping the resized frames. Both
height and width are the same.
zero_centering_image: If `True`, frames are normalized to values in
[-1, 1]. If `False`, values in [0, 1].
one_hot_label: Return labels as one hot tensors.
add_label_name: Also return the name of the label.
"""
modalities.add_image(
parser_builder=self.parser_builder,
sampler_builder=self.sampler_builder,
decoder_builder=self.decoder_builder,
preprocessor_builder=self.preprocessor_builder,
postprocessor_builder=self.postprocessor_builder,
is_training=is_training,
num_frames=num_frames, stride=stride,
num_test_clips=num_test_clips,
min_resize=min_resize, crop_size=crop_size,
zero_centering_image=zero_centering_image)
modalities.add_label(
parser_builder=self.parser_builder,
decoder_builder=self.decoder_builder,
preprocessor_builder=self.preprocessor_builder,
one_hot_label=one_hot_label,
num_classes=HMDB51Factory._NUM_CLASSES,
add_label_name=add_label_name)
|
dmvr-master
|
examples/hmdb.py
|
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
r"""Script to generate csvs for HMDB.
You would need to download the official splits at:
http://serre-lab.clps.brown.edu/wp-content/uploads/2013/10/test_train_splits.rar
and unrar the archive on your machine, e.g. /path/to/hmdb/
Usage:
```
python generate_hmdb_csv.py \
--input_path=/path/to/hmdb/testTrainMulti_7030_splits \
--output_path=/path/to/hmdb
```
"""
import collections
import csv
import glob
import os
from absl import app
from absl import flags
flags.DEFINE_string(
'input_path', None, 'Path containing the metadata from HMDB51.')
flags.DEFINE_string(
'output_path', None, 'Path containing the metadata from HMDB51.')
FLAGS = flags.FLAGS
InputVideo = collections.namedtuple(
'InputRow',
('video_id', 'split', 'subset', 'label_name'))
OutputRow = collections.namedtuple(
'OutputRow',
('video_id', 'start_sec', 'end_sec', 'label_name', 'label_id'))
def main(argv):
del argv
all_files = glob.glob(os.path.join(FLAGS.input_path, '*txt'))
all_rows = []
label_names = set()
# Read the files.
for file_name in all_files:
base_name = os.path.basename(file_name)
base_name_split = base_name.split('_')
label_name = ' '.join(base_name_split[:-2])
label_name = label_name.replace(' ', '_')
label_names.add(label_name)
split = int(base_name[-5])
with open(file_name, 'r') as f:
lines = [x.strip().split(' ') for x in f.readlines()]
for (video_id, ind) in lines:
if ind == '1':
all_rows.append(
InputVideo(video_id, split, 'train', label_name))
elif ind == '2':
all_rows.append(
InputVideo(video_id, split, 'test', label_name))
# Sort the label names.
label_names = list(label_names)
label_names.sort()
all_csvs = {
'train_1': [],
'train_2': [],
'train_3': [],
'test_1': [],
'test_2': [],
'test_3': [],
}
# Generate the csvs rows.
for row in all_rows:
csv_name = f'{row.subset}_{row.split}'
all_csvs[csv_name].append(OutputRow(
video_id=f'{row.label_name}/{row.video_id}',
start_sec=0,
end_sec=20,
label_name=row.label_name,
label_id=label_names.index(row.label_name)
))
# Write the csvs.
for csv_name in all_csvs:
output_path = os.path.join(FLAGS.output_path, f'{csv_name}.csv')
print(f'Writing outputs to CSV file {output_path}')
with open(output_path, 'w') as f:
writer = csv.writer(f, delimiter=',')
writer.writerow(
['video_path', 'start', 'end', 'label'])
for row in all_csvs[csv_name]:
writer.writerow([
row.video_id, row.start_sec, row.end_sec, row.label_name])
if __name__ == '__main__':
app.run(main)
|
dmvr-master
|
examples/generate_hmdb_csv.py
|
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Builders for video datasets."""
import abc
import copy
import dataclasses
import enum
import typing
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
import tensorflow as tf
# Common types.
FeaturesDict = Dict[str, tf.Tensor]
Parser = Callable[[tf.Tensor], FeaturesDict]
Processor = Callable[[FeaturesDict], FeaturesDict]
FeatureProcessor = Callable[[tf.Tensor], tf.Tensor]
ProcessorState = Dict[str, Any]
StatefulProcessor = Callable[[FeaturesDict, ProcessorState], FeaturesDict]
StatefulFeatureProcessor = Callable[[tf.Tensor, ProcessorState], tf.Tensor]
FilterFn = Callable[[FeaturesDict], tf.Tensor] # Boolean tensor of shape ().
_DefaultSingleValue = Union[Tuple[bytes], Tuple[int], Tuple[float]]
_DefaultSequenceValue = Union[Tuple[Tuple[bytes]], Tuple[Tuple[int]],
Tuple[Tuple[float]]]
_DefaultValue = Union[_DefaultSingleValue, _DefaultSequenceValue]
_DefaultValues = Dict[str, Union[_DefaultValue, _DefaultSequenceValue]]
# Default name of features for each modality in `FeaturesDict`.
# User should reference those via variable and not string directly.
AUDIO_FEATURE_NAME = 'audio'
AUDIO_MEL_FEATURE_NAME = 'audio_mel'
FLOW_FEATURE_NAME = 'flow'
IMAGE_FEATURE_NAME = 'image'
KEY_FEATURE_NAME = 'key'
LABEL_INDEX_FEATURE_NAME = 'label'
LABEL_NAME_FEATURE_NAME = 'label_name'
TEXT_INDICES_FEATURE_NAME = 'text_indices'
TEXT_FEATURE_NAME = 'text'
class Phase(enum.Enum):
"""Phases of the data processing graph."""
READ = enum.auto()
PARSE = enum.auto()
SAMPLE = enum.auto()
DECODE = enum.auto()
PREPROCESS = enum.auto()
POSTPROCESS = enum.auto()
class RawFormat(enum.Enum):
"""Supported formats of raw data."""
TF_EXAMPLE = enum.auto()
TF_SEQUENCE_EXAMPLE = enum.auto()
class BaseParserBuilder(abc.ABC):
"""Builder for the parser function.
The parse function is supposed to process a `tf.Tensor` with the bytes of a
raw data representation into a features dictionary. The dictionary should keep
features in their rawest format, as the decode function will be responsible
for parsing those to usable formats, hence avoiding to decode more than
necessary.
Usage:
```python
parser_builder = ChildClassParserBuilder()
parse_fn = (parser_builder
.parse_feature('image/encoded',
tf.io.FixedLenSequenceFeature((), dtype=tf.string),
IMAGE_FEATURE_NAME)
.parse_feature('WAVEFORM/feature/floats',
tf.io.VarLenFeature(dtype=tf.float32),
AUDIO_FEATURE_NAME)
.parse_feature('my_text_feature',
tf.io.VarLenFeature(dtype=tf.string),
TEXT_FEATURE_NAME,
child_class_arg=42) # Argument for child class.
.parse_feature('my_own_modality_feature',
tf.io.FixedLenFeature(dtype=tf.int32),
'my_chosen_name')
.build())
raw_data = tf.Tensor(raw_data_bytes, dtype=tf.string)
features_dict = parse_fn(raw_data)
# features_dict: {
# 'image': tf.Tensor(bytes_representation_of_image),
# 'audio': tf.SparseTensor(audio_floats),
# 'text': tf.SparseTensor(text_as_string),
# 'my_chosen_name': tf.Tensor(int_value)
# }
```
Names in the generated features dictionary (`output_name`) should be the same
for a given modality (even if input names are different), as long as they have
the same meaning, so following processing code can be reused easily by using
the same `feature_name` in processors (e.g. `builders.IMAGE` can be used as
`output_name` for frames features independently of how they are stored in the
input serialized example).
"""
@abc.abstractmethod
def parse_feature(self,
feature_name: str,
feature_type: Union[tf.io.VarLenFeature,
tf.io.FixedLenFeature,
tf.io.FixedLenSequenceFeature],
output_name: Optional[str] = None,
**kwargs) -> 'BaseParserBuilder':
"""Parses the given feature when parsing the raw data.
Args:
feature_name: Name of the feature to be parsed (in the raw data).
feature_type: Type of `tf.Tensor` to be generated from parsing the given
feature. The type will depend on the structure of the raw data. E.g.
a sequence of frames (list with one JPEG as bytes string) should be
`tf.io.FixedLenSequenceFeature`, while a single feature of variable
length (audio) should be `tf.io.VarLenFeature`.
output_name: Name of the feature in the resulting dictionary. This should
be a meaningful name and preferably the same across different datasets,
so later processing functions can be reused easily. Name should be
unique over all features. If no `output_name` is provided,
`feature_name` is used.
**kwargs: Named arguments extended by the child class.
Returns:
This instance of the `BaseParserBuilder`.
"""
@abc.abstractmethod
def _parse_fn(self, raw_data: tf.Tensor) -> FeaturesDict:
"""Converts bytes of raw data to a features dictionary.
Args:
raw_data: `tf.Tensor` of bytes (string).
Returns:
The features dictionary obtained from parsing the raw data.
"""
def get_fake_data(self,
default_values: Optional[_DefaultValues] = None,
) -> FeaturesDict:
"""Get fake data following the spec of the parser.
Args:
default_values: Allows the user to pass default values to be used to fill
the feature dictionary of fake data in lieu of the harcoded default.
Usage:
```python
parser_builder.parse_feature(
'image/encoded',
tf.io.FixedLenSequenceFeature((), dtype=tf.string),
IMAGE_FEATURE_NAME)
fake_data = parser_builder.get_fake_data(
default_values={IMAGE_FEATURE_NAME: (b'a jpeg string',)})
)
```
Returns:
The features dictionary obtained from parsing the fake data.
"""
raise NotImplementedError('get_fake_data is not implemented!')
def build(self) -> Parser:
"""Builds parse function."""
return self._parse_fn
def get_default_value(feature_name: str,
default_values: _DefaultValues,
output_names: Sequence[str],
expected_len: Optional[int],
list_of_list: bool = False) -> Optional[_DefaultValue]:
"""Get a default value list for ParserBuilders.
Args:
feature_name: The input feature name for which we want to provide default
value for.
default_values: A dict containing the default value. For convenience as we
dont have a control on the input feature_name which might depend on how
the data is stored, the key of the dict have to be the ones corresponding
to the output_names. Values of the dict can either be a tuple of
float/int/bytes (list_of_list=False) or a tuple of tuples of
float/int/bytes (list_of_list=True).
output_names: The output names used for feature_name. Note that the same
feature_name can be used for multiple output, hence why output_names is a
Sequence. If the user provide default_value for multiple of these
output_names, they have to all match.
expected_len: If provided, will check that the default value has the correct
length.
list_of_list: Whether or not we provide default value for single example
(a tuple is expected) or a default value for a sequence example that can
accomodate list of list.
Returns:
The default_value if it exists in default_values or None instead.
Raises:
ValueError if different default_value are provided for the output_names.
ValueError if the provided default value does not have the expected len.
Note: The reason why the default_value should be tuples instead of lists
is that we can verify their uniqueness (as tuple are hashable objects
whereas list are not).
"""
output_values = [default_values.get(n) for n in output_names]
output_values = list(set(filter(lambda x: x is not None, output_values)))
if not output_values:
# Case where no entries in default_values matched the provided output_names
return None
# output_values contain all the default_values given for output_names.
# Since all names in output_names correspond to the same feature_name we need
# to ensure that there is at most a single one entry in the set.
if len(output_values) > 1:
raise ValueError(
f'Different default values (={output_values}) were assigned'
f' to the same underlying input name (={feature_name})!')
# We ensure there was a unique default_value provided which corresponds to
# the first entry of the set.
output_value = output_values[0]
# At this stage output_value can be:
# - If list_of_list:
# * a) A tuple of tuples of bytes/int/float.
# * b) A tuple of bytes/int/float. In that case we will transform to a
# tuple of tuple: (output_value,) to match the expected format.
# - if not list_of_list:
# * c) A tuple of bytes/int/float.
if list_of_list and isinstance(output_value[0], (bytes, int, float)):
# Case b) => we transform to tuple of tuples.
assert all([isinstance(x, (bytes, int, float)) for x in output_value])
# The next conversion is used to make sure pytype recognize the type.
output_value = (
tuple([x for x in output_value if isinstance(x, (bytes, str, float))]),
)
# If expected_len is provided, we verify that the length of the inner tuple of
# bytes/int/float is as expected.
if expected_len:
actual_length = len(output_value[0]) if list_of_list else len(output_value)
if actual_length != expected_len:
raise ValueError(
f'The expected len(={expected_len}) for {feature_name} is different'
f' from the provided one (={actual_length}).')
return output_value
def _get_feature(
feature_name: str,
feature_type: Union[tf.io.VarLenFeature,
tf.io.FixedLenFeature,
tf.io.FixedLenSequenceFeature],
default_values: _DefaultValues,
output_names: Sequence[str],
default_int: int = 0,
default_float: float = 42.0,
default_bytes: bytes = b'lorem ipsum',
) -> tf.train.Feature:
"""Get default tf.train.Feature."""
if isinstance(feature_type, tf.io.VarLenFeature):
shape = [1]
expected_len = None # The len of the default_values can be arbitrary.
elif (isinstance(feature_type, tf.io.FixedLenFeature) or
isinstance(feature_type, tf.io.FixedLenSequenceFeature)):
shape = feature_type.shape
if isinstance(shape, int):
shape = [shape]
shape = shape if len(shape) == 1 else [1]
if len(shape) > 1:
raise ValueError(
f'Shape must be of length 1 but shape={shape} was provided!')
expected_len = shape[0]
else:
raise ValueError(f'feature_type={feature_type} is not supported!')
value = get_default_value(
feature_name, default_values, output_names, expected_len)
if feature_type.dtype == tf.string:
if value is None:
value = [default_bytes] * shape[0]
assert isinstance(value[0], bytes)
output = tf.train.Feature(bytes_list=tf.train.BytesList(value=value))
elif feature_type.dtype in (tf.bool, tf.int32, tf.int64):
if value is None:
value = [default_int] * shape[0]
assert isinstance(value[0], int)
output = tf.train.Feature(int64_list=tf.train.Int64List(value=value))
elif feature_type.dtype in (tf.float32, tf.float64):
if value is None:
value = [default_float] * shape[0]
assert isinstance(value[0], float)
output = tf.train.Feature(float_list=tf.train.FloatList(value=value))
else:
raise ValueError(f'dtype {feature_type.dtype} is not supported!')
return output
def _get_feature_list(
feature_name: str,
feature_type: Union[tf.io.VarLenFeature, tf.io.FixedLenSequenceFeature],
default_values: _DefaultValues,
output_names: Sequence[str],
default_feature_list_len: int = 1,
) -> tf.train.FeatureList:
"""Get default tf.train.FeatureList."""
if isinstance(feature_type, tf.io.VarLenFeature):
expected_len = None
elif isinstance(feature_type, tf.io.FixedLenSequenceFeature):
shape = feature_type.shape
if isinstance(shape, int):
shape = [shape]
if len(shape) > 1:
raise ValueError(
f'Shape must be of length 1 but shape={shape} was provided!')
expected_len = shape[0] if len(shape) == 1 else 1
value_list = get_default_value(feature_name, default_values, output_names,
expected_len, list_of_list=True)
# If not in the default_values, we fall back to single value that we repeat
# default_feature_list_len times.
if value_list is None:
feature = _get_feature(feature_name, feature_type, dict(), output_names)
feature_list = tf.train.FeatureList(
feature=[feature] * default_feature_list_len)
else:
features = []
if isinstance(value_list[0][0], bytes):
for val in value_list:
assert all([isinstance(x, bytes) for x in val])
features.append(
tf.train.Feature(bytes_list=tf.train.BytesList(value=val)))
elif isinstance(value_list[0][0], float):
for val in value_list:
assert all([isinstance(x, float) for x in val])
features.append(
tf.train.Feature(float_list=tf.train.FloatList(value=val)))
elif isinstance(value_list[0][0], int):
for val in value_list:
assert all([isinstance(x, int) for x in val])
features.append(
tf.train.Feature(int64_list=tf.train.Int64List(value=val)))
else:
raise ValueError(f'value_list (={value_list}) given for {feature_name} '
'has to be of bytes/float/int')
feature_list = tf.train.FeatureList(feature=features)
return feature_list
class SequenceExampleParserBuilder(BaseParserBuilder):
"""Builder for the parser function from raw `tf.train.SequenceExample`."""
def __init__(self):
super().__init__()
self._features: Dict[Tuple[str, bool],
Union[tf.io.VarLenFeature, tf.io.FixedLenFeature,
tf.io.FixedLenSequenceFeature]] = {}
self._name_dict: Dict[Tuple[str, bool], List[str]] = {}
def parse_feature(self,
feature_name: str,
feature_type: Union[tf.io.VarLenFeature,
tf.io.FixedLenFeature,
tf.io.FixedLenSequenceFeature],
output_name: Optional[str] = None,
is_context: bool = False) -> 'SequenceExampleParserBuilder':
"""Parses the given feature when parsing the raw `tf.train.SequenceExample`.
The same input feature can be added more than once with different
`output_name` but always with the same `feature_type`. This is useful when
multiple views (with different processing down the line) of the same data
is needed.
Args:
feature_name: See base class.
feature_type: See base class.
output_name: See base class.
is_context: True if feature is in the `context` of the
`tf.train.SequenceExample` and false if it is in the `feature_lists`.
Note that it depends on the structure of the parsed
`tf.train.SequenceExample`.
Returns:
This instance of `SequenceExampleParserBuilder`.
Raises:
ValueError: `output_name` is not unique.
ValueError: Different `feature_type` for the same input feature.
"""
# Validate name.
output_name = output_name or feature_name
for name_list in self._name_dict.values():
if output_name in name_list:
raise ValueError(f'Given `output_name` {output_name} is not unique.')
feature_key = (feature_name, is_context)
if feature_key not in self._features:
self._features[feature_key] = feature_type
elif self._features[feature_key] != feature_type:
raise ValueError('Different `feature_type` given for the same feature '
f'{feature_name} with `is_context` {is_context}.')
if (feature_name, is_context) not in self._name_dict:
self._name_dict[(feature_name, is_context)] = []
self._name_dict[(feature_name, is_context)].append(output_name)
return self
def get_fake_data(self,
default_values: Optional[_DefaultValues] = None,
) -> FeaturesDict:
default_values = default_values or {}
# Get tf.SequenceExample proto from the parser spec, then parse it.
feature = {}
feature_list = {}
for (feat_name, is_context), out_names in self._name_dict.items():
feat_type = self._features[(feat_name, is_context)]
if is_context:
feature[feat_name] = _get_feature(
feat_name, feat_type, default_values, out_names)
else:
feature_list[feat_name] = _get_feature_list(
feat_name, feat_type, default_values, out_names)
context = tf.train.Features(feature=feature)
feature_lists = tf.train.FeatureLists(feature_list=feature_list)
tf_proto = tf.constant(tf.train.SequenceExample(
context=context, feature_lists=feature_lists).SerializeToString())
return self._parse_fn(tf_proto)
def _parse_fn(self, raw_data: tf.Tensor) -> FeaturesDict:
"""Converts bytes of `tf.train.SequenceExample` to a features dictionary."""
context_features = {n: t for (n, c), t in self._features.items() if c}
sequence_features = {n: t for (n, c), t in self._features.items() if not c}
parsed_context, parsed_sequence = tf.io.parse_single_sequence_example(
raw_data, context_features, sequence_features)
# Rename features dict.
output = {}
for context, parsed in [(True, parsed_context), (False, parsed_sequence)]:
for k, f in parsed.items():
output_names = self._name_dict[(k, context)]
for output_name in output_names:
output[output_name]: tf.Tensor = tf.identity(f)
return output
class ExampleParserBuilder(BaseParserBuilder):
"""Builder for the parser function from raw `tf.train.Example`."""
def __init__(self):
super().__init__()
self._features = {}
self._name_dict: Dict[str, List[str]] = {}
def parse_feature( # pytype: disable=signature-mismatch # overriding-parameter-type-checks
self,
feature_name: str,
feature_type: Union[tf.io.VarLenFeature, tf.io.FixedLenFeature],
output_name: Optional[str] = None) -> 'ExampleParserBuilder':
"""Parses the given feature when parsing the raw `tf.train.Example`.
The same input feature can be added more than once with different
`output_name` but always with the same `feature_type`. This is useful when
multiple views (with different processings down the line) of the same data
is needed.
Args:
feature_name: See base class.
feature_type: See base class.
output_name: See base class.
Returns:
This instance of `ExampleParserBuilder`.
Raises:
ValueError: `output_name` is not unique.
ValueError: Different `feature_type` for the same input feature.
"""
# Validate name.
output_name = output_name or feature_name
for name_list in self._name_dict.values():
if output_name in name_list:
raise ValueError(f'Given output_name {output_name} is not unique.')
if feature_name not in self._features:
self._features[feature_name] = feature_type
elif self._features[feature_name] != feature_type:
raise ValueError('Different `feature_type` given for the same feature '
f'{feature_name}.')
if feature_name not in self._name_dict:
self._name_dict[feature_name] = []
self._name_dict[feature_name].append(output_name)
return self
def get_fake_data(self,
default_values: Optional[_DefaultValues] = None,
) -> FeaturesDict:
"""Generate a fake example following the spec of the ParserBuilder."""
default_values = default_values or {}
# Get a tf.Example proto following the spec of the parser, then parse it.
feature_dict = {}
for feat_name, out_names in self._name_dict.items():
feat_type = self._features[feat_name]
feature_dict[feat_name] = _get_feature(
feat_name, feat_type, default_values, out_names)
tf_proto = tf.constant(tf.train.Example(
features=tf.train.Features(feature=feature_dict)).SerializeToString())
return self._parse_fn(tf_proto)
def _parse_fn(self, raw_data: tf.Tensor) -> FeaturesDict:
"""Converts bytes of raw Example to a features dictionary."""
parsed = tf.io.parse_single_example(
serialized=raw_data, features=self._features)
# Rename features dict.
output = {}
for k, f in parsed.items():
output_names = self._name_dict[k]
for output_name in output_names:
output[output_name]: tf.Tensor = tf.identity(f)
return output
RAW_FORMAT_TO_PARSER = {
RawFormat.TF_EXAMPLE: ExampleParserBuilder,
RawFormat.TF_SEQUENCE_EXAMPLE: SequenceExampleParserBuilder,
}
@dataclasses.dataclass
class FunctionDescription:
"""Function description in DMVR."""
fn_name: str
fn: Union[Processor, FeatureProcessor, StatefulProcessor,
StatefulFeatureProcessor]
feature_name: Optional[str]
stateful: bool
class _Builder(abc.ABC):
"""Base class for processor builders.
This builder can be used to build a process function that takes as input a
features dictionary and outputs another features dictionary. Each function
added to the builder can transform either a single feature (`tf.Tensor`) when
a `feature_name` is provided, outputting its transformed version, or transform
the entire `FeaturesDict` when no `feature_name` is provided (this can be used
when the function needs access to more than one feature). The generated
processor is a function which executes each one of the added functions in
order.
Basic usage:
```python
def crop_image(image: tf.Tensor) -> tf.Tensor:
...
return cropped_image
def text_to_indices(features_dict: FeaturesDict) -> FeaturesDict:
text = features_dict[TEXT_FEATURE_NAME]
indices = tokenize_text(text)
del features_dict[TEXT_FEATURE_NAME]
features_dict[TEXT_INDICES_FEATURE_NAME] = indices
return features_dict
builder = _Builder()
process_fn = (builder
.add_fn(crop_image, feature_name=IMAGE_FEATURE_NAME)
.add_fn(text_to_indices)
.build())
# input_features_dict = {
# 'image': tf.Tensor(rgb_representation),
# 'text': tf.Tensor(sentences)
# }
output_features_dict = process_fn(input_features_dict)
# output_features_dict: {
# 'image': tf.Tensor(cropped_rgb_representation)
# 'text_indices': tf.Tensor(indices)
# }
```
This builder also supports more flexible control by allowing deleting and
replacing added functions and inserting new ones. This allows more granular
operations and better control over the data processing graph.
Usage:
```python
def standard_crop_image(image: tf.Tensor) -> tf.Tensor:
...
return cropped_image
def special_crop_image(image: tf.Tensor) -> tf.Tensor:
...
return specially_cropped_image
builder = _Builder().add_fn(standard_crop_image, IMAGE_FEATURE_NAME, 'crop')
# Add other things to builder.
builder.replace_fn('crop', special_crop_image)
```
In order to easily add different modalities, this builder allows a shared
state among all added functions. The state is a mutable dictionary passed to
the stateful functions and might be modified in order to keep metadata. A
basic use case is sampling video and audio consistently.
Usage:
```python
def sample_image(frames: tf.Tensor, state: Dict[str, Any]) -> tf.Tensor:
...
state['start_sample_time'] = start_time
state['end_sample_time'] = end_time
return sampled_frames
def sample_audio(audio: tf.Tensor, state: Dict[str, Any]) -> tf.Tensor:
start_time = state['start_sample_time']
end_time = state['end_sample_time']
...
return sampled_audio_according_to_start_and_end
builder = _Builder().add_fn(sample_image, IMAGE_FEATURE_NAME, stateful=True)
.add_fn(sample_audio, AUDIO_FEATURE_NAME, stateful=True)
```
"""
def __init__(self):
self._fns_list = []
self._fn_idx = 0
def add_fn(self,
fn: Union[Processor, FeatureProcessor, StatefulProcessor,
StatefulFeatureProcessor],
feature_name: Optional[str] = None,
fn_name: Optional[str] = None,
stateful: bool = False,
add_before_fn_name: Optional[str] = None) -> '_Builder':
"""Adds the given function to the processor.
Args:
fn: Function to be added to the processor.
feature_name: Name of the feature input and output of the function. If no
name is provided, the entire features dictionary will be given as input
to the function.
fn_name: Name for the function being added. This allows users to replace
specific functions if needed instead of rebuilding the entire processor
graph. If no name is given a unique identifier will be used.
stateful: Whether the function has access to the state of the builder. If
`True`, the function should receive the state as second parameter.
add_before_fn_name: Name of the function before which the given function
should be added. If None, given function will be appended to the list.
Returns:
This instance of the builder.
Raises:
ValueError: `fn_name` is not unique.
ValueError: Value of `add_before_fn_name` does not exist.
"""
if fn_name is None:
fn_name = f'fn_{self._fn_idx}'
self._fn_idx += 1
if fn_name in [fd.fn_name for fd in self._fns_list]:
raise ValueError(f'Given `fn_name` {fn_name} is not unique.')
new_fd = FunctionDescription(fn_name, fn, feature_name, stateful)
if add_before_fn_name:
add_before_idx = [
i for i, fd in enumerate(self._fns_list)
if fd.fn_name == add_before_fn_name
]
if not add_before_idx:
raise ValueError(
f'Given `add_before_idx` {add_before_idx} does not exist.')
add_before_idx = add_before_idx[0]
self._fns_list.insert(add_before_idx, new_fd)
else:
self._fns_list.append(new_fd)
return self
def reset(self) -> '_Builder':
"""Resets the list of functions in the builder."""
self._fns_list = []
return self
def remove_fn(self, fn_name: str) -> '_Builder':
"""Removes the given function from the builder.
Args:
fn_name: Name of the function to be deleted.
Returns:
This instance of the builder.
"""
self._fns_list = [fd for fd in self._fns_list if fd.fn_name != fn_name]
return self
def replace_fn(
self, fn_name: str, fn: Union[Processor, FeatureProcessor,
StatefulProcessor, StatefulFeatureProcessor]
) -> '_Builder':
"""Replaces the function with the given name by the given function.
Args:
fn_name: Name of the function to be replaced.
fn: Function to be used as replacement.
Returns:
This instance of the builder.
Raises:
ValueError: `fn_name` name does not exist.
"""
idx = [i for i, fd in enumerate(self._fns_list) if fd.fn_name == fn_name]
if not idx:
raise ValueError(f'Given `fn_name` {fn_name} does not exist.')
idx = idx[0]
fd = self._fns_list[idx]
new_fd = FunctionDescription(fd.fn_name, fn, fd.feature_name, fd.stateful)
self._fns_list[idx] = new_fd
return self
def get_summary(self):
"""Returns a summary of the current functions in the builder."""
return copy.copy(self._fns_list)
def build(self) -> Processor:
"""Builds process function."""
fns_list = tuple(self._fns_list)
def process_fn(features_dict: FeaturesDict) -> FeaturesDict:
"""Adds function one at a time."""
output = copy.copy(features_dict)
state: Dict[str, Any] = {}
for fd in fns_list:
if fd.feature_name:
if fd.stateful:
fn = typing.cast(StatefulFeatureProcessor, fd.fn)
output[fd.feature_name] = fn(output[fd.feature_name], state)
else:
fn = typing.cast(FeatureProcessor, fd.fn)
output[fd.feature_name] = fn(output[fd.feature_name])
else:
if fd.stateful:
fn = typing.cast(StatefulProcessor, fd.fn)
output = fn(output, state)
else:
fn = typing.cast(Processor, fd.fn)
output = fn(output)
return output
return process_fn
class SamplerBuilder(_Builder):
"""Builder for the sample function.
The sample function is supposed to sample only the useful bits of the given
features dictionary in order to avoid later useless decoding. E.g. sample only
the necessary frames from the video. Function is run on unbatched examples.
For usage see parent class docstring.
"""
class DecoderBuilder(_Builder):
"""Builder for the decode function.
The decode function is supposed to transform raw features into usable formats.
E.g. decode JPEG string tensors to rgb. This function should not implement
operations as crop, resize, etc. and instead should do more basic operations
(that are common over independent datasets or usages of the same dataset).
Function is run on unbatched examples.
For usage see parent class docstring.
"""
class PreprocessorBuilder(_Builder):
"""Builder for the preprocess function.
The preprocess function is supposed to transform features in order to put them
in the desired format. E.g. crop, pad, resize, etc. Function is run on
unbatched examples.
For usage see parent class docstring.
"""
class PostprocessorBuilder(_Builder):
"""Builder for postprocess function.
Same as `PreprocessorBuilder` but runs on batched examples. E.g. transpose.
For usage see parent class docstring.
"""
class FilterBuilder:
"""Agglomerator of filter functions for each data process phase.
Usage:
```python
def filter_on_key(features_dict: FeaturesDict) -> tf.Tensor:
return tf.not_equal(
tf.strings.substr(features_dict[KEY_FEATURE_NAME], 0, 7), 'invalid')
def filter_on_channels(features_dict: FeaturesDict) -> tf.Tensor:
return tf.equal(tf.shape(features_dict[IMAGE_FEATURE_NAME])[3], 3)
filter_builder = (FilterBuilder()
.add_filter_fn(filter_on_key, Phase.READ)
.add_filter_fn(filter_on_channels, Phase.DECODE))
filter_fn_post_read = filter_builder.build(Phase.PARSE)
filter_fn_post_decode = filter_builder.build(Phase.DECODE)
# input_ds = [{
# 'image': tf.Tensor(rgb_representation_with_channel_3),
# 'key': tf.Tensor('invalid_key_0')
# },
# {
# 'image': tf.Tensor(rgb_representation_with_channel_3),
# 'key': tf.Tensor('valid_key_1')
# },
# {
# 'image': tf.Tensor(rgb_representation_with_channel_1),
# 'key': tf.Tensor('valid_key_2')
# }]
# Read.
ds = input_ds.filter(filter_fn_post_parse)
# Decode.
ds = ds.filter(filter_fn_post_decode)
# ds: [{
# 'image': tf.Tensor(rgb_representation_with_channel_3),
# 'key': tf.Tensor('valid_key_1')
# }]
```
"""
def __init__(self):
self._filter_fns: Dict[Phase, List[FilterFn]] = {}
for phase in Phase:
self._filter_fns[phase] = []
def add_filter_fn(self, filter_fn: FilterFn,
after_phase: Phase) -> 'FilterBuilder':
"""Adds the given function to the filter.
Args:
filter_fn: Function to be added to the filter. It must receive as
parameter a features dictionary and output a boolean `tf.Tensor` of
shape () indicating if the example should be kept.
after_phase: Phase after which the filter should be applied. In order to
avoid useless processing, the earliest possible phase should be used.
Returns:
This instance of the `FilterBuilder`.
"""
self._filter_fns[after_phase].append(filter_fn)
return self
def build(self, after_phase: Phase) -> FilterFn:
"""Builds the filter function for the given phase."""
filter_fns = copy.copy(self._filter_fns[after_phase])
def filter_fn(features_dict: FeaturesDict) -> tf.Tensor:
keep = tf.constant(True)
for fn in filter_fns:
keep = tf.logical_and(keep, fn(features_dict))
return keep
return filter_fn
def get_summary(self):
"""Returns a summary of the current functions in the builder."""
return copy.copy(self._filter_fns)
|
dmvr-master
|
dmvr/builders.py
|
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for sources."""
import os
from dmvr import sources
import tensorflow as tf
class TFRecordsSourceTest(tf.test.TestCase):
def setUp(self):
super().setUp()
self._shard = os.path.join(self.get_temp_dir(), 'shard')
# Generate a TFRecord single shard with one serialized SequenceExample
# in the format ('sequence', [[0], [1], ..., [99]]).
with tf.io.TFRecordWriter(self._shard) as builder:
self._seq_example = tf.train.SequenceExample()
for i in range(100):
self._seq_example.feature_lists.feature_list.get_or_create(
'sequence').feature.add().int64_list.value[:] = [i]
builder.write(self._seq_example.SerializeToString())
def test_load_and_decode(self):
source = sources.TFRecordsSource()
ds = source.load_and_decode_shard(self._shard)
it = iter(ds)
data = next(it)
self.assertEqual(data[0], self._shard.encode('utf-8'))
self.assertEqual(data[1], self._seq_example.SerializeToString())
with self.assertRaises(StopIteration) as _:
data = next(it)
def test_input_as_tensor(self):
source = sources.TFRecordsSource()
ds = source.load_and_decode_shard(tf.constant(self._shard))
it = iter(ds)
data = next(it)
self.assertEqual(data[0], self._shard.encode('utf-8'))
self.assertEqual(data[1], self._seq_example.SerializeToString())
if __name__ == '__main__':
tf.test.main()
|
dmvr-master
|
dmvr/sources_test.py
|
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for builders."""
from dmvr import builders
from parameterized import parameterized
import tensorflow as tf
class SequenceExampleParserBuilderTest(tf.test.TestCase):
def setUp(self):
super().setUp()
# Prepare SequenceExample.
seq_example = tf.train.SequenceExample()
seq_example.context.feature.get_or_create(
'my_context_feature').int64_list.value[:] = [0, 1]
seq_example.feature_lists.feature_list.get_or_create(
'my_seq_feature').feature.add().int64_list.value[:] = [2, 3]
seq_example.feature_lists.feature_list.get(
'my_seq_feature').feature.add().int64_list.value[:] = [4, 5]
seq_example.feature_lists.feature_list.get_or_create(
'my_var_len_seq_feature').feature.add().int64_list.value[:] = [6]
seq_example.feature_lists.feature_list.get(
'my_var_len_seq_feature').feature.add().int64_list.value[:] = [7, 8]
# Put SequenceExample in expected format.
self._raw_seq_example = tf.constant(seq_example.SerializeToString())
def test_parse(self):
parse_fn = (
builders.SequenceExampleParserBuilder()
.parse_feature('my_context_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64),
'context_name', True)
.parse_feature('my_seq_feature',
tf.io.FixedLenSequenceFeature((2,), dtype=tf.int64),
'seq_name')
.parse_feature('my_var_len_seq_feature',
tf.io.VarLenFeature(dtype=tf.int64),
'var_len_seq_name')
.build())
features_dict = parse_fn(self._raw_seq_example)
self.assertSetEqual(set(['context_name', 'seq_name', 'var_len_seq_name']),
set(features_dict.keys()))
self.assertAllEqual(features_dict['context_name'], [0, 1])
self.assertAllEqual(features_dict['seq_name'], [[2, 3], [4, 5]])
self.assertAllEqual(features_dict['var_len_seq_name'].values, [6, 7, 8])
self.assertAllEqual(features_dict['var_len_seq_name'].indices,
[[0, 0], [1, 0], [1, 1]])
self.assertAllEqual(features_dict['var_len_seq_name'].dense_shape, [2, 2])
def test_fake_data(self):
parser = builders.SequenceExampleParserBuilder()
parser.parse_feature('my_context_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64),
'context_name', True)
parser.parse_feature('my_seq_feature',
tf.io.FixedLenSequenceFeature((2,), dtype=tf.int64),
'seq_name')
parser.parse_feature('my_var_len_seq_feature',
tf.io.VarLenFeature(dtype=tf.int64),
'var_len_seq_name')
fake_data = parser.get_fake_data(default_values={
'context_name': (0, 1), 'var_len_seq_name': ((1, 2), (3, 4, 5))})
self.assertSetEqual(set(['context_name', 'seq_name', 'var_len_seq_name']),
set(fake_data.keys()))
self.assertAllEqual(fake_data['context_name'], [0, 1])
self.assertAllEqual(fake_data['seq_name'], [[0, 0]])
self.assertAllEqual(fake_data['var_len_seq_name'].values, [1, 2, 3, 4, 5])
self.assertAllEqual(fake_data['var_len_seq_name'].dense_shape, [2, 3])
def test_no_output_name(self):
parse_fn = (
builders.SequenceExampleParserBuilder()
.parse_feature('my_context_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64),
is_context=True)
.build())
features_dict = parse_fn(self._raw_seq_example)
self.assertSetEqual(set(['my_context_feature']), set(features_dict.keys()))
def test_same_output_name(self):
parser_builder = builders.SequenceExampleParserBuilder()
parser_builder.parse_feature('my_context_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64),
'same_name', True)
parser_builder.parse_feature('my_context_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64),
'other_name', True)
with self.assertRaises(ValueError) as _:
parser_builder.parse_feature(
'my_seq_feature', tf.io.FixedLenSequenceFeature((2,), dtype=tf.int64),
'same_name')
def test_different_types_for_same_feature(self):
parser_builder = builders.SequenceExampleParserBuilder()
parser_builder.parse_feature('my_context_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64),
'context_name', True)
with self.assertRaises(ValueError) as _:
parser_builder.parse_feature('my_context_feature',
tf.io.FixedLenFeature((3,), dtype=tf.int64),
'context_name_2', True)
with self.assertRaises(ValueError) as _:
parser_builder.parse_feature('my_context_feature',
tf.io.FixedLenFeature((2,), dtype=tf.string),
'context_name_3', True)
class ExampleParserBuilderTest(tf.test.TestCase):
def setUp(self):
super().setUp()
# Prepare Example.
tf_example = tf.train.Example()
tf_example.features.feature.get_or_create(
'my_fixed_len_feature').int64_list.value[:] = [0, 1]
tf_example.features.feature.get_or_create(
'my_var_len_feature').int64_list.value[:] = [2, 3, 4]
# Put Example in expected format.
self._raw_tf_example = tf.constant(tf_example.SerializeToString())
def test_parse(self):
parse_fn = (
builders.ExampleParserBuilder()
.parse_feature('my_fixed_len_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64),
'fixed_name')
.parse_feature('my_var_len_feature',
tf.io.VarLenFeature(dtype=tf.int64), 'var_name')
.build())
features_dict = parse_fn(self._raw_tf_example)
self.assertSetEqual(set(['fixed_name', 'var_name']),
set(features_dict.keys()))
self.assertAllEqual(features_dict['fixed_name'], [0, 1])
self.assertAllEqual(features_dict['var_name'].values, [2, 3, 4])
self.assertAllEqual(features_dict['var_name'].indices, [[0], [1], [2]])
self.assertAllEqual(features_dict['var_name'].dense_shape, [3])
def test_fake_data(self):
fake_data = (
builders.ExampleParserBuilder()
.parse_feature('my_fixed_len_feature',
tf.io.FixedLenFeature((2,), dtype=tf.string),
'fixed_name')
.parse_feature('my_var_len_feature',
tf.io.VarLenFeature(dtype=tf.int64), 'var_name')
.get_fake_data(default_values={'fixed_name': (b'42', b'25')}))
self.assertSetEqual(set(['fixed_name', 'var_name']),
set(fake_data.keys()))
self.assertAllEqual(fake_data['fixed_name'], [b'42', b'25'])
self.assertAllEqual(fake_data['var_name'].values, [0])
self.assertAllEqual(fake_data['var_name'].indices, [[0]])
self.assertAllEqual(fake_data['var_name'].dense_shape, [1])
def test_no_output_name(self):
parse_fn = (
builders.ExampleParserBuilder()
.parse_feature('my_fixed_len_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64))
.build())
features_dict = parse_fn(self._raw_tf_example)
self.assertSetEqual(set(['my_fixed_len_feature']),
set(features_dict.keys()))
def test_same_output_name(self):
parser_builder = builders.ExampleParserBuilder()
parser_builder.parse_feature('my_fixed_len_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64),
'same_name')
parser_builder.parse_feature('my_fixed_len_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64),
'other_name')
with self.assertRaises(ValueError) as _:
parser_builder.parse_feature(
'my_var_len_feature',
tf.io.FixedLenSequenceFeature((2,), dtype=tf.int64), 'same_name')
def test_different_types_for_same_feature(self):
parser_builder = builders.SequenceExampleParserBuilder()
parser_builder.parse_feature('my_fixed_len_feature',
tf.io.FixedLenFeature((2,), dtype=tf.int64),
'fixed_name')
with self.assertRaises(ValueError) as _:
parser_builder.parse_feature('my_fixed_len_feature',
tf.io.FixedLenFeature((3,), dtype=tf.int64),
'fixed_name_2')
with self.assertRaises(ValueError) as _:
parser_builder.parse_feature('my_fixed_len_feature',
tf.io.FixedLenFeature((2,), dtype=tf.string),
'fixed_name_3')
def _add_one(x):
return tf.math.add(x, 1)
def _subtract_one(x):
return tf.math.subtract(x, 1)
def _upper_text(x):
return tf.strings.upper(x)
def _add_text_len(features_dict):
features_dict['feature_3'] = tf.strings.length(
input=features_dict['feature_2'])
return features_dict
def _set_state(x, state):
state['value'] = x
return x
def _use_state(features_dict, state):
features_dict['feature_4'] = state['value']
return features_dict
class BuilderTest(tf.test.TestCase):
def setUp(self):
super().setUp()
# Prepare features dictionary.
self._input_features_dict = {
'feature_1': tf.constant(0),
'feature_2': tf.constant('text')
}
def test_basic(self):
process_fn = (
builders._Builder()
.add_fn(_add_one, 'feature_1')
.add_fn(_upper_text, 'feature_2')
.add_fn(_add_text_len)
.add_fn(_add_one, 'feature_1')
.build())
output_features_dict = process_fn(self._input_features_dict)
self.assertSetEqual(
set(['feature_1', 'feature_2', 'feature_3']),
set(output_features_dict.keys()))
self.assertEqual(output_features_dict['feature_1'], 2)
self.assertEqual(output_features_dict['feature_2'], b'TEXT')
self.assertEqual(output_features_dict['feature_3'], 4)
def test_replace(self):
process_fn = (
builders._Builder()
.add_fn(_add_one, 'feature_1', 'add_one')
.add_fn(_upper_text, 'feature_2')
.replace_fn('add_one', _subtract_one)
.build())
output_features_dict = process_fn(self._input_features_dict)
self.assertSetEqual(set(['feature_1', 'feature_2']),
set(output_features_dict.keys()))
self.assertEqual(output_features_dict['feature_1'], -1)
self.assertEqual(output_features_dict['feature_2'], b'TEXT')
def test_remove(self):
process_fn = (
builders._Builder()
.add_fn(_add_one, 'feature_1', 'add_one')
.add_fn(_upper_text, 'feature_2')
.remove_fn('add_one')
.build())
output_features_dict = process_fn(self._input_features_dict)
self.assertSetEqual(set(['feature_1', 'feature_2']),
set(output_features_dict.keys()))
self.assertEqual(output_features_dict['feature_1'], 0)
self.assertEqual(output_features_dict['feature_2'], b'TEXT')
def test_reset(self):
process_fn = (
builders._Builder()
.add_fn(_add_one, 'feature_1')
.add_fn(_upper_text, 'feature_2')
.reset()
.build())
output_features_dict = process_fn(self._input_features_dict)
self.assertSetEqual(set(['feature_1', 'feature_2']),
set(output_features_dict.keys()))
self.assertEqual(output_features_dict['feature_1'], 0)
self.assertEqual(output_features_dict['feature_2'], b'text')
def test_stateful(self):
process_fn = (
builders._Builder()
.add_fn(_set_state, 'feature_1', stateful=True)
.add_fn(_use_state, stateful=True)
.build())
output_features_dict = process_fn(self._input_features_dict)
self.assertSetEqual(set(['feature_1', 'feature_2', 'feature_4']),
set(output_features_dict.keys()))
self.assertEqual(output_features_dict['feature_1'], 0)
self.assertEqual(output_features_dict['feature_4'], 0)
def test_same_fn_name(self):
builder = builders._Builder().add_fn(_add_one, 'feature_1', 'add_one')
with self.assertRaises(ValueError) as _:
builder.add_fn(_add_one, 'feature_1', 'add_one')
def test_replace_wrong_fn_name(self):
builder = builders._Builder().add_fn(_add_one, 'feature_1', 'add_one')
with self.assertRaises(ValueError) as _:
builder.replace_fn('add_one_wrong', _add_one)
def test_insert(self):
def replace_string(_):
return tf.constant('replaced_text')
builder = builders._Builder() .add_fn(_add_text_len, fn_name='text_len')
output_features_dict = builder.build()(self._input_features_dict)
builder.add_fn(replace_string, 'feature_2', add_before_fn_name='text_len')
output_features_dict_2 = builder.build()(self._input_features_dict)
self.assertSetEqual(set(['feature_1', 'feature_2', 'feature_3']),
set(output_features_dict.keys()))
self.assertEqual(output_features_dict['feature_2'], b'text')
self.assertEqual(output_features_dict['feature_3'], 4)
self.assertSetEqual(set(['feature_1', 'feature_2', 'feature_3']),
set(output_features_dict_2.keys()))
self.assertEqual(output_features_dict_2['feature_2'], b'replaced_text')
self.assertEqual(output_features_dict_2['feature_3'], 13)
def test_wrong_add_before_fn_name(self):
builder = builders._Builder().add_fn(_add_one, 'feature_1', 'add_one')
with self.assertRaises(ValueError) as _:
builder.add_fn(_add_one, 'feature_1', add_before_fn_name='add_one_wrong')
class FilterBuilderTest(tf.test.TestCase):
def setUp(self):
super().setUp()
# Prepare features dictionary.
self._input_features_dict = {
'feature_1': tf.constant(0),
'feature_2': tf.constant('text'),
'feature_3': tf.zeros((16, 200, 200, 3))
}
@parameterized.expand(((builders.Phase.READ,), (builders.Phase.PARSE,),
(builders.Phase.SAMPLE,), (builders.Phase.DECODE,),
(builders.Phase.PREPROCESS,),
(builders.Phase.POSTPROCESS,)))
def test_drop(self, phase):
filter_fn = (
builders.FilterBuilder()
.add_filter_fn(lambda fd: tf.equal(fd['feature_1'], 0), phase)
.add_filter_fn(lambda fd: tf.equal(fd['feature_2'], 'no_text'), phase)
.add_filter_fn(
lambda fd: tf.equal(tf.shape(input=fd['feature_3'])[3], 3), phase)
.build(phase))
keep = filter_fn(self._input_features_dict)
self.assertEqual(keep, False)
@parameterized.expand(((builders.Phase.READ,), (builders.Phase.PARSE,),
(builders.Phase.SAMPLE,), (builders.Phase.DECODE,),
(builders.Phase.PREPROCESS,),
(builders.Phase.POSTPROCESS,)))
def test_keep(self, phase):
filter_fn = (
builders.FilterBuilder()
.add_filter_fn(lambda fd: tf.equal(fd['feature_1'], 0), phase)
.add_filter_fn(lambda fd: tf.equal(fd['feature_2'], 'text'), phase)
.add_filter_fn(
lambda fd: tf.equal(tf.shape(input=fd['feature_3'])[3], 3), phase)
.build(phase))
keep = filter_fn(self._input_features_dict)
self.assertEqual(keep, True)
@parameterized.expand(((builders.Phase.READ,), (builders.Phase.PARSE,),
(builders.Phase.SAMPLE,), (builders.Phase.DECODE,),
(builders.Phase.PREPROCESS,),
(builders.Phase.POSTPROCESS,)))
def test_empty(self, phase):
filter_fn = builders.FilterBuilder().build(phase)
keep = filter_fn(self._input_features_dict)
self.assertEqual(keep, True)
if __name__ == '__main__':
tf.test.main()
|
dmvr-master
|
dmvr/builders_test.py
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.