Skip to content

A ffxiv crafting rotation solver, for command-line and the web

License

Notifications You must be signed in to change notification settings

alostsock/crafty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A ffxiv crafting rotation solver, for command-line and the web

Resources

License

Stars

Watchers

Forks