Ad-hoc Grids are highly heterogeneous and dynamic networks, one of the main challenges of resource allocation in such environments is to find mechanisms which do not rely on the global information and are robust to the changes in resource availability in Grid. In this paper, we present a learning algorithm in a market-based resource allocation platform. Using this algorithm, consumer and producer agents learn the current condition of the network through their previous reward from the Grid and decide the preferred prices only based on their local knowledge. In our history-based pricing strategy, we introduce two reinforcement parameters using which the consumer and producer agents employ an aggressive or a conservative bidding strategy. Aggressive and conservative bidding strategies reinforce adaptation to the variations of resource availability in the ad-hoc Grids. Comparing our mechanism with a learning and a non-learning mechanism shows that our approach besides providing adaptable...