AI for the Dice game FARKLE - android

I'm hoping someone can point me in the right direction. I have a dice game called Farkle. The game is working great as a Two Player game. Now I want to implement an AI for a One Player game. Basically all I want it so if the current Dice score is >= lets say 300 to pass the dice back to the Human Player. There are a few other things I would like it to look for such as if all the dice have been used and all 6 dice can be rolled again.
I am new to the entire Java/Android world, so really don't know where to begin or look for any example for Dice AI examples. I have found a few for Poker, but I think they are way more complex then I need or for that matter can even understand. Any ideas?
BTW... I would be willing to send the source code for the Game to anyone that is willing and or able to help.
Thanks in advance!

To be honest I don't know any AI library that could help you. In addition I had to actually read the farkle rules to understand the concept and how AI could be integrated into that. So 2 options come into my mind that you however will have to implement yourself:
1.Use a neural network. The network will be trained using maybe backpropagation. As an error you could maybe use the difference of the 6 dices (that maybe be modelled by 6 different output neurons) sum from 300. If you search a bit I don't believe you will find it difficult to find a java library or source code examples.
2.Use genetic algorithms. For this actually there is a quite nice library JGAP. The chromosomes will be the result of rolling all 6 dice and the fitness function would be their score.
Of course both of the routes mentioned above are pretty generic and may not be very accurate. I am afraid that you will have to get familiar with certain AI concepts/algorithms. The farkle game is not that popular to have an AI package itself (like chess for example), so I believe you will have to implement things on your own (maybe using some libraries). Hope this helps.

Related

Algorithm for very simple voice/speech recognition

I'm writing a game for Google Glass, but unfortunately SpeechRecognizer API isn't available on the current builds on Google Glass GDK.
So I've been thinking about implementing an algorithm for a very simple voice recognition.
Let's say I want to recognize only: "Yes" and "No".
Do you know any example code or any helpful resources to help me in implementing this ?
Is it so hard that I should drop the idea and go with big frameworks like CMUSphinx ?
What about recognizing: up, down, right, left or numbers from 1 to 10 ?
As I know, there often used transition to the frequency domain by fast Fourier transform (FFT) and it analyzing. Also need some dictionary of speeched words for frequency correlation.
Please see this links:
CMU Sphinx have java implementation.
David Wagner have a good article and matlab implementation.
P.S. Ohh, if you speak in russian, why you don't read this article - very simple, with java examples.
P.P.S. Honestly, I never use this framework, but if you have only a superficial knowledge about speech recognition, robust and easyest way is to use existing complete solutions like frameworks or libraries, otherwise you need spend time to possess the necessary knowledge threshold. In this case you can read this article.

Starting point for app creating, where to start

I am looking to start writing apps for mobile devices. I know a little about this subjec, and I am proficient in both java and python. However, before jumping into creating apps I wanted to get the community's input on a question I have not yet found the answer to:
How/Where should I begin?
I understand this question is fairly general/basic for a community that focuses on solving/debugging complex programs, but if there is a recommended tutorial (or specific platform) that will help a beginner(such as myself), it would greatly reduce the frustration and amount of monotonous questions asked on this forum and others.
Regards
Coursera is offering 3 courses all using android development which started last week. That would be an excellent starting point for anyone:
https://www.coursera.org/specialization/mobilecloudcomputing/2
How/Where should I begin?
I don't know about you, but I often learn by example more than reading. You mentioned that you're proficient in java so thats a great start. After you understand the Android SDK it's really only the UI good practices you need to learn. So here's my suggestion.
Start off with something super simple. Let's say, create your own version of a calculator. Something that can add, subtract, multiply, and divide. This should be dirty, ugly, but works correctly.
After doing this, take a look at some other android calculators on the play store. Check out Simple Loan Calculator. I use this example because it offers a lot of android UI components. ViewPager, ActionBar, etc. Download this app, take a look at it, and try to mimic it. This should provide an idea on how to work with the android UI components.
What's next? After you have done these two apps you should be relatively ready to tackle your own project.
HTML apps are easy to port across multiple mobile platforms. I have set up an Android HTML template as a starting point. You can just import this project into Eclipse and take a look at that.
https://github.com/jakewp11/HTML5_Android_Template
Here is my experience for ios,
There are three things that I consider as pillars
Objective C
Memory managment
Design patterns
The first one looks obvious but I'd stress on learning concepts like protocols, categories, extensions. As a beginner I thought that learning the syntax was enough, but time and again I had to jump back to the language concepts to understand what's going.
The memory managment , the most talked and confusing subject and now since we have automatic referenc counting to make things simpler and often new Dev skips learning memory concepts (I did it). So I suggest you to have an idea what actually happens under the hood of arc " the manual memory managment"
The design patters,
When I started off , to pass data and control , what I used to do was achieve every thing through the only design patten I knew (target action) . I lack the knowledge of design patters didn't how easily I could achive better results with less code.
Some resources:
Dev.apple.com
http://www.raywenderlich.com (one of my best tutorials are here, you can find one on design patterns)
http://rypress.com/tutorials/objective-c/
And yes , the sample projects at Dev.apple are the best tutors.

What do I have to learn or should use in creating a 3D android game?

My thesis is to create an 3D android game. I have installed the 3D softwares like 3DS Max, ZBrush, Blender. I also downloaded Android SDK for Windows and I have Eclipse Juno. But I don't know how to start. Thank you in advance. :)
If you want to write a game, use a game engine.
I would advice against using OpenGL directly if you want to focus
on game mechanics or story. 3D game engines like
Unity or JMonkeyEngine
give you all the tools you need to turn your 3D assets into a game:
Importers for various file formats, a scene graph,
math libraries, and usually tons of example projects that get you
started quickly.
If you want to write a rendering engine, use OpenGL
With OpenGL you can build everything mentioned above yourself: Write
or find importers for your assets, figure out a lighting model, write
a scene graph. If you want to do all that, cool, use OpenGL. But
doing this technical stuff will keep you busy; you will have less time
to make a really great game.
I prefer OpenGL ES for Android. Good performance and easy enough to learn.
It's better to start from basic with opengl and then understand concept of using 3d and then prefer standard tool to use.
I have listed android game engine tool for 2d and 3d. Hope it might help u.
https://stackoverflow.com/questions/17163446/what-is-the-best-2d-game-engine-for-android/17166794#17166794
Start with unity3d which is a game engine, I am not sure but the names that you have posted are used for making 3d models for the game.
Your Thesis? That's pretty broad scope! :)
What I would be looking for, is something with lots of example code (since you say you don't know where to start) and good community involvement (ditto the start thing).
If you only need a single player setting, then I would suggest libGDX as a place that would be a good jumping off platform, as there are lots and lots of step thru tutorials along with lots of example code (and a very up to date wiki on the API), and a pretty good group at helping out with issues.
Since it is open source, you can dig as deep as you want into the inner workings to understand (or be mystified like me) as to how the code is accomplishing whatever task you are looking at. (which might be handy for your thesis)
While it might not be quite as polished as some other commercial 3d development kits, the BadLogic crew has made some very big progress the past few months on the 3d side of the house, along with breaking my JSON code... thanks! :) )

How to start game programming without a graphic artist?

Having a hard time phrasing the question, my situation actually is on the release phase of the game development cycle.
I have this game that falls under the casual category with little to no-complex-logic involved at all, running on a 2D side scrolling (semi) single character. In short it really is simple, so I am already done with the code and just need to replace sprites with my own to avoid any copyright issues once I decide to release it on the market (truth is I used sprites from various forums of another side scrolling MMORPG).
So my actual problem is, being an independent developer, with no talent in graphic arts and little budget to outsource a graphic artist, How would I (a plain programmer) create a modern looking graphical game?
Note:
The game is non-profit, I made it just to learn what the android platform has to offer.
But seeing it can actually be fun for others to play with, I'd like to release it.
I wanted to make this a community wiki as I see other game programming beginners would also face the same question. Although I am not that sure if that reason alone qualifies. But it seems with my reputation now, I'd leave that to the admin / mods decisions.
Keep the resources seperate and replace them before releasing with free versions or your own art.
There is no cheap source of high quality (graphics) unless you find someone willing to work for you cheap or for free.
Be very careful with copying sprites from other games. Some publishers have (and keep) very strict policies.
Another forum/site that might give you more information is http://www.Gamedev.net
Especially interesting might be the resources found here
I don't know how it is on Android but whenever I've tried games for fun, I've always relied on free sprite sheets which are all over the net. I've also clipped off a few from old DOS games which I run via. dosbox.
My favorite tactic is to put ugly placeholder graphics inside the game, and brag with it to my fellow pixel-movers. Next, someone from the pool will be disgusted with my lack of taste and ability to do good graphics, and put himself into the game.
If it doesn't work, you can always go headhunting, having your game ready and with just graphics to replace.
I stayed on the same problem, like you did.
Me as programmer also wanted to start coding a little android game, because i never did before.
And my garphic/artist skill is like 3-year-old-child...
So i tried to think of a designconcept with very easy geometrical Forms, if you are not so skilled.
And with the open source Software gimp you can do alot.
I dont know which engine you use, but i decided for unity3d, cause you are very flexible and you also can cross compile your project. I dont had experience with c#, but its very easy if you came from other oop languages, like java, so maybe have look for it. :)
Maybe also look what i made of it, it were just some circles and lines!
https://play.google.com/store/apps/details?id=de.duckdev.anbr
greets

Sound processing in Android

I know there is a similar question to this floating around stackoverflow. What I would like to know is if there's a simple way to do beat mapping for a song in Android? I don't need to do anything as complicated as beat matching between different varieties of songs, as the other question requests; at least I don't think it's anymore complicated, more experienced programmers please feel free to comment.
I simply would like to map the beat of a single song to be able to use it later in my program. I'm very new to both Android programming and sound processing in programs, so any suggestions or comments are appreciated.
Check out the open source (actually made by a member of the Android team) project RingDroid...there's some pretty basic sound processing there, so that should give you a start.
Here's the RingDroid site.

Categories

Resources