So in terms of hitting a specific fps target, it all boils down to optimizing your code in terms of AI, Collision Detection, and or render code?
a profiler or timers are used to determine what code is too slow. then that code is optimized to run faster. It may be the type of code you mention (AI etc) or it may be some entirely different sections of code. never make assumptions about whats fast and whats not. test and time everything to be sure.
So in terms of PC games, do developers pick their target hardware specification based on the hardware they developed the game on?
you start by determining what the "average" user's PC will be when the game is done. if it takes 2 years to make the game, you have to guess what will be the average gaming PC in two years and target that hardware. This way you don't have minimum system requirements that are too high, yet you have as much hardware power as possible to work with. Console hardware is not an ever-moving target, and thus much easier to predict what hardware the users will have when the game is released.
Why do some developers aim for 30 frames per second? Whats the advantage of that? I would think a developer would want to aim for as high a framerate as possible, since if the target is at 30 frames per second then the frame rate would have to be lower than that (To the point were the perception of smooth motion is gone.). Is it due to the complexity of the game and the algorithms used will never allow the game to reach a certain frame-rate over 30? Or is there something else at play?
lower frame rates = more time per frame to do more stuff.
higher framerates mean doing less, or optimizing code. nobody wants to cut features out of a game. and optimizing code is more work. higher framerates only increase the smoothness of animations. framerates don't need to be high to be playable, they need to be consistent, IE not drop frames. The fact is that you only need to run at 15 fps to be playable, anything faster is just smoother animation, and nothing more. you can notice a bit more responsiveness at 30 vs 15 fps. but not at 60 vs 30 fps.
many folks run render as fast as possible, for smoother animation. this is the primary driver behind higher framerates.
some games are more complex than others, or target slower hardware, and thus have lower target frame rates.