There is no limit to what a man can do so long as he does not care a straw who gets the credit for it.
(Charles Edward Montague)
Technological breakthroughs are often difficult to assign to a particular person, time, or place. Some methods are "in the air", and are reinvented independently in short succession. Financial and emotional motives complicate matters further. Inventors may regard each other's ideas as special cases of their own, more general insights. In 1910 the Smithsonian Institute congratulated the Wright brothers "for bringing [Samuel P. Langley's] aerodrome..to the commercial and practical stage", and only in 1942 issued an official statement that the Wrights, not Langley, had invented the airplane. Only in 1914, after 8 years of court struggles, and strong opposition from Glenn Curtiss, was the Wright's plane patent declared valid. I myself am currently witnessing, in my field of work, a similar patent war, albeit at a much smaller scale.
However, with the Singularity, things are different, as a friend recently pointed out to me over dinner in Berkeley. (Of course, the same idea had occurred to me already, independently!) If a breakthrough in AI results in the creation of a very powerful entity, this entity will likely find it trivial to sort out who contributed how much to its coming into existence. If the entity is benevolent, it will likely take care of proper credit assignment. Spin, PR, old-boy-networks and lawsuits are probably no match to superintelligence, nanotechnology, and non-invasive brain scanning.
With that in mind, the hopeful AI researcher can focus his attention on maximizing the chances for a benevolent Singularity. That means he should publish his work. Credit assignment can be of higher order, such as when his published ideas enable someone else's breakthrough. In the context of a normal invention, this is less desirable than holding back ideas and achieving the breakthrough himself, a little later maybe. In the context of the Singularity, however, earlier is better, all else equal, given ~60 million people dying per year. While his competitor may have beat him to the finishing line, he enabled the competitor's early success by releasing his ideas. That the competitor won't acknowledge this, is no longer a problem after the Singularity, and speeding things up by a mere week may save a million lives.
So if you have an idea that could matter for AI, and the Singularity, set it free. You know it wants to be.