Image Image Image




Post new topic Reply to topic  [ 60 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Best language for bots (VB or C# or C++ or other)?
PostPosted: Fri Mar 21, 2008 8:40 pm 
Offline
Regular member
User avatar

Posts: 70
Favourite Bot: the one on it way
Would like your view on what coding language to choose and there level.

My point of view and knowledge is:

Basic is for the Beginner.
Productivity that is ideal for first time or casual Windows programming.

C# is for the Intermediate.
A great combination of power and productivity for the Windows developer.

C++ is for the Advanced.
Horsepower with a finer degree of control than other Express Editions.

I would properly choose C++, because it is the most advanced language of the 3 and it is supported by Microsoft.

What do you use ? Why ? What lever is it ? (Beginner,Intermediate,Advanced)

- Ocean :geek:

_________________
- Ocean :geek:


Top
 Profile E-mail  
 
 Post subject: Re: Basic vs C# vs C++ and other coding languages
PostPosted: Fri Mar 21, 2008 8:46 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
Most of today's proffesional development is done either in Java or .Net (about 50-50). Both are very productive, and used for mission-critical software. I would prefer C#, as concepts are closer to Java, I myself code in Java.

BTW - You meant best language for bots coding, I suppose - Java is poor for windows programming, and GUI programing, as I don't need both for my bots (my bots are scrapers based) Java is fine for me.

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Basic vs C# vs C++ and other coding languages
PostPosted: Fri Mar 21, 2008 9:09 pm 
Offline
Regular member
User avatar

Posts: 70
Favourite Bot: the one on it way
Yes, for bot coding off course.
Will have a look at C# vs C++ then, maybe even Java.

- Ocean :geek:

_________________
- Ocean :geek:


Top
 Profile E-mail  
 
 Post subject: Re: Basic vs C# vs C++ and other coding languages
PostPosted: Fri Mar 21, 2008 10:00 pm 
Offline
PokerAI fellow
User avatar

Posts: 1239
Favourite Bot: my bot
- Native C++ will run 3 times as fast as C#, java or VB on compute intensive tasks.
- The only differences between C# and VB are syntactical
- Generally speaking people find C++ harder to write than the others, though experience can make up for this.

I use java most of the time, C for speed, but have used them all at some time or other.


Top
 Profile E-mail  
 
 Post subject: Re: Basic vs C# vs C++ and other coding languages
PostPosted: Fri Mar 21, 2008 11:47 pm 
Offline
PokerAI fellow
User avatar

Posts: 686
Location: Midwest, USA
Favourite Bot: N/A
I would disagree about Basic being for beginners only. AFAIK, you can do anything in VB.net that can be done in C# (like spears said). IMO, VB6 was really powerful and low level compared to the new managed .net crap. Wait, did I just call .net crap? :D

Anyway, for bot programming you'll face a couple of problems. First off, to do memory reads, DLL injection, hooking, stealth, security, etc you'll be a lot better off with low level languages (like C, C++, D, assembly, etc). For hand enumerations you'll also be better off with a low level fast language.

As far as general coding, that isn't a speed bottle neck (like general stat keeping, opponent modeling, core AI, etc), any language will work. It's only a matter of personal preference at that point.

I personally prefer the solid structure of C++. I feel that it makes (forces) one to consider their problem and design before coding, and that makes for a better product. For the record, D is probably closest to my ideal language. The only problem is the lack of support right now (but it's growing).

For a total beginner, I'd suggest learning a low level language like C++, as well as a high level language like Python or Ruby. Everyone seems to love java, but honestly I can see no advantages it has over C++ for bot building. :twisted:

BTW, this is going to be my only reply to this thread, no matter what! :roll:


Top
 Profile  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Sat Mar 22, 2008 6:17 pm 
Offline
Senior member
User avatar

Posts: 465
Favourite Bot: Mine, of course!
I have done Hooks and Injection in VB 6. I currently do it in VB .Net. I only know a few languages, but almost all of them work. Of the languages I do know, only Transact SQL is worthless as a bot language. But it's great on the data mining and data anlysis side. :D

If I converted some CPU intensive stuff to C++, it would be much faster; however, I'm not running up against the clock anyway so I don't worry about squeezing a few tenths of a second better performance out of each hand. For those who take a dynamic, heavy calc approach in their bot, C++ vs. .Net or Java would make a big difference.


Top
 Profile  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Sun Mar 23, 2008 2:52 pm 
Offline
Senior member
User avatar

Posts: 129
Favourite Bot: ruserious?
I think some people like to exaggerate the speed difference between .Net and c++....

The biggest slow down is the JIT-ing of the IL code from .Net... Once this is done, there is no way there is a 3X slow down between .Net and c++ for computations... At least not if both are written to be efficient...

There are certainly some areas where the managed environment and garbage collection can add in some periodic lag, but there are also ways to avoid this...

If you have c++ experience, use it... There are certainly benefits, but I think that c++ is a very impractical and difficult language for people learning to program, especially since the work on languages and the programming paradigm in general has been moving swiftly towards abstracting away all of the complicated BS that interferes with translating requirements into code... Why should I have to worry about low level memory management and other little caveats with c++?

Stay away from VB.Net... IMO, it is the ugliest, wordiest, hardest to read language out there... I used to be a VB6 programmer, and when moving to .Net, I went straight to C#.... VB.net is the antithesis of syntactic elegance...


Top
 Profile E-mail  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Sun Mar 23, 2008 4:08 pm 
Offline
Senior member
User avatar

Posts: 465
Favourite Bot: Mine, of course!
When Microsoft released VB .Net, they changed the language to basically look a lot like C#. Many of the same syntaxes now exist. The problem is not that VB .Net is clunky, VB 6 is clunky! To this day I still cringe when I see VB 6 code!


Top
 Profile  
 
 Post subject: Re: Basic vs C# vs C++ and other coding languages
PostPosted: Mon Mar 24, 2008 4:56 am 
Offline
Regular member
User avatar

Posts: 74
Favourite Bot: ...
Timmy wrote:
memory reads, DLL injection, hooking, stealth, security, etc


This can all be done with C# as well, some of it is as easy as doing it in c++, some is a bit harder and longer. C# has come a long way, and I think it gets a bad rap based on old or incorrect information.

But in the end it's what your want to use, one could write a bot in ASM or in qbasic, it doesn't really matter as long as it wins.

-acidie

_________________
I'm back... well almost, no, no I'm gone again.
I'm in ya shitz, haxoring ya boxz!
Nothing is secure, everything is permitted.


Top
 Profile  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Mon Mar 24, 2008 12:12 pm 
Offline
PokerAI fellow
User avatar

Posts: 1239
Favourite Bot: my bot
Maybe I was a bit rash to say C++ is 3 * faster than Java. This was my experience 8 or 9 years ago and I'm prepared to believe things have improved. If you do a bit of internet research on this it's certainly a confusing picture, with many old references coming up. Many people say using the java -server is faster than the default. Java does bounds checking on all array accesses which is quite costly whereas C++ doesn't.

I would expect Java and C# to have similar performance as their implementation is quite similar, and this seems to supported by the internet research I've done. I see that you can avoid bounds checking in C# in unsafe region so that should improve C# performance where there are a lot of array accesses. Given that it is much easier to access the windows API from C# than java, if I were choosing a development language today I'd probably choose C#.


Top
 Profile E-mail  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Mon Mar 24, 2008 7:03 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
spears wrote:
Maybe I was a bit rash to say C++ is 3 * faster than Java


By overall experience, also looking something like the hand evaluator discussions, Java and C seems of similar performance, close enough if not the same. Before Java had JIT compilation it was really slow, but that was long long ago. with JIT, everything is basically compiled to native code. There are some performance pitfalls in using Java, e.g. excessive usage of strings, careless usage of objects, which may lead to abnormal garbage collections (GC), but even with that, 5-15% is the max penalty you can get from GC.

My bot, five-tabling, loads one of the CPUs at 15-20% on average. How is that for performance, I guess not bad.

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Thu Mar 27, 2008 10:00 am 
Offline
Regular member
User avatar

Posts: 74
Favourite Bot: ...
indiana wrote:
My bot, five-tabling, loads one of the CPUs at 15-20% on average. How is that for performance, I guess not bad.

What specs?

_________________
I'm back... well almost, no, no I'm gone again.
I'm in ya shitz, haxoring ya boxz!
Nothing is secure, everything is permitted.


Top
 Profile  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Thu Mar 27, 2008 10:39 am 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
acidie wrote:
indiana wrote:
My bot, five-tabling, loads one of the CPUs at 15-20% on average. How is that for performance, I guess not bad.

What specs?

Q6600, read 1 CPU = 1 Core

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Thu Apr 03, 2008 1:19 pm 
Offline
Junior member
User avatar

Posts: 13
Favourite Bot: casi
From what Ive read Java at least at first glance seems to be the easier language for bot coding because of the robot class. I cant find an alternative in c#.


Top
 Profile E-mail  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Fri Apr 11, 2008 4:17 pm 
Offline
Senior member
User avatar

Posts: 232
Favourite Bot: Poki
I use c# , its perfect because it's easy and powerful


Top
 Profile E-mail  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Wed Apr 16, 2008 10:03 am 
Offline
Regular member
User avatar

Posts: 64
Favourite Bot: LogicalAI
I would have to say AutoIt and Java.

That Java Robot class is damn near as good as Autoit itself. You can create an AutoIt object in Java and multithread Autoit that way if needed.

AutoIt by itself is real straight forward, but if your goals can't be achived with plain AutoIt, which is rare, then Java and AutoIt.

_________________
Logical AI


Top
 Profile E-mail  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Sun Apr 20, 2008 2:53 pm 
Offline
Senior member
User avatar

Posts: 468
Favourite Bot: Custom
Java can be used to access native windows functions through JNI (Java Native Interface). Pure JNI programming is a pain in the ass but there are plenty of programs out there that will abstract the process and make interfacing with windows as easy as writing pure java code. The speed of Java has come a long way in recent years so if your bot is choking the CPU, it's more than likely a problem with the code you're writing rather than the development language.


Top
 Profile E-mail  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Sun Apr 20, 2008 3:00 pm 
Offline
Junior member
User avatar

Posts: 10
Favourite Bot: I don't know, me?
I personnaly use C sharp because it's easy and like Java
I like the dotnet framework


Top
 Profile E-mail  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Sun Apr 20, 2008 9:07 pm 
Offline
Senior member
User avatar

Posts: 287
Favourite Bot: own
Normally I would say C# is one of the best language, but you should think about the fact that your code (if your software on poker client is also written in c#) that every c# code (.net code generally) is compiled in IM (Intermediate language) and could easily get read by the poker clients if you do nothing against that.

On the other way C++ and all not interpreted programs could be dead someday. Yes they will run every time, but not in secure sandboxes. In Windows Vienna there should be a mode called "sandbox" that only allows secure (managed) software to be run in each sandbox if on of the software demands it. Then it is completely isolated. Okay, who knows, this feature should have been integrated in vista but it wasn't. A programmer on the last developer conference told me they had not enough time to integrate that one but this feature is a big demand from various companies.

Microsoft wants to isolate every unsecure (unmanaged) software as soon as possible. So I would (and have) definitely choose one of those managed programming languages.


Top
 Profile E-mail  
 
 Post subject: Re: Best language for bots (VB or C# or C++ or other)?
PostPosted: Mon Apr 21, 2008 1:13 pm 
Offline
Senior member
User avatar

Posts: 465
Favourite Bot: Mine, of course!
JasonM_72 wrote:
Microsoft wants to isolate every unsecure (unmanaged) software as soon as possible. So I would (and have) definitely choose one of those managed programming languages.

This would be a difficult task to accomplish, since that would include device drivers, etc. And of course, not to mention the lawsuits: If Windows only allows "exposed" manged code that can be decompiled, why is Windows OS not written in managed code?

At the very least . . . "someday" is at least two decades away so this is not really much of a consideration if any. Two decades from now we may be using Voice#: speak the goal and the computer writes the code. Ahhh to have a computer like those found on Star Trek!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 60 posts ]  Go to page 1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 14 guests


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

Search for:
Jump to: