Sign in to follow this  
merc808

need some direction for my bot project

Recommended Posts

I have started a little project mainly to increase my programming skills but also out of curiosity. I am going to have two bots battle it out in an imaginary ring. Each bot will have an AI script written for it. The scripts will resemble the C language. I thought it would be fun to see which script would be the best. I would load up a script for each bot, and interpret it in real time. The bots would be simple, having "sensors" that would basically give an angle, distance, and what it is (either a barrier or another bot). Right now I know virtually nothing about AI, and have been wondering what kind of features would be necessary for the scripted language that I create. I understand that pathfinding would be involved, especially if barriers were put into the ring. What am I missing? I need some direction, maybe if there is source available for a C-style interpreter and/or examples of some AI pseudocode that could apply to a C-like language. If anybody could help that would be greatly appreciated.

Share this post


Link to post
Share on other sites
Well, there happens to be a huge following to what you want to do. There are yearly world championships pitting the best of the best in a multi-bot brawl. Each bot is programmed with an AI to run-n-gun to the top. You can find out more at Robocode.

Unfortunately (for you), Robocode is in Java, and you won't be able to see what's under the hood. You download the program, which allows the user to create new bots (tanks) by providing a simple framework to follow. The user can then download hundreds of bots to pit their creations against. It really is fun, but like I said, you are strictly programming AI...and in Java. Anyways, take a look at it, and if it's not your thing, at least it will give you some excellent inspiration and encouragement. Have fun!

Share this post


Link to post
Share on other sites
That looks very similar to what I will be trying to implement. I was going to write my own interpreter with as many features as I can. It seems that the robocode uses java or javascript for the AI of the robots.

Does anyone know of some resources for making a C style interpreter?

Share this post


Link to post
Share on other sites
Quote:
I was going to write my own interpreter with as many features as I can.
Ahh, yes. Why have less features when you can have more?

Quote:
It seems that the robocode uses java or javascript for the AI of the robots.
Java.

Quote:
Does anyone know of some resources for making a C style interpreter?
Explain to me what C style interpreter means.

Share this post


Link to post
Share on other sites
Quote:
Original post by stonemetal
ch is a interpreter for c/c++. What is it you are trying to learn AI or how to write an interpreter?


I actually am trying to learn C++. I thought that writing a C interpreter would be a good way to continue learning. As for AI, this project will be fairly basic. I thought that I would concentrate on writing the interpreter first, and when I said "C style" I meant the same syntax and semantics of the C language (or at least as much as is necessary for the AI to function properly... ) I want it to be close to C. Of course I don't know much about AI or interpreters but I thought it would be good for experimenting. I am sorry if my language is unclear I just wanted helpful suggestions on interpreters and basic AI.

Also I can think of many reasons to have less features compared to more.

*For some reason the plus plus in C++ isn't showing in the preview

Share this post


Link to post
Share on other sites
Quote:

*For some reason the plus plus in C++ isn't showing in the preview


Ha, yeah the preview doesn't show them, but when you post it they are there.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this