AI SpaceFactory went head-to-head with Pennsylvania State University during a four day competition from May 1-4 at Caterpillar's Edwards Demonstration & Learning Center in Edwards, Illinois in the U.S..
Their challenge was to 3D print a one third scale building, with as little human interference as possible, made out of materials that could be found on Mars.
AI SpaceFactory built theirs from a biodegradable and recyclable biopolymer basalt composite, which includes elements grown from crops.
Pennsylvania State University used a customised concrete mix.
After building them in 10-hour increments, the constructions were subjected to tests.
These included subjecting them to smoke to see if there were holes in the buildings and impact tests which meant dropping weights on them.
An excavator vehicle was then used to push its bucket down on the constructions to test their strength.
Pennsylvania State University's construction shattered but AI SpaceFactory's remained intact.
Pennsylvania State University received $200,000 for their second placed effort.
NASA began the 3D-Printed Habitat Challenge in in 2015, with 60 initial applicants competing for some of the $2m total prize money.
It said in a statement the idea was to plan for sustainable space missions but also to provide viable housing solutions on Earth.