That is a project in progress I have to create an AI for KernelPanick in c++. The first problem is that I have no knowledge of c++ and the second is that I have no idea where to start.
I tried to read the file "example" but they seem to be generated automatically whereas I really have to coding raw ... This is not really my strong point for once....
If one or more of you can give me advice ... My goal is not specifically to successfully beat the machine but just to make my AI do some stuff ...
I really depressed and relies on your generosity;)
I would recommend doing AI in lua now. Its simpler and the AI can be distributed more easily - in the game itself. (Zero-K lobby for example does not support C++ AI at all).
You can start by looking at existing AI - CAI from Zero-K
You don't know C++ but you insist on writing it in C++? What's the catch here, is it for homework, competition or something like that? If you also don't know C or any C-like language, I suggest you learn that first, or it's going to be a rough ride.
If you do know a bit of C at least, get the engine sources, and I suggest you just make a copy of the CppTestAI and base your work on that. Look at the other existing C/C++ AI for hints, and read the wiki.
Most importantly, if you need help, tell us what you tried so far, and exactly where you're having trouble.
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
are you using this? http://www.irit.fr/ProgAndPlay/index_en.php found it by googling bytebattle. Might matter in case it is a bit different to normal spring but Idk. Looks interessting though.
i recommend quitting the C++ course, and take an other course.. prefferably... any language that is not C++. we need to kill this language.. noobs learning it is not the right way to go!
C++ isn't going away, even if no new C++ projects are started, and it does have its value, it explains a lot, the training of it could even spark Hoijui rivals ;D
Thank for the link, i'll watch it later. In fact, i know java, but i have to code un c++, i change university this year, and here, they learned c++, not java =P
Thank for the link, i'll watch it later. In fact, i know java, but i have to code un c++, i change university this year, and here, they learned c++, not java =P
LOL, My College switched the CS program from C++ to Java when I was two years in... one of the many many reasons I dropped out...
You should actually have a much better time of it going from Java to C++, there are going to be a lot of gotchas and weird glitches but the syntax, structure and logic is going to be mostly transferable... at least at the level you'll be using it... You might be better off finding a "Moving from Java to C++" type deal.
It's been years since I've done any "real" programming but this result that came up for me in google seems nominally useful:
Honestly, I always saw it much easier to go from C++ to Java than the other way around, especially if you were ever taught OOP properly.
In fact, usually for C++ you need to have a good C understanding as an additional prerequisite and you end up dealing with a much more complicated including, declaring, compiling, linking, etc. process which C++ inherited to be backwards compatible with C, which doesn't really teach you anything about OOP.
@OP: 1) Learn C++ 2) Write A* outside of Spring using C++ 3) Compile Spring 4) Create the simplest AI that just spams units and sends them to the enemy 5) Improve your AI to fit the course requirements
PS: Were you assigned Kernel Panic AI as a project, or did you pick it yourself? Because I (am a TA starting with this semester) would never give my students a project using specific tools without giving the instructions how to setup those tools (if not obvious). If you were assigned that, you should at least ask your TAs to help you set it up.
I have a small question, I see there are two ways to attack an ennemy:
CMD.ATTACK (->expect 1 parameters in return (unitid) or 3 parameters in return (mappos)) CMD.AREA_ATTACK (->expect 4 parameters in return (mappos+radius))
If i understand, the first one only take the ID of the enemy or it's exact postition... The second take a map position and the radius...
The second seems much interesting, could you explein how to use the radius please
The area-attack one is what you use when holding the "A" key in game. To use it, you should specify a map position with x, y and z coordinates, and radius, which specifies the area of the circle. Wikipedia has a decent explanation of the radius, but you probably met with it when you were in elementary school: https://en.wikipedia.org/wiki/Radius
PS: I don't really think that command is of much use for an AI, you can easily implement it with a simple for loop, and you will almost always want to set targeting yourself. PPS: Where are you from, i.e what is your native language?
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum