Giter VIP home page Giter VIP logo

crafty's Introduction

crafty

A very experimental crafting rotation solver for FFXIV.

How it works

The simulator implemented for this project was roughly rewritten from the Teamcraft simulator and is reasonably accurate, but has some rounding errors compared to actual in-game crafts.

The solver uses a basic Monte Carlo tree search (MCTS) algorithm with some hand-coded crafting rotation logic to better guide the search. Usually this method is used for two-player games like chess or go -- this solver is a single-agent variant.

Installing the command-line app

To build and install from scratch (requires the Rust toolchain):

git clone https://github.com/alostsock/crafty
cd crafty
cargo install --path cli
crafty --help

Benchmarks

Running benchmarks:

cargo bench

Flamegraphs can be generated and viewed by following the steps in this blog post.

cargo bench --profile release --bench benchmark -- --profile-time=10

Compiling to WASM

wasm-pack is used to generate an ES6 module for usage in Node.js or browsers; it can be found here. Javascript bindings can be generated from the web crate:

wasm-pack build web --release --target web --out-name crafty

Relevant work

Schadd, Maarten PD, et al. "Single-player Monte-Carlo tree search for SameGame." Knowledge-Based Systems 34 (2012): 3-11.

Browne, Cameron B., et al. "A survey of monte carlo tree search methods." IEEE Transactions on Computational Intelligence and AI in games 4.1 (2012): 1-43.

Chaslot, Guillaume MJ-B., Mark HM Winands, and H. J. V. D. Herik. "Parallel monte-carlo tree search." International Conference on Computers and Games. Springer, Berlin, Heidelberg, 2008.

Cazenave, Tristan, and Nicolas Jouandeau. "On the parallelization of UCT." Computer games workshop. 2007.

Gelly, Sylvain, and David Silver. "Monte-Carlo tree search and rapid action value estimation in computer Go." Artificial Intelligence 175.11 (2011): 1856-1875.

crafty's People

Contributors

alostsock avatar workingrobot avatar raylu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.