harris-ferguson / zmija Goto Github PK
View Code? Open in Web Editor NEWBattlesnake Server for Battlesnake Saskatchewan
Battlesnake Server for Battlesnake Saskatchewan
A Holding Pattern pathfinder class that picks a good pattern to move to wait until we have a good piece of food to go for.
in Decider, we should have a method that decides what piece of food on the game board we should go towards. Going to the closest piece each time makes sense, however there might be some strategy in picking a piece that is closest to our snake but furthest from other snakes. Regardless of what, we need a method that picks a spot.
Sometimes the snake will move off the edge of the game board despite having an obvious safe square.
The server goes into an infinite loop if there are no safe moves. It's only happened twice so far, and the server can still recieve requests will this is happening, but it caused a seg fault the most recent time it happened to me.
I think an interface class would be good here. We can have a pathfinder class for looking for food and another class for "holding pattern", and swap them out in the Decider depending on the state of the board.
We can reply with a shout every time we give a move. We could have some funny shouts!
Assuming we have some arbitrary path from a pathfinder function / method / object, we need a way to process and keep track of:
Should we create a Class to keep track of these calculations, or let the Decider class worry about it?
We could also calculate an path each step of the game, take the first step on that path, then recalculate on the next step.
Implement a shortest path that takes the state of the board and decides the best path to reach a given point.
We need a way to convert a board location adjacent to our current location (i.e. the next step of a path, or an adjacent piece of food), to a direction. I think this method could be in either the Decider or GameState and make reasonable sense.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.