Code Monkey home page Code Monkey logo

unobot's People

Contributors

kaiks avatar

Watchers

 avatar

unobot's Issues

Self-update

Implement a command that would

  1. download files from a given location (in a zip format)
  2. unpack them into the unobot folder
  3. load all files in the folder into the currently running program

Bonus:
4. implement version (like in ZbojeiJureq)
5. implement transactional loading:
a) make copies of all files
b) try to load a file
c) if SyntaxError is raised:

  1. unload all files that have not been previously loaded
  2. load previous versions of new files
  3. abort further loading
    d) loader should never be overwritten

log errors

find a way with cinch to log caught exceptions

Test random-sample minimax with AB prunning

  • Adjust the sample size (10000 randomized hands?)
  • check for equivalent plays, e.g. all else being equal wr -> r4 = wr -> r6
    though this is probably more complicated (later plays can affect the tree), so check that later when in trouble
  • Opponent should probably play with the naive strategy, esp. if it's worse performance wise

The algorithm would look like that:

  1. sample N hands from the stack pile (discarding by pe'd colors!, discarding by figures)
  2. check immediately playable cards
  3. for each playable card, create a minmax node
    3.5) final node score is winning probability
  4. choose the best node

Card counting #1

Adversary card count is set to 6 when unobot starts the game because of this message:

[22:58:56] unobot's turn. Top card: [7]

Should be 7 cards.

When unobot goes second, the card count is correct.

Terrible performance

The bot chokes at 8 cards, which should not be the case.

Even if we do 8! operations, that makes 40k and should not be taking more than 15 seconds.

More and better tests

We need more and better tests to test for breaking changes and drive code refactoring

Logging bad games

Need to implement a command that would save a game's history (possibly with debug messages) in a file and notify me

Updating probabilities based on play history

Currently the bot only looks at probabilities based on cards that have not been played. It should also take into account what cards caused the adversary to pick a card.

e.g.:
bot has: y6, y8, ys, rs, r8, w
top card: r6
pl y6
pe
pl g6
bot should play wy rather than wr, because he knows that a doesn't have yellow cards.

fix UnoCard.sample

in order to be able to more accurately simulate possible worlds when heuristically evaluating plays

Card counting #2

Playing a skip reduces adversary's card count. It should not.

W gets played before WD4

W gets played before WD4 when adversary has only one card. Should most likely always be the other way around.

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.