need some direction for my bot project

Started by
5 comments, last by Shakedown 16 years, 2 months ago
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.
Advertisement
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!
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 &#106avascript for the AI of the robots.

Does anyone know of some resources for making a C style interpreter?
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 &#106avascript 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.
ch is a interpreter for c/c++. What is it you are trying to learn AI or how to write an interpreter?
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
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.

This topic is closed to new replies.

Advertisement