GithubHelp home page GithubHelp logo

mirroruniverse's People

Contributors

lumilux avatar sidnair avatar yufeiliu avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

mirroruniverse's Issues

Optimize DFA or revert to approximation

Right now, it's a little slow and uses too much heap space.

Ideas: micro-optimizations where appropriate, only consider "relevant" subsection of the graph.

Fix Exploration Bug

On

1, 30, 2, -1, maps/g7maps/map_50_50_illusion_1.txt
1, 30, 2, -1, maps/g7maps/map_50_50_illusion_2.txt

we get stuck in a corner.

Optimize DFA Memory

Only create states as needed. This introduces a lot of GC overhead, but I think it's the only solution that preserves optimality. This requires a lot of modifications to the DFA stuff, so this will be done on a separate branch.

Come up with heuristic when DFA solution fails

If the DFA can't solve it and we've explored everything, we should be able to step on the exits. Probably just get both players close to the exit and find the shortest path for one of the players or something like that. Thoughts?

DFA sometimes fails

Sometimes it things a suboptimal solution is optimal. Can't repro consistently. Using:

35, 35, 2, 6, 0.4, 5
35, 35, 2, 7, 0.2, 6

gets it to fail sometimes.

prevent exploration to get stuck

sometimes it gets stuck in circles. I'm thinking of adding a way to detect if both players have been confined to a fixed radius for several turns. if so, take random walk to get out of it

Handle DFA Non-Solutions

Solve for one, then the other.

We also need to recompute solution more often. It should be recomputed before we step on an exit. Right now, I think if we don't find a perfect solution, we're returning null and then solving for each individually.

Fix Random Walk

There's a bug in exploration. We very frequently go over the same few spaces even though it doesn't uncover everything new. I guess this is the random walk issue.

I tried running it on

1, 30, 2, -1, maps/g2maps/PipeMaze_A_51_12.txt
1, 30, 2, -1, maps/g2maps/PipeMaze_B_51_12.txt

and got results between 290 and 3250. If you look at the player in the worse runs, there are a ton of wasted steps. If we can fix the random issue bug we'll be in pretty good shape (at least on that map).

Implement capMap

It's in Utils. See comments for details about the contract I expect it to fulfill.

Optimize DFA Memory

Only create states as needed. This introduces a lot of GC overhead, but I think it's the only solution that preserves optimality. This requires a lot of modifications to the DFA stuff, so this will be done on a separate branch.

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.