Skip to main content

Agents for the Tangled game

Project description

snowdrop-tangled-agents

A place to build and test agents for playing Tangled!

How to build your own agent

This repo includes a random agent (see RandomRandyAgent in random_agent.py). To build your own agent, follow the instructions and pattern for that agent. The process is straightforward - your agent gets a Game instance as input/observable, which is a snapshot of the current game being played which includes the current state of the game, and you output an action/move. The move is just which edge to pick, and what color to apply to it. That's all! Obviously the underlying process you use to select this move can be arbitrarily complex but the actual agent interface is simple.

Testing agents

A test script is included in run_local_parallel_tournament.py. Out of the box it runs 100,000 games for each of the X-Prize graphs (not including the mutant C60 graph) where the adjudicator used is simulated annealing, and the two agents in the competition are both random agents.

Suggested next steps

If you want to build your own agent, I would start by building your own adjudicator (look at both the adjudicators in the snowdrop-adjudicators repo). The better you can spoof the D-Wave hardware, the better quality reward your agent will have to learn from. To do this, I would recommend you build a look-up table adjudicator, by first enumerating all the terminal states for a small game graph, and then adjudicating all of them using the schrodinger equation adjudicator (this will be limited to small game graphs, but it's still a great warm-up for doing something more ambitious). Once you have your lookup table adjudicator, you can then build an agent that uses it to give you the correct answer every time. You can use run_local_parallel_tournament.py - add your adjudicator and new agents to and see how well they do against the random agent and any other agents you might have built!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snowdrop_tangled_agents-0.0.4.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snowdrop_tangled_agents-0.0.4-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file snowdrop_tangled_agents-0.0.4.tar.gz.

File metadata

  • Download URL: snowdrop_tangled_agents-0.0.4.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.7 Windows/10

File hashes

Hashes for snowdrop_tangled_agents-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2acdd1c690c53dc6db5d6e75323212114111a058a2ed642db689141b6ad705c3
MD5 5f7744392be5e53265f801400edb5876
BLAKE2b-256 acb58ee6229eebadd7945dcec9b1100ac206dafdec30f16617a73f6ef729ab5d

See more details on using hashes here.

File details

Details for the file snowdrop_tangled_agents-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for snowdrop_tangled_agents-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 10c8fae72e2a88d8e75ac3637bb776cc7b17845117d7e70abe57cc8dce228b9c
MD5 d1e9ec57acd4b557922398c98bba8dd2
BLAKE2b-256 896b0e3e702a4163eda6351f5a486862e94bcb8b388040a9db6eb65f4fa8c18a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page