apotapov / tafl Goto Github PK
View Code? Open in Web Editor NEWAndroid implementation of a Tafl game
License: Apache License 2.0
Android implementation of a Tafl game
License: Apache License 2.0
Take a look at some of the approaches for AI board games:
http://gamedev.stackexchange.com/questions/30026/checkers-ai-algorithm
http://gamedev.stackexchange.com/questions/16135/how-to-implement-a-i-for-checkers-draughts
http://en.wikipedia.org/wiki/Computer_Othello
For alpha launch...
Design Help Screens to teach about the game
This lives in Zaria right now. Need to test out his capability on a small scale first.
Repro:
Frequency:
This happens once about every two games I play. I see the computer sometimes ignore the obvious good move, and it may be the same bug. If so, then I notice about it 2-3 times per game.
The Board should show 1..x on the sides and A...x on the top and bottom to more easily identify the squares.
I think this could make the game more fun and stop people from over-thinking. In case you never played Speed Chess, each player gets X min on the clock. Y.Y seconds are subtracted for each player's move. A player wins either if he wins the game or if the other player runs out of time first.
Several places mentioned that two battles need to be played, one with each side to determine the match. Might be a good way to balance...
Need sound effects for:
The hud is a little out of whack on Android.
Need to figure out a way to adjust font depending on the screen resolution. Also take care of landscape and portrait mode. For now we will force the users to use portrait.
"Middle Game" starts when Black has completely or nearly formed all barricades around the four corners.
Black: Form cordons, if possible, and squeeze the mobility and reduce the number of white pieces until King is captured. Meanwhile, do not let white get into formations to force a draw, and let white pierce through any barricade(s) or cordons it has created.
White: Pierce through Black's cordons and barricades. Preserve enough pieces to force a draw while dwindling number of Black pieces, so it must force a draw or break open its flanks. Also, get into formations to preserve number of pieces.
An entity system is an overkill for such a simple game. It will simplify the layout.
I think we should have the ability to undo as a learning tool. Perhaps only for the beginner mode.
Need to figure out what kind of statistics to gather.
Wins vs losses
Difficulty level
Game crashes
Etc.
Notify when the player is in check or in check mate.
According to : http://www.irminsul.org/arc/002sg.html
If the King has a clear approach to any edge square, the Blue player announces, "Raichi," or check. If the King has a clear approach to two exit squares, which is unblockable, he announces, "Tuichi," and wins the game since the move can't be blocked in one play.
Looks like there are some issues with memory allocation during game play.
Garbage collector is going crazy especially in the beginning of the game:
01-22 22:20:41.070: D/dalvikvm(1558): GC_FOR_ALLOC freed 168K, 20% free 3233K/4016K, paused 4ms, total 4ms
01-22 22:20:41.166: D/dalvikvm(1558): GC_FOR_ALLOC freed 407K, 19% free 3268K/4016K, paused 2ms, total 2ms
01-22 22:20:42.130: D/dalvikvm(1558): GC_FOR_ALLOC freed 371K, 16% free 3409K/4016K, paused 2ms, total 2ms
01-22 22:20:42.898: D/dalvikvm(1558): GC_FOR_ALLOC freed 390K, 15% free 3441K/4016K, paused 4ms, total 5ms
01-22 22:20:42.898: I/dalvikvm-heap(1558): Grow heap (frag case) to 3.544MB for 72791-byte allocation
01-22 22:20:42.902: D/dalvikvm(1558): GC_FOR_ALLOC freed <1K, 15% free 3512K/4088K, paused 3ms, total 3ms
01-22 22:20:43.258: I/FPSLogger(1558): fps: 56
01-22 22:20:43.274: D/dalvikvm(1558): GC_FOR_ALLOC freed 335K, 15% free 3482K/4088K, paused 3ms, total 3ms
01-22 22:20:43.274: I/dalvikvm-heap(1558): Grow heap (frag case) to 3.592MB for 80012-byte allocation
01-22 22:20:43.278: D/dalvikvm(1558): GC_FOR_ALLOC freed <1K, 15% free 3560K/4168K, paused 5ms, total 5ms
01-22 22:20:43.286: D/dalvikvm(1558): GC_FOR_ALLOC freed 27K, 15% free 3573K/4168K, paused 2ms, total 2ms
01-22 22:20:43.314: I/dalvikvm-heap(1558): Grow heap (frag case) to 3.680MB for 80012-byte allocation
01-22 22:20:43.338: D/dalvikvm(1558): GC_FOR_ALLOC freed <1K, 15% free 3651K/4248K, paused 27ms, total 27ms
01-22 22:20:43.350: D/dalvikvm(1558): GC_FOR_ALLOC freed 21K, 14% free 3672K/4248K, paused 2ms, total 2ms
01-22 22:20:43.350: I/dalvikvm-heap(1558): Grow heap (frag case) to 3.778MB for 80012-byte allocation
01-22 22:20:43.354: D/dalvikvm(1558): GC_FOR_ALLOC freed 0K, 14% free 3751K/4328K, paused 2ms, total 2ms
01-22 22:20:44.270: I/FPSLogger(1558): fps: 37
01-22 22:20:45.274: I/FPSLogger(1558): fps: 56
01-22 22:20:45.854: D/dalvikvm(1558): GC_FOR_ALLOC freed 154K, 8% free 3987K/4328K, paused 3ms, total 3ms
01-22 22:20:45.854: D/dalvikvm(1558): GC_FOR_ALLOC freed <1K, 8% free 4261K/4608K, paused 2ms, total 2ms
01-22 22:20:45.894: D/dalvikvm(1558): GC_FOR_ALLOC freed 1K, 7% free 4576K/4888K, paused 4ms, total 4ms
01-22 22:20:45.914: D/dalvikvm(1558): GC_FOR_ALLOC freed 2K, 6% free 4938K/5248K, paused 2ms, total 2ms
01-22 22:20:46.278: I/FPSLogger(1558): fps: 58
01-22 22:20:47.306: D/dalvikvm(1558): GC_FOR_ALLOC freed 151K, 5% free 5493K/5764K, paused 6ms, total 6ms
Need to prune for new memory allocation during the game play and get rid of it.
Need to save the game state to disk so that the user can close the game and come back to it.
Need a way to perform database upgrades.
We need to get a definitive list of Menu screens and Game screen layouts.
Hnefatafl World championships are held annually on an island of Feltlar.
Here's the official website: http://www.fetlar.org/hnefatafl-world-championship
From the website:
Fetlar Rules
The latest version of the rules for Hnefatafl developed by the Fetlar Hnefatafl Panel can be downloaded here in pdf format. Please note that these rules were developed for use by an 11 x 11 square board. These rules were those in force on 03-08-2013. Any updates to the rules will be posted on this page.
Here's the link to the PDF: http://www.fetlar.org/assets/files/hnefatafl/rules2013visual.pdf
I also have it saved in the project's doc directory: https://github.com/apotapov/tafl/tree/master/docs
Should have the ability to drag a piece to a spot on the board.
The piece gets placed when the click/touch is released.
If the piece is released over a non-legal square, return the piece to original position.
It would be nice to make the piece "snap-to-cell" to reduce the mistakes.
I'm using a modifiable string to avoid creating a new object for the time displayed at the top of the screen during game play. Unfortunately, Strings seem to be implemented differently on Android, and they cannot be modified in place.
I'll do some research about how to do this without creating a new object every time.
Maybe take out the timer completely?
The game currently hangs when AI is executing.
For beginner mode we should get the AI to generate hints for the player. It would be cool to have those hints give explanation as well.
With current AI, the computer gets into a pattern of repeating moves. Add a repeat move penalty.
After the refactoring there are some issues with capturing regular pieces against the castle square.
The king can be captured with 2 pieces right now and it doesn't end the game.
The defending player has the ability to force a draw by surrounding the king such that it cannot be captured but move back and forth forever.
Simple version of user instruction. 3-5 screens (phone sized images) to explain the game.
Note: no interactive tutorial
Need graphics for:
Need to purchase a font for the text.
Preferences are sufficient
Need sound effects for:
Do what the JS implementation did for a heuristic one-move lookahead for material balance. We should try it. It's one of the easiest "look ahead" heuristics.
If a piece can be capturable by opponent (as the board is now (called "null move")), then subtract 20-30% off Material Value for that piece. For example, if piece would have value = 10, and it can be captured by opponent on one side, it's value = 10 - 2. If it can be captured on 2 sides, then it's value = 10 - 2 - 2.
Refer to teams as swedes and muscovites.
Refer to the squares correctly.
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.