Programming a chess AI - artificial-intelligence

I'm looking to try and write a chess AI. Is there something i can use on the .NET framework (or maybe even a chess program scripted in Lua) that will let me write and test a chess AI without worrying about actually makign a chess game?

Not sure about what you are trying to do.
If you are looking for a ready-to-use chess GUI, you can use WinBoard.
It is completely decoupled from the underlying chess engine(s), thanks to an established communication protocol. Your chess engine thus becomes a console app exchanging commands with the GUI.
A more modern alternative following the same concept is UCI. A GUI supporting UCI is Arena.

I write a Computer Chess Blog that takes you through all the steps of writing a chess engine in C# from scratch, it includes a computer chess links section and a chess game starter kit.
http://www.chessbin.com
Adam Berent

Here are some open source chess boards / games that run on Windows.
GNU XBoard
SCID
C# Micro Chess

Use one of the open source chess games.
Figure out the interface that decides the computer's next move.
Implement your own AI using the same interface and remove the user interface part.
Compare your AI to the included one.
Fun!

Related

Game Development With NLP TOOLKIT

I'm not that mature in coding. I'm curious about can I use NLP Toolkit for game development.
I have a game in my mind. It is like there are three different difficulties. The player selects one of them. And the word pops out according to the difficulty level that the player selected. After that 10 additional blob comes out and you will enter words according to the word that came out in the middle. For example, the school came out from the selection.
So I will enter words like book, teacher, computer, homework, parental pressure, future anxiety, fear of the morning, cafeteria, childhood, school bus and I will get +10 points.
Can I use NLP Toolkit for this and what will be the correct way to develop this? I want to develop this game for phones and computers at the same time so there will be some porting work to be done but none of a big deal. Maybe we can just code it for mobile and run it, through emulators.
So my main questions are these; What is the correct way to develop this game (which language or which tools should I use) can I use NLP Toolkit and if use it will it make my work easier. I have taken a look at spaCy too. But I'm developing my game in Turkish but there isn't support for it.
I was thinking to develop this game on python and graphical interface via css but I dunno how accurate that is. As I said I'm a newcomer to this community. And English isn't my first language so sorry for mistakes and unclear sentences. Thanks for your help and kindness. Thanks in regards.

visual c editor for kids

does anyone know of a visual programming tool that could be adapted for children (kids age 7-12) so that they can generate c programs to control device?
If controlling devices is your ultimate goal, how about LEGO Mindstorms? You can use all sorts of languages with it and they get to play with LEGO! They can start with the default language and once they understand the fundamentals they can start using some of the third-party languages, some of which are C/C-like
Another interesting language for kids is
scratch, from MIT. I don't know if it's possible to use it to control devices
I agree with Daniel about the LEGO's but another idea is to try Alice and a class mate of mine from college is trying to start a company with his brother and two sisters working on a project to teach children, or anyone for that matter, how to program. It's called Project Forge I don't know too much about it but I thought you could look into it.
If your looking for a good way to teach kids programming, take a look at LOGO.
http://www.softronix.com/logo.html
A bonus of learning LOGO, is that it has been used in a variety of robot toys. You don't need to buy these to teach your children to program, the free LOGO version suffices. Of course the robot toys are great fun as well. More information is available online, e.g. the LEGO (Mindstorm series) and Fisher Technic toys.
I am not sure if my answer is helpful, but you can use arduino IDE to program arduino boards. it is it is visual and running program is just a single click. interface is simple as hell and programming language (C based) is very simple to start with.
http://villamil.org/?p=106
although myself, I prefer emacs to program arduino (definitely overkill for kids)
It is not C/C++, but Microsoft has a free Small Basic IDE http://msdn.microsoft.com/en-us/beginner/ff384126.aspx aimed at kids. Also, the EXPRESS editions of Visual Studio are free and do support C in the IDE

2D game development basics

I would like to write some simple Mario-like game from scratch using language C. But honestly I have no idea how to do so, and I canĀ“t find any good tutorial for this, which is for free.
But to the actuall question, I have only written WinAPI programs so far, so all event handling and user input was handled by OS, with minimum work, But to develope game, with for example menus with non-rectangular buttons, animations, and so, I guess, there is no such thing in WinAPI taht could help me with this more than just some basic routines mouse pointer location and keypresses.
So, is the right way to write your game to write entire draw part of game engine by manipulating objects for player, enemies, and even background yourself, and than just use directdraw for output to screen?
EDIT:
I actually want to learn how to write games from scratch, becouse it must be great programming experience, and if you consider games like Commander Keen on DOS, created with no framework or libraries, but still so great.
A good approach to this would be to have a look at the SDL library. I'm not saying it's necessarily the best library for 2D games, but it's easy to get started with and the web is flooded with tutorials and open source code samples for simple homebrew 2D games written using SDL.
I do recommand the SDL too, but you should definitely have a look on lazyfoo tutorial, which is just great.
When I started programming I started doing it with Allegro, back in the good old DOS days. It was the first usable library which worked with SVGA libraries, and had a good sprite support. Then version3 came and they added support for windows (using GDI and Directy X, you could choose at runtime which engine to use). The linux port came to life, and all is good.
It's a very basic 2D library, and it will teach you the very basics of graphics and animations. Now it even contains audio support which is a very needed addition (well, I still remember V 2.9X...). They are in betas for version 5, and I think this is an interesting project for you to look into.
http://www.talula.demon.co.uk/allegro/
What are you guys talking about, the WinAPI has low level drawing routines.
Although using an established library like SDL is probably a better idea you could create your own abstractions to the WinAPI drawing routines without too much difficulty.
Then it's just a matter of creating the while loop that has all the drawing instructions and interpreting input. For 2D games this isn't too difficult.
I also used SDL, but try to look at HGE. It requires at least DirectX 8.0 so your applications will work only on Windows but on their forum you will find many topics on how to port it to OpenGL. In my opinion HGE will be easier to learn than SDL, because SDL is a low level library and you will have to learn how to handle many things by yourself. HGE is more ready to start just out of the box.
In short, yes - there's nothing in the WinAPI that will help you much. However, there are dozens of game engines that you could build your game on that would take a huge amount of gruntwork out of creating the game itself. A bit of Googling will help you.
(Personal recommendation: although it's technically a 3D engine, something like Unity is an excellent engine that includes tutorials for creating 2D games. Unity isn't C, but it does make your life a lot easier...)
EDIT: I actually want to learn how to write games from scratch, becouse it must be great programming experience, and if you consider games like Commander Keen on DOS, created with no framework or libraries, but still so great.
This is actually not quite right. Commander Keen (and any DOS games) do use libraries: the ones provided by DOS, BIOS, etc. Without libraries of one form or another, you wouldn't be able to do anything useful with C. For game programming, you really do want to leave all the low level details to someone else.
I'd recommend Allegro as a beginning game programming library.
Check out this one Game dev starting
They have realy a big resource related to game programming and a lot of beginner stuff. SDL is good, but you should consider about learning basic game techniques before start coding and even before start thinking about the api/libs you use.
Clear out how much "intelligence" you need (Ki), consider about loading/Saving a an early time, ... so much things that you should keep in mind if you want to finish your project.
Do you need a game editor? (Also..work) What about sound/graphics? Writing all this stuff on your own will take a lot of time (if you do not have experience). Creating the content is another big issue which can consume a lot of time, if you make it at all.
Maybe it will help you to have a look on some dev kids, because that will give you the idea how their engine works. Like this one (outdated) Dev kid
I've just started a similar project a few days ago, you can check it out over at GitHub.
It should give you some ideas about how the game is structured. As well as some details on a scrolling 2D map with collision (which turns out to be quite complicated if you want to get it 100% bug free). Oh, and it's using SDL as many here have already suggested.
As for me, this is my first C project. But I'll have to admit that I've done similar stuff in Java and Python before, so this was a good way for me to quickly learn C. And since it's learning and not any productive stuff, I'm using plain C99, which makes the task even "funnier".
But back to the game, you really need to think about your design before you start coding, write it down on a sheet of paper, or if you're like me and you don't have tree stuff in reach write it in pseudocode.
Think about as many possible game states as you can, nothing's worse than having to re-implement the whole player/map/whatever stuff from scratch just because you did not think about feature XYZ before.
Design is very important, if you don't have a goal to begin with, your project will reach a point where it fails, just like my Tuff did, well it also failed due to missing music and somebody who would have designed enemies, etc.
Speaking of graphics and such, bear in mind that the game will consist of much more than just the plain code. If you aren't good in graphics then take that into account while designing. Because you will quickly lose your motivation when the only things on the screen are colored rectangles.
Action Arcade Adventure Set (originally published as a book) is probably one of the most complete tutorials on how to write a 2D side-scrolling game. Although an older reference, many fundamentals for developing a 2D side-scroller have not changed.
Full source code examples and some tools to develop a side-scroller are provided as downloads. There is only one external library used to handle graphics primitives. As this is an older DOS program, you may have to use a DOS emulator like DOSBox or modify the examples for more modern environments.
I suggest you skim chapters 1 to 9 and focus on chapters 10 to 17.

Any good open source online RPG starter kit for development?

Does anyone know of a good open source toolkit that allows level designer and graphic designer or someone with basic programming experience to create multiplayer online Role Playing Game ? The game can be a simple 2D interface in a 2d virtual world.
I know Microsoft have a starter kit something like the following :
http://creators.xna.com/en-US/starterkit/roleplayinggame
that allows developer to create RPG game running on XBox platform but i am looking more on multiplayer role playing game on the web platform where player can play directly with their browser.
regards
Andrew
Tried these??...
RPG MAKER for XP
http://tkool.jp/products/rpgxp/eng/
ECLIPSE MMORPG creator
http://www.freemmorpgmaker.com/index.php
Also as a stand-alone game developer (which i presume you are) i would suggest You go through these for a good grasp of the challenges ahead:
Game Development & Production
Game Developer's Open Source Handbook
UPDATE: You might be interested in Quake-Live
For a few sample of Quake Live on Youtube:
http://www.youtube.com/results?search_query=quake+live+demo&aq=f
RPG Toolkit seems to be a good one too
For 2D single-player:
http://rpgjs.com/
For 2D MMO:
http://browserquest.mozilla.org/
Unity3D is free for you to develop games for the web (and desktop I think), you can later upgrade your account in order to deploy your game into more platforms. Really easy to use and the programing is friendly enough for you to learn (lots of tutorials everywhere).
Pokemon Essentials is good for pokemon games, but I have used it for many other RPG games.
https://www.youtube.com/watch?v=mlnzaEhH5cI <-- It's in the description

Fundamentals of Game Programming in C

During the last 2 months I've been trying to learn the basics of game programming. So I coded a few simple games in Java to learn the fundamentals, such as Tetris, Checkers and Pac-Man.
Now I want to learn/improve my skills in C, so I have this idea of writing those games in C to learn more about memory management, no OOP, etc. I have done basic C programming before but never with graphics, so I don't know where to start.
Which libraries should I use to write simple 2D games in C? GTK+? Cairo libraries? Any tutorials you can recommend? Graphics libraries?
Thanks
I would recommend using the SDL graphics libraries, there are some pretty good tutorials and demonstrations here... http://www.libsdl.org/ and for tutorials here... http://www.sdltutorials.com/ Hope it goes well!
Doing some openGL with glut is a good place to start in my opinion, as it allows you to do both 2d and 3d graphics.
http://www.opengl.org/resources/libraries/glut/glut_downloads.php
If you want another layer to help you with various parts of game programming (keyboard and mouse events, sound, etc..) you can use SDL with openGL.
http://osdl.sourceforge.net/main/documentation/rendering/SDL-openGL.html
There are lots of tutorials around the web to help get you started.
If you want to do C game development, OpenGL with glut is a good start..
The red book is your friend!!
Although the following are not 2d; as everyone is mentioning 3d i might add the following libraries; they are open source libraries for 3d engines.
Ogre is a pretty popular open source graphics engine. "Torchlight" was written in it, and so was "A tale in the Desert". Also the unreal engine has gone open source.
A 2D library that just crossed my mind and is amazing to use is Quartz from OSX. The tools are pretty damn good as well. You'll have to learn some Obj-C though, but its a nice language.
As someone mentioned you need some key Math skills to move up in the game programming world. I don't know how much is involved in animation and modelling since tools are available, but to write engines of any sort Linear Algebra is involved; this applies to 3D programming and it might be involved in 2D Opengl. Gilbert Strang's introductory book on Linear Algebra is amazing. Mit opencourseware also has an entire semesters worth of lectures available by Gilbert Strang on Linear Algebra. You can download them directly from Itunes or on the web.

Resources