CTar

Members
  • Content count

    1945
  • Joined

  • Last visited

Community Reputation

1134 Excellent

About CTar

  • Rank
    Contributor
  1. Computer trouble

    I just bought a new computer, but I'm having problems with it and was hoping somewhere here could help me narrow down the issue. Specs: CPU: Intel i7, 920 RAM: 3x 2GB Corsair DDR3 (1333MHz) Graphics: GeForce GTX275 Motherboard: Asrock X58 Extreme Power: 750W supply The problem is that after having been on for about 30min the screen image freezes, but all fans keep operating. This happens consistently even when I just enter the BIOS and look at the HW monitor. According to the HW monitor the CPU and MB temperature are both <40deg C (~100 deg F). I have tried disconnecting the HD and DVD drive, replaced the graphics card and RAM with components I know to be working. None of these have changed anything. If I restart the computer right after it freezes, then no image appears on screen and I get some beeps (2short, then pause, then 8short). If I wait a little longer it turns on alright, but the time it takes for it to freeze is considerably reduced (sometimes to 2-4min). I'm not really sure what to do to find the issue.
  2. Buy and Download from Steam

    I'm in Denmark and I suspect the situation here is the same as in Sweden. I've been downloading with 1MB/s from steam (which is my max. speed), but it's not uncommon for games to download at 100KB/s. I suspect the servers are simply busy.
  3. Quote:Original post by ZiKaS @CTar Thanks for your reply. So I've understand that perception is concerned about collecting data, inference concerned about converting the collected data (by perception) to game information and decision making is concerned about taking suitable decision against game information (provided by the inference). For Example, in FPS Game the enemy has shot me then perception system will collect this data after that, the inference system will take this data and then produce the output "My hp was reduced by 50 hit points" finally, the decision making will produce output "Attack enemy" Thanks :) Yes that's pretty much it though I doubt any real FPS games would structure it like that. In every AI architecture you will have a number of pre-defined messages that the actor can get to inform it about what happens. This is what perception is. As you said "You have been shot" could be such a percept, but you would likely get a couple of additional parameters detailing where you were shot and how much damage you took and possibly the kind of weapon and direction you were shot from. Thus you example of "my hp was reduced by 50 hp" is really an inference as you state, but a fairly trivial one because you were told "you were shot and took 50 hp dmg". The purpose of an inference system is to take the fairly unstructured information and present it in a format that is easier to understand for the decision making system. Thus a much more useful inference would be "I have taken 50% damage in the current firefight", "I will probably be killed in 9 seconds if the current rate of damage continues.", "There is a heavy concentration of fire coming from approximately (x,y,z)". These inferences are things that the decision making system can work with so it can structure high level strategies like "look for cover", "run to cover", etc. and then finally execute those actions. Also a decision making system can rarely output such high-level commands as "attack enemy". It has a set of narrowly defined actions it's allowed to execute such as "fire" or perhaps "fire in direction x", "crouch", "shout for help", etc. "Attack enemy" is a perfectly valid goal for a decision making system, but it also needs to break down that task and find out how to actually carry out the attack. In some cases it can help to structure the decision making system as a sequential list of smaller decision making systems with progressively more specific commands. The first decision making system may output "Attack enemy", the next decision making system gets that action and outputs "Find position from which I can shoot at (x,y,z) and prepare for combat" and the final decision making system may then look at percepts and inferences to determine that the appropriate action is "turn 130 degrees clockwise" followed by "sprint" and "equip primary rifle".
  4. Quote:Original post by ZiKaS @alvaro Thanks for your reply. So if inference means observation then what's the definition of perception? To be pedantic about it I guess perception is the act of collecting information from your sensors while inference is deducing further information from a base of knowledge. Usually this base of knowledge is the actor's percept sequence. For instance your actor may perceive a "shot in arm" percept and then infer that enemies are nearby. Often these are so tightly coupled in games that we don't bother to separate them. We don't care whether "shot in the arm" was perceived directly or inferred from "took 30dmg to arm" and "heard gunshot". The perception/inference system simply tells us that we were shot. A decision making system determines what actions to perform based on the information inferred by the inference system. I.e. it's a system that makes decisions. Again to be pedantic it doesn't actually carry out the actions, it only tells its "motors" to carry out actions such as "sprint" or "drop active weapon".
  5. I'm currently working on a library which I expect to eventually release in some form and thus I would really like to put together some documentation for the API (primarily C++, but with some C# parts). Something like the DirectX or Havok documentation (both have documentation that I consider pretty impressive though my needs are probably more like those of the DX team). However I have never done any real documentation of software projects and am unsure what tools are available for this purpose. I know Doxygen works to document the actual interface, however I would also like to document the high-level architecture, provide performance-related tips and include introductory articles. I'm not really sure whether Doxygen is capable of doing this, but I'm under the (perhaps mistaken) impression that this isn't what Doxygen was designed for and as such it will be pretty hard to write good documentation that includes formulas, graphs and heading. I'm looking for suggestions as to what tools people would recommend. I need the ability to write articles with headings and subheadings that include source code, diagrams (images) and cross-references in the hyper-text versions. I would like a system that is capable of outputting in CHM, PDF and HTML though I will settle for support for just one if necessary. I will also need to draw diagrams and flowcharts and I'm also not sure what to get for this. I tried installing Visio, but it seemed pretty hard to produce anything good-looking without spending hours moving arrows around, but perhaps this is just because I'm completely inexperienced with this type of tool. It would also be nice for some kind of mathematical typesetting support; preferably LaTeX, but something like Microsoft's equation editor is fine (though I don't see why that would be supported unless some Office tool proves adequate). I would prefer if API documentation is kept in the source files, and I don't really care about the location of the rest. I guess quite a few people here have had to write documentation for some software projects so it would be cool to hear about your experiences and suggestions.
  6. I used to feel like you, but I have since been convinced of the superior expressiveness of mathematics assuming you have the adequate mathematical experience. Quote:x ≡ 1 mod n They use a triple equal sign and place the mod n behind the 1 while actually they're taking the modulo of the x instead of the 1. In programming language, it'd be: x mod n == 1 While the two statements are logically equivalent they state subtly different results. The first asserts that x and 1 belong to the same residue class. The second asserts that the representative of x in the residue class is 1. Most people (even many programmers) aren't that comfortable working with equivalence classes, residue classes and cosets, but by stating the result in terms of a concrete representative in the integers you make the statement more easily digestible for most. Thus the gain in understanding in my opinion comes from your rewording, not the actual syntactical differences. Also both would be perfectly valid in a mathematical context, but for mathematicians the first is as easy if not easier to comprehend and allows for some flexibility (for instance x ≡ 19 mod n <==> x mod n == 19 mod n, but the first is IMO easier to understand since we don't need to take the mod of 19). I believe the chief reason for mathemticians using congruences is that once you get used to it, it's easier to think of x and 1 being equal with a somewhat unusual definition of equal, but it takes some time getting used to. Quote:but that doesn't really stop the fact that in reality there's a modulo operator taken What does it mean that there really is an operator applied? I mean sure the way you rephrased it the equation involves the modulo operator applied, but I could instead phrase it n | x-1 so in my opinion what it really hides is that a division is taken, or perhaps it's a statement that (x-1)/n is an integer so what it really is, is: is_int((x-1)/n)) but then it really is is a sequence of arithmetic operations followed by a test of whether a real number is integral. The beauty of the mathematical approach is that it can be understood in a number of ways and that you're allowed to consider it in any way logically equivalent to the original form. To many people in elementary number theory this means thinking in terms of remainders as you seem to do, but an experienced mathematician has a much broader repertoire of tools to approach it including congruence classes, divisibility, algorithmic description and modulo operators. Quote:Also, things like for loops can sometimes indicate summations much more clearly, Often a description written using summations or for loops only contains superficial difference and as such the real difference comes in your prior exposure to the syntactical constructs. A for loop is a more natural way to express yourself as an imperative programmer, but as a mathematician you often find that a summation is a much clearer representation of your thought pattern. The only difference is experience. Quote:and, using mathematical functions in a programming language with arguments inside the () is sometimes clearer to me than various mathematical notations for various functions. Again simply a result of your experience. Quote:And of course, in a programming language you always write out the multiplication operator, while in mathematical notation, it's sometimes not clear if two symbols are being multiplied or they're just forming one symbol together or they're applying the first symbol to the second. It should ALWAYS be clear in decent mathematical writing what happens if you understand the objects involved. Context matters. Can you give an example? Because while I have heard people voice similar complaints I don't remember ever being confused over whether multiplication or function application was meant. Notation is carefully specified and it would be considered bad mathematics to use confusing notation. It's possible to abuse mathematics and due to the informal specification of notation it can be easier, but such an abuse is the mathematical equivalent of confusing function names and excessive operator overloading. Vector3 x,y; Vector3 z = x(y); What does this do? Translate x by y? Possibly, but the point remains that it's easy to be confusing in both cases and if you don't understand the subject field (programming or mathematics) then surely you will make mistakes. I see mathematics as a much more general, flexible and elegant framework for expressing ideas. That said it can be somewhat elitist and rarely do much to ease the learning curve. You think C++ is hard to get started with because you don't get concrete results? Try algebraic topology. However once you have that BSc or whatever you will find it much easier to express ideas mathematically than algorithmically. However as many programmers never get the necessary mathematical experience you're right that for most programming notation will probably be easier.
  7. help game engine

    The correct symbol to OR the flags together is | not ¦.
  8. Quote:Is there a difference in performance or memory-use maybe? I'm still kinda new to C# and couldn't find anything in the various MSDN guides. Does it really matter? Do you check this type more than 10000 times a second? If not then you really shouldn't worry about this kind of microoptimization. If you do then you probably still shouldn't worry about this; at least not until you have confirmed with your profiler that it's a bottleneck. Also checking if an object is a rifle thousands or millions or times suggests a bad design anyway, so you probably have bigger issues if this code is performance critical. Quote:I'm generally a sucker for abstraction so I can't tell whether it's too much or not. ... Also, I realise one could go with the second approach and replace the uint WepType with an enum and thereby avoid the magic-numbers and get similar pleasant code like CheckWeaponType(Item.WeaponTypes.Rifle); but I'd like to avoid that since all item data is read from external data files and I'd have to update the code whenever I update the data files. You're a sucker for abstraction, but you want to keep passing around ints? It can't take long to update the data loading code to load the data into an enum. You would have to update the input validation part of the code anyway whenever you modify the enum. I would seriously reconsider using an enum if I was you and then simply have property WeaponType Weapon{get{return weaponType;}} Anyway if you could change your class hierarchy I would consider whether this is really the right way to design it. Often the approach of having a single GameObject class used for many things is bad OOD. However if you can't change the design due to code depending on this design or for some other reason, then I would suggest you at least switch to using enums; not for performance, but for ease of use.
  9. pool objects outliving pool

    I guess I would simply wrap the pool in a class that keeps a shared_ptr to the pool, and then pass that shared_ptr<Pool> on to the deleter in the returned shared_ptr<SomeType>. Then the pool won't be deleted until all shared_ptrs have been deleted. Assuming a simple pool interface like, template<class T> struct SimplePool { typedef T elem_t; T* alloc(){ return new T; } }; It would look something like (not tested, but the idea should work): template<class Pool> class PoolElemDeleter { std::shared_ptr<Pool> pool_; public: typedef typename Pool::elem_t elem_t; void operator()(elem_t* ptr) { delete ptr; } }; template<class Pool> class PoolWrapper { std::shared_ptr<Pool> pool_; public: typedef typename Pool::elem_t elem_t; PoolWrapper() : pool_(new Pool) {} std::shared_ptr<elem_t> alloc() { return std::shared_ptr<elem_t>(pool_->alloc(), PoolElemDeleter<Pool>(pool_) ); } };
  10. I'm not sure what a role-playing GTA 2-style game is so I'm assuming it's something like a GTA2 clone. For a start I would construct some kind of graph of your road network which the AI can use to do pathfinding on (a directed graph should do unless you game world is massive or your road topology is considerably more complex than GTA2's was). If you just want them to move randomly you could simply have them all randomly chose a location on your road network (you may want to assign certain areas with higher probability as the probability of driving to downtown should be higher than driving to the quarry outside the city, you may even take time of day into account). Then you simply do something like A*-pathfinding to find a road to follow. Remember to add some kind of cost for turning or you may end up with a disproportionate number of turning vehicles. Driving itself should be fairly simple. Drive until you get close to an obstacle (car, red light, pedestrian) and slow down as you get closer. In a chaotic situation you can go into a panic mode (use a finite state machine to track states) where the vehicle first checks if it can find a way out driving normally (this may need some experimentation to get working properly and as far as I remember it could even be problematic in GTA2, but it didn't matter because you often just blew the whole thing up or moved on and the whole mess was simple cleared when you got a couple of blocks away), and otherwise perform some other action like wait and honk until you can get out; in a non-persistent world it doesn't really matter if you just wait and honk forever, but it will look stupid if it's obviously easy for the driver to move on. This is pretty much just a pathfinding and obstacle avoidance problem for a simple agent whose state can be tracked by a FSM. Pretty much any Game AI book or site will have more suggestions for just this situation (look up A star, pathfinding and finite state machines for AI and you should get a good starting point and many of these articles will have "further reading" sections if you want something a bit more sophisticated).
  11. Quote:Original post by Spoonbender Quote:Original post by Toolmaker Instead, the EC explicitly wants Microsoft to allow consumers to choose which browser they want to use. And that's a bad thing? Seems a fair goal to me. Which is why the EU is not happy that IE8 gets removed. The goal is to give the user *more* choice, not *less*. I really don't see why the EU should be the ones to do this. I believe it's up to MS to choose how customizable they make their product. Anyway who are to say what browsers get chosen between? Why shouldn't MS be forced to include my buggy open source browser if they are forced to include Firefox? At the moment browsers are pretty much free software, but what if someone release a commercial browser that is actually sold? How should MS handle such a thing? Surely they can't be allowed to give free browsers an unfair advantage. Quote:Quote:Firefox had a market share of 31% in that period, while Opera had a negligible share of 1.5%. I find the complaint weird, because clearly it shows that the Mozilla foundation was capable of gaining a solid 32.5% share in a market dominated by Microsoft. In other words, the complaint doesn't make sense. Or perhaps Firefox would've had a higher still market share if MS hadn't used their OS dominance to push browsers as well. If Microsoft (or any other company) abuses its monopoly then it's bad, whether competitors manage to get 1, 5 or 32% market share, isn't it? But was it really abuse or simply use? Even a company like MS is allowed to adapt its strategy to its position in the market. The steady rise of Firefox shows that the situation isn't as bad as Opera tried to argue it was. Quote:Anyway, "free market" does not mean that each company can do what it pleases. It means the exact opposite, that the consumer can choose what to buy and what not to buy. If Microsoft can ensure that their product and nothing else ends up on 98% of all computers, whether the owner wants it or not, then it's hardly a free market, is it? True, then it would be breaking EU law, but at the moment we are discussing MS not some fictional monopolistic company. Most stats I have seen place IE usage share somewhere between 60% and 70%, not 98%. Also users who don't want IE can easily replace it, so there is what I would consider free choice for these users. The problem is with agnostic users who haven't taken a stance on what browser to use, and therefore simply uses the default. I admit that this may be against EU legislation; it's an extremely complex area and I'm not qualified to judge the legality of MS' strategy, but if it's illegal then I consider EU antitrust legislation to be flawed, and unless the EU can come up with concrete, practical suggestions for what MS should do then I consider the situation fairly stupid. Quote:There is nothing "free market" about a company using their monopoly in market A to gain a monopoly in an unrelated market B as well. In a free market, Microsoft's browser would gain marketshare on its own merits, not on being made by a company who happens to have a virtual monopoly on operating systems. Unrelated? For most users they are extremely related. I'm wondering how it can be that Coca-Cola can be allowed to sell its soft drinks in their own cans. I mean, I'm not an expert user so I haven't really considered getting new cans, but shouldn't I get the choice of what container to use? It's simply unacceptable that I'm forced to get this unrelated product and it's surely the reason why no one has been unable to penetrate the market of selling cans directly to consumers. Quote:Quote:Personally, Windows without IE is going to be a bitch to use. But what happens if MS is allowing the consumer to select their browser, is that they have to provide support for it as well. And instead of people actually blaming their software, it's all Microsoft's fault when it doesn't work. This one just doesn't really seem to make much sense, given that Microsoft doesn't offer free support on their products as it is. You get what, two free support calls when you buy Windows. So even if people *do* flood them with support calls about Safari, it's hardly going to be a burden for Microsoft. The problem isn't support calls, but that people blame MS. If their computer becomes unresponsive, but a Mac doesn't they will consider getting a Mac whether it's MS' fault or not. If their websites don't work properly they will get a worse opinion of MS. Remember when Vista was first introduced and suddenly programs couldn't write to the Progam Files folder? MS had to go the extra mile to add support for these programs to improve the user experience even if they could simply have said the programs were to blame and let them crash. MS is held responsible for everything that runs in a Window environment by the end-user, whether this is fair or not.
  12. Well most methods that are practical in the context of games are what you'd call "vector math" methods, but they are extremely varied. They can be made fairly efficient by using crude-approximations as early tests, organizing objects into spatial structures and caching results to take advantage of spatial and temporal locality. It's a large subject and there are way too many techniques to cover in a forum posts, but if you are serious about learning about these techniques I've found the book "Real-time collision detection" by Christer Ericson to be a great introduction to the subject (check out the table of contents to get an idea of the scope of the subject area).
  13. VS2010 beta impressions

    I'm happy Microsoft finally implemented multi-monitor support, but I find it somewhat awkward to use. Sure you can drag code windows to your second monitor, but I haven't really found a way to create tabs on your second monitor so if you switch between a lot of files it's hard to use (if someone know how to create a tabbed window on your second monitor please tell me). I found it complained about a couple of Boost libraries when trying to compile, but none that I cared about, but perhaps that was because I just checked out the trunk (1.39 doesn't seem to support VS10). I find the new UI to be great visually, but I'm somewhat surprised by the sluggishness of it. A well-designed WPF application shouldn't really have 1s lag when pressing a standard button. I'm hopeful performance will improve as Microsoft generally produce great apps and it really shouldn't be so hard to move background processing into the background. There is really no excuse for me waiting 3-4 secs when pressing add new file on a quad-core with 4GB memory. As for IntelliSense I definitely feel that it has improved and perhaps this will be the first release where we won't need VisualAssist, however it also seems to suffer from the problem of bringing background processing to the foreground. Sometimes the system becomes completely unresponsive due to IntelliSense parsing a couple of hundred files. Again parsing is such an easy problem that I would expect it to go on silently. I don't need to be informed that IntelliSense is traversing the DirectX include files; just do it when you don't think it will annoy me. Also the addition of IntelliSense errors to the error list seems weird and I can't really see the benefit. I would much rather have proper online code checking and analysis. Overall I'm happy with it. It's a much bigger improvement than 05->08, but I don't feel it lives up to the hype on the IDE-side (the improvements in C# and .NET are however great). Unfortunately I haven't really had time to play with stuff like the profiler, testing and refactoring yet, but I hope to in the future.
  14. Pirate Bay founders found guilty

    Quote:1. Torrent sites aren't illegal and it's not the site owners responsibility for user posted content. Come on. If you run a site you are responsible for the content regardless of who posted it. Running a site with user posted content is tough. You need to be always monitoring for inappropriate content. I had some forums on my business site that was constantly spammed with porn site ads. As far as my clients and I was concerned, it was my responsibility to remove this garbage as soon as possible. I ended up having to restrict registrations to eventually get a handle on the problem. So basically: The owners of a site for user-uploaded content should be policed by the owners. However, how much policing should be required by law? Why shouldn't you have manually approved every message before it became public? You were after all responsible, so even if it was quickly removed for a short while you hosted porn just as if you uploaded it yourself. Google may have done some minor filtering to stop child pornography (I don't know what actions they have taken, but as far as I know they are fairly minor), but why not force them to devote 10% of their manpower to develop a super-filter? Then why not 50%? Google is probably doing as little policing of copyright infringement as TPB. Neither would take down links to illegal content even if notified of it. Also Google is a very profitable company with enough manpower to effectively combat copyright infringement, while the pirate bay would have a much harder time. Even then, the Pirate Bay has taken some minor steps: Quote:From Usage policy for The Pirate Bay tracker system. The responsibility lies upon the user to not spread malicious, false or illegal material using the tracker. ... Connecting to any of our trackers means that you accept this policy agreement. Surely this is not legally binding, but all users have at least been informed that they are not allowed to use TPB to spread illegal material. With regards to child pornography: Quote:From About To report child abuse or other similar unlawful activities please do so to your local authority. In Sweden you can contact childabuse@rkp.police.se to report child abuse matters. Please do so. And AFAIK child pornography isn't a huge issue on TPB. If TPB isn't policing enough, then neither is YouTube or Google. The law should be the same for all (and objectively specify exactly how much a company must do). If you choose to hold owners responsible for all content hosted on their servers then Google would be illegal as well, and they would have to manually verify every new addition to their database. This is infeasible, but would be the result if we took this viewpoint (personally I don't consider it a good idea). The only real difference I see between Google and TPB is intent; that the owners of TPB openly condone piracy. If the authors publicly stated: "We are sorry our services are used for copyright infringement, but currently we can't spare the resources needed to combat the problem effectively. At the same time we won't shut down our services due to the users who use it as it was meant, to do legal file sharing." (pretty much the Google approach though they aren't as open about not using resources to combat illegal material) Should they then be prosecuted? If so why shouldn't Google be prosecuted as they do the exact same thing? Quote:And why shouldn't they be held responsible? If I have a computer in my house and I invite someone to put child porn on to it, aren't I somehow responsible for that? And if I allow a third person to come in and take those files? What if I allow him to instal software to find specific files? What if wrote the search program myself? What if I left the front door open and let these 2 or 3 people in my house whenever they felt like coming in? Why not just make the whole process easier and let these guys have remote access. Why not let more people access my computer? Hey, I can put up some ads and make some money while I do all this. Wait, these files are too controvercial, maybe I should switch to copyright media instead. It's still illegal but it's more socially acceptable. That would be a reasonable analogy if TPB hosted content, but as they don't you are inviting your friends to post links to files on their computers in a database on your computer and let them search the database. You never tell them "go post links to child pornography" you tell them "go post links to anything you like". In that case I think it's your friends who need to be arrested, not you, even if you are aware that many of the links contain child pornography. I think we need to go after the actual people participating in illegal file sharing.
  15. I just got accepted into MIT!!!

    Congrats on being accepted. Quote:Anyone else apply/attend/graduate from MIT? I'm going to apply regular action as an international student (also HS senior). I plan to major in mathematics though, if I'm accepted.