| from David Bolton No exact date yet as I have to write a sample bot in each language C, C++ and C# but the Weekly Challenge based on playing Sid Sackson's game Acquire will start next month, details below. Only three more working days for me this week then a break until the New Year. I will still be writing the blog, tutorials and the Challenges during this time so no rest for me! Have a Merry Christmas and a Happy New Year. | ![]() | In the Spotlight | Weekly Challenge - Acquire Starts January 2010 The feedback was positive so I've started work on the API for this. Currently it looks like just five main functions are needed to play the game. To help people understand if they haven't played the game I've taken some photos and put up a gallery of common situations. It really is an easy game to play but hard to play well! I've added a more explanatory article. I've also posted a sample c bot skeleton but this is just the skeleton, not a full demo bot (One will appear soon) and the API is about 90% finalized. It's to give you an early heads up. these are the functions you'll need to implement in this version: int PickTile(pgamedata pgame,BufferType buffer) ; void BuyShares(pgamedata pgame,pShares shares) ; int CreateChain() ; int TakeoverChain() ; void SwapSellHold(int * SharesToSwap,int * SharesToSell) ; Plus the usual two for info about the bot.: char * BotNameVersionDate(void) ; char * BotOwner(void) ; I will follow up in the next few days with articles about writing bots in each language as well as a sample bot for each. Look for articles in this folder: | | Another C# IDE
The world is a messy, untidy place and I guess that's true in the world of open source. It's the freedom to develop what you want, even if a dozen other people have developed it before. Part of me though wants to knock heads together and say, "if only you'd all put your energy into working on one superlative version instead of a dozen lesser versions, imagine what the world would be like". I do wonder how many versions just get abandoned, forgotten and lost. Of course consolidating and working together will never happen; there are too many issues- personalities and the skill set to manage a team of developers is far removed from working on your own pet project. Also it would be a bit boring if there was only one version of anything but just two or three would be nice. In C++ there are a considerable number of IDEs and the same thing is starting to happen in C#. Not only is there Microsoft's Visual Studio, but Sharpdevelop, Monodevelop and Xacc not to mention the "seem to be no longer developed" x-develop and C# Studio. However xacc, developed solely by Llewellyn Pritchard is an interesting IDE. It's written in C#, is very small with just a 615Kb setup file and yet supports 27 programming languages. It includes an integrated debugger and scripting support as well and feels snappily fast, something more typical of Win32 applications and not my normal experience with .NET editors. | A Small Furry Database Back 20 or so years ago before SQL databases became popular on microcomputers, B-Tree type databases were the in thing. A B-Tree is a data structure that holds data in pages in a tree structure. The B means balanced not binary. Binary trees are tree structures with just two branches per node whereas a B-tree isn't so restricted. As data is added to a b-tree, pages are split to maintain the balance. Generally all data is held in the same depth. You can see an example of a C++ class to maintain a B-Tree. Even in some SQL databases, a B-Tree structure is used to hold the data internally . A good example of an embedded DB (ie one that links into your code rather than running as an external server) written in C is HamsterDB, a cross platform. Dual licensed under GPL or commercial license. Note for non SQL DBs the approach to using the DB is quite different than that of SQL. It's more about retrieving records using a matching key and then doing updates or retrieving data. HamsterDB comes with a number of example programs to get you up and running. At my last job, the database there was Faircom's C-Tree and it was also a B-tree type database though commercial not open source. These types of databases are very fast but much better suited to single user rather than multi user applications. | Sponsored Links | ![]() |  | | C / C++ / C# Ads Advertisement |  |
No comments:
Post a Comment